|
|
@@ -17,386 +17,387 @@ $custom_filters = [
|
|
|
];
|
|
|
|
|
|
?>
|
|
|
-<div class="container mt-3 py-4">
|
|
|
+<div class="mt-3 py-4">
|
|
|
+ <div class="container-fluid">
|
|
|
|
|
|
- <div class="row">
|
|
|
- <div class="col-sm">
|
|
|
- <h2>
|
|
|
- Tests
|
|
|
- </h2>
|
|
|
- </div>
|
|
|
- <div class="col-sm-auto">
|
|
|
- <div class="row">
|
|
|
- <div class="col-auto">
|
|
|
- <a class="btn btn-outline-primary" href="#filters" data-toggle="collapse">
|
|
|
- Toggle Filters <span class="badge badge-pill badge-danger"><?=$filter_count?></span>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
- <div class="col">
|
|
|
- <div class="input-group">
|
|
|
- <div class="input-group-prepend">
|
|
|
- <span class="input-group-text">
|
|
|
- Sort
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <select class="form-control" id="sort-dropdown" data-url-template="/account/tests?<?=htmlspecialchars(http_build_query($query))?>">
|
|
|
- <?php
|
|
|
- foreach($sorts as $value => $display) {
|
|
|
- $selected = ($value == $sort) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=$display?></option>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-sm">
|
|
|
+ <h2>
|
|
|
+ Tests
|
|
|
+ </h2>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-auto">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-auto">
|
|
|
+ <a class="btn btn-outline-primary" href="#filters" data-toggle="collapse">
|
|
|
+ Toggle Filters <span class="badge badge-pill badge-danger"><?=$filter_count?></span>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="col">
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">
|
|
|
+ Sort
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <select class="form-control" id="sort-dropdown" data-url-template="/account/tests?<?=htmlspecialchars(http_build_query($query))?>">
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach($sorts as $value => $display) {
|
|
|
+ $selected = ($value == $sort) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=$display?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="row my-3">
|
|
|
- <div class="col mb-1">
|
|
|
- <a class="btn btn-block btn-primary" href="/account/tests">Show All</a>
|
|
|
- </div>
|
|
|
- <div class="col mb-1">
|
|
|
- <a class="btn btn-block btn-secondary" href="/account/tests?status=<?=Test::STATUS_UNASSIGNED?>">Unassigned</a>
|
|
|
- </div>
|
|
|
- <div class="col mb-1">
|
|
|
- <a class="btn btn-block btn-warning" href="/account/tests?status=<?=Test::STATUS_CONFIRMED?>">Confirmed</a>
|
|
|
- </div>
|
|
|
- <div class="col mb-1">
|
|
|
- <a class="btn btn-block btn-success" href="/account/tests?status=<?=Test::STATUS_PENDING_VERIFICATION?>">Pending Verification</a>
|
|
|
- </div>
|
|
|
- <div class="col mb-1">
|
|
|
- <a class="btn btn-block btn-danger" href="/account/tests?pass=0">Fails</a>
|
|
|
+ <div class="row my-3">
|
|
|
+ <div class="col mb-1">
|
|
|
+ <a class="btn btn-block btn-primary" href="/account/tests">Show All</a>
|
|
|
+ </div>
|
|
|
+ <div class="col mb-1">
|
|
|
+ <a class="btn btn-block btn-secondary" href="/account/tests?status=<?=Test::STATUS_UNASSIGNED?>">Unassigned</a>
|
|
|
+ </div>
|
|
|
+ <div class="col mb-1">
|
|
|
+ <a class="btn btn-block btn-warning" href="/account/tests?status=<?=Test::STATUS_CONFIRMED?>">Confirmed</a>
|
|
|
+ </div>
|
|
|
+ <div class="col mb-1">
|
|
|
+ <a class="btn btn-block btn-success" href="/account/tests?status=<?=Test::STATUS_PENDING_VERIFICATION?>">Pending Verification</a>
|
|
|
+ </div>
|
|
|
+ <div class="col mb-1">
|
|
|
+ <a class="btn btn-block btn-danger" href="/account/tests?pass=0">Fails</a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="<?=$filters_collapse?>" id="filters">
|
|
|
- <form method="get">
|
|
|
- <div class="card card-body bg-light text-dark mb-3">
|
|
|
+ <div class="<?=$filters_collapse?>" id="filters">
|
|
|
+ <form method="get">
|
|
|
+ <div class="card card-body bg-light text-dark mb-3">
|
|
|
|
|
|
- <h3>Filters</h3>
|
|
|
+ <h3>Filters</h3>
|
|
|
|
|
|
- <div class="row mb-1">
|
|
|
- <div class="col-lg-6">
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-form-label col-sm-4" for="status">Status</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="status" id="status">
|
|
|
- <option value="">Any not cancelled</option>
|
|
|
- <?php
|
|
|
- foreach(Test::STATUSES as $value => $display) {
|
|
|
- $selected = ($value === $status) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <div class="col-lg-6">
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-form-label col-sm-4" for="status">Status</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="status" id="status">
|
|
|
+ <option value="">Any not cancelled</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-form-label col-sm-4" for="status-tester-invoice">Tester Invoice Status</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="status_tester_invoice" id="status-tester-invoice">
|
|
|
- <option value="">Any</option>
|
|
|
- <?php
|
|
|
- foreach(Test::STATUSES_TESTER_INVOICE as $value) {
|
|
|
- $display = Test::getStatusTesterInvoiceText($value);
|
|
|
- $selected = ($value === $status_tester_invoice) ? "selected" : "";
|
|
|
+ foreach(Test::STATUSES as $value => $display) {
|
|
|
+ $selected = ($value === $status) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-form-label col-sm-4" for="customer-id">Customer</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="customer_id" id="customer-id">
|
|
|
- <option value="">Select customer</option>
|
|
|
- <?php
|
|
|
- foreach($customers as $customer) {
|
|
|
- $selected = ($customer->id == $customer_id) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=$customer->id?>" <?=$selected?>><?=htmlspecialchars($customer->name)?></option>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-form-label col-sm-4" for="status-tester-invoice">Tester Invoice Status</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="status_tester_invoice" id="status-tester-invoice">
|
|
|
+ <option value="">Any</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-form-label col-sm-4" for="project-id">Project</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="project_id" id="project-id">
|
|
|
- <option value="">Select project</option>
|
|
|
- <?php
|
|
|
- foreach($projects as $project) {
|
|
|
- $selected = ($project->id == $project_id) ? "selected" : "";
|
|
|
+ foreach(Test::STATUSES_TESTER_INVOICE as $value) {
|
|
|
+ $display = Test::getStatusTesterInvoiceText($value);
|
|
|
+ $selected = ($value === $status_tester_invoice) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
?>
|
|
|
- <option value="<?=$project->id?>" <?=$selected?>><?=htmlspecialchars($project->name)?></option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-form-label col-sm-4" for="customer-id">Customer</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="customer_id" id="customer-id">
|
|
|
+ <option value="">Select customer</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach($customers as $customer) {
|
|
|
+ $selected = ($customer->id == $customer_id) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$customer->id?>" <?=$selected?>><?=htmlspecialchars($customer->name)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="pass">Result</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="pass" id="pass">
|
|
|
- <?php
|
|
|
- foreach($results as $value => $display) {
|
|
|
- $selected = (strval($value) === strval($pass)) ? "selected" : "";
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-form-label col-sm-4" for="project-id">Project</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="project_id" id="project-id">
|
|
|
+ <option value="">Select project</option>
|
|
|
+ <?php
|
|
|
+ foreach($projects as $project) {
|
|
|
+ $selected = ($project->id == $project_id) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$project->id?>" <?=$selected?>><?=htmlspecialchars($project->name)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="pass">Result</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="pass" id="pass">
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach($results as $value => $display) {
|
|
|
+ $selected = (strval($value) === strval($pass)) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-lg">
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="test-id">Test ID</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="test_id" id="test-id" placeholder="Enter test ID" value="<?=$test_id?>" />
|
|
|
+ <div class="col-lg">
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="test-id">Test ID</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="test_id" id="test-id" placeholder="Enter test ID" value="<?=$test_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="tester-id">Tester ID</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="tester_id" id="tester-id" placeholder="Enter tester ID" value="<?=$tester_id?>" />
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="tester-id">Tester ID</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="tester_id" id="tester-id" placeholder="Enter tester ID" value="<?=$tester_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="location-id">Location ID</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="location_id" id="location-id" placeholder="Enter location ID" value="<?=$location_id?>" />
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="location-id">Location ID</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="location_id" id="location-id" placeholder="Enter location ID" value="<?=$location_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="location-internal-id">Internal ID</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="location_internal_id" id="location-internal-id" placeholder="Enter location internal ID" value="<?=$location_internal_id?>" />
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="location-internal-id">Internal ID</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="location_internal_id" id="location-internal-id" placeholder="Enter location internal ID" value="<?=$location_internal_id?>" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="custom">Custom Filter</label>
|
|
|
- <div class="col-sm">
|
|
|
- <select class="form-control" name="custom" id="custom">
|
|
|
- <option value="">Select custom filter</option>
|
|
|
- <?php
|
|
|
- foreach($custom_filters as $value => $display) {
|
|
|
- $selected = (strval($value) === strval($custom)) ? "selected" : "";
|
|
|
- ?>
|
|
|
- <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="custom">Custom Filter</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <select class="form-control" name="custom" id="custom">
|
|
|
+ <option value="">Select custom filter</option>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </select>
|
|
|
+ foreach($custom_filters as $value => $display) {
|
|
|
+ $selected = (strval($value) === strval($custom)) ? "selected" : "";
|
|
|
+ ?>
|
|
|
+ <option value="<?=$value?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="row">
|
|
|
- <div class="col-lg">
|
|
|
- <div class="row">
|
|
|
- <div class="col-sm offset-sm-4">
|
|
|
- <button class="btn btn-primary" type="submit">Filter</button>
|
|
|
- <a class="btn btn-secondary" href="/account/tests">Clear Filters</a>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-lg">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-sm offset-sm-4">
|
|
|
+ <button class="btn btn-primary" type="submit">Filter</button>
|
|
|
+ <a class="btn btn-secondary" href="/account/tests">Clear Filters</a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="col-lg">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="col-lg">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
- </div>
|
|
|
- <input type="hidden" name="sort" value="<?=$sort?>" />
|
|
|
- </form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <?php
|
|
|
-
|
|
|
- if(empty($tests)) {
|
|
|
- ?>
|
|
|
- <div class="alert alert-info">
|
|
|
- There are no tests to display.
|
|
|
+ </div>
|
|
|
+ <input type="hidden" name="sort" value="<?=$sort?>" />
|
|
|
+ </form>
|
|
|
</div>
|
|
|
+
|
|
|
<?php
|
|
|
- }
|
|
|
- else {
|
|
|
- ?>
|
|
|
- <div class="mb-3">
|
|
|
+
|
|
|
+ if(empty($tests)) {
|
|
|
+ ?>
|
|
|
+ <div class="alert alert-info">
|
|
|
+ There are no tests to display.
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- View::include("pagination", compact("pagination_object"));
|
|
|
+ }
|
|
|
+ else {
|
|
|
?>
|
|
|
- </div>
|
|
|
+ <div class="mb-3">
|
|
|
+ <?php
|
|
|
+ View::include("pagination", compact("pagination_object"));
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
|
|
|
- <form method="post">
|
|
|
+ <form method="post">
|
|
|
|
|
|
- <div class="table-responsive mb-3">
|
|
|
+ <div class="table-responsive mb-3">
|
|
|
|
|
|
- <table class="table table-sm table-hover" style="min-width: 1024px;">
|
|
|
- <thead>
|
|
|
- <th></th>
|
|
|
- <th>ID</th>
|
|
|
- <th>Location</th>
|
|
|
- <th>Project</th>
|
|
|
- <th>Tester</th>
|
|
|
- <th>Due Date</th>
|
|
|
- <th>Status</th>
|
|
|
- <th>Result</th>
|
|
|
- <th></th>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <?php
|
|
|
+ <table class="table table-sm table-hover" style="min-width: 1024px;">
|
|
|
+ <thead>
|
|
|
+ <th></th>
|
|
|
+ <th>ID</th>
|
|
|
+ <th>Location</th>
|
|
|
+ <th>Project</th>
|
|
|
+ <th>Tester</th>
|
|
|
+ <th>Due Date</th>
|
|
|
+ <th>Status</th>
|
|
|
+ <th>Result</th>
|
|
|
+ <th></th>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <?php
|
|
|
|
|
|
- foreach($tests as $test) {
|
|
|
- $location = $test->getLocation();
|
|
|
- $project = $test->getProject();
|
|
|
- $tester = $test->getTester();
|
|
|
+ foreach($tests as $test) {
|
|
|
+ $location = $test->getLocation();
|
|
|
+ $project = $test->getProject();
|
|
|
+ $tester = $test->getTester();
|
|
|
|
|
|
- $unix_start = strtotime($test->dts_start . " UTC");
|
|
|
- $unix_end = strtotime($test->dts_end . " UTC");
|
|
|
+ $unix_start = strtotime($test->dts_start . " UTC");
|
|
|
+ $unix_end = strtotime($test->dts_end . " UTC");
|
|
|
|
|
|
|
|
|
- ?>
|
|
|
+ ?>
|
|
|
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <input type="checkbox" name="test_ids[]" value="<?=$test->id?>" />
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <?=$test->id?>
|
|
|
- </td>
|
|
|
- <td class="align-middle">
|
|
|
- <a href="/account/locations/<?=$location->id?>">
|
|
|
- <?=htmlspecialchars($location->name)?>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <input type="checkbox" name="test_ids[]" value="<?=$test->id?>" />
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <?=$test->id?>
|
|
|
+ </td>
|
|
|
+ <td class="align-middle">
|
|
|
+ <a href="/account/locations/<?=$location->id?>">
|
|
|
+ <?=htmlspecialchars($location->name)?>
|
|
|
+ <?php
|
|
|
+ if($location->internal_id) {
|
|
|
+ ?>
|
|
|
+ <small>(Internal ID: <?=htmlspecialchars($location->internal_id)?>)</small>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </a><br />
|
|
|
+ <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city"]))?></small>
|
|
|
+ </td>
|
|
|
+ <td class="align-middle">
|
|
|
+ <a href="/account/projects/<?=$project->id?>"><?=htmlspecialchars($project->name)?></a><br />
|
|
|
+ <small><strong>Deadline:</strong> <?=date("d/m/Y", strtotime($project->dts_deadline . " UTC"))?><small>
|
|
|
+ </td>
|
|
|
+ <td class="align-middle">
|
|
|
+ <?php
|
|
|
+ if($tester) {
|
|
|
+ ?>
|
|
|
+ <a href="/account/users/<?=$tester->id?>"><?=htmlspecialchars($tester->getDisplayName())?></a>
|
|
|
<?php
|
|
|
- if($location->internal_id) {
|
|
|
+ if($test->status_tester_invoice > 0) {
|
|
|
+ $time = Util::getUnixTimeFromUTC($test->dts_tester_invoice_generated);
|
|
|
+ $dts = Util::getDisplayDateTime($time);
|
|
|
?>
|
|
|
- <small>(Internal ID: <?=htmlspecialchars($location->internal_id)?>)</small>
|
|
|
+ <br />
|
|
|
+ <span class="badge badge-<?=Test::getStatusTesterInvoiceClass($test->status_tester_invoice)?>" title="Generated on <?=$dts?>"><?=$test->getStatusTesterInvoiceText($test->status_tester_invoice)?></span>
|
|
|
<?php
|
|
|
}
|
|
|
+ }
|
|
|
+ else {
|
|
|
?>
|
|
|
- </a><br />
|
|
|
- <small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city"]))?></small>
|
|
|
- </td>
|
|
|
- <td class="align-middle">
|
|
|
- <a href="/account/projects/<?=$project->id?>"><?=htmlspecialchars($project->name)?></a><br />
|
|
|
- <small><strong>Deadline:</strong> <?=date("d/m/Y", strtotime($project->dts_deadline . " UTC"))?><small>
|
|
|
- </td>
|
|
|
- <td class="align-middle">
|
|
|
- <?php
|
|
|
- if($tester) {
|
|
|
+ <small class="text-muted">N/A</small>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
?>
|
|
|
- <a href="/account/users/<?=$tester->id?>"><?=htmlspecialchars($tester->getDisplayName())?></a>
|
|
|
+ </td>
|
|
|
+ <td class="text-center align-middle">
|
|
|
<?php
|
|
|
- if($test->status_tester_invoice > 0) {
|
|
|
- $time = Util::getUnixTimeFromUTC($test->dts_tester_invoice_generated);
|
|
|
- $dts = Util::getDisplayDateTime($time);
|
|
|
+ if(is_null($test->dts_due)) {
|
|
|
?>
|
|
|
- <br />
|
|
|
- <span class="badge badge-<?=Test::getStatusTesterInvoiceClass($test->status_tester_invoice)?>" title="Generated on <?=$dts?>"><?=$test->getStatusTesterInvoiceText($test->status_tester_invoice)?></span>
|
|
|
+ <small class="text-muted">N/A</small>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ?>
|
|
|
+ <?=explode(" ", $test->dts_due)[0]?>
|
|
|
<?php
|
|
|
}
|
|
|
- }
|
|
|
- else {
|
|
|
- ?>
|
|
|
- <small class="text-muted">N/A</small>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </td>
|
|
|
- <td class="text-center align-middle">
|
|
|
- <?php
|
|
|
- if(is_null($test->dts_due)) {
|
|
|
- ?>
|
|
|
- <small class="text-muted">N/A</small>
|
|
|
- <?php
|
|
|
- }
|
|
|
- else {
|
|
|
?>
|
|
|
- <?=explode(" ", $test->dts_due)[0]?>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </td>
|
|
|
- <td class="text-center align-middle">
|
|
|
- <span class="badge badge-<?=$test->getStatusClass()?>"><?=$test->getStatusText()?></span>
|
|
|
- </td>
|
|
|
- <td class="text-center align-middle text-<?=$test->getPassClass()?>">
|
|
|
- <div title="<?=$test->getPassText()?>">
|
|
|
- <i class="fas fa-2x fa-fw fa-<?=$test->getPassIcon()?>"></i>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td class="text-right align-middle">
|
|
|
- <div class="dropdown">
|
|
|
- <button class="btn btn-secondary dropdown-toggle" type="button" id="test-dropdown-<?=$test->id?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
- Actions
|
|
|
- </button>
|
|
|
- <div class="dropdown-menu" aria-labelledby="test-dropdown-<?=$test->id?>">
|
|
|
- <a class="dropdown-item" href="/account/tests/<?=$test->id?>">View</a>
|
|
|
- <?php
|
|
|
- if($test->hasTesterInvoicePDF()) {
|
|
|
- ?>
|
|
|
- <a class="dropdown-item" href="/account/tests/<?=$test->id?>/invoice">Download Tester Invoice</a>
|
|
|
+ </td>
|
|
|
+ <td class="text-center align-middle">
|
|
|
+ <span class="badge badge-<?=$test->getStatusClass()?>"><?=$test->getStatusText()?></span>
|
|
|
+ </td>
|
|
|
+ <td class="text-center align-middle text-<?=$test->getPassClass()?>">
|
|
|
+ <div title="<?=$test->getPassText()?>">
|
|
|
+ <i class="fas fa-2x fa-fw fa-<?=$test->getPassIcon()?>"></i>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class="text-right align-middle">
|
|
|
+ <div class="dropdown">
|
|
|
+ <button class="btn btn-secondary dropdown-toggle" type="button" id="test-dropdown-<?=$test->id?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
+ Actions
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu" aria-labelledby="test-dropdown-<?=$test->id?>">
|
|
|
+ <a class="dropdown-item" href="/account/tests/<?=$test->id?>">View</a>
|
|
|
<?php
|
|
|
- }
|
|
|
- ?>
|
|
|
+ if($test->hasTesterInvoicePDF()) {
|
|
|
+ ?>
|
|
|
+ <a class="dropdown-item" href="/account/tests/<?=$test->id?>/invoice">Download Tester Invoice</a>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-6 offset-md-6">
|
|
|
- <div class="input-group">
|
|
|
- <div class="input-group-prepend">
|
|
|
- <span class="input-group-text">
|
|
|
- Batch Action
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <select class="form-control" name="batch_action" required>
|
|
|
- <option value="">Select Action</option>
|
|
|
- <option value="unassign">Unassign</option>
|
|
|
- <option value="mark_tester_invoice_paid">Mark Tester Invoice as Paid</option>
|
|
|
- </select>
|
|
|
- <div class="input-group-append">
|
|
|
- <button type="submit" class="btn btn-primary" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>">
|
|
|
- Submit
|
|
|
- </button>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-6 offset-md-6">
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">
|
|
|
+ Batch Action
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <select class="form-control" name="batch_action" required>
|
|
|
+ <option value="">Select Action</option>
|
|
|
+ <option value="unassign">Unassign</option>
|
|
|
+ <option value="mark_tester_invoice_paid">Mark Tester Invoice as Paid</option>
|
|
|
+ </select>
|
|
|
+ <div class="input-group-append">
|
|
|
+ <button type="submit" class="btn btn-primary" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>">
|
|
|
+ Submit
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- </form>
|
|
|
+ </form>
|
|
|
|
|
|
- <div class="mt-3">
|
|
|
+ <div class="mt-3">
|
|
|
+ <?php
|
|
|
+ View::include("pagination", compact("pagination_object"));
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
<?php
|
|
|
- View::include("pagination", compact("pagination_object"));
|
|
|
- ?>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
- ?>
|
|
|
-</div>
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
+</div>
|