diff --git a/RIGS/forms.py b/RIGS/forms.py index b4de22f4..e2e62fca 100644 --- a/RIGS/forms.py +++ b/RIGS/forms.py @@ -22,6 +22,7 @@ class EventForm(forms.ModelForm): datetime_input_formats = list(settings.DATETIME_INPUT_FORMATS) meet_at = forms.DateTimeField(input_formats=datetime_input_formats, required=False) access_at = forms.DateTimeField(input_formats=datetime_input_formats, required=False) + parking_and_access = forms.BooleanField(label="Additional parking or access requirements (i.e. campus parking permits, wristbands)?", required=False) items_json = forms.CharField() @@ -125,7 +126,7 @@ class Meta: fields = ['is_rig', 'name', 'venue', 'start_time', 'end_date', 'start_date', 'end_time', 'meet_at', 'access_at', 'description', 'notes', 'mic', 'person', 'organisation', 'dry_hire', 'checked_in_by', 'status', - 'purchase_order', 'collector', 'forum_url'] + 'purchase_order', 'collector', 'forum_url', 'parking_and_access'] class BaseClientEventAuthorisationForm(forms.ModelForm): diff --git a/RIGS/management/commands/generateSampleRIGSData.py b/RIGS/management/commands/generateSampleRIGSData.py index b8331891..1292fb67 100644 --- a/RIGS/management/commands/generateSampleRIGSData.py +++ b/RIGS/management/commands/generateSampleRIGSData.py @@ -276,6 +276,7 @@ def setup_events(self): nonstandard_emergency_procedure=bool(random.getrandbits(1)), special_structures=bool(random.getrandbits(1)), suspended_structures=bool(random.getrandbits(1)), + parking_and_access=bool(random.getrandbits(1)), outside=bool(random.getrandbits(1))) if i == 0 or random.randint(0, 1) > 0: # Event 1 and 1 in 10 have a Checklist models.EventChecklist.objects.create(event=new_event, diff --git a/RIGS/migrations/0052_event_parking_and_access.py b/RIGS/migrations/0052_event_parking_and_access.py new file mode 100644 index 00000000..4df4ec56 --- /dev/null +++ b/RIGS/migrations/0052_event_parking_and_access.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.25 on 2024-11-20 20:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0051_alter_payment_method'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='parking_and_access', + field=models.BooleanField(default=False), + ), + ] diff --git a/RIGS/migrations/0053_riskassessment_parking_and_access.py b/RIGS/migrations/0053_riskassessment_parking_and_access.py new file mode 100644 index 00000000..82fa3170 --- /dev/null +++ b/RIGS/migrations/0053_riskassessment_parking_and_access.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.25 on 2024-11-20 21:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0052_event_parking_and_access'), + ] + + operations = [ + migrations.AddField( + model_name='riskassessment', + name='parking_and_access', + field=models.BooleanField(default=False, help_text='Are there additional requirements for parking and access to the venue? (i.e. campus parking permits, event access wristbands)'), + preserve_default=False, + ), + ] diff --git a/RIGS/models.py b/RIGS/models.py index 415bcd5d..ad4267e1 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -351,6 +351,9 @@ class Event(models.Model, RevisionMixin): access_at = models.DateTimeField(blank=True, null=True) meet_at = models.DateTimeField(blank=True, null=True) + # Venue requirements + parking_and_access = models.BooleanField(default=False) + # Crew management checked_in_by = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='event_checked_in', blank=True, null=True, on_delete=models.CASCADE) @@ -779,6 +782,9 @@ class RiskAssessment(ReviewableModel, RevisionMixin): persons_responsible_structures = models.TextField(blank=True, default='', help_text="Who are the persons on site responsible for their use?") rigging_plan = models.URLField(blank=True, default='', help_text="Upload your rigging plan to the Sharepoint and submit a link", validators=[validate_url]) + # Venue Access + parking_and_access = models.BooleanField(help_text="Are there additional requirements for parking and access to the venue? (i.e. campus parking permits, event access wristbands)") + # Blimey that was a lot of options supervisor_consulted = models.BooleanField(null=True) @@ -803,6 +809,7 @@ class RiskAssessment(ReviewableModel, RevisionMixin): 'nonstandard_emergency_procedure': False, 'special_structures': False, 'suspended_structures': False, + 'parking_and_access': False } inverted_fields = {key: value for (key, value) in expected_values.items() if not value}.keys() diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index a1de143d..96296546 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -15,8 +15,11 @@ {% endif %} {% if object.is_rig and perms.RIGS.view_event %} {# only need contact details for a rig #} -
If yes to the below, ensure you have communicated with the client and secured all necessary access prior to the event commencing.
+ {% include 'partials/yes_no_radio.html' with formitem=form.parking_and_access %} +This venue has additional parking and/or access requirements.
+ +Ensure the MIC has:
+