|
@@ -55,6 +55,7 @@ if($submit) {
|
|
|
$customer_slug = str_replace("-", "_", Util::slug($customer->name));
|
|
$customer_slug = str_replace("-", "_", Util::slug($customer->name));
|
|
|
|
|
|
|
|
$tester = null;
|
|
$tester = null;
|
|
|
|
|
+ $formatted_start_dts = null;
|
|
|
$formatted_due_dts = null;
|
|
$formatted_due_dts = null;
|
|
|
|
|
|
|
|
$icon = null;
|
|
$icon = null;
|
|
@@ -66,12 +67,19 @@ if($submit) {
|
|
|
|
|
|
|
|
$tester = $test->getTester();
|
|
$tester = $test->getTester();
|
|
|
|
|
|
|
|
- $unix_due = strtotime($test->dts_due);
|
|
|
|
|
- $formatted_due_dts = date("d/m/Y H:i", $unix_due);
|
|
|
|
|
|
|
+ if(!is_null($test->dts_start)) {
|
|
|
|
|
+ $unix_start = strtotime($test->dts_start);
|
|
|
|
|
+ $formatted_start_dts = date("d/m/Y H:i", $unix_start);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if(is_null($test->pass)) {
|
|
if(is_null($test->pass)) {
|
|
|
$icon_file = "{$customer_slug}_pending.png";
|
|
$icon_file = "{$customer_slug}_pending.png";
|
|
|
|
|
|
|
|
|
|
+ if(!is_null($test->dts_due)) {
|
|
|
|
|
+ $unix_due = strtotime($test->dts_due);
|
|
|
|
|
+ $formatted_due_dts = date("d/m/Y H:i", $unix_due);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if($tester && $test->dts_due && time() > $unix_due) {
|
|
if($tester && $test->dts_due && time() > $unix_due) {
|
|
|
$icon_file = "{$customer_slug}_past_due.png";
|
|
$icon_file = "{$customer_slug}_past_due.png";
|
|
|
$past_due = true;
|
|
$past_due = true;
|
|
@@ -103,6 +111,7 @@ if($submit) {
|
|
|
if($test) {
|
|
if($test) {
|
|
|
$data["test"] = [
|
|
$data["test"] = [
|
|
|
"id" => $test->id,
|
|
"id" => $test->id,
|
|
|
|
|
+ "formattedStartDts" => $formatted_start_dts,
|
|
|
"formattedDueDts" => $formatted_due_dts,
|
|
"formattedDueDts" => $formatted_due_dts,
|
|
|
"tester" => null,
|
|
"tester" => null,
|
|
|
"pastDue" => $past_due,
|
|
"pastDue" => $past_due,
|