|
|
@@ -360,176 +360,247 @@ function render_card_list_group($details) {
|
|
|
</div>
|
|
|
</div>
|
|
|
<hr />
|
|
|
- <?php
|
|
|
- if($template->hasPassFail()) {
|
|
|
+
|
|
|
+ <section class="mb-4">
|
|
|
+ <h5><?=htmlspecialchars(__("Overrides"))?></h5>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ if($template->hasPassFail()) {
|
|
|
+ ?>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="pass-override">Pass Override</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control form-control-sm" name="pass_override" id="pass-override">
|
|
|
+ <option value="">None</option>
|
|
|
+ <option value="1">Pass</option>
|
|
|
+ <option value="0">Fail</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
?>
|
|
|
<div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="pass-override">Pass Override</label>
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="start-override">Start Override</label>
|
|
|
+
|
|
|
<div class="col-sm">
|
|
|
- <select class="form-control form-control-sm" name="pass_override" id="pass-override">
|
|
|
- <option value="">None</option>
|
|
|
- <option value="1">Pass</option>
|
|
|
- <option value="0">Fail</option>
|
|
|
- </select>
|
|
|
+ <input class="form-control form-control-sm" type="datetime-local" name="start_override" id="start-override" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="start-override">Start Override</label>
|
|
|
-
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control form-control-sm" type="datetime-local" name="start_override" id="start-override" />
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="end-override">End Override</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control form-control-sm" type="datetime-local" name="end_override" id="end-override" />
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="end-override">End Override</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control form-control-sm" type="datetime-local" name="end_override" id="end-override" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="customer-fee">Customer Fee Override</label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="input-group input-group-sm">
|
|
|
- <div class="input-group-prepend">
|
|
|
- <span class="input-group-text">£</span>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="customer-fee">Customer Fee Override</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">£</span>
|
|
|
+ </div>
|
|
|
+ <input class="form-control" type="number" step="0.01" min="0" name="customer_fee" id="customer-fee" placeholder="Enter customer fee override" value="<?=htmlspecialchars($test->customer_fee)?>" />
|
|
|
</div>
|
|
|
- <input class="form-control" type="number" step="0.01" min="0" name="customer_fee" id="customer-fee" placeholder="Enter customer fee override" value="<?=htmlspecialchars($test->customer_fee)?>" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="tester-fee">Tester Fee Override</label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="input-group input-group-sm">
|
|
|
- <div class="input-group-prepend">
|
|
|
- <span class="input-group-text">£</span>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="tester-fee">Tester Fee Override</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">£</span>
|
|
|
+ </div>
|
|
|
+ <input class="form-control" type="number" step="0.01" min="0" name="tester_fee" id="tester-fee" placeholder="Enter tester fee override" value="<?=htmlspecialchars($test->test_fee)?>" />
|
|
|
</div>
|
|
|
- <input class="form-control" type="number" step="0.01" min="0" name="tester_fee" id="tester-fee" placeholder="Enter tester fee override" value="<?=htmlspecialchars($test->test_fee)?>" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <row class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="travel-cost">Travel Costs</label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="input-group input-group-sm">
|
|
|
- <div class="input-group-prepend">
|
|
|
- <span class="input-group-text">£</span>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section class="mb-4">
|
|
|
+ <h5><?=htmlspecialchars(__("Costs & Notes"))?></h5>
|
|
|
+
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="travel-cost">Travel Costs</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">£</span>
|
|
|
+ </div>
|
|
|
+ <input class="form-control" type="number" step="0.01" min="0" max="999.99" name="travel_cost" id="travel-cost" placeholder="Enter travel costs" value="<?=htmlspecialchars($test->test_travel_cost)?>" />
|
|
|
</div>
|
|
|
- <input class="form-control" type="number" step="0.01" min="0" max="999.99" name="travel_cost" id="travel-cost" placeholder="Enter travel costs" value="<?=htmlspecialchars($test->test_travel_cost)?>" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- </row>
|
|
|
-
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="verifier-notes">Verifier Notes</label>
|
|
|
- <div class="col-sm">
|
|
|
- <textarea class="form-control form-control-sm" name="verifier_notes" id="verifier-notes" placeholder="Enter verifier notes" rows="4"><?=htmlspecialchars($test->verifier_notes)?></textarea>
|
|
|
+
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="verifier-notes">Verifier Notes</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <textarea class="form-control form-control-sm" name="verifier_notes" id="verifier-notes" placeholder="Enter verifier notes" rows="4"><?=htmlspecialchars($test->verifier_notes)?></textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="row mb-1 align-items-center">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="retest">Set As Retest</label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="custom-control custom-checkbox">
|
|
|
- <input class="custom-control-input" type="checkbox" name="retest" id="retest" value="1" <?=Form::checked($test->retest)?> />
|
|
|
- <label class="custom-control-label" for="retest">This test was a retest</label>
|
|
|
+ <div class="row mb-1 align-items-center">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="retest">Set As Retest</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="retest" id="retest" value="1" <?=Form::checked($test->retest)?> />
|
|
|
+ <label class="custom-control-label" for="retest">This test was a retest</label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </section>
|
|
|
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="new-test-project-id">Create New Test</label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="input-group">
|
|
|
- <select class="form-control" name="new_test_project_id" id="new-test-project-id">
|
|
|
- <option value="0">Do not create</option>
|
|
|
- <?php
|
|
|
- foreach($future_projects as $future_project) {
|
|
|
- ?>
|
|
|
- <option value="<?=$future_project->id?>"><?=htmlspecialchars($future_project->name)?></option>
|
|
|
+ <section class="mb-4">
|
|
|
+ <h5><?=htmlspecialchars(__("New Test"))?></h5>
|
|
|
+
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="new-test-project-id">
|
|
|
+ Create New Test
|
|
|
+ </label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="input-group">
|
|
|
+ <select class="form-control" name="new_test_project_id" id="new-test-project-id">
|
|
|
+ <option value="0">Do not create</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
- <div class="input-group-append">
|
|
|
- <div class="input-group-text">
|
|
|
- <div class="custom-control custom-checkbox">
|
|
|
- <input class="custom-control-input" type="checkbox" name="new_test_is_retest" id="new-test-is-retest" value="1" />
|
|
|
- <label class="custom-control-label" for="new-test-is-retest"><?=htmlspecialchars(__("Retest"))?></label>
|
|
|
+ foreach($future_projects as $future_project) {
|
|
|
+ ?>
|
|
|
+ <option value="<?=$future_project->id?>" data-customer-fee="<?=$future_project->default_customer_fee?>">
|
|
|
+ <?=htmlspecialchars($future_project->name)?>
|
|
|
+ </option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ <div class="input-group-append">
|
|
|
+ <div class="input-group-text">
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="new_test_is_retest" id="new-test-is-retest" value="1" />
|
|
|
+ <label class="custom-control-label" for="new-test-is-retest"><?=htmlspecialchars(__("Retest"))?></label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <?php
|
|
|
- if($test->getStatus() === Test::STATUS_PENDING_VERIFICATION) {
|
|
|
- ?>
|
|
|
<?php
|
|
|
- $customer_checked = $customer->email_after_test;
|
|
|
- $location_checked = $customer->email_locations_after_test;
|
|
|
-
|
|
|
- $email_address_configs = [
|
|
|
- ["email" => $customer->email, "label" => "Email Headquarters", "name" => "email_customer", "checked" => $customer_checked],
|
|
|
- ["email" => $location->email, "label" => "Email Venue", "name" => "email_location", "checked" => $location_checked],
|
|
|
- ["email" => $location->area_manager_email, "label" => "Email AM", "name" => "email_location_area_manager", "checked" => $location_checked],
|
|
|
- ["email" => $location->operations_manager_email, "label" => "Email OM", "name" => "email_location_operations_manager", "checked" => $location_checked],
|
|
|
- ["email" => $location->gaming_manager_email, "label" => "Email GM", "name" => "email_location_gaming_manager", "checked" => $location_checked],
|
|
|
- ["email" => $location->senior_gaming_manager_email, "label" => "Email SGM", "name" => "email_location_senior_gaming_manager", "checked" => $location_checked],
|
|
|
- ];
|
|
|
-
|
|
|
- foreach($email_address_configs as $email_address_config) {
|
|
|
- $email_address = $email_address_config["email"];
|
|
|
- if(!$email_address) {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- $label = $email_address_config["label"];
|
|
|
- $name = $email_address_config["name"];
|
|
|
- $checked = $email_address_config["checked"];
|
|
|
- $id = str_replace("_", "-", $name);
|
|
|
+ if($location->email) {
|
|
|
?>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="<?=$id?>">
|
|
|
- <?=htmlspecialchars($label)?>
|
|
|
+ <div class="row mb-1 align-items-center">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="payment-required">
|
|
|
+ Invoice Location
|
|
|
</label>
|
|
|
<div class="col-sm">
|
|
|
- <div class="custom-control custom-checkbox">
|
|
|
- <input class="custom-control-input" type="checkbox" name="<?=$name?>" id="<?=$id?>" value="1" <?=Form::checked($checked)?> />
|
|
|
- <label class="custom-control-label" for="<?=$id?>"><?=htmlspecialchars($email_address)?></label>
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input class="custom-control-input" id="payment-required" name="payment_required" type="checkbox" value="1" />
|
|
|
+ <label class="custom-control-label" for="payment-required"><?=htmlspecialchars(__("Send Invoice"))?></label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row mb-1 align-items-center">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="invoice-amount">
|
|
|
+ Invoice Amount
|
|
|
+ </label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">£</span>
|
|
|
+ </div>
|
|
|
+ <input class="form-control" type="number" step="0.01" min="0" max="999.99" name="invoice_amount" id="invoice-amount" placeholder="Enter invoice amount" value="0.00" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<?php
|
|
|
}
|
|
|
?>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="include-previous-test"><?=htmlspecialchars(__("Previous Test"))?></label>
|
|
|
- <div class="col-sm">
|
|
|
- <div class="custom-control custom-checkbox">
|
|
|
- <input class="custom-control-input" type="checkbox" name="include_previous_test" id="include-previous-test" value="1" checked />
|
|
|
- <label class="custom-control-label" for="include-previous-test">
|
|
|
- <?=htmlspecialchars(__("Attach PDF"))?>
|
|
|
+
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ if($test->getStatus() === Test::STATUS_PENDING_VERIFICATION) {
|
|
|
+ ?>
|
|
|
+ <section class="mb-4">
|
|
|
+ <h5><?=htmlspecialchars(__("Notifications"))?></h5>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $customer_checked = $customer->email_after_test;
|
|
|
+ $location_checked = $customer->email_locations_after_test;
|
|
|
+
|
|
|
+ $email_address_configs = [
|
|
|
+ ["email" => $customer->email, "label" => "Email Headquarters", "name" => "email_customer", "checked" => $customer_checked],
|
|
|
+ ["email" => $location->email, "label" => "Email Venue", "name" => "email_location", "checked" => $location_checked],
|
|
|
+ ["email" => $location->area_manager_email, "label" => "Email AM", "name" => "email_location_area_manager", "checked" => $location_checked],
|
|
|
+ ["email" => $location->operations_manager_email, "label" => "Email OM", "name" => "email_location_operations_manager", "checked" => $location_checked],
|
|
|
+ ["email" => $location->gaming_manager_email, "label" => "Email GM", "name" => "email_location_gaming_manager", "checked" => $location_checked],
|
|
|
+ ["email" => $location->senior_gaming_manager_email, "label" => "Email SGM", "name" => "email_location_senior_gaming_manager", "checked" => $location_checked],
|
|
|
+ ];
|
|
|
+
|
|
|
+ foreach($email_address_configs as $email_address_config) {
|
|
|
+ $email_address = $email_address_config["email"];
|
|
|
+ if(!$email_address) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ $label = $email_address_config["label"];
|
|
|
+ $name = $email_address_config["name"];
|
|
|
+ $checked = $email_address_config["checked"];
|
|
|
+ $id = str_replace("_", "-", $name);
|
|
|
+ ?>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="<?= $id ?>">
|
|
|
+ <?= htmlspecialchars($label) ?>
|
|
|
</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="<?= $name ?>"
|
|
|
+ id="<?= $id ?>" value="1" <?= Form::checked($checked) ?> />
|
|
|
+ <label class="custom-control-label"
|
|
|
+ for="<?= $id ?>"><?= htmlspecialchars($email_address) ?></label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm"
|
|
|
+ for="include-previous-test"><?= htmlspecialchars(__("Previous Test")) ?></label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="include_previous_test"
|
|
|
+ id="include-previous-test" value="1" checked/>
|
|
|
+ <label class="custom-control-label" for="include-previous-test">
|
|
|
+ <?= htmlspecialchars(__("Attach PDF")) ?>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="tester-message">Message to Tester (if rejecting)</label>
|
|
|
- <div class="col-sm">
|
|
|
- <textarea class="form-control form-control-sm" name="tester_message" id="tester-message" placeholder="Enter message to tester" rows="4"><?=htmlspecialchars($tester_message)?></textarea>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="tester-message">Message to Tester (if
|
|
|
+ rejecting)</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <textarea class="form-control form-control-sm" name="tester_message"
|
|
|
+ id="tester-message" placeholder="Enter message to tester"
|
|
|
+ rows="4"><?= htmlspecialchars($tester_message) ?></textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </section>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ // Submit buttons
|
|
|
|
|
|
+ if($test->getStatus() === Test::STATUS_PENDING_VERIFICATION) {
|
|
|
+ ?>
|
|
|
<div class="row mb-1">
|
|
|
<div class="col-sm offset-sm-4">
|
|
|
- <button class="btn btn-success" type="submit" name="accept" value="1">Accept</button>
|
|
|
+ <button class="btn btn-success" type="submit" name="accept" value="1">Accept
|
|
|
+ </button>
|
|
|
<button class="btn btn-danger" type="submit" name="reject" value="1">Reject</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -545,6 +616,7 @@ function render_card_list_group($details) {
|
|
|
<?php
|
|
|
}
|
|
|
?>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|