Compare commits
5 Commits
966633fe3b
...
c87a22b103
| Author | SHA1 | Date | |
|---|---|---|---|
| c87a22b103 | |||
| 3ea7c4bb51 | |||
| 73f29cde9a | |||
| f670015e39 | |||
| 11a120879e |
@ -127,17 +127,17 @@ class StaffForm(forms.ModelForm):
|
||||
queryset=Service.objects.all(),
|
||||
required=False,
|
||||
)
|
||||
phone_number = SaudiPhoneNumberField(
|
||||
required=False,
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
"class": "form-control",
|
||||
"placeholder": _("Phone Number"),
|
||||
"id": "phone",
|
||||
}
|
||||
),
|
||||
label=_("Phone Number"),
|
||||
)
|
||||
# phone_number = SaudiPhoneNumberField(
|
||||
# required=False,
|
||||
# widget=forms.TextInput(
|
||||
# attrs={
|
||||
# "class": "form-control",
|
||||
# "placeholder": _("Phone Number"),
|
||||
# "id": "phone",
|
||||
# }
|
||||
# ),
|
||||
# label=_("Phone Number"),
|
||||
# )
|
||||
group = forms.ModelMultipleChoiceField(
|
||||
label=_("Group"),
|
||||
widget=forms.CheckboxSelectMultiple(attrs={"class": "form-check-input"}),
|
||||
|
||||
@ -1467,7 +1467,7 @@ class Staff(models.Model):
|
||||
first_name = models.CharField(max_length=255, verbose_name=_("First Name"))
|
||||
last_name = models.CharField(max_length=255, verbose_name=_("Last Name"))
|
||||
|
||||
arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"))
|
||||
arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"),null=True,blank=True)
|
||||
phone_number = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_("Phone Number"),
|
||||
|
||||
@ -10,8 +10,8 @@ urlpatterns = [
|
||||
# main URLs
|
||||
path("", views.WelcomeView, name="welcome"),
|
||||
path("signup/", views.dealer_signup, name="account_signup"),
|
||||
path("", views.HomeView.as_view(), name="home"),
|
||||
path("<slug:dealer_slug>/", views.HomeView.as_view(), name="home"),
|
||||
path("", views.HomeView, name="home"),
|
||||
path("<slug:dealer_slug>/", views.HomeView, name="home"),
|
||||
# Tasks
|
||||
path("legal/", views.terms_and_privacy, name="terms_and_privacy"),
|
||||
# path('tasks/<int:task_id>/detail/', views.task_detail, name='task_detail'),
|
||||
@ -130,7 +130,7 @@ urlpatterns = [
|
||||
),
|
||||
path(
|
||||
"<slug:dealer_slug>/crm/leads/<slug:slug>/update/",
|
||||
views.LeadUpdateView.as_view(),
|
||||
views.lead_update,
|
||||
name="lead_update",
|
||||
),
|
||||
path(
|
||||
|
||||
23011
inventory/views.py
23011
inventory/views.py
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 429 KiB |
@ -8,13 +8,13 @@
|
||||
<div class="main-content flex-grow-1 container-fluid mt-4 mb-3">
|
||||
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center mb-5 pb-3 border-bottom">
|
||||
<h2 class="h3 fw-bold mb-3 mb-md-0">
|
||||
{% if request.is_dealer or request.is_manager%}
|
||||
{% if request.is_dealer %}
|
||||
{% trans "Business Health Dashboard" %}
|
||||
{% endif %}
|
||||
{% if request.is_inventory and not request.is_manager and not request.is_dealer %}
|
||||
{% elif request.is_manger %}
|
||||
{% trans "Manager Dashboard" %}
|
||||
{% elif request.is_inventory %}
|
||||
{% trans "Inventory Dashboard" %}
|
||||
{% endif %}
|
||||
{% if request.is_accountant and not request.is_manager and not request.is_dealer %}
|
||||
{% else %}
|
||||
{% trans "Accountant Dashboard" %}
|
||||
{% endif %}
|
||||
<i class="fas fa-chart-area text-primary ms-2"></i>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
hx-swap="outerHTML"
|
||||
hx-select-oob="#toast-container"
|
||||
hx-indicator="#spinner">
|
||||
|
||||
<li class="nav-item">
|
||||
{% comment %} <p class="navbar-vertical-label text-primary fs-8 text-truncate">{{request.dealer|default:"Apps"}}</p>
|
||||
<hr class="navbar-vertical-line"> {% endcomment %}
|
||||
@ -439,27 +440,23 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'ticket_list' request.dealer.slug %}">
|
||||
<div class="d-flex align-items-center">
|
||||
{% if user.is_authenticated %}
|
||||
|
||||
<span class="nav-link-icon"><span class="fa-solid fa-car"></span></span>
|
||||
<span class="nav-link-text">{{ request.dealer.user.username }}</span>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-vertical-footer">
|
||||
<button class="btn navbar-vertical-toggle border-0 fw-semibold w-100 white-space-nowrap d-flex align-items-center">
|
||||
<span class="fas fa-angle-double-left fs-8"></span><span class="fas fa-angle-double-right fs-8"></span><span class="navbar-vertical-footer-text ms-2">Collapsed View</span>
|
||||
</button>
|
||||
<a class="nav-link ps-2" href="{% if request.is_dealer%}{% url 'ticket_list' request.dealer.slug %} {% else %}#{%endif%}">
|
||||
<div class="d-flex align-items-center">
|
||||
{% if user.is_authenticated%}
|
||||
|
||||
<span class="nav-link-icon"><span class="fa-solid fa-gear me-1 fs-5"></span></span>
|
||||
<span class="nav-link-text">{{ request.dealer.user.username }}</span>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<nav class="navbar navbar-top fixed-top navbar-expand" id="navbarDefault">
|
||||
|
||||
@ -1,23 +1,25 @@
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n static custom_filters django_ledger %}
|
||||
|
||||
{% block content %}
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.is_sales and not request.is_manager and not request.is_dealer %}
|
||||
{% url 'sales_dashboard' request.dealer.slug as dashboard_url %}
|
||||
{% else %}
|
||||
{% url 'general_dashboard' request.dealer.slug as dashboard_url %}
|
||||
{% endif %}
|
||||
<div id="dashboard-content"
|
||||
hx-get="{{ dashboard_url }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#dashboard-content"
|
||||
hx-swap="innerHTML">
|
||||
<div class="spinner-container">
|
||||
<div class="spinner"></div>
|
||||
<p>Loading dashboard...</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% comment %} {% extends 'base.html' %}
|
||||
{% load i18n static custom_filters django_ledger %}
|
||||
|
||||
{% block content %}
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.is_sales and not request.is_manager and not request.is_dealer %}
|
||||
{% url 'sales_dashboard' request.dealer.slug as dashboard_url %}
|
||||
{% else %}
|
||||
{% url 'general_dashboard' request.dealer.slug as dashboard_url %}
|
||||
{% endif %}
|
||||
<div id="dashboard-content"
|
||||
hx-get="{{ dashboard_url }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#dashboard-content"
|
||||
hx-swap="innerHTML">
|
||||
<div class="spinner-container">
|
||||
<div class="spinner"></div>
|
||||
<p>Loading dashboard...</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %} {% endcomment %}
|
||||
@ -26,7 +26,16 @@
|
||||
<form class="needs-validation" method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
{{ redirect_field }}
|
||||
{{ form|crispy }}
|
||||
|
||||
{{ form.first_name|as_crispy_field }}
|
||||
{{ form.last_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.logo|as_crispy_field }}
|
||||
{{ form.group|as_crispy_field }}
|
||||
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger mt-4" role="alert">
|
||||
<h4 class="alert-heading small">{% trans "Please correct the following errors:" %}</h4>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user