From cb16790ea8be3dde400aa092808bca3e71c79235 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 19 Dec 2017 15:05:48 -0500 Subject: Misc changes for the video --- app/dispatch/management/commands/insert_fake_data.py | 1 - app/dispatch/templates/dispatch/drivers/summary.html | 8 ++++---- app/dispatch/templates/dispatch/invoice/detail.html | 4 ++++ app/dispatch/templates/dispatch/loads/list.html | 4 ++++ app/dispatch/templates/dispatch/login.html | 1 + app/dispatch/views.py | 1 - 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/dispatch/management/commands/insert_fake_data.py b/app/dispatch/management/commands/insert_fake_data.py index 3800372..6b3f49d 100644 --- a/app/dispatch/management/commands/insert_fake_data.py +++ b/app/dispatch/management/commands/insert_fake_data.py @@ -98,7 +98,6 @@ class Command(BaseCommand): new_load.save() if attachments: - print("yeppers") self.add_attachment(new_load) return new_load diff --git a/app/dispatch/templates/dispatch/drivers/summary.html b/app/dispatch/templates/dispatch/drivers/summary.html index 362c1fa..4c24fc9 100644 --- a/app/dispatch/templates/dispatch/drivers/summary.html +++ b/app/dispatch/templates/dispatch/drivers/summary.html @@ -75,8 +75,8 @@ Number of Loads - Average Load cost - Total Load cost + Average Load amount + Total Load amount @@ -93,8 +93,8 @@
Note:

- Cannot generate an invoice at this time, one or more Loads has an improper - Amount or is missing attachments. + Cannot generate an invoice at this time, one or more loads has an improper + amount or is missing attachments.

diff --git a/app/dispatch/templates/dispatch/invoice/detail.html b/app/dispatch/templates/dispatch/invoice/detail.html index c66e545..d48a14b 100644 --- a/app/dispatch/templates/dispatch/invoice/detail.html +++ b/app/dispatch/templates/dispatch/invoice/detail.html @@ -13,7 +13,9 @@ {% csrf_token %} Delete + {% if request.user.is_superuser %} Edit + {% endif %} Print @@ -36,7 +38,9 @@ {% csrf_token %} Delete + {% if request.user.is_superuser %} Edit + {% endif %} Print diff --git a/app/dispatch/templates/dispatch/loads/list.html b/app/dispatch/templates/dispatch/loads/list.html index e615432..7171fe1 100644 --- a/app/dispatch/templates/dispatch/loads/list.html +++ b/app/dispatch/templates/dispatch/loads/list.html @@ -24,7 +24,11 @@ {% load custom_tags %} +{% if request.user.is_superuser %} {% listForCommaString "Customer,Vendor,Amount,Description,Attachments" as load_headers %} +{% else %} +{% listForCommaString "Customer,Amount,Description,Attachments" as load_headers %} +{% endif %} {% include "dispatch/generic_load_listing.html" %}
diff --git a/app/dispatch/templates/dispatch/login.html b/app/dispatch/templates/dispatch/login.html index 2b5d48b..0f5e1b1 100644 --- a/app/dispatch/templates/dispatch/login.html +++ b/app/dispatch/templates/dispatch/login.html @@ -51,6 +51,7 @@
+ If you do not already have an account, register here diff --git a/app/dispatch/views.py b/app/dispatch/views.py index 784da9e..2ca9d22 100644 --- a/app/dispatch/views.py +++ b/app/dispatch/views.py @@ -475,7 +475,6 @@ class IdentityDetail(DetailView): def SetDefaultIdentity(request, user_id, pk): if request.user.is_superuser: - print("WORKS") ident = Identity.objects.get(pk=pk) ident.set_default() return redirect(reverse('driver_details', kwargs={'pk': user_id})) -- cgit v1.2.3