Merge pull request 'User management ui changes' (#52) from frontend into main
Reviewed-on: #52
This commit is contained in:
commit
74993eec94
@ -4673,7 +4673,7 @@ class LeadListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
|
||||
dealer = get_user_type(self.request)
|
||||
qs = models.Lead.objects.filter(dealer=dealer)
|
||||
if query:
|
||||
qs = apply_search_filters(qs, query)
|
||||
qs = apply_search_filters(qs, query)
|
||||
if self.request.is_dealer:
|
||||
return qs
|
||||
staffmember = getattr(self.request.user, "staffmember", None)
|
||||
|
||||
BIN
static/images/logos/users/pexels-eberhardgross-443446.jpg
Normal file
BIN
static/images/logos/users/pexels-eberhardgross-443446.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
@ -8,18 +8,18 @@
|
||||
{% block content %}
|
||||
<section class="pt-5 pb-9">
|
||||
<div class="row">
|
||||
<h2 class="mb-4">{% trans 'User Management' %}</h2>
|
||||
<h2 class="mb-4"><i class="fa-solid fa-people-roof me-1"></i>{% trans 'User Management' %}</h2>
|
||||
<div class="row g-3 justify-content-between mb-4">
|
||||
<div class="col-12">
|
||||
<h3 class="mb-3">{% trans 'Customers' %}</h3>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table table-hover fs-9 mb-0">
|
||||
<table class="table align-items-center table-flush table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('First Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Last Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Email') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" style="width:15%;">{{ _('Status') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase " scope="col" style="width:15%;">{{ _('Status') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" style="width:15%;">{{ _('Created date') }}</th>
|
||||
<th class="sort text-end align-middle pe-0 ps-4" scope="col">{{ _('Actions') }}</th>
|
||||
</tr>
|
||||
@ -51,7 +51,7 @@
|
||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
<a href="{% url 'activate_account' 'customer' customer.slug %}"><button class="dropdown-item">{% trans "Activate" %}</button></a>
|
||||
<a href="{% url 'activate_account' 'customer' customer.slug %}"><button class="dropdown-item text-primary">{% trans "Activate" %}</button></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{% url 'permenant_delete_account' 'customer' customer.slug %}"><button class="dropdown-item text-danger">{% trans "Permenantly Delete" %}</button></a>
|
||||
</div>
|
||||
@ -64,19 +64,26 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end mt-3">
|
||||
<div class="d-flex">
|
||||
{% if is_paginated %}
|
||||
{% include 'partials/pagination.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-12">
|
||||
<h3 class="mb-3">{% trans 'Organizations' %}</h3>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table table-hover fs-9 mb-0">
|
||||
<table class="table align-items-center table-flush table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Arabic Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Email') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" style="width:15%;">{{ _('Status') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase " scope="col" style="width:15%;">{{ _('Status') }}</th>
|
||||
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" style="width:15%;">{{ _('Create date') }}</th>
|
||||
<th class="sort text-end align-middle pe-0 ps-4" scope="col">{{ _('Actions') }}</th>
|
||||
</tr>
|
||||
@ -108,7 +115,7 @@
|
||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
<a href="{% url 'activate_account' 'organization' organization.slug %}"><button class="dropdown-item">{% trans "Activate" %}</button></a>
|
||||
<a href="{% url 'activate_account' 'organization' organization.slug %}"><button class="dropdown-item text-primary">{% trans "Activate" %}</button></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{% url 'permenant_delete_account' 'organization' organization.slug %}"><button class="dropdown-item text-danger">{% trans "Permenantly Delete" %}</button></a>
|
||||
</div>
|
||||
@ -121,15 +128,22 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end mt-3">
|
||||
<div class="d-flex">
|
||||
{% if is_paginated %}
|
||||
{% include 'partials/pagination.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-12">
|
||||
<h3 class="mb-3">{% trans 'Vendors' %}</h3>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table table-hover fs-9 mb-0">
|
||||
<table class="table align-items-center table-flush table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Arabic Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Email') }}</th>
|
||||
@ -165,7 +179,7 @@
|
||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
<a href="{% url 'activate_account' 'vendor' vendor.slug %}"><button class="dropdown-item">{% trans "Activate" %}</button></a>
|
||||
<a href="{% url 'activate_account' 'vendor' vendor.slug %}"><button class="dropdown-item text-primary">{% trans "Activate" %}</button></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{% url 'permenant_delete_account' 'vendor' vendor.slug %}"><button class="dropdown-item text-danger">{% trans "Permenantly Delete" %}</button></a>
|
||||
</div>
|
||||
@ -178,15 +192,22 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end mt-3">
|
||||
<div class="d-flex">
|
||||
{% if is_paginated %}
|
||||
{% include 'partials/pagination.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-12">
|
||||
<h3 class="mb-3">{% trans 'Staff' %}</h3>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table table-hover fs-9 mb-0">
|
||||
<table class="table align-items-center table-flush table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Arabic Name') }}</th>
|
||||
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" style="width:20%;">{{ _('Email') }}</th>
|
||||
@ -222,7 +243,7 @@
|
||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
<a href="{% url 'activate_account' 'staff' obj.slug %}"><button class="dropdown-item">{% trans "Activate" %}</button></a>
|
||||
<a href="{% url 'activate_account' 'staff' obj.slug %}"><button class="dropdown-item text-primary">{% trans "Activate" %}</button></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{% url 'permenant_delete_account' 'staff' obj.slug %}"><button class="dropdown-item text-danger">{% trans "Permenantly Delete" %}</button></a>
|
||||
</div>
|
||||
@ -235,6 +256,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end mt-3">
|
||||
<div class="d-flex">
|
||||
{% if is_paginated %}
|
||||
{% include 'partials/pagination.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-success btn-sm" type="submit">{{ _("Save") }} <i class="fa fa-save"></i></button>
|
||||
<button class="btn btn-primary btn-lg" type="submit"><i class="fa fa-save me-2"></i>{{ _("Save") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@ -4,40 +4,38 @@
|
||||
|
||||
{% block body %}
|
||||
{% block order_header %}
|
||||
<h1>{% trans "List of orders" %}</h1>
|
||||
<h3 class="mt-4"><i class="fa-solid fa-list me-2"></i>{% trans "List of orders" %}</h3>
|
||||
{% endblock %}
|
||||
|
||||
{% if object_list %}
|
||||
{% block pagination_first %}
|
||||
{% include "plans/pagination.html" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block order_table %}
|
||||
<div class="table-responsive">
|
||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||
<div class="table-responsive px-1 scrollbar mt-3">
|
||||
<table class="table align-items-center table-flush">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class="bg-body-highlight">
|
||||
<th>ID</th>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
<th>{% trans 'Created' context 'order created' %}</th>
|
||||
<th>{% trans 'Status' context 'order status' %}</th>
|
||||
<th>{% trans 'Completed' context 'order completed' %}</th>
|
||||
<th>{% trans 'Total' context 'total amount, value' %}</th>
|
||||
<th>{% trans 'Plan valid from' %}</th>
|
||||
<th>{% trans 'Plan valid until' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Name' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Created' context 'order created' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Status' context 'order status' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Completed' context 'order completed' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Total' context 'total amount, value' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Plan valid from' %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'Plan valid until' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order in object_list %}
|
||||
<tr class="{% if order.status == 2 %}success{% elif order.status == 3 %}danger{% elif order.status == 4 %}warning{% elif order.status == 5 %}info{% endif %}">
|
||||
<td><a href="{{ order.get_absolute_url }}">{{ order.pk }}</a></td>
|
||||
<td><a href="{{ order.get_absolute_url }}">{{ order.name }}</a></td>
|
||||
<td class="date">{{ order.created|date }}</td>
|
||||
<td class="status">{{ order.get_status_display }}</td>
|
||||
<td class="date">{{ order.completed|date|default:"-" }}</td>
|
||||
<td class="number">{{ order.total }} {{ CURRENCY }}</td>
|
||||
<td class="date">{{ order.plan_extended_from|date|default:"-" }}</td>
|
||||
<td class="date">{{ order.plan_extended_until|date|default:"-" }}</td>
|
||||
<td class="align-middle product white-space-nowrap"><a href="{{ order.get_absolute_url }}">{{ order.pk }}</a></td>
|
||||
<td class="align-middle product white-space-nowrap"><a href="{{ order.get_absolute_url }}">{{ order.name }}</a></td>
|
||||
<td class="date align-middle product white-space-nowrap">{{ order.created|date }}</td>
|
||||
<td class="status align-middle product white-space-nowrap">{{ order.get_status_display }}</td>
|
||||
<td class="date align-middle product white-space-nowrap">{{ order.completed|date|default:"-" }}</td>
|
||||
<td class="number align-middle product white-space-nowrap">{{ order.total }} {{ CURRENCY }}</td>
|
||||
<td class="date align-middle product white-space-nowrap">{{ order.plan_extended_from|date|default:"-" }}</td>
|
||||
<td class="date align-middle product white-space-nowrap">{{ order.plan_extended_until|date|default:"-" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -52,4 +50,7 @@
|
||||
{% else %}
|
||||
{% blocktrans %}You do not have any orders so far.{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user