aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/dispatch/management/commands/insert_fake_data.py1
-rw-r--r--app/dispatch/templates/dispatch/drivers/summary.html8
-rw-r--r--app/dispatch/templates/dispatch/invoice/detail.html4
-rw-r--r--app/dispatch/templates/dispatch/loads/list.html4
-rw-r--r--app/dispatch/templates/dispatch/login.html1
-rw-r--r--app/dispatch/views.py1
6 files changed, 13 insertions, 6 deletions
diff --git a/app/dispatch/management/commands/insert_fake_data.py b/app/dispatch/management/commands/insert_fake_data.py
index 3800372..6b3f49d 100644
--- a/app/dispatch/management/commands/insert_fake_data.py
+++ b/app/dispatch/management/commands/insert_fake_data.py
@@ -98,7 +98,6 @@ class Command(BaseCommand):
new_load.save()
if attachments:
- print("yeppers")
self.add_attachment(new_load)
return new_load
diff --git a/app/dispatch/templates/dispatch/drivers/summary.html b/app/dispatch/templates/dispatch/drivers/summary.html
index 362c1fa..4c24fc9 100644
--- a/app/dispatch/templates/dispatch/drivers/summary.html
+++ b/app/dispatch/templates/dispatch/drivers/summary.html
@@ -75,8 +75,8 @@
<thead>
<tr>
<td>Number of Loads</td>
- <td>Average Load cost</td>
- <td>Total Load cost</td>
+ <td>Average Load amount</td>
+ <td>Total Load amount</td>
</tr>
</thead>
<tr>
@@ -93,8 +93,8 @@
<div class="col s12">
<h5>Note:</h5>
<p class="flow-text">
- Cannot generate an invoice at this time, one or more Loads has an improper
- Amount or is missing attachments.
+ Cannot generate an invoice at this time, one or more loads has an improper
+ amount or is missing attachments.
</p>
</div>
</div>
diff --git a/app/dispatch/templates/dispatch/invoice/detail.html b/app/dispatch/templates/dispatch/invoice/detail.html
index c66e545..d48a14b 100644
--- a/app/dispatch/templates/dispatch/invoice/detail.html
+++ b/app/dispatch/templates/dispatch/invoice/detail.html
@@ -13,7 +13,9 @@
<!-- <input type="submit" class="btn red" value="Delete" /> -->
{% csrf_token %}
<a class="btn red" href="#" onClick="warn_submit('Are you sure?', '#invoice_delete')">Delete</a>
+ {% if request.user.is_superuser %}
<a class="btn orange darken-3" href="{% url 'invoice_edit' object.pk %}">Edit</a>
+ {% endif %}
<a class="btn green" href="#" onClick="window.print()">Print</a>
</form>
</div>
@@ -36,7 +38,9 @@
<!-- <input type="submit" class="btn red" value="Delete" /> -->
{% csrf_token %}
<a class="btn red" href="#" onClick="warn_submit('Are you sure?', '#invoice_delete')">Delete</a>
+ {% if request.user.is_superuser %}
<a class="btn orange darken-3" href="{% url 'invoice_edit' object.pk %}">Edit</a>
+ {% endif %}
<a class="btn green" href="#" onClick="window.print()">Print</a>
</form>
</div>
diff --git a/app/dispatch/templates/dispatch/loads/list.html b/app/dispatch/templates/dispatch/loads/list.html
index e615432..7171fe1 100644
--- a/app/dispatch/templates/dispatch/loads/list.html
+++ b/app/dispatch/templates/dispatch/loads/list.html
@@ -24,7 +24,11 @@
</div>
{% load custom_tags %}
+{% if request.user.is_superuser %}
{% listForCommaString "Customer,Vendor,Amount,Description,Attachments" as load_headers %}
+{% else %}
+{% listForCommaString "Customer,Amount,Description,Attachments" as load_headers %}
+{% endif %}
{% include "dispatch/generic_load_listing.html" %}
<div class="row">
diff --git a/app/dispatch/templates/dispatch/login.html b/app/dispatch/templates/dispatch/login.html
index 2b5d48b..0f5e1b1 100644
--- a/app/dispatch/templates/dispatch/login.html
+++ b/app/dispatch/templates/dispatch/login.html
@@ -51,6 +51,7 @@
</div>
<input type="hidden" name="next" value="{{ next }}" />
</form>
+ If you do not already have an account, register <a href='/accounts/register'>here</a>
</div>
</div>
</div>
diff --git a/app/dispatch/views.py b/app/dispatch/views.py
index 784da9e..2ca9d22 100644
--- a/app/dispatch/views.py
+++ b/app/dispatch/views.py
@@ -475,7 +475,6 @@ class IdentityDetail(DetailView):
def SetDefaultIdentity(request, user_id, pk):
if request.user.is_superuser:
- print("WORKS")
ident = Identity.objects.get(pk=pk)
ident.set_default()
return redirect(reverse('driver_details', kwargs={'pk': user_id}))