From 0be25b7fed14e59ebb7ac52930a8284535eb4276 Mon Sep 17 00:00:00 2001 From: Kyle Blanker Date: Wed, 13 Sep 2017 14:04:47 -0400 Subject: Setup driver, company details to show loads, loads list now shows per week as well --- app/dispatch/templates/dispatch/base.html | 19 ++++- .../templates/dispatch/companies/detail.html | 57 ++++++++++++++- .../templates/dispatch/companies/list.html | 2 +- .../templates/dispatch/drivers/detail.html | 63 ++++++++++++++++ app/dispatch/templates/dispatch/drivers/edit.html | 15 ++++ app/dispatch/templates/dispatch/drivers/list.html | 34 +++++++++ app/dispatch/templates/dispatch/loads/list.html | 85 ++++++++++++++-------- 7 files changed, 240 insertions(+), 35 deletions(-) create mode 100644 app/dispatch/templates/dispatch/drivers/detail.html create mode 100644 app/dispatch/templates/dispatch/drivers/edit.html create mode 100644 app/dispatch/templates/dispatch/drivers/list.html (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/base.html b/app/dispatch/templates/dispatch/base.html index 37c8830..de28d7a 100644 --- a/app/dispatch/templates/dispatch/base.html +++ b/app/dispatch/templates/dispatch/base.html @@ -17,9 +17,16 @@ font-size: 2rem; margin: 0; } + h2 { + font-size: 1.75rem; + + } main { padding: 16px; } + .helptext{ + display: none; + } @@ -28,7 +35,7 @@ + +
+ + +
+ +{% load dynamic_key %} +{% for date in loads %} +
+
+
+ {{date}} + + + + + + + + + {% for load in loads|keyvalue:date %} + + + + + + {% empty %} + + {% endfor %} + +
DriverAmount
{{ load.user.first_name }} {{ load.user.last_name }}{{ load.amount }} + Edit + View +
No load.
+
+
+
+{% endfor %} + +
+ + +
+ {% endblock %} diff --git a/app/dispatch/templates/dispatch/companies/list.html b/app/dispatch/templates/dispatch/companies/list.html index 48612d9..9399276 100644 --- a/app/dispatch/templates/dispatch/companies/list.html +++ b/app/dispatch/templates/dispatch/companies/list.html @@ -10,7 +10,7 @@ Add Company - +
diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html new file mode 100644 index 0000000..598d01e --- /dev/null +++ b/app/dispatch/templates/dispatch/drivers/detail.html @@ -0,0 +1,63 @@ +{% extends 'dispatch/base.html' %} + + +{% block content %} +
+
+

Driver: {{ object.first_name }} {{ object.last_name }}

+

Loads for {{start_date}} - {{end_date}}

+
+
+ +
+ + +
+ +{% load dynamic_key %} +{% for date in loads %} +
+
+
+ {{date}} +
Name
+ + + + + + + + {% for load in loads|keyvalue:date %} + + + + + + {% empty %} + + {% endfor %} + +
CompanyAmount
{{ load.company.name }}{{ load.amount }} + Edit + View +
No load.
+ + + +{% endfor %} + +
+ + +
+ +{% endblock %} diff --git a/app/dispatch/templates/dispatch/drivers/edit.html b/app/dispatch/templates/dispatch/drivers/edit.html new file mode 100644 index 0000000..fe8460d --- /dev/null +++ b/app/dispatch/templates/dispatch/drivers/edit.html @@ -0,0 +1,15 @@ +{% extends 'dispatch/base.html' %} + + +{% block content %} +
+
+

{{object.name}}

+
+
+ +
{% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} diff --git a/app/dispatch/templates/dispatch/drivers/list.html b/app/dispatch/templates/dispatch/drivers/list.html new file mode 100644 index 0000000..efc6141 --- /dev/null +++ b/app/dispatch/templates/dispatch/drivers/list.html @@ -0,0 +1,34 @@ +{% extends 'dispatch/base.html' %} + + +{% block content %} +
+
+

Drivers

+
+
+ + + + + + + + + + {% for driver in object_list %} + + + + + + + {% empty %} + + {% endfor %} + +
First NameLast NameEmail
{{ driver.first_name }}{{ driver.last_name }}{{ driver.email }} + Edit + View +
No drivers yet.
+{% endblock %} diff --git a/app/dispatch/templates/dispatch/loads/list.html b/app/dispatch/templates/dispatch/loads/list.html index 8129907..d4caf71 100644 --- a/app/dispatch/templates/dispatch/loads/list.html +++ b/app/dispatch/templates/dispatch/loads/list.html @@ -2,42 +2,65 @@ {% block content %} +
-

Loads

+

Loads for {{start_date}} - {{end_date}}

- - - - {% if user.is_superuser %} - - {% endif %} - - - - - - - {% for load in object_list %} - - {% if user.is_superuser %} - - {% endif %} - - - - - - {% empty %} - - {% endfor %} - -
DriverDateCompanyAmount
{{ load.user.first_name }} {{ load.user.last_name }}{{ load.date }}{{ load.company.name }}{{ load.amount }} - Edit - View -
No loads yet.
+
+ + +
+{% load dynamic_key %} +{% for date in loads %} +
+
+
+ {{date}} + + + + + + + + + + + {% for load in loads|keyvalue:date %} + + + + + + + + {% empty %} + + {% endfor %} + +
DriverCompanyLoad NumberAmount
{{ load.user.first_name }} {{ load.user.last_name }}{{ load.company.name }}{{ load.load_number }}{{ load.amount }} + Edit + View +
No load.
+
+
+
+{% endfor %} +
+ + +
{% endblock %} -- cgit v1.2.3