diff --git a/RIGS/migrations/0048_auto_20200829_2201.py b/RIGS/migrations/0048_auto_20200829_2201.py new file mode 100644 index 00000000..e3f68956 --- /dev/null +++ b/RIGS/migrations/0048_auto_20200829_2201.py @@ -0,0 +1,31 @@ +# Generated by Django 3.1 on 2020-08-29 21:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0047_auto_20200829_2105'), + ] + + operations = [ + migrations.AlterField( + model_name='eventchecklistcrew', + name='end', + field=models.DateTimeField(default=None), + preserve_default=False, + ), + migrations.AlterField( + model_name='eventchecklistcrew', + name='role', + field=models.CharField(default=None, max_length=255), + preserve_default=False, + ), + migrations.AlterField( + model_name='eventchecklistcrew', + name='start', + field=models.DateTimeField(default=None), + preserve_default=False, + ), + ] diff --git a/RIGS/migrations/0049_auto_20200829_2313.py b/RIGS/migrations/0049_auto_20200829_2313.py new file mode 100644 index 00000000..be56d711 --- /dev/null +++ b/RIGS/migrations/0049_auto_20200829_2313.py @@ -0,0 +1,78 @@ +# Generated by Django 3.1 on 2020-08-29 22:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0048_auto_20200829_2201'), + ] + + operations = [ + migrations.AddField( + model_name='eventchecklist', + name='all_rcds_tested', + field=models.BooleanField(default=False, help_text='All circuit RCDs tested?(using test button)'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_earth_fault', + field=models.IntegerField(default=False, help_text='Earth Fault Loop Impedance (ZS)'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_phase_rotation', + field=models.BooleanField(default=False, help_text='Phase Rotation
(if required)'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_pssc', + field=models.IntegerField(default=False, help_text='Prospective Short Circuit Current'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_voltage_l1', + field=models.IntegerField(default=False), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_voltage_l2', + field=models.IntegerField(default=False), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='fd_voltage_l3', + field=models.IntegerField(default=False), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='labelling', + field=models.BooleanField(default=False, help_text='Appropriate and clear labelling on distribution and cabling?'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='public_sockets_tested', + field=models.BooleanField(default=False, help_text='Public/Performer accessible circuits tested?(using socket tester)'), + preserve_default=False, + ), + migrations.AddField( + model_name='eventchecklist', + name='source_rcd', + field=models.BooleanField(default=False, help_text='Source RCD protected?
(if cable is more than 3m long) '), + preserve_default=False, + ), + migrations.AlterField( + model_name='eventchecklist', + name='earthing', + field=models.BooleanField(help_text='Equipment appropriately earthed?
(truss, stage, generators etc)'), + ), + ] diff --git a/RIGS/models.py b/RIGS/models.py index a583153c..6ec83221 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -642,7 +642,6 @@ class EventChecklist(models.Model, RevisionMixin): # General power_mic = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='checklists', null=True, verbose_name="Power MIC", on_delete=models.CASCADE, help_text="Who is the Power MIC?") - #vehicles = models.JSONField(help_text="List vehicles and their drivers", default=dict, null=False) # Safety Checks safe_parking = models.BooleanField(help_text="Vehicles parked safely?
(does not obstruct venue access)") @@ -654,16 +653,28 @@ class EventChecklist(models.Model, RevisionMixin): hs_location = models.CharField(max_length=255, help_text="Location of Safety Bag/Box") extinguishers_location = models.CharField(max_length=255, help_text="Location of fire extinguishers") - # Crew Record TODO - # Small Electrical Checks rcds = models.BooleanField(help_text="RCDs installed where needed and tested?") supply_test = models.BooleanField(help_text="Electrical supplies tested?
(using socket tester)") - earthing = models.BooleanField(help_text="Equipment appropriately earthed?
(truss, stage, etc)") + + # Shared electrical checks + earthing = models.BooleanField(help_text="Equipment appropriately earthed?
(truss, stage, generators etc)") pat = models.BooleanField(help_text="All equipment in PAT period?") medium_event = models.BooleanField() # Medium Electrical Checks + source_rcd = models.BooleanField(help_text="Source RCD protected?
(if cable is more than 3m long) ") + labelling = models.BooleanField(help_text="Appropriate and clear labelling on distribution and cabling?") + # First Distro + fd_voltage_l1 = models.IntegerField(help_text="L1 - N") + fd_voltage_l2 = models.IntegerField(help_text="L2 - N") + fd_voltage_l3 = models.IntegerField(help_text="L3 - N") + fd_phase_rotation = models.BooleanField(help_text="Phase Rotation
(if required)") + fd_earth_fault = models.IntegerField(help_text="Earth Fault Loop Impedance (ZS)") + fd_pssc = models.IntegerField(help_text="Prospective Short Circuit Current") + + all_rcds_tested = models.BooleanField(help_text="All circuit RCDs tested?(using test button)") + public_sockets_tested = models.BooleanField(help_text="Public/Performer accessible circuits tested?(using socket tester)") @property def activity_feed_string(self): diff --git a/RIGS/templates/event_checklist_detail.html b/RIGS/templates/event_checklist_detail.html index 4f3d3d8c..1b547a9f 100644 --- a/RIGS/templates/event_checklist_detail.html +++ b/RIGS/templates/event_checklist_detail.html @@ -5,7 +5,7 @@ {% block content %}
-
+

Event Checklist for Event N{{ object.event.pk|stringformat:"05d" }} {{ object.event.name }}

@@ -13,74 +13,109 @@ class="hidden-xs">Edit
-
-
General
-
-
-
{{ object|help_text:'power_mic' }}
-
- {{ object.power_mic.name }} -
-
-

List vehicles and their drivers

-
    - {% for i in object.vehicles.all %} -
  • {{i}}
  • - {% endfor %} -
+
+
+
+
General
+
+
+
{{ object|help_text:'power_mic' }}
+
+ {{ object.power_mic.name }} +
+
+

List vehicles and their drivers

+
    + {% for i in object.vehicles.all %} +
  • {{i}}
  • + {% endfor %} +
+
-
-
-
Safety Checks
-
-
-
{{ object|help_text:'safe_parking'|safe }}
-
- {{ object.safe_parking|yesno|title }} -
-
{{ object|help_text:'safe_packing'|safe }}
-
- {{ object.safe_packing|yesno|title }} -
-
{{ object|help_text:'exits'|safe }}
-
- {{ object.exits|yesno|title }} -
-
{{ object|help_text:'trip_hazard'|safe }}
-
- {{ object.trip_hazard|yesno|title }} -
-
{{ object|help_text:'warning_signs'|safe }}
-
- {{ object.warning_signs|yesno|title }} -
-
{{ object|help_text:'ear_plugs'|safe }}
-
- {{ object.ear_plugs|yesno|title }} -
-
+
+
+
+
Safety Checks
+
+
+
{{ object|help_text:'safe_parking'|safe }}
+
+ {{ object.safe_parking|yesno|title }} +
+
{{ object|help_text:'safe_packing'|safe }}
+
+ {{ object.safe_packing|yesno|title }} +
+
{{ object|help_text:'exits'|safe }}
+
+ {{ object.exits|yesno|title }} +
+
{{ object|help_text:'trip_hazard'|safe }}
+
+ {{ object.trip_hazard|yesno|title }} +
+
{{ object|help_text:'warning_signs'|safe }}
+
+ {{ object.warning_signs|yesno|title }} +
+
{{ object|help_text:'ear_plugs'|safe }}
+
+ {{ object.ear_plugs|yesno|title }} +
+
+
+
Crew Record
-
-
    - {% for i in object.crew.all %} -
  • {{i}}
  • + + + + + + + + + + + {% for crew in object.crew.all %} + + + + + + {% endfor %} - - + +
    CrewmemberStart TimeRoleEnd Time
    {{crew.crewmember}}{{crew.start}}{{crew.role}}{{crew.end}}
Power
{% if object.medium_event %} - Small Event + Medium Event {% else %} - Medium Event - {% endif %} + Small Event
+
{{ object|help_text:'rcds'|safe }}
+
+ {{ object.rcds|yesno|title }} +
+
{{ object|help_text:'supply_test'|safe }}
+
+ {{ object.supply_test|yesno|title }} +
+
{{ object|help_text:'earthing'|safe }}
+
+ {{ object.earthing|yesno|title }} +
+
{{ object|help_text:'pat'|safe }}
+
+ {{ object.pat|yesno|title }} +
+ {% endif %}
diff --git a/RIGS/templates/event_checklist_form.html b/RIGS/templates/event_checklist_form.html index e1b882e6..ef78e0b5 100644 --- a/RIGS/templates/event_checklist_form.html +++ b/RIGS/templates/event_checklist_form.html @@ -77,7 +77,12 @@ }); $('button[data-action=delete]').on('click', function(event) { event.preventDefault(); - $($(this).attr('data-target') + '_' + $(this).attr('data-id')).remove(); + $(this).closest('tr').remove(); + }); + //Somewhat rudimentary way of ensuring people fill in completely (if it hits the database validation the whole table row disappears when the page reloads...) + //the not is to avoid adding it to some of bootstrap-selects extra crap + $('#vehiclest,#crewmemberst').find("select,input[type!='search']").change(function () { + $(this).closest('tr').find('input,select').attr('required', 'true'); }); }); @@ -255,6 +260,52 @@
Electrical Checks for ‘Medium’ TEC Events
+ {% include 'partials/checklist_checkbox.html' with formitem=form.source_rcd %} + {% include 'partials/checklist_checkbox.html' with formitem=form.clear_labelling %} + {% include 'partials/checklist_checkbox.html' with formitem=form.earthing %} + {% include 'partials/checklist_checkbox.html' with formitem=form.pat %} +
+

Tests at first distro

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test
Voltage
(cube meter)
{{object|help_text:'fd_voltage_l1'}}{{object|help_text:'fd_voltage_l2'}}{{object|help_text:'fd_voltage_l3'}}
{% render_field form.fd_voltage_l1 class+="form-control" %}{% render_field form.fd_voltage_l2 class+="form-control" %}{% render_field form.fd_voltage_l1 class+="form-control" %}
{{object|help_text:'fd_phase_rotation'|safe}}{% render_field form.fd_phase_rotation %}
{{object|help_text:'fd_earth_fault'|safe}}{% render_field form.fd_earth_fault class+="form-control" %}
{{object|help_text:'fd_pssc'|safe}}{% render_field form.fd_pssc class+="form-control" %}
+
+ {% include 'partials/checklist_checkbox.html' with formitem=form.all_rcds_tested %} + {% include 'partials/checklist_checkbox.html' with formitem=form.public_sockets_tested %} + {% include 'partials/ec_power_info.html' %}
diff --git a/RIGS/templates/partials/ec_power_info.html b/RIGS/templates/partials/ec_power_info.html new file mode 100644 index 00000000..b60d567e --- /dev/null +++ b/RIGS/templates/partials/ec_power_info.html @@ -0,0 +1,51 @@ +

Threshhold Values

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
RCD Value (mA)Max ZS (Ohms)
301667
100500
300167
500100
+
+
+ + + + + + + + + + + + + + + + + +
DistroMax PSSC (kA)
Intel & Toblerone distros6
All other distros10
+

Voltage Drop on Circuit: 5% (approx. 12v)

+
+
diff --git a/RIGS/templates/partials/event_details_form.html b/RIGS/templates/partials/event_details_form.html index a1ca202b..bd8c74bd 100644 --- a/RIGS/templates/partials/event_details_form.html +++ b/RIGS/templates/partials/event_details_form.html @@ -77,7 +77,6 @@
-
{% render_field form.access_at class+="form-control" step="60" %}