diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 79579835..baece64e 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -731,7 +731,7 @@ class TicketController extends BaseController $data['claim_type'] = $this->claimType[2]; } - $data['client_for_motor'] = $this->clientModel->select('id,client_name')->where('client_type', 2)->where('is_active', 1)->findAll(); + $data['client_for_motor'] = $this->clientModel->select('id,client_name,phone')->where('client_type', 2)->where('is_active', 1)->findAll(); $this->myLogger->logme('error', "Ticket form data fetched successfully for Ticket Type: $ticket_type"); @@ -875,15 +875,7 @@ class TicketController extends BaseController { // $ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first(); $ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id); - if($ticket_data['ticket_type_id'] == 8){ - $this->motor_claim($ticket_data,$ticket_id); - }else{ - $this->other_claim($ticket_data,$ticket_id); - } - } - - public function other_claim($ticket_data,$ticket_id) - { + $ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y'); if (in_array($ticket_data['claim_status_id'], [15, 25, 35])) { @@ -942,22 +934,15 @@ class TicketController extends BaseController // print_rr($data); die; } - return $this->loadLayout('ticket_edit_onbording', $data); - } + // 8TH TYPE is Motor - so do not remove it.... + if($ticket_data['ticket_type_id'] == 8){ + $claim_status_id = $ticket_data['claim_status_id']; + $ticket_type = $ticket_data['ticket_type_id']; + $data['claim_status'] = $this->transFormClaimStatus($claim_status_id, $ticket_type); + $data['client_for_motor'] = $this->clientModel->select('id,client_name,phone')->where('client_type', 2)->where('is_active', 1)->findAll(); + } - public function motor_claim($ticket_data,$ticket_id) - { - $claim_status_id = $ticket_data['claim_status_id']; - $ticket_type = $ticket_data['ticket_type_id']; - - $data['selected_ticket_type'] = $ticket_type; - $data['ticket_type'] = [ 8 => 'Motor' ]; - $data['ticket_data'] = $ticket_data; - // print_r($ticket_data);die; - $data['claim_status'] = $this->transFormClaimStatus($claim_status_id, $ticket_type); - $data['client_for_motor'] = $this->clientModel->select('id,client_name')->where('client_type', 2)->where('is_active', 1)->findAll(); - // print_r($data);die; - return $this->loadLayout('ticket_form_motor', $data); + return $this->loadLayout('ticket_edit_onbording', $data); } public function formatDateForClaim($ticket_data, $out_put_format = 'Y-m-d') diff --git a/app/Views/ticket_edit_onbording.php b/app/Views/ticket_edit_onbording.php index dab23823..cfa9e718 100644 --- a/app/Views/ticket_edit_onbording.php +++ b/app/Views/ticket_edit_onbording.php @@ -54,6 +54,7 @@ History + + + + @@ -84,9 +88,11 @@ if ($ticket_data['ticket_type_id'] == 1) { include('ticket_form_gmc.php'); + } else if($ticket_data['ticket_type_id'] == 8){ + include('ticket_form_motor.php'); } else { include('ticket_form_gpa.php'); - } + } ?>
@@ -98,15 +104,19 @@
+
+
+
+
diff --git a/app/Views/ticket_form_motor.php b/app/Views/ticket_form_motor.php index 2032fd56..8d891cec 100644 --- a/app/Views/ticket_form_motor.php +++ b/app/Views/ticket_form_motor.php @@ -27,11 +27,11 @@
" style="margin-right: 23px;">
- +
-

Motor

+

Claim

- -
+ - - - - - +
+
General Details

+ + + + + + +
@@ -70,62 +75,60 @@
- '.$value['client_name'].''; + echo ''; } } ?> - - - +
- +
- - + + data-insurerid="" data-insurername="" >Select Policy
+ -
-
-
@@ -179,10 +182,11 @@
+
- - + $value) { @@ -1012,6 +1016,11 @@ \ No newline at end of file