diff --git a/inventory/management/commands/seed.py b/inventory/management/commands/seed.py index 1b5a785e..14f97f88 100644 --- a/inventory/management/commands/seed.py +++ b/inventory/management/commands/seed.py @@ -20,7 +20,7 @@ class Command(BaseCommand): count = opts['count'] client = Client() # lives inside management command - for n in range(5, 7): + for n in range(6, 9): self.stdout.write(f"🚗 Seeding dealer #{n}") self._create_dealer(client, n) # self._create_cars(client, n) diff --git a/inventory/models.py b/inventory/models.py index 99b67cc1..6009cdca 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -1184,7 +1184,7 @@ class Dealer(models.Model, LocalizedNameMixin): blank=True, null=True, verbose_name=_("Logo"), - default="user-logo.png", + default="images/default-user-image/dealer.png", ) thumbnail = ImageSpecField( source="logo", @@ -1288,7 +1288,7 @@ class Staff(models.Model, LocalizedNameMixin): max_length=200, blank=True, null=True, verbose_name=_("Address") ) logo = models.ImageField( - upload_to="logos/staff", blank=True, null=True, verbose_name=_("Image"),default="user-logo.jpg" + upload_to="logos/staff", blank=True, null=True, verbose_name=_("Image"),default="images/default-user-image/staff.png" ) thumbnail = ImageSpecField( source="logo", @@ -1511,7 +1511,7 @@ class Customer(models.Model): ) active = models.BooleanField(default=True, verbose_name=_("Active")) image = models.ImageField( - upload_to="customers/", blank=True, null=True, verbose_name=_("Image") + upload_to="customers/", blank=True, null=True, verbose_name=_("Image"),default="images/default-user-image/customer-logo.png", ) thumbnail = ImageSpecField( source="image", @@ -2481,7 +2481,7 @@ class Vendor(models.Model, LocalizedNameMixin): email = models.EmailField(max_length=255, verbose_name=_("Email Address")) address = models.CharField(max_length=200, verbose_name=_("Address")) logo = models.ImageField( - upload_to="logos/vendors", blank=True, null=True, verbose_name=_("Logo"),default="user-logo.jpg" + upload_to="logos/vendors", blank=True, null=True, verbose_name=_("Logo"),default="images/default-user-image/vendor.png" ) thumbnail = ImageSpecField( source="logo", diff --git a/inventory/views.py b/inventory/views.py index dac11229..de32d0a1 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -6125,7 +6125,7 @@ def lead_tracking(request, dealer_slug): qs = models.Lead.objects.filter(dealer=dealer, staff=staff) else: qs = models.Lead.objects.filter(dealer=dealer) - + leads=qs won = qs.filter(status="won") new = qs.filter(status="new") lose = qs.filter(status="lose") @@ -6138,6 +6138,7 @@ def lead_tracking(request, dealer_slug): "won": won, "lose": lose, "negotiation": negotiation, + "leads":leads } return render(request, "crm/leads/lead_tracking.html", context) diff --git a/static/images/default-user-image/customer-logo.png b/static/images/default-user-image/customer-logo.png new file mode 100644 index 00000000..177e8dff Binary files /dev/null and b/static/images/default-user-image/customer-logo.png differ diff --git a/static/images/default-user-image/dealer.png b/static/images/default-user-image/dealer.png new file mode 100644 index 00000000..7127aa86 Binary files /dev/null and b/static/images/default-user-image/dealer.png differ diff --git a/static/images/default-user-image/staff.png b/static/images/default-user-image/staff.png new file mode 100644 index 00000000..167ab34d Binary files /dev/null and b/static/images/default-user-image/staff.png differ diff --git a/static/images/default-user-image/vendor.png b/static/images/default-user-image/vendor.png new file mode 100644 index 00000000..9f98dc1c Binary files /dev/null and b/static/images/default-user-image/vendor.png differ diff --git a/templates/account/login.html b/templates/account/login.html index 03ea4fdc..0c82f862 100644 --- a/templates/account/login.html +++ b/templates/account/login.html @@ -6,9 +6,10 @@ {% trans "Sign In" %} {% endblock head_title %} {% block content %} -
-
-
-
+ {% include 'footer.html' %} -
+ {% endblock content %} {% block customJS %} diff --git a/templates/crm/leads/lead_tracking.html b/templates/crm/leads/lead_tracking.html index 54d62cf9..bc93cb84 100644 --- a/templates/crm/leads/lead_tracking.html +++ b/templates/crm/leads/lead_tracking.html @@ -65,6 +65,8 @@ {% endblock customCSS %} {% block content %} + +{% if leads %}
@@ -168,13 +170,14 @@ {% endfor %}
- {% if not new and not follow_up and not negotiation %} - {% url 'lead_create' request.dealer.slug as create_lead_url %} - {% include "empty-illustration-page.html" with value="lead" url=create_lead_url %} - {% endif %} +
+ {% else %} + {% url 'lead_create' request.dealer.slug as create_lead_url %} + {% include "empty-illustration-page.html" with value="lead" url=create_lead_url %} + {% endif %} {% endblock %} diff --git a/templates/empty-illustration-page.html b/templates/empty-illustration-page.html index 5ba17427..d185b106 100644 --- a/templates/empty-illustration-page.html +++ b/templates/empty-illustration-page.html @@ -42,16 +42,19 @@ No-empty-state-image -

