diff options
Diffstat (limited to 'app/dispatch/templates')
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/detail.html | 136 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/list.html | 6 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/drivers/summary.html | 115 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/generic_load_listing.html | 2 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/identity/create.html | 15 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/identity/detail.html | 42 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/identity/edit.html | 18 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/loads/detail.html | 2 | ||||
| -rw-r--r-- | app/dispatch/templates/dispatch/nav.html | 4 |
9 files changed, 255 insertions, 85 deletions
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 %} <div class="row"> <div class="col s12"> - <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> + <h1> + User: {{object.first_name}} {{object.last_name}} ( {{object.username}} ) + </h1> </div> -</div> +</div> <div class="row"> <div class="col s12"> <div class="right-align"> - <a class="btn orange" href="{% url 'invoice_generate' object.pk%}?date={{week_dates.start_date|date:"m/d/Y"}}">Generate Invoice For Listing</a> + <a class="btn green" href="{% url 'driver_edit' object.pk %}">Edit</a> </div> </div> </div> - -{% if not request.user.is_superuser %} <div class="row"> <div class="col s12"> <table> - <thead> - <tr> - <td>Date</td> - <td>Description</td> - <td>Total</td> - <td></td> - </tr> - </thead> - <tbody> - {% for load in loads_nosplit %} - <tr> - <td>{{load.date}}</td> - <td>{{load.description}}</td> - <td>{{load.amount}}</td> - <td class="right-align"> - <a href="{% url 'load_detail' load.id %}" class="btn green"> - View - </a> - </td> - </tr> - {% endfor %} - </tbody> + <tr> + <th>First Name:</th> + <td>{{object.first_name}}</td> + </tr> + <tr> + <th>Last Name:</th> + <td>{{object.last_name}}</td> + </tr> + <tr> + <th>Username:</th> + <td>{{object.username}}</td> + </tr> + <tr> + <th>Email:</th> + <td>{{object.email}}</td> + </tr> </table> </div> </div> -{% endif %} + + +{% if ident is not None %} +<div class="row"> + <div class="col s12"> + <div class="right-align"> + <a class="btn green" href="{% url 'identity_edit' ident.pk %}"> + Edit + </a> + </div> + </div> +</div> <div class="row"> <div class="col s12"> <table> - <thead> - <tr> - <td>Number of Loads</td> - <td>Average Load cost</td> - <td>Total Load cost</td> - </tr> - </thead> <tr> - <td>{{stats.count}}</td> - <td>${{stats.average|stringformat:".3f"}}</td> - <td>${{stats.sum}}</td> + <th>Name:</th> + <td>{{ident.name}}</td> + </tr> + <tr> + <th>Address:</th> + <td>{{ident.address}}</td> + </tr> + <tr> + <th>City:</th> + <td>{{ident.city}}</td> + </tr> + <tr> + <th>State:</th> + <td>{{ident.state}}</td> + </tr> + <tr> + <th>Zip Code:</th> + <td>{{ident.zip_code}}</td> </tr> </table> </div> </div> - - - - - +{% else %} <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> - </div> - <div class="col s6 right-align"> - <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 class="col s12"> + <div class="right-align"> + <a class="btn green" href="{% url 'identity_create' object.pk %}">Create New Identity</a> </div> + </div> </div> - -{% if stats.incomplete_loads > 0 %} <div class="row"> - <div class="col s12 m8 offset-m2"> - <div class="card red z-depth-3"> - <div class="card-content black-text"> - <span class="card-title"> - Note: One or more loads has a 0 amount that needs attention - </span> - </div> - </div> + <div class="col s12"> + No Identity found. </div> </div> {% endif %} -{% 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> - </div> - <div class="col s6 right-align"> - <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/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 @@ <td>{{ driver.last_name }}</td> <td>{{ driver.email }}</td> <td class="right-align"> - {% if user.is_superuser %} - <a href="{% url 'driver_edit' driver.id %}" class="btn orange">Edit</a> - {% endif %} - <a href="{% url 'driver_detail' driver.id %}" class="btn blue">View</a> + <a href="{% url 'driver_details' driver.id %}" class="btn orange">Edit</a> + <a href="{% url 'driver_summary' driver.id %}" class="btn blue">View</a> </td> </tr> {% 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 %} +<div class="row"> + <div class="col s12"> + <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> + +<div class="row"> + <div class="col s12"> + <div class="right-align"> + <a class="btn orange" href="{% url 'invoice_generate' object.pk%}?date={{week_dates.start_date|date:"m/d/Y"}}">Generate Invoice For Listing</a> + </div> + </div> +</div> + +{% if not request.user.is_superuser %} +<div class="row"> + <div class="col s12"> + <table> + <thead> + <tr> + <td>Date</td> + <td>Description</td> + <td>Total</td> + <td></td> + </tr> + </thead> + <tbody> + {% for load in loads_nosplit %} + <tr> + <td>{{load.date}}</td> + <td>{{load.description}}</td> + <td>{{load.amount}}</td> + <td class="right-align"> + <a href="{% url 'load_detail' load.id %}" class="btn green"> + View + </a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> +</div> +{% endif %} + +<div class="row"> + <div class="col s12"> + <table> + <thead> + <tr> + <td>Number of Loads</td> + <td>Average Load cost</td> + <td>Total Load cost</td> + </tr> + </thead> + <tr> + <td>{{stats.count}}</td> + <td>${{stats.average|stringformat:".3f"}}</td> + <td>${{stats.sum}}</td> + </tr> + </table> + </div> +</div> + + + + + +<div class="row"> + <div class="col s6 left-align"> + <a href="{% url 'driver_summary' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a> + </div> + <div class="col s6 right-align"> + <a href="{% url 'driver_summary' 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> + +{% if stats.incomplete_loads > 0 %} +<div class="row"> + <div class="col s12 m8 offset-m2"> + <div class="card red z-depth-3"> + <div class="card-content black-text"> + <span class="card-title"> + Note: One or more loads has a 0 amount that needs attention + </span> + </div> + </div> + </div> +</div> +{% endif %} + +{% 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_summary' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a> + </div> + <div class="col s6 right-align"> + <a href="{% url 'driver_summary' 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 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 %} - <td><a href="{% url 'driver_detail' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td> + <td><a href="{% url 'driver_summary' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td> {% 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 %} +<div class="row"> + <div class="col s12 m6"> + <h1>New Identity</h1> + </div> +</div> + +<form action="" method="post">{% csrf_token %} + {{ form.as_p }} + <input type="submit" class="btn green" value="Save" /> +</form> +{% 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 %} +<div class="row"> + <div class="col s12 m6"> + <h1> + Identity for {{object.user.username}} + </h1> + </div> +</div> + +<div class="row"> + <div class="col s12"> + <table> + <tr> + <th>Name:</th> + <td>{{object.name}}</td> + </tr> + <tr> + <th>Address:</th> + <td>{{object.address}}</td> + </tr> + <tr> + <th>City:</th> + <td>{{object.city}}</td> + </tr> + <tr> + <th>State:</th> + <td>{{object.state}}</td> + </tr> + <tr> + <th>Zip Code:</th> + <td>{{object.zip_code}}</td> + </tr> + </table> + </div> +</div> + +{% 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 %} +<div class="row"> + <div class="col s12 m6"> + <h1> + Identity for {{object.user.username}} + </h1> + </div> +</div> + +<form action="" method="post">{% csrf_token %} + {{ form.as_p }} + <input type="submit" class="btn blue" value="Update" /> +</form> +{% 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 @@ <tr> <th>User</th> - <td><a href="{% url 'driver_detail' object.user.id %}">{{object.user}}</a></td> + <td><a href="{% url 'driver_summary' object.user.id %}">{{object.user}}</a></td> </tr> <tr> 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 @@ <li><a href="{% url 'customer_list' %}">Customers</a></li> <li><a href="{% url 'invoice_list' %}">Invoices</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> + <li><a href="{% url 'driver_summary' request.user.id %}">Summary</a> + <li><a href="{% url 'driver_details' request.user.id %}">My Account</a></li> {% endif %} <li><a href="{% url 'logout' %}">Logout</a></li> {% else %} |
