diff --git a/dbtest.sqlite3 b/dbtest.sqlite3 deleted file mode 100644 index 43278622..00000000 Binary files a/dbtest.sqlite3 and /dev/null differ diff --git a/inventory/views.py b/inventory/views.py index 57e6a1b0..ad7b2b0e 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -297,7 +297,7 @@ def dealer_signup(request): :rtype: Union[django.http.HttpResponse, django.http.JsonResponse] """ if request.method == "POST": - + data = json.loads(request.body) email = data.get("email") @@ -4238,6 +4238,18 @@ def sales_list_view(request, dealer_slug): qs = models.ExtraInfo.get_sale_orders(staff=staff) except Exception as e: print(e) + print(qs[0]) + # query = request.GET.get('q') + # # if query: + # # qs = qs.filter( + # # Q(order_number__icontains=query) | + # # Q(customer__name__icontains=query) | + # # Q(item_details__icontains=query) + + # # ).distinct() + # for so in qs: + # if query in so.customer_customer + paginator = Paginator(qs, 30) page_number = request.GET.get("page") @@ -4325,6 +4337,7 @@ class EstimateListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): related_content_type=ContentType.objects.get_for_model(models.Staff), related_object_id=staff.pk, ) + context["staff_estimates"] = qs return context def get_queryset(self): @@ -4332,8 +4345,17 @@ class EstimateListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): entity = dealer.entity status = self.request.GET.get("status") queryset = entity.get_estimates() + if status: queryset = queryset.filter(status=status) + # search_query = self.request.GET.get('q', '').strip() + # if search_query: + # queryset = queryset.filter( + # Q(quotation_number__icontains=search_query) | + # Q(customer__name__icontains=search_query) + + # ).distinct() # + return queryset diff --git a/templates/account/login.html b/templates/account/login.html index 8a394e09..b945c623 100644 --- a/templates/account/login.html +++ b/templates/account/login.html @@ -6,7 +6,7 @@ {% trans "Sign In" %} {% endblock head_title %} {% block content %} -
+
@@ -22,20 +22,20 @@

{% trans "Sign In" %}

{% if not SOCIALACCOUNT_ONLY %} -
-
+ + {% csrf_token %} -
+
- +
-
+
- +
@@ -63,7 +63,7 @@
{% include 'footer.html' %}
- + {% if LOGIN_BY_CODE_ENABLED or PASSKEY_LOGIN_ENABLED %}
{% element button_group vertical=True %} diff --git a/templates/account/signup-wizard.html b/templates/account/signup-wizard.html index 1d204109..959d5e1d 100644 --- a/templates/account/signup-wizard.html +++ b/templates/account/signup-wizard.html @@ -4,8 +4,9 @@ {% block content %} +
-
+
{% endcomment %} + + + + + {% endblock %} diff --git a/templates/admin_management/permenant_delete_account.html b/templates/admin_management/permenant_delete_account.html index 22d05df8..3bc83a78 100644 --- a/templates/admin_management/permenant_delete_account.html +++ b/templates/admin_management/permenant_delete_account.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} - +{% load i18n %} {% block content %} -
+ {% comment %}

Delete Account

Are you sure you want to delete this account "{{ obj.email }}"? This will delete all associated information for this user.

@@ -13,6 +13,39 @@
-
+
{% endcomment %} + + + +
+ +
+
+
+

+ {% trans 'Delete Account'%} +

+
+
+

Are you sure you want to delete this account "{{ obj.email }}"? This will delete all associated information for this user.

+ +
+ {% csrf_token %} +
+
+ + Cancel +
+
+ + + +
+
+ +
+ +
+ {% endblock %} diff --git a/templates/csv_upload.html b/templates/csv_upload.html index 6e223e67..6b3abc1e 100644 --- a/templates/csv_upload.html +++ b/templates/csv_upload.html @@ -73,7 +73,7 @@ {% block content %}
-

Upload Cars CSV

+

Upload Cars CSV

Download Sample CSV diff --git a/templates/dealers/dealer_form.html b/templates/dealers/dealer_form.html index 54a0dcc1..d82a4ab0 100644 --- a/templates/dealers/dealer_form.html +++ b/templates/dealers/dealer_form.html @@ -5,10 +5,9 @@ {% block title %}{{ _("Update Dealer Information") }}{% endblock title %} {% block content %} -
+ {% comment %}
-

{{ _("Update Dealer Information") }}

@@ -24,5 +23,36 @@
-
+
{% endcomment %} + + +
+ {% endblock %} \ No newline at end of file diff --git a/templates/groups/group_form.html b/templates/groups/group_form.html index e8716e7f..3acc1bc7 100644 --- a/templates/groups/group_form.html +++ b/templates/groups/group_form.html @@ -13,7 +13,7 @@ {% block content %} -
+ {% comment %}
@@ -48,5 +48,45 @@
-
+
{% endcomment %} + + +
+ +
+
+
+

+ {% if staff.created %} + {{ _("Edit Group") }} + {% else %} + {{ _("Add Group") }} + {% endif %} +

+
+
+ +
+ {% csrf_token %} + {{ redirect_field }} + {{ form|crispy }} + {% for error in form.errors %} +
{{ error }}
+ {% endfor %} + +
+
+ + {% trans "Cancel" %} +
+
+ + +
+
+ +
+ +
+ {% endblock %} \ No newline at end of file diff --git a/templates/inventory/car_edit.html b/templates/inventory/car_edit.html index 0b3cc119..e4e7d728 100644 --- a/templates/inventory/car_edit.html +++ b/templates/inventory/car_edit.html @@ -6,7 +6,7 @@ {% trans 'Edit Car' %} {% endblock %} {% block content %} -
+ {% comment %}

{% trans 'Edit Car' %}

@@ -20,5 +20,38 @@
-
+
{% endcomment %} + + + +
+ +
+
+
+

+ {% trans 'Edit Car' %} +

+
+
+ +
+ {% csrf_token %} {{ form|crispy }} + +
+
+ + {% trans "Cancel" %} +
+
+ + +
+
+ +
+ +
+ + {% endblock %} diff --git a/templates/inventory/car_finance_form.html b/templates/inventory/car_finance_form.html index 1a87cf18..8b727dc2 100644 --- a/templates/inventory/car_finance_form.html +++ b/templates/inventory/car_finance_form.html @@ -6,7 +6,7 @@ {% trans "Car Finance Details" %} {% endblock %} {% block content %} -
+ {% comment %}

{% trans "Finance Details for" %} {{ car.id_car_make.get_local_name }} - {{ car.id_car_model.get_local_name }} @@ -38,6 +38,56 @@ {% trans "Cancel" %}

-
+
{% endcomment %} + + + + +
+ +
+
+
+

+ {% trans "Finance Details for" %}{{ car.id_car_make.get_local_name }} - {{ car.id_car_model.get_local_name }} +

+ {% if form.errors %} +
+
    + {% for field in form %} + {% for error in field.errors %}
  • {{ field.label }}: {{ error }}
  • {% endfor %} + {% endfor %} + {% for error in form.non_field_errors %}
  • {{ error }}
  • {% endfor %} +
+
+ {% endif %} +
+
+ +
+
+
+ {% csrf_token %} + {{ form|crispy }} +
+
+ +
+
+ + {% trans "Cancel" %} +
+
+ + + +
+
+ +
+ +
+ + {% endblock %} diff --git a/templates/plans/billing_info_create_or_update.html b/templates/plans/billing_info_create_or_update.html index a0b01280..0108105d 100644 --- a/templates/plans/billing_info_create_or_update.html +++ b/templates/plans/billing_info_create_or_update.html @@ -3,11 +3,11 @@ {%block title%} {% trans 'Billing Information'%}{%endblock%} {% block content %} -
+ {% comment %}
- {% comment %} {% trans "Provide billing data"|upper %} {% endcomment %} +

{% trans "Provide billing data"|upper %}

{% csrf_token %} {{ form|crispy }} @@ -21,5 +21,44 @@
-
+
{% endcomment %} + + + +
+ +
+
+
+

+ {% trans "Provide billing data"|upper %} +

+
+
+ + +
+ {% csrf_token %} + {{ form|crispy }} + +
+
+ + {% if object %} + {{ _("Delete") }} + {% endif %} + +
+ +
+ + + +
+
+ +
+ +
+ {% endblock %} diff --git a/templates/pricing_page.html b/templates/pricing_page.html index 78a9a0de..2118076a 100644 --- a/templates/pricing_page.html +++ b/templates/pricing_page.html @@ -45,11 +45,15 @@ .form-label { font-weight: 500; } + #pricing_container{ + max-width:60rem; + + } {% endblock customCSS %} {% block content %} -
+

{{ _("Choose Your Plan")}}

{% csrf_token %} @@ -200,10 +204,14 @@
+
- 4. {{ _("Confirm Your Information")}} +

+ 4. {{ _("Confirm Your Information")}} +

-
+ +
{{ _("Order Summary")}}
{{ _("Plan") }}:
{{ _("Price") }}:
diff --git a/templates/sales/estimates/estimate_list.html b/templates/sales/estimates/estimate_list.html index 42f6227e..6bdeb04c 100644 --- a/templates/sales/estimates/estimate_list.html +++ b/templates/sales/estimates/estimate_list.html @@ -4,8 +4,20 @@ {% block title %}{{ _("Quotations") }}{% endblock title %} {% block content %} -
-

{% trans "Quotations" %}

+
+ +
+
+
+

{% trans "Quotations" %}

+
+
+
+
+ {% include 'partials/search_box.html' %} +
+
+
diff --git a/templates/sales/invoices/invoice_list.html b/templates/sales/invoices/invoice_list.html index 73e937a9..7b68e5eb 100644 --- a/templates/sales/invoices/invoice_list.html +++ b/templates/sales/invoices/invoice_list.html @@ -5,8 +5,19 @@ {% block content %}
-

{% trans "Invoices" %}

- + +
+
+
+

{% trans "Invoices" %}

+
+
+
+
+ {% include 'partials/search_box.html' %} +
+
+
diff --git a/templates/sales/sales_list.html b/templates/sales/sales_list.html index 1f3c978a..3561c1fa 100644 --- a/templates/sales/sales_list.html +++ b/templates/sales/sales_list.html @@ -3,117 +3,34 @@ {% load custom_filters %} {%block title%} {%trans 'Sales'%} {%endblock%} -{% block customCSS %} - -{% endblock customCSS %} - {% block content %} -
-
-
-
- {% comment %} {% endcomment %} +
+
+ +
+
+
+

{% trans 'Sale Orders' %}

+
-
-
-
Loading...
- +
+
+ {% include 'partials/search_box.html' %}
-
- - - - - -
-
-
-
-
-
- -
+
+
- - - - - - - - + + + + + @@ -170,20 +87,7 @@

{% endif %} - - - -
+ {{ _("Customer Name")}}{{ _("Customer Address")}}{{ _("Customer Phone")}}{{ _("Quotation") }}{{ _("Invoice") }}{{ _("Status") }}{{ _("Staff Member") }}{{ _("Customer Address")}}{{ _("Customer Phone")}}{{ _("Quotation") }}{{ _("Invoice") }}
- {% if car.status == "available" %} - {{car.status}} - {% elif car.status == "reserved" %} - {{car.status}} - {% elif car.status == "sold" %} - {{car.status}} - {% elif car.status == "transfer" %} - {{car.status}} - {% endif %} - +
-
-
-
-
- {% if is_paginated %} - {% include 'partials/pagination.html' %} - {% endif %} -
-
+
+ {% if page_obj.paginator.num_pages > 1 %} + +
+ +
+ {% include 'partials/pagination.html'%} +
+ +
+ {% endif %}
-
- +
{% endblock %} - -{% block customJS %} - -{% endblock customJS %} \ No newline at end of file diff --git a/templates/users/user_form.html b/templates/users/user_form.html index 89bb78c1..18c66d6e 100644 --- a/templates/users/user_form.html +++ b/templates/users/user_form.html @@ -13,7 +13,7 @@ {% block content %} -
+ {% comment %}
@@ -55,6 +55,54 @@
-
+
{% endcomment %} + + + +
+ +
+
+
+

+ + {% if staff.created %} + {{ _("Edit Staff") }} + {% else %} + {{ _("Add Staff") }} + {% endif %} +

+
+
+
+ {% csrf_token %} + {{ redirect_field }} + {{ form.name|as_crispy_field }} + {{ form.arabic_name|as_crispy_field }} + {{ form.email|as_crispy_field }} + {{ form.phone_number|as_crispy_field }} + {{ form.address|as_crispy_field }} + {{ form.image|as_crispy_field }} + {{ form.group|as_crispy_field }} + {% for error in form.errors %} +
{{ error }}
+ {% endfor %} + +
+
+ + {% trans "Cancel" %} +
+
+ + + +
+
+ +
+ +
+ {% endblock %}