Start RA 'mark review' feature

This commit is contained in:
2020-08-05 20:51:31 +01:00
parent b88554a57f
commit 92377227e0
9 changed files with 45 additions and 85 deletions

View File

@@ -53,6 +53,16 @@
{% if perms.RIGS.view_venue %}
<li class="nav-item"><a class="nav-link" href="{% url 'venue_list' %}">Venues</a></li>
{% endif %}
{% if perms.RIGS.view_riskassessment %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownHS" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
H&S
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownHS">
<a class="dropdown-item" href="{% url 'ra_list' %}">Risk Assessment List</a>
</div>
</li>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -154,14 +154,14 @@
<div class="card-body" id="is_rig-selector">
<span data-toggle="tooltip"
title="Anything that involves TEC kit, crew, or otherwise us providing a service to anyone.">
<button type="button" class="btn btn-primary" data-is_rig="1">Rig</button>
<button type="button" class="btn btn-primary" data-is_rig="1" style="width: 10rem;">Rig</button>
</span>
<span data-toggle="tooltip"
title="Things that aren't service-based, like training, meetings and site visits.">
<button type="button" class="btn btn-info" data-is_rig="0">Non-Rig</button>
<button type="button" class="btn btn-info" data-is_rig="0" style="width: 10rem;">Non-Rig</button>
</span>
<span data-toggle="tooltip" title="Coming soon...">
<button type="button" class="btn btn-warning" data-is_rig="-1">Subhire</button>
<button type="button" class="btn btn-warning" data-is_rig="-1" style="width: 10rem;">Subhire</button>
</span>
</div>
</div>

View File

@@ -32,8 +32,8 @@
<dd class="col-2">
{{ object.crewfatigue|yesno|title }}
</dd>
<dt class="col-10">{{ object|help_text:'general_notes' }}</dt>
<dd class="col-2">
<dt class="col-12">{{ object|help_text:'general_notes' }}</dt>
<dd class="col-12">
{{ object.general_notes|default:'N/A'|linebreaks }}
</dd>
</dl>
@@ -67,8 +67,8 @@
<dd class="col-sm-6">
{{ object.multiple_electrical_environments|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'power_notes' }}</dt>
<dd class="col-sm-6">
<dt class="col-12">{{ object|help_text:'power_notes' }}</dt>
<dd class="col-12">
{{ object.power_notes|default:'N/A'|linebreaks }}
</dd>
</dl>
@@ -82,8 +82,8 @@
<dd class="col-sm-6">
{{ object.noise_monitoring|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'sound_notes' }}</dt>
<dd class="col-sm-6">
<dt class="col-12">{{ object|help_text:'sound_notes' }}</dt>
<dd class="col-12">
{{ object.sound_notes|default:'N/A'|linebreaks }}
</dd>
</dl>

View File

@@ -7,12 +7,12 @@
{% block content %}
<div class="row">
<div class="col-sm-12">
<div class="col-12">
<h2>Risk Assessment List</h2>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-12">
<div class="table-responsive">
<table class="table mb-0">
<thead>
@@ -44,6 +44,7 @@
<th scope="col">{{ object_list.0|verbose_name:'special_structures'|title }}</th>
<th scope="col">{{ object_list.0|verbose_name:'persons_responsible_structures'|title }}</th>
<th scope="col">{{ object_list.0|verbose_name:'suspended_structures'|title }}</th>
<th scope="col">Review</th>
{% endif %}
</tr>
</thead>
@@ -79,10 +80,17 @@
<td class="{% if object.special_structures%}bg-danger text-white{%endif%}">{{object.special_structures|yesno|title}}</td>
<td>{{ object.persons_responsible_structures|default:'N/A'|linebreaks }}</td>
<td class="{% if object.suspended_structures%}bg-danger text-white{%endif%}">{{object.suspended_structures|yesno|title}}</td>
<td>
{% if object.reviewed_by %}
Reviewed by <a href="{% url 'profile_detail' object.reviewed_by.pk %}">{{ object.reviewed_by }}</a> at {{ object.reviewed_at }}
{% else %}
<a class="btn btn-success" href="{% url 'ra_review' object.pk %}">Mark Reviewed</a>
{% endif %}
</td>
</tr>
{% empty %}
<tr class="bg-warning">
<td colspan="6">Not Found</td>
<td colspan="6">No risk assessments found</td>
</tr>
{% endfor %}
</tbody>