aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--app/dispatch/templates/dispatch/drivers/detail.html14
-rw-r--r--app/dispatch/templates/dispatch/generic_load_listing.html4
-rw-r--r--app/dispatch/templates/dispatch/nav.html1
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 %}
<div class="row">
<div class="col s12">
- <h1>Driver Summary for {{ object.first_name }} {{ object.last_name }}</h1>
+ <h1>Summary for {{ object.first_name }} {{ object.last_name }}</h1>
<h2>Loads for {{week_dates.start_date|date:"l, F, d"}} to {{week_dates.end_date|date:"l, F, d"}}</h2>
</div>
</div>
@@ -30,6 +30,8 @@
</div>
+
+
<div class="row">
<div class="col s6 left-align">
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a>
@@ -53,10 +55,13 @@
</div>
{% 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 %}
+<!--
<div class="row">
<div class="col s6 left-align">
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a>
@@ -65,5 +70,6 @@
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.next_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons right">arrow_forward</i> Next</a>
</div>
</div>
+-->
{% 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 %}
<tr class="green lighten-4">
{% if "Customer" in load_headers %}
+ {% if request.user.is_superuser %}
<td><a href="{% url 'customer_detail' load.customer.id %}">{{ load.customer.name }}</a></td>
+ {% else %}
+ <td>{{ load.customer.name }}</td>
+ {% endif %}
{% endif %}
{% if "Driver" in load_headers %}
<td><a href="{% url 'driver_detail' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td>
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 @@
<li><a href="{% url 'driver_list' %}">Drivers</a></li>
<li><a href="{% url 'customer_list' %}">Customers</a></li>
{% else %}
+ <li><a href="{% url 'driver_detail' request.user.id %}">Summary</a>
<li><a href="{% url 'driver_edit' request.user.id %}">My Account</a></li>
{% endif %}
<li><a href="{% url 'logout' %}">Logout</a></li>