Просмотр исходного кода

Add COVID-19 fields to AV templates

Alan Lam 6 лет назад
Родитель
Сommit
62698ebb50

+ 41 - 12
json/age_verification.json

@@ -51,10 +51,10 @@
 
 		{
 			"type": "header",
-			"content": "Venue Sensor"
+			"content": "Venue"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "door_sensor_alert",
 			"label": "Door Sensor Alert",
 			"values": ["", "0", "1"],
@@ -63,6 +63,35 @@
 			"customerExport": false
 		},
 
+		{
+			"type": "inline-radio",
+			"name": "social_distancing_signage",
+			"label": "Signage for Social Distancing",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+		{
+			"type": "inline-radio",
+			"name": "entrance_hand_sanitiser",
+			"label": "Hand Sanitisers at Entrance",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+		{
+			"type": "inline-radio",
+			"name": "social_distancing_measures",
+			"label": "Social Distancing Measures",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"helpText": "Were there social distancing measures in place?",
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+
 		{
 			"type": "hr"
 		},
@@ -111,15 +140,15 @@
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "challenger_gender",
 			"label": "Gender",
 			"values": ["", "M", "F"],
-			"displayStrings": ["No challenge/Don't know", "M", "F"],
+			"displayStrings": ["No challenge/Don't know", "Male", "Female"],
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "challenger_eye_contact",
 			"label": "Eye Contact",
 			"values": ["", "0", "1"],
@@ -143,7 +172,7 @@
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_jackpot",
 			"label": "Jackpot Value",
 			"values": ["", 5, 10, 15, 20, 25, 35, 50, 100, 500],
@@ -151,7 +180,7 @@
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_machine_stake",
 			"label": "Stake Played",
 			"values": ["", 0.1, 0.2, 0.25, 0.3, 0.5, 1, 2],
@@ -159,7 +188,7 @@
 			"helpText": "This is how much the machine charges you per spin."
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_minutes",
 			"label": "Time Played (Minutes)",
 			"values": ["", "1", "2", "3", "4", "5"],
@@ -186,28 +215,28 @@
 			"content": "Signage Details"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "citizen_card_brochure_displayed",
 			"label": "Citizen Card Brochure Displayed",
 			"values": ["", "0", "1"],
 			"displayStrings": ["Don't know", "No", "Yes"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_25",
 			"label": "Think 21 or Think 25",
 			"values": ["", "Think 21", "Think 25"],
 			"displayStrings": ["Don't know", "Think 21", "Think 25"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_badge",
 			"label": "Think 21/25 Badge Worn by Staff",
 			"values": ["", "0", "1"],
 			"displayStrings": ["Don't know", "No", "Yes"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_poster",
 			"label": "Think 21/25 Poster Displayed",
 			"values": ["", "0", "1"],

+ 44 - 15
json/age_verification_mitchells_and_butlers.json

@@ -51,10 +51,10 @@
 	"duringTest": [
 		{
 			"type": "header",
-			"content": "Venue Sensor"
+			"content": "Venue"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "door_sensor_alert",
 			"label": "Door Sensor Alert",
 			"values": ["", "0", "1"],
@@ -63,6 +63,35 @@
 			"customerExport": false
 		},
 
+		{
+			"type": "inline-radio",
+			"name": "social_distancing_signage",
+			"label": "Signage for Social Distancing",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+		{
+			"type": "inline-radio",
+			"name": "entrance_hand_sanitiser",
+			"label": "Hand Sanitisers at Entrance",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+		{
+			"type": "inline-radio",
+			"name": "social_distancing_measures",
+			"label": "Social Distancing Measures",
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
+			"helpText": "Were there social distancing measures in place?",
+			"required": true,
+			"requiredKey": "COVID-19"
+		},
+
 		{
 			"type": "hr"
 		},
@@ -111,15 +140,15 @@
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "challenger_gender",
 			"label": "Gender",
 			"values": ["", "M", "F"],
-			"displayStrings": ["No challenge/Don't know", "M", "F"],
+			"displayStrings": ["No challenge/Don't know", "Male", "Female"],
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "challenger_eye_contact",
 			"label": "Eye Contact",
 			"values": ["", "0", "1"],
@@ -136,7 +165,7 @@
 			"content": "Bar Details"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "bar_purchase",
 			"label": "Bar Purchase",
 			"values": ["0", "1"],
@@ -155,7 +184,7 @@
 			"helpText": "For example: Enter 1.50 if you have spent £1.50."
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "alcohol_purchased",
 			"label": "Alcohol Purchased",
 			"values": ["0", "1"],
@@ -192,7 +221,7 @@
 			"helpText": "Where the machine was located in the venue? (e.g. Opposite the bar.)"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "play_machine_line_of_sight",
 			"label": "Machine Line of Sight of Bar",
 			"values": ["", "0", "1"],
@@ -200,7 +229,7 @@
 			"helpText": "Was the machine in line of sight of the bar?"
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_jackpot",
 			"label": "Jackpot Value",
 			"values": ["", 5, 10, 15, 20, 25, 35, 50, 100, 500],
@@ -208,7 +237,7 @@
 			"customerExport": false
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_machine_stake",
 			"label": "Stake Played",
 			"values": ["", 0.1, 0.2, 0.25, 0.3, 0.5, 1, 2],
@@ -216,7 +245,7 @@
 			"helpText": "This is how much the machine charges you per spin."
 		},
 		{
-			"type": "dropdown",
+			"type": "radio",
 			"name": "play_minutes",
 			"label": "Time Played (Minutes)",
 			"values": ["", "1", "2", "3", "4", "5"],
@@ -243,28 +272,28 @@
 			"content": "Signage Details"
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "citizen_card_brochure_displayed",
 			"label": "Citizen Card Brochure Displayed",
 			"values": ["", "0", "1"],
 			"displayStrings": ["Don't know", "No", "Yes"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_25",
 			"label": "Think 21 or Think 25",
 			"values": ["", "Think 21", "Think 25"],
 			"displayStrings": ["Don't know", "Think 21", "Think 25"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_badge",
 			"label": "Think 21/25 Badge Worn by Staff",
 			"values": ["", "0", "1"],
 			"displayStrings": ["Don't know", "No", "Yes"]
 		},
 		{
-			"type": "dropdown",
+			"type": "inline-radio",
 			"name": "think_21_poster",
 			"label": "Think 21/25 Poster Displayed",
 			"values": ["", "0", "1"],

+ 4 - 3
json/mystery_shop.json

@@ -60,13 +60,14 @@
 
 		{
 			"type": "inline-radio",
-			"name": "entrance_hand_sanitiser_count",
+			"name": "entrance_hand_sanitiser",
 			"label": "Hand Sanitisers at Entrance",
-			"values": [0, 1, 2, 3],
-			"displayStrings": ["0", "1", "2", "3+"],
+			"values": [0, 1],
+			"displayStrings": ["No", "Yes"],
 			"required": true,
 			"requiredKey": "COVID-19"
 		},
+
 		{
 			"type": "inline-radio",
 			"name": "face_mask_offered",

+ 41 - 1
template_processing/age_verification/test_pdf.php

@@ -1,7 +1,15 @@
 <?php
 
+/**
+ * @var Template $template
+ * @var array $values
+ */
+
 $pass_image = $test->pass ? "pass.png" : "fail.png";
 
+// COVID-19
+$covid_19 = in_array("COVID-19", $template->getKeys());
+
 ?>
 
 <h3 class="section">Test Result</h3>
@@ -70,7 +78,7 @@ $pass_image = $test->pass ? "pass.png" : "fail.png";
 
 <h3 class="section">Test Details</h3>
 
-<div style="float: left; width: 49.5%">
+<div class="wide-field-names" style="float: left; width: 49.5%">
 	<div class="subheader">
 		<strong>Date &amp; Time</strong>
 	</div>
@@ -94,6 +102,38 @@ $pass_image = $test->pass ? "pass.png" : "fail.png";
 
 	<div style="clear: both;"></div><br />
 
+	<div class="subheader">
+		<strong>Venue</strong>
+	</div>
+
+	<div class="bl">
+		<div class="field">Door Sensor:</div>
+		<div class="value"><?=TestPDF::getBooleanHtml($values["door_sensor_alert"] ?? false)?></div>
+	</div>
+
+	<?php
+	if($covid_19) {
+		?>
+		<div class="bl">
+			<div class="field">Social Distancing Signage:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_signage"] ?? false)?></div>
+		</div>
+
+		<div class="bl">
+			<div class="field">Entrance Hand Sanitiser:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["entrance_hand_sanitiser"] ?? false)?></div>
+		</div>
+
+		<div>
+			<div class="field">Social Distancing Measures:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_measures"] ?? false)?></div>
+		</div>
+		<?php
+	}
+	?>
+
+	<div style="clear: both;"></div><br />
+
 	<div class="subheader">
 		<strong>Staff</strong>
 	</div>

+ 31 - 0
template_processing/age_verification_mitchells_butlers/test_pdf.php

@@ -2,6 +2,9 @@
 
 $pass_image = $test->pass ? "pass.png" : "fail.png";
 
+// COVID-19
+$covid_19 = in_array("COVID-19", $template->getKeys());
+
 ?>
 
 <h3 class="section">Test Result</h3>
@@ -110,10 +113,38 @@ $pass_image = $test->pass ? "pass.png" : "fail.png";
 
 	<div style="clear: both;"></div><br />
 
+	<div class="subheader">
+		<strong>Venue</strong>
+	</div>
+
+	<div class="bl">
+		<div class="field">Door Sensor:</div>
+		<div class="value"><?=TestPDF::getBooleanHtml($values["door_sensor_alert"] ?? false)?></div>
+	</div>
+
 	<?php
+	if($covid_19) {
+		?>
+		<div class="bl">
+			<div class="field">Social Distancing Signage:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_signage"] ?? false)?></div>
+		</div>
 
+		<div class="bl">
+			<div class="field">Entrance Hand Sanitiser:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["entrance_hand_sanitiser"] ?? false)?></div>
+		</div>
+
+		<div>
+			<div class="field">Social Distancing Measures:</div>
+			<div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_measures"] ?? false)?></div>
+		</div>
+		<?php
+	}
 	?>
 
+	<div style="clear: both;"></div><br />
+
 	<div class="subheader">
 		<strong>Staff</strong>
 	</div>

+ 1 - 0
template_processing/mystery_shop/test_pdf.php

@@ -2,6 +2,7 @@
 
 /**
  * @var Template $template
+ * @var array $values
  */
 
 // Values