mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Implement some of Jonny's suggested changes
TODO: - Define event size at RA time, pass through to EC - Have later power questions be context dependent
This commit is contained in:
34
RIGS/migrations/0045_auto_20201116_1808.py
Normal file
34
RIGS/migrations/0045_auto_20201116_1808.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 3.1.2 on 2020-11-16 18:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('RIGS', '0044_auto_20201024_2031'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='riskassessment',
|
||||
name='outside',
|
||||
field=models.BooleanField(default=False, help_text='Is the event outdoors?'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='riskassessment',
|
||||
name='contractors',
|
||||
field=models.BooleanField(help_text='Are you using any external contractors?<small>i.e. Freelancers/Crewing Companies</small>'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='riskassessment',
|
||||
name='nonstandard_equipment',
|
||||
field=models.BooleanField(help_text="Does the event require any hired in equipment or use of equipment that is not covered by <a href='https://nottinghamtec.sharepoint.com/:f:/g/HealthAndSafety/Eo4xED_DrqFFsfYIjKzMZIIB6Gm_ZfR-a8l84RnzxtBjrA?e=Bf0Haw'>TEC's standard risk assessments and method statements?</a>"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='riskassessment',
|
||||
name='other_companies',
|
||||
field=models.BooleanField(help_text='Are TEC working with any other companies on site?<small>e.g. TEC is providing the lighting while another company does sound</small>'),
|
||||
),
|
||||
]
|
||||
@@ -614,15 +614,17 @@ class Payment(models.Model, RevisionMixin):
|
||||
class RiskAssessment(models.Model, RevisionMixin):
|
||||
event = models.OneToOneField('Event', on_delete=models.CASCADE)
|
||||
# General
|
||||
nonstandard_equipment = models.BooleanField(help_text="Does the event require any hired in equipment or use of equipment that is not covered by TEC's standard risk assessments and method statements?")
|
||||
nonstandard_equipment = models.BooleanField(help_text="Does the event require any hired in equipment or use of equipment that is not covered by <a href='https://nottinghamtec.sharepoint.com/:f:/g/HealthAndSafety/Eo4xED_DrqFFsfYIjKzMZIIB6Gm_ZfR-a8l84RnzxtBjrA?e=Bf0Haw'>TEC's standard risk assessments and method statements?</a>")
|
||||
nonstandard_use = models.BooleanField(help_text="Are TEC using their equipment in a way that is abnormal?<br><small>i.e. Not covered by TECs standard health and safety documentation</small>")
|
||||
contractors = models.BooleanField(help_text="Are you using any external contractors?")
|
||||
other_companies = models.BooleanField(help_text="Are TEC working with any other companies on site?")
|
||||
contractors = models.BooleanField(help_text="Are you using any external contractors?<small>i.e. Freelancers/Crewing Companies</small>")
|
||||
other_companies = models.BooleanField(help_text="Are TEC working with any other companies on site?<small>e.g. TEC is providing the lighting while another company does sound</small>")
|
||||
crew_fatigue = models.BooleanField(help_text="Is crew fatigue likely to be a risk at any point during this event?")
|
||||
general_notes = models.TextField(blank=True, null=True, help_text="Did you have to consult a supervisor about any of the above? If so who did you consult and what was the outcome?")
|
||||
|
||||
# Power
|
||||
big_power = models.BooleanField(help_text="Does the event require larger power supplies than 13A or 16A single phase wall sockets, or draw more than 20A total current?")
|
||||
outside = models.BooleanField(help_text="Is the event outdoors?")
|
||||
# If yes to the above two, you must answer...
|
||||
power_mic = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='power_mic', blank=True, null=True,
|
||||
verbose_name="Power MIC", on_delete=models.CASCADE, help_text="Who is the Power MIC?")
|
||||
generators = models.BooleanField(help_text="Will generators be used?")
|
||||
@@ -645,8 +647,8 @@ class RiskAssessment(models.Model, RevisionMixin):
|
||||
|
||||
# Structures
|
||||
special_structures = models.BooleanField(help_text="Does the event require use of winch stands, motors, MPT Towers, or staging?")
|
||||
persons_responsible_structures = models.TextField(blank=True, null=True, help_text="Who are the persons on site responsible for their use?")
|
||||
suspended_structures = models.BooleanField(help_text="Are any structures (excluding projector screens and IWBs) being suspended from TEC's structures?")
|
||||
persons_responsible_structures = models.TextField(blank=True, null=True, help_text="Who are the persons on site responsible for their use?")
|
||||
|
||||
# Blimey that was a lot of options
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h5 class="py-3"><a class="btn btn-info" data-toggle="collapse" href="#values" aria-expanded="false" aria-controls="values">View Threshhold Values</a></h5>
|
||||
<h5 class="py-3"><a class="btn btn-info" data-toggle="collapse" href="#values" aria-expanded="false" aria-controls="values">View Threshold Values</a></h5>
|
||||
<div class="row collapse" id="values">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
{{ object.power_mic.name|default:'None' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'generators' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.outside|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'outside' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.generators|yesnoi:'invert' }}
|
||||
</dd>
|
||||
@@ -94,15 +98,15 @@
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6">{{ object|help_text:'known_venue' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.known_venue|yesnoi }}
|
||||
{{ object.known_venue|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'safe_loading'|safe }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.safe_loading|yesnoi }}
|
||||
{{ object.safe_loading|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'safe_storage' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.safe_storage|yesnoi }}
|
||||
{{ object.safe_storage|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'area_outside_of_control' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
@@ -127,14 +131,14 @@
|
||||
<dd class="col-sm-6">
|
||||
{{ object.special_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'persons_responsible_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.persons_responsible_structures.name|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'suspended_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.suspended_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'persons_responsible_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.persons_responsible_structures.name|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<div class="card-header">Power</div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.big_power %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.outside %}
|
||||
<label for="{{ form.power_mic.id_for_label }}"
|
||||
class="col-sm-8 col-form-label">{{ form.power_mic.help_text }}</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -108,7 +109,7 @@
|
||||
<div class="card">
|
||||
<div class="card-header">Sound</div>
|
||||
<div class="card-body">
|
||||
<p><strong>If yes, consult a supervisor of sound and make sure an appropriate noise monitoring plan and risk assessment is drawn up</strong></p>
|
||||
<p><strong>If yes, consult a supervisor of sound</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.noise_monitoring %}
|
||||
<label for="{{ form.sound_notes.id_for_label }}">{{ form.sound_notes.help_text }}</label>
|
||||
{% render_field form.sound_notes class+="form-control" %}
|
||||
@@ -121,7 +122,7 @@
|
||||
<div class="card">
|
||||
<div class="card-header">Site Details</div>
|
||||
<div class="card-body">
|
||||
<p><strong>If YES to any of the below, a site visit must be conducted, and an assessment of the venue completed and added to TEC’s records</strong></p>
|
||||
<p><strong>If yes to any of the below, a site visit must be conducted, and an assessment of the venue completed and added to TEC’s records</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.known_venue %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.safe_loading %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.safe_storage %}
|
||||
@@ -138,9 +139,9 @@
|
||||
<div class="card-header">Structures</div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.special_structures %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.suspended_structures %}
|
||||
<label for="{{ form.persons_responsible_structures.id_for_label }}" class="mt-3">{{ form.persons_responsible_structures.help_text }}</label>
|
||||
{% render_field form.persons_responsible_structures class+="form-control mb-3" %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.suspended_structures %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -290,7 +290,7 @@ class GenericList(BasePage):
|
||||
class UserPage(BasePage):
|
||||
URL_TEMPLATE = 'user/'
|
||||
|
||||
_api_key_selector = (By.XPATH, '/html/body/div[1]/div[2]/div[2]/div/div/dl/dd[1]')
|
||||
_api_key_selector = (By.ID, 'api-key')
|
||||
_cal_url_selector = (By.ID, 'cal-url')
|
||||
_generation_button_selector = (By.LINK_TEXT, 'Generate API Key')
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<code id="api-key">{{user.api_key}}</code>
|
||||
<button class="btn btn-secondary align-middle" data-clipboard-target="#api-key" data-content="Copied to clipboard!"><span class="fas fa-clipboard"></span></button>
|
||||
{% else %}
|
||||
No API Key Generated
|
||||
<span id="api-key">No API Key Generated</span>
|
||||
{% endif %}
|
||||
<a href="{% url 'reset_api_key' %}" class="btn btn-secondary align-middle">
|
||||
{% if user.api_key %}Reset API Key{% else %}Generate API Key{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user