Selaa lähdekoodia

fix date&time

ifah
Siti Hajar Ibrahim 5 vuotta sitten
vanhempi
commit
a5e818d9d8
1 muutettua tiedostoa jossa 70 lisäystä ja 15 poistoa
  1. 70
    15
      app/Http/Controllers/CustomerService/WorkOrderController.php

+ 70
- 15
app/Http/Controllers/CustomerService/WorkOrderController.php Näytä tiedosto

@@ -278,6 +278,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -290,8 +298,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -379,8 +387,15 @@ class WorkOrderController extends Controller
}else {
$company = $company->name;
}
if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -393,8 +408,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -483,6 +498,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -495,8 +518,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -588,6 +611,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -600,8 +631,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -690,6 +721,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -702,8 +741,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -792,6 +831,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -804,8 +851,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));
@@ -894,6 +941,14 @@ class WorkOrderController extends Controller
$company = $company->name;
}

if(empty($w->dateTimeStart)){
$date = '';
$time = '';
} else {
$date = date("d/m/Y", strtotime($w->dateTimeStart));
$time = date("h:i A", strtotime($w->dateTimeStart));
}

array_push($nested_data, array(
'formT' => $n1.$i.$w->Form->type_application,
'service' => $w->nature_work,
@@ -906,8 +961,8 @@ class WorkOrderController extends Controller
'package' => $product,
'contractor' => $company,
'installer' => $installer,
'date' => date("d/m/Y", strtotime($w->dateTimeStart)),
'time' => date("h:i A", strtotime($w->dateTimeStart)),
'date' => $date,
'time' => $time,
'status' => $w->status,
'action' => $w->wo,
));

Loading…
Peruuta
Tallenna