aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-11-27 11:16:39 -0500
committerMitch Riedstra <Mitch@riedstra.us>2017-11-27 11:16:39 -0500
commit807c082bc71ed79651533551111b0e3507ae410b (patch)
tree1d320f398a8ad5e9a8ae56c911f5cdc487785b6b /app/dispatch
parentf125be2549e5f4f04c8097b7305be2982ccff063 (diff)
downloaddispatch-tracker-807c082bc71ed79651533551111b0e3507ae410b.tar.gz
dispatch-tracker-807c082bc71ed79651533551111b0e3507ae410b.tar.xz
Keep the current date range when switching to Driver/Customer views
Diffstat (limited to 'app/dispatch')
-rw-r--r--app/dispatch/templates/dispatch/generic_load_listing.html13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/dispatch/templates/dispatch/generic_load_listing.html b/app/dispatch/templates/dispatch/generic_load_listing.html
index 60ed1d2..c7be455 100644
--- a/app/dispatch/templates/dispatch/generic_load_listing.html
+++ b/app/dispatch/templates/dispatch/generic_load_listing.html
@@ -1,5 +1,6 @@
{% load dynamic_key %}
{% for date in loads %}
+
<div class="row">
<div class="col s12 card">
<div class="card-content">
@@ -37,13 +38,21 @@
{% endif %}
{% if "Customer" in load_headers %}
{% if request.user.is_superuser %}
- <td><a href="{% url 'customer_detail' load.customer.id %}">{{ load.customer.name }}</a></td>
+ {% if request.GET.date %}
+ <td><a href="{% url 'customer_detail' load.customer.id %}?date={{request.GET.date}}">{{ load.customer.name }}</a></td>
+ {% else %}
+ <td><a href="{% url 'customer_detail' load.customer.id %}">{{ load.customer.name }}</a></td>
+ {% endif %}
{% else %}
<td>{{ load.customer.name }}</td>
{% endif %}
{% endif %}
{% if "Driver" in load_headers or "Vendor" in load_headers or "Vendor/Driver" in load_headers %}
- <td><a href="{% url 'driver_summary' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td>
+ {% if request.GET.date %}
+ <td><a href="{% url 'driver_summary' load.user.id %}?date={{request.GET.date}}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td>
+ {% else %}
+ <td><a href="{% url 'driver_summary' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td>
+ {% endif %}
{% endif %}
{% if "Amount" in load_headers %}