diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 1d1763d3..43217ae5 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3769,7 +3769,11 @@ class EmployeeRestController extends AdminController $fetchData['priority'] = 1; $fetchData['mode_of_intimation'] = 3; - $fetchData['claim_type'] = 1; + + if(!isset($received_data['claim_type']) || (isset($received_data['claim_type']) && empty($received_data['claim_type']))) { + $received_data['claim_type'] = 1; + } + $fetchData = array_merge($fetchData, $received_data); // $fetchData['relationship'] = strtolower($fetchData['relationship']) ?? $fetchData['relationship']; @@ -3993,8 +3997,9 @@ class EmployeeRestController extends AdminController // ])->setStatusCode(400); $ticket_type = $this->ticketController->ticketType; + $claim_type = $this->ticketController->claimType; $ticket_type = array_map(fn($value, $key) => (object) ['id' => $key, 'name' => $value], array_values($ticket_type), array_keys($ticket_type)); - return $this->response->setJSON(['ticket_type' => $ticket_type])->setStatusCode(200); + return $this->response->setJSON(['ticket_type' => $ticket_type, 'claim_type' => $claim_type])->setStatusCode(200); } // Get policy type ids