From fae5a7e38ef7084990724df51488f54c52ec592d Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 25 Oct 2017 00:33:14 -0400 Subject: Better driver edit page as well as pages for working with Identity --- .../templates/dispatch/drivers/detail.html | 136 +++++++++------------ app/dispatch/templates/dispatch/drivers/list.html | 6 +- .../templates/dispatch/drivers/summary.html | 115 +++++++++++++++++ .../templates/dispatch/generic_load_listing.html | 2 +- .../templates/dispatch/identity/create.html | 15 +++ .../templates/dispatch/identity/detail.html | 42 +++++++ app/dispatch/templates/dispatch/identity/edit.html | 18 +++ app/dispatch/templates/dispatch/loads/detail.html | 2 +- app/dispatch/templates/dispatch/nav.html | 4 +- 9 files changed, 255 insertions(+), 85 deletions(-) create mode 100644 app/dispatch/templates/dispatch/drivers/summary.html create mode 100644 app/dispatch/templates/dispatch/identity/create.html create mode 100644 app/dispatch/templates/dispatch/identity/detail.html create mode 100644 app/dispatch/templates/dispatch/identity/edit.html (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html index fc197b5..8ce409d 100644 --- a/app/dispatch/templates/dispatch/drivers/detail.html +++ b/app/dispatch/templates/dispatch/drivers/detail.html @@ -1,115 +1,97 @@ {% extends 'dispatch/base.html' %} -{% block title %}Details - {{ object.first_name }} {{ object.last_name }}{% endblock %} +{% block title %}View User {{object.username}}{% endblock %} {% block content %}
-

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"}}

+

+ User: {{object.first_name}} {{object.last_name}} ( {{object.username}} ) +

-
+
- -{% if not request.user.is_superuser %}
- - - - - - - - - - {% for load in loads_nosplit %} - - - - - - - {% endfor %} - + + + + + + + + + + + + + + + +
DateDescriptionTotal
{{load.date}}{{load.description}}{{load.amount}} - - View - -
First Name:{{object.first_name}}
Last Name:{{object.last_name}}
Username:{{object.username}}
Email:{{object.email}}
-{% endif %} + + +{% if ident is not None %} +
+
+ +
+
- - - - - - - - - - + + + + + + + + + + + + + + + + + +
Number of LoadsAverage Load costTotal Load cost
{{stats.count}}${{stats.average|stringformat:".3f"}}${{stats.sum}}Name:{{ident.name}}
Address:{{ident.address}}
City:{{ident.city}}
State:{{ident.state}}
Zip Code:{{ident.zip_code}}
- - - - - +{% else %}
- - - -{% if stats.incomplete_loads > 0 %}
-
-
-
- - Note: One or more loads has a 0 amount that needs attention - -
-
+
+ No Identity found.
{% endif %} -{% 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/drivers/list.html b/app/dispatch/templates/dispatch/drivers/list.html index 4153fe9..8b7508b 100644 --- a/app/dispatch/templates/dispatch/drivers/list.html +++ b/app/dispatch/templates/dispatch/drivers/list.html @@ -23,10 +23,8 @@ {{ driver.last_name }} {{ driver.email }} - {% if user.is_superuser %} - Edit - {% endif %} - View + Edit + View {% empty %} diff --git a/app/dispatch/templates/dispatch/drivers/summary.html b/app/dispatch/templates/dispatch/drivers/summary.html new file mode 100644 index 0000000..d849e9d --- /dev/null +++ b/app/dispatch/templates/dispatch/drivers/summary.html @@ -0,0 +1,115 @@ +{% extends 'dispatch/base.html' %} + +{% block title %}Details - {{ object.first_name }} {{ object.last_name }}{% endblock %} + +{% block content %} +
+
+

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"}}

+
+
+ + + +{% if not request.user.is_superuser %} +
+
+ + + + + + + + + + + {% for load in loads_nosplit %} + + + + + + + {% endfor %} + +
DateDescriptionTotal
{{load.date}}{{load.description}}{{load.amount}} + + View + +
+
+
+{% endif %} + +
+
+ + + + + + + + + + + + + +
Number of LoadsAverage Load costTotal Load cost
{{stats.count}}${{stats.average|stringformat:".3f"}}${{stats.sum}}
+
+
+ + + + + + + +{% if stats.incomplete_loads > 0 %} +
+
+
+
+ + Note: One or more loads has a 0 amount that needs attention + +
+
+
+
+{% endif %} + +{% 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 7fb42f1..5512184 100644 --- a/app/dispatch/templates/dispatch/generic_load_listing.html +++ b/app/dispatch/templates/dispatch/generic_load_listing.html @@ -37,7 +37,7 @@ {% endif %} {% endif %} {% if "Driver" in load_headers %} - {{ load.user.first_name }} {{ load.user.last_name }} + {{ load.user.first_name }} {{ load.user.last_name }} {% endif %} {% if "Amount" in load_headers %} diff --git a/app/dispatch/templates/dispatch/identity/create.html b/app/dispatch/templates/dispatch/identity/create.html new file mode 100644 index 0000000..90cdd8e --- /dev/null +++ b/app/dispatch/templates/dispatch/identity/create.html @@ -0,0 +1,15 @@ +{% extends 'dispatch/base.html' %} + + +{% block content %} +
+
+

New Identity

+
+
+ +
{% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} diff --git a/app/dispatch/templates/dispatch/identity/detail.html b/app/dispatch/templates/dispatch/identity/detail.html new file mode 100644 index 0000000..491c59e --- /dev/null +++ b/app/dispatch/templates/dispatch/identity/detail.html @@ -0,0 +1,42 @@ +{% extends 'dispatch/base.html' %} + +{% block title %}Identity for {{object.user.username}}{% endblock %} + +{% block content %} +
+
+

+ Identity for {{object.user.username}} +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Name:{{object.name}}
Address:{{object.address}}
City:{{object.city}}
State:{{object.state}}
Zip Code:{{object.zip_code}}
+
+
+ +{% endblock %} + diff --git a/app/dispatch/templates/dispatch/identity/edit.html b/app/dispatch/templates/dispatch/identity/edit.html new file mode 100644 index 0000000..a48a8d1 --- /dev/null +++ b/app/dispatch/templates/dispatch/identity/edit.html @@ -0,0 +1,18 @@ +{% extends 'dispatch/base.html' %} + +{% block title %}Edit Identity for {{object.user.username}}{% endblock %} + +{% block content %} +
+
+

+ Identity for {{object.user.username}} +

+
+
+ +
{% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} diff --git a/app/dispatch/templates/dispatch/loads/detail.html b/app/dispatch/templates/dispatch/loads/detail.html index d8feea3..62a8b30 100644 --- a/app/dispatch/templates/dispatch/loads/detail.html +++ b/app/dispatch/templates/dispatch/loads/detail.html @@ -23,7 +23,7 @@ User - {{object.user}} + {{object.user}} diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html index 532b2a9..a4fc8cb 100644 --- a/app/dispatch/templates/dispatch/nav.html +++ b/app/dispatch/templates/dispatch/nav.html @@ -5,8 +5,8 @@
  • Customers
  • Invoices
  • {% else %} -
  • Summary -
  • My Account
  • +
  • Summary +
  • My Account
  • {% endif %}
  • Logout
  • {% else %} -- cgit v1.2.3