|
|
@@ -1,13 +1,28 @@
|
|
|
<?php
|
|
|
|
|
|
+use Mpdf\Mpdf;
|
|
|
+
|
|
|
/**
|
|
|
* @var Template $template
|
|
|
* @var array $values
|
|
|
+ * @var Test $test
|
|
|
+ * @var Mpdf $mpdf
|
|
|
+ * @var string $location_text
|
|
|
+ * @var Customer $customer
|
|
|
+ * @var Location $location
|
|
|
+ * @var User $tester
|
|
|
+ * @var string $date_start
|
|
|
+ * @var string $time_start
|
|
|
+ * @var string $time_end
|
|
|
+ * @var string $duration_text
|
|
|
+ * @var string[] $field_name_label_map
|
|
|
*/
|
|
|
|
|
|
// Values
|
|
|
+
|
|
|
$cleanliness = $values["cleanliness"];
|
|
|
switch($cleanliness) {
|
|
|
+ default:
|
|
|
case 1: $cleanliness = "Very dirty"; break;
|
|
|
case 2: $cleanliness = "Dirty"; break;
|
|
|
case 3: $cleanliness = "Adequate"; break;
|
|
|
@@ -16,8 +31,8 @@ switch($cleanliness) {
|
|
|
}
|
|
|
|
|
|
$staff_badge_worn = $values["staff_badge_worn"] ?? "";
|
|
|
-if(strlen($staff_badge_worn) == 0) $staff_badge_worn = "Don't know/Not approached";
|
|
|
-else $staff_badge_worn = ($staff_badge_worn == 0) ? "No" : "Yes";
|
|
|
+if(strlen($staff_badge_worn) === 0) $staff_badge_worn = "Don't know/Not approached";
|
|
|
+else $staff_badge_worn = !$staff_badge_worn ? "No" : "Yes";
|
|
|
|
|
|
$staff_offered_drink = $values["staff_offered_drink"] ?? "";
|
|
|
$staff_offered_drink = $staff_offered_drink ? "Yes" : "No";
|
|
|
@@ -50,8 +65,7 @@ if(!file_exists($location_photo_path)) {
|
|
|
$location_photo_path = "public/img/no_image_4_3.png";
|
|
|
}
|
|
|
|
|
|
-$size = getimagesize($location_photo_path);
|
|
|
-list($image_width, $image_height) = $size;
|
|
|
+[$image_width, $image_height] = getimagesize($location_photo_path);
|
|
|
|
|
|
$width = "";
|
|
|
$height = "";
|
|
|
@@ -202,7 +216,7 @@ $mpdf->imageVars["location_photo"] = file_get_contents($location_photo_path);
|
|
|
<div class="subheader">
|
|
|
<strong>Location Photo</strong>
|
|
|
</div>
|
|
|
- <img src="var:location_photo" width="<?=$width?>" height="<?=$height?>" />
|
|
|
+ <img src="var:location_photo" width="<?=$width?>" height="<?=$height?>" alt="" />
|
|
|
</div>
|
|
|
|
|
|
<div style="float: right; width: 49.5%">
|