Bring colours back to the rigboard

This commit is contained in:
2020-03-16 23:12:21 +00:00
parent fe0e4063d7
commit 8fbe9f9026
2 changed files with 29 additions and 14 deletions

View File

@@ -177,7 +177,7 @@ class Command(BaseCommand):
def setupEvents(self):
names = ["Outdoor Concert", "Hall Open Mic Night", "Festival", "Weekend Event", "Magic Show", "Society Ball", "Evening Show", "Talent Show", "Acoustic Evening", "Hire of Things", "SU Event",
"End of Term Show", "Theatre Show", "Outdoor Fun Day", "Summer Carnival", "Open Days", "Magic Show", "Awards Ceremony", "Debating Event", "Club Night", "DJ Evening", "Building Projection", "Choir Concert"]
descriptions = ["A brief desciption of the event", "This event is boring", "Probably wont happen", "Warning: this has lots of kit"]
descriptions = ["A brief description of the event", "This event is boring", "Probably wont happen", "Warning: this has lots of kit"]
notes = ["The client came into the office at some point", "Who knows if this will happen", "Probably should check this event", "Maybe not happening", "Run away!"]
itemOptions = [{'name': 'Speakers', 'description': 'Some really really big speakers \n these are very loud', 'quantity': 2, 'cost': 200.00},

View File

@@ -2,23 +2,26 @@
<table class="table">
<thead class="thead-dark">
<tr>
<td>#</td>
<td>Event Date</td>
<td>Event Details</td>
<td>MIC</td>
<th scope="col">#</th>
<th scope="col">Event Date</th>
<th scope="col">Event Details</th>
<th scope="col">MIC</th>
</tr>
</thead>
<tbody>
{% for event in events %}
<!---TODO: Red if all chips are red, amber if mixed, green if good to go + MIC...--->
<tr class="
{% if event.cancelled %}
text-muted table-secondary
{% elif event.authorised and event.risk_assessment_edit_url and event.mic %}
table-success
{% elif not event.is_rig %}
info
table-info
{% else %}
table-warning
{% endif %}">
<!---Number-->
<td>{{ event.pk }}</td>
<th scope="row">{{ event.pk }}</th>
<!--Dates-->
<td>
<div><strong>{{ event.start_date|date:"D d/m/Y" }}</strong></div>
@@ -75,13 +78,25 @@
{{ event.description|linebreaksbr }}
</div>
{% endif %}
<span class="badge badge-{% if event.confirmed %}success{%else%}warning{%endif%}">{{ event.get_status_display }}</span>
{% if event.is_rig and perms.RIGS.view_event and event.authorised %}
<span class="badge badge-success">Authorised <i class="fas fa-check"></i></span>
{% endif %}
{% if event.is_rig and perms.RIGS.view_event and event.risk_assessment_edit_url %}
<span class="badge badge-success">RA <i class="fas fa-check"></i></span>
<!---Overall status at a glance--->
<span class="badge badge-{% if event.confirmed %}success{% elif event.cancelled %}dark{% else %}warning{% endif %}">Status: {{ event.get_status_display }}</span>
{% if event.is_rig %}
{% if event.purchase_order %}
<span class="badge badge-success">PO: {{ event.purchase_order }}</i></span>
{% elif event.authorised %}
<span class="badge badge-success">Payment: Authorised <i class="fas fa-check"></i></span>
{% else %}
<span class="badge badge-danger">Payment: <i class="fas fa-times"></i></span>
{% endif %}
<!-- TODO show invoice stuff here -->
{% if event.risk_assessment_edit_url %}
<span class="badge badge-success">RA: <i class="fas fa-check"></i></span>
{% else %}
<span class="badge badge-danger">RA: <i class="fas fa-times"></i></span>
{% endif %}
{% endif %}
</td>
<!---MIC-->
<td>