From d4522cf8fc8e8978e65980d13debe38658903735 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 23 Oct 2017 12:41:36 -0400 Subject: Add to Driver's navigation. Remove redundant load listing under driver's view. Update Readme --- README.md | 5 +---- app/dispatch/templates/dispatch/drivers/detail.html | 14 ++++++++++---- app/dispatch/templates/dispatch/generic_load_listing.html | 4 ++++ app/dispatch/templates/dispatch/nav.html | 1 + 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 371744d..5e03ec1 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,7 @@ Requirements going forward: - * Remove description from paperwork - * When downloading files set the filename header to be the load description - * Change Company to "Customer" + * Drivers will be able to generate a weekly PDF invoice * Change "user" to Vendor on the "Add Load Page" * Auto Fill username when not superuser on add load page * Users must be able to initially create new load objects @@ -22,7 +20,6 @@ Requirements going forward: * Make loads without paperwork blue * Make loads with paperwork green * A way for users to be invited via email - * Company statistics on the "Company Summary" view * Figure out if auditlog timestamps are fucked or not with timezones diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html index c4c19e8..11e07a9 100644 --- a/app/dispatch/templates/dispatch/drivers/detail.html +++ b/app/dispatch/templates/dispatch/drivers/detail.html @@ -5,7 +5,7 @@ {% block content %}
-

Driver Summary for {{ object.first_name }} {{ object.last_name }}

+

Summary for {{ object.first_name }} {{ object.last_name }}

Loads for {{week_dates.start_date|date:"l, F, d"}} to {{week_dates.end_date|date:"l, F, d"}}

@@ -30,6 +30,8 @@ + +
arrow_back Prev @@ -53,10 +55,13 @@
{% endif %} -{% load custom_tags %} -{% listForCommaString "Customer,Amount,Description" as load_headers %} -{% include "dispatch/generic_load_listing.html" %} +{% if request.user.is_superuser %} + {% load custom_tags %} + {% listForCommaString "Customer,Amount,Description" as load_headers %} + {% include "dispatch/generic_load_listing.html" %} +{% endif %} + {% endblock %} diff --git a/app/dispatch/templates/dispatch/generic_load_listing.html b/app/dispatch/templates/dispatch/generic_load_listing.html index 235a371..7fb42f1 100644 --- a/app/dispatch/templates/dispatch/generic_load_listing.html +++ b/app/dispatch/templates/dispatch/generic_load_listing.html @@ -30,7 +30,11 @@ {% for load in loads|keyvalue:date %} {% if "Customer" in load_headers %} + {% if request.user.is_superuser %} {{ load.customer.name }} + {% else %} + {{ load.customer.name }} + {% endif %} {% endif %} {% if "Driver" in load_headers %} {{ load.user.first_name }} {{ load.user.last_name }} diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html index c53a07e..20a2e83 100644 --- a/app/dispatch/templates/dispatch/nav.html +++ b/app/dispatch/templates/dispatch/nav.html @@ -4,6 +4,7 @@
  • Drivers
  • Customers
  • {% else %} +
  • Summary
  • My Account
  • {% endif %}
  • Logout
  • -- cgit v1.2.3