{% trans "No" %} {{ _(value|capfirst) }} {% trans "Yet" %}

+

+ {% blocktrans %}No {{ value}} Yet{% endblocktrans %} +

- {% trans "It looks like you haven't added any {{ value }} to your account. - Click the button below to get started and add your first {{ value }}!" %} + {% blocktrans %}It looks like you haven't added any {{ value }} to your account. + Click the button below to get started and add your first {{ value }}!{% endblocktrans %}

- {% trans "Create New " %}{{ _(value|capfirst) }} + + {% blocktrans %}Create New {{value}}{% endblocktrans %} diff --git a/templates/inventory/inventory_stats.html b/templates/inventory/inventory_stats.html index aa9d07ab..892ce9ea 100644 --- a/templates/inventory/inventory_stats.html +++ b/templates/inventory/inventory_stats.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -{% if inventory %} +{% if inventory.total_cars > 0 %}
diff --git a/templates/ledger/bills/bill_list.html b/templates/ledger/bills/bill_list.html index 7b8d8fb5..c3041657 100644 --- a/templates/ledger/bills/bill_list.html +++ b/templates/ledger/bills/bill_list.html @@ -90,7 +90,7 @@ {% else %} - {% url "bill-create" request.dealer.slug as create_bill_url %} + {% url "bill-create" request.dealer.slug request.entity.slug as create_bill_url %} {% include "empty-illustration-page.html" with value="bill" url=create_bill_url %} {% endif %} {% endblock %} diff --git a/templates/ledger/ledger/ledger_list.html b/templates/ledger/ledger/ledger_list.html index bfeb7123..ff655496 100644 --- a/templates/ledger/ledger/ledger_list.html +++ b/templates/ledger/ledger/ledger_list.html @@ -131,7 +131,7 @@
{% else %} - {% url 'ledger_create' request.dealer.slug as create_ledger_url %} + {% url 'ledger_create' request.dealer.slug request.entity.slug as create_ledger_url %} {% include "empty-illustration-page.html" with value="ledger" url=create_ledger_url %} {% endif %} {% endblock %} diff --git a/templates/sales/estimates/estimate_list.html b/templates/sales/estimates/estimate_list.html index 7e4d692b..adb0bd5e 100644 --- a/templates/sales/estimates/estimate_list.html +++ b/templates/sales/estimates/estimate_list.html @@ -79,7 +79,7 @@ {% else %} {% url "estimate_create" request.dealer.slug as create_estimate_url %} - {% include "empty-illustration-page.html" with value="customer" url=create_estimate_url %} + {% include "empty-illustration-page.html" with value="estimate" url=create_estimate_url %} {% endif %} {% endblock %} diff --git a/templates/users/user_list.html b/templates/users/user_list.html index 9cc05118..a8ec7747 100644 --- a/templates/users/user_list.html +++ b/templates/users/user_list.html @@ -91,8 +91,28 @@ {% else %} - {% url "user_create" request.dealer.slug as create_staff_url %} - {% include "empty-illustration-page.html" with value="staff" url=create_staff_url %} + + {% if request.user.userplan %} + {% url "user_create" request.dealer.slug as create_staff_url %} + {% include "empty-illustration-page.html" with value="staff" url=create_staff_url %} + + {% else %} + + {% endif %} {% endif %} + + + {% endblock %} diff --git a/templates/welcome_base.html b/templates/welcome_base.html index 2c3dc611..e5cd4464 100644 --- a/templates/welcome_base.html +++ b/templates/welcome_base.html @@ -2,11 +2,11 @@ {% get_current_language as LANGUAGE_CODE %} @@ -78,6 +78,9 @@ {% include 'welcome_header.html' %} {% block content %} {% endblock content %} + + + {% comment %}