diff --git a/app/Controllers/ApiServiceController.php b/app/Controllers/ApiServiceController.php index 23ee92c9..ea3103e9 100644 --- a/app/Controllers/ApiServiceController.php +++ b/app/Controllers/ApiServiceController.php @@ -847,13 +847,13 @@ class ApiServiceController extends BaseController $requested_data['insurer_or_tpa'] = 'tpa'; $requested_data['flag_status'] = $event_mapping[$event] ?? "A"; - $ICICILombardController = new ICICILombardController(); - $apiResponse = $ICICILombardController->ICICIPushEmployeeDetails($requested_data); + // $ICICILombardController = new ICICILombardController(); + // $apiResponse = $ICICILombardController->ICICIPushEmployeeDetails($requested_data); - // $r = Jobs::addJob(['job_name' => 'ICICIPushEmployeeDetails', 'payload' => $requested_data]); - // log_message('error', "ICICIPushEmployeeDetails job pushed successfully."); + $r = Jobs::addJob(['job_name' => 'ICICIPushEmployeeDetails', 'payload' => $requested_data]); + log_message('error', "ICICIPushEmployeeDetails job pushed successfully."); - return $this->respond(['status' => true, 'code' => 200, 'message' => 'Action Triggered','data' => $apiResponse ]); + return $this->respond(['status' => true, 'code' => 200, 'message' => 'Action Triggered','data' => [] ]); } } diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 48ba5646..765afe8f 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -447,7 +447,7 @@ class LeadsController extends BaseController ], ]; - if (isset($postData['lead_type']) && $postData['lead_type'] == 1) { + if (isset($postData['lead_type']) && in_array((int) $postData['lead_type'], [1, 3], true)) { $rules['entity_type_id'] = [ 'rules' => 'required', @@ -659,8 +659,7 @@ class LeadsController extends BaseController $request_data = $this->request->getPost(); $data = sanitizeInputArrayAdvanced($request_data); $data['client_type'] = 1; - - if ($data['lead_type'] != 1) { + if (! in_array((int) $data['lead_type'], [1, 3], true)) { $client_data = $this->clientModel->where('id', $data['client_id'])->where('is_active', 1)->first(); $data['client_name'] = $client_data['client_name']; $data['client_short_name'] = $client_data['short_name']; @@ -760,7 +759,8 @@ class LeadsController extends BaseController $form_docs_name = "docs_name_" . $index_plus_one; $leads_file_primary_key = $data['leads_file_id'] ?? []; $files = $this->request->getFileMultiple($form_file_name); - $multi_file_data = $this->uploadMultiFiles($files, $data[$form_docs_name], $leads_file_primary_key); + $docs_names_from_post = $data[$form_docs_name] ?? []; + $multi_file_data = $this->uploadMultiFiles($files, $docs_names_from_post, $leads_file_primary_key); // Separate the insurer and insurer branch, handle missing or invalid data if (isset($data['insurer'][$index]) && strpos($data['insurer'][$index], '-') !== false) { @@ -950,7 +950,7 @@ class LeadsController extends BaseController $insertCount[] = $insert; $this->insertLeadStatus($insert, $value['status'], 3); - if ($value['lead_type'] == 1 && $value['status'] == 'won') { + if (in_array((int) $value['lead_type'], [1, 3], true) && $value['status'] == 'won') { $leadDataForClient = $this->leadsModel->find($insert); $this->createClientWithLeadData($leadDataForClient); } @@ -981,7 +981,7 @@ class LeadsController extends BaseController $this->insertMultiFilesData($data[0]['multi_file_data'], $id, $data[0]['lead_form_type']); $this->insertLeadStatus($id, $data[0]['status'], 3); - if ($data[0]['lead_type'] == 1 && $data[0]['status'] == 'won') { + if (in_array((int) $data[0]['lead_type'], [1, 3], true) && $data[0]['status'] == 'won') { $leadDataForClient = $this->leadsModel->find($id); if (empty($leadDataForClient['is_client_created'])) { $this->createClientWithLeadData($leadDataForClient); @@ -1079,7 +1079,7 @@ class LeadsController extends BaseController $file_name = file_Upload_for_lead($value, $uploadFilePath, UPLOAD_EXT_LEAD_FILES); $multi_file_data[] = [ 'file_name' => $file_name, - 'docs_name' => $docs_names[$index], + 'docs_name' => $docs_names[$index] ?? '', 'id' => $primaryKey[$index] ?? "", ]; } @@ -1402,7 +1402,7 @@ class LeadsController extends BaseController } // 4. Conditional query - only fetch if needed - if ($lead_data['lead_type'] != 1) { + if (! in_array((int) $lead_data['lead_type'], [1, 3], true)) { $client_policy_data = $this->clientPolicyModel ->select('policy_terms, placement_json') ->where('is_active', 1) @@ -2165,7 +2165,7 @@ class LeadsController extends BaseController } // dd($data); $lead_data = []; - if ($rfq_data['lead_type'] == 1) { + if (in_array((int) $rfq_data['lead_type'], [1, 3], true)) { if (in_array($rfq_data['policy_type_id'], [2, 3, 4, 5])) { $lead_data = [ @@ -4774,7 +4774,7 @@ class LeadsController extends BaseController // πŸ”Ή Client Details (Single Row) $data['actual_lead_client_details'] = $this->leadModel - ->select('sales_actual_leads.company_name, clients.short_name, sales_actual_leads.email, sales_actual_leads.phone, sales_actual_leads.address, sales_actual_leads.website, sales_actual_leads.gst_number, sales_actual_leads.status, sales_actual_leads.assigned_to') + ->select('sales_actual_leads.company_name, clients.short_name, clients.client_type, sales_actual_leads.email, sales_actual_leads.phone, sales_actual_leads.address, sales_actual_leads.website, sales_actual_leads.gst_number, sales_actual_leads.status, sales_actual_leads.assigned_to') ->join('clients', 'clients.id = sales_actual_leads.client_id', 'left') ->where('sales_actual_leads.lead_id', $actual_lead_id) ->first(); // first row only @@ -4842,7 +4842,7 @@ class LeadsController extends BaseController $data['lead_edit_data']['multi_file_html'] = trim($html) !== '' ? $html : null; } - if ($data['lead_edit_data']['lead_type'] != 1 && $data['lead_edit_data']['lead_form_type'] == 2) { + if (! in_array((int) $data['lead_edit_data']['lead_type'], [1, 3], true) && $data['lead_edit_data']['lead_form_type'] == 2) { $data['lead_edit_data']['claims_details_html'] = view('rfq/claims_details_non_eb', $data['lead_edit_data']); } else { $data['lead_edit_data']['claims_details_html'] = ""; @@ -5527,7 +5527,7 @@ class LeadsController extends BaseController * * @param string $recipientType insurer|client|internal */ - protected function downloadFileFromGoogleSheet(array $lead_data, string $recipientType = 'insurer'): array + protected function downloadFileFromGoogleSheet(array $lead_data, string $recipientType = 'insurer'): ?array { try { $leadId = (int) ($lead_data['id'] ?? 0); diff --git a/app/Controllers/MediAssistApiController.php b/app/Controllers/MediAssistApiController.php index 6e2ef338..da7b2b79 100644 --- a/app/Controllers/MediAssistApiController.php +++ b/app/Controllers/MediAssistApiController.php @@ -596,7 +596,7 @@ class MediAssistApiController extends BaseController "Confirmation Awaited" => 4, "Information Awaited Reminder" => 4, "Information Awaited Final Reminder" => 4, - "Insurer Concurrence Awaited" => 6, + "Insurer Concurrence Awaited" => 7, "Closed" => 12, "Physical Documents Awaited" => 9, @@ -944,7 +944,7 @@ class MediAssistApiController extends BaseController "Confirmation Awaited" => 4, "Information Awaited Reminder" => 4, "Information Awaited Final Reminder" => 4, - "Insurer Concurrence Awaited" => 6, + "Insurer Concurrence Awaited" => 7, "Closed" => 12, "Physical Documents Awaited" => 9, @@ -1191,7 +1191,7 @@ class MediAssistApiController extends BaseController "Confirmation Awaited" => 4, "Information Awaited Reminder" => 4, "Information Awaited Final Reminder" => 4, - "Insurer Concurrence Awaited" => 6, + "Insurer Concurrence Awaited" => 7, "Closed" => 12, "Physical Documents Awaited" => 9, diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 146b748e..4302a338 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -737,6 +737,8 @@ class TicketController extends BaseController public function ticket_form($ticket_type) { $data = $this->ticket_form_data($ticket_type); + $data['tab_name'] = "Claims"; + $data['page_name'] = "Claims"; // dd($data); return $this->loadLayout('ticket_form_handler', $data); } diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 686b617e..9e5f256b 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -1,15 +1,105 @@ + $file) { + $batch_col_max_len[0] = max($batch_col_max_len[0], mb_strlen((string) ($key + 1))); + $batch_col_max_len[1] = max($batch_col_max_len[1], mb_strlen((string) ($file['batch_code'] ?? ''))); + $batch_col_max_len[2] = max($batch_col_max_len[2], mb_strlen((string) ($file['file_name'] ?? ''))); + $batch_col_max_len[3] = max($batch_col_max_len[3], mb_strlen((string) ($file['client_short_name'] ?? ''))); + $batch_col_max_len[4] = max($batch_col_max_len[4], mb_strlen((string) ($file['branch_name'] ?? ''))); + $policy_display_len = trim( + (isset($file['policy_type']) ? $file['policy_type'] : '') + . ' - ' + . (isset($file['policy_no']) ? $file['policy_no'] : '') + ); + $batch_col_max_len[5] = max($batch_col_max_len[5], mb_strlen($policy_display_len)); + $batch_col_max_len[6] = max($batch_col_max_len[6], mb_strlen((string) ($file['event_type'] ?? ''))); + $insLabel = $insurer_or_tpa[$file['insurer_or_tpa'] ?? ''] ?? ''; + $batch_col_max_len[7] = max($batch_col_max_len[7], mb_strlen((string) $insLabel)); + $actKey = $file['actions'] ?? ''; + $actLabel = $import_or_export[$actKey] ?? ucfirst((string) $actKey); + $batch_col_max_len[8] = max($batch_col_max_len[8], mb_strlen((string) $actLabel)); + $countStr = ($file['count'] ?? null) === null ? '-' : (string) $file['count']; + $batch_col_max_len[9] = max($batch_col_max_len[9], mb_strlen($countStr)); + $batch_col_max_len[10] = max($batch_col_max_len[10], mb_strlen((string) format_indian_number($file['amount']))); + $userTime = change_date_format($file['created_at'] ?? '', 'Y-m-d H:i:s', 'd M Y h:i a') + . ' by ' + . get_username($file['created_by'] ?? ''); + $batch_col_max_len[11] = max($batch_col_max_len[11], mb_strlen($userTime)); + $batch_col_max_len[12] = max($batch_col_max_len[12], mb_strlen((string) ($file['status'] ?? ''))); + $batch_col_max_len[13] = max($batch_col_max_len[13], 2); + } +} + +$batch_col_min_px = [48, 72, 100, 72, 80, 120, 88, 96, 72, 56, 80, 160, 96, 52]; +$batch_col_max_px = [64, 220, 480, 240, 240, 640, 200, 200, 140, 110, 160, 560, 320, 64]; +$batch_col_width_px = []; +for ($i = 0; $i < $batch_col_count; $i++) { + $chars = max($batch_col_max_len[$i], mb_strlen($batch_header_labels[$i])); + $px = (int) round($chars * 7.0 + 26); + $batch_col_width_px[$i] = min( + $batch_col_max_px[$i], + max($batch_col_min_px[$i], $px) + ); +} +?>
@@ -130,7 +239,7 @@
- +
@@ -159,14 +268,25 @@ - - + + + + @@ -354,7 +475,7 @@
S.No 
+ - @@ -175,6 +295,7 @@ data-toggle="tooltip" data-placement="top" title="">
diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index d2bae3a3..4cf5ab23 100755 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -162,7 +162,7 @@ input:checked + .slider:before { - Allowed: PNG, JPG, JPEG. Size : 200KB Dimension : 100 X 100 Pixels + Allowed: JPG, JPEG, PNG. Size : 200KB Dimension : 100 X 100 Pixels
@@ -465,7 +465,7 @@ input:checked + .slider:before { $.each(res.data, function (index, item) { var row = ` -
${item.file_name}

Allowed: PNG, JPG, JPEG. +

Allowed: JPG, JPEG, PNG. diff --git a/app/Views/file_list.php b/app/Views/file_list.php index 759cdba6..1fcba673 100755 --- a/app/Views/file_list.php +++ b/app/Views/file_list.php @@ -220,7 +220,7 @@ - Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100 + Allowed: XLS, XLSX. Size : 25MB diff --git a/app/Views/hr_file_upload.php b/app/Views/hr_file_upload.php index 62979743..50464d26 100644 --- a/app/Views/hr_file_upload.php +++ b/app/Views/hr_file_upload.php @@ -230,7 +230,7 @@ - Allowed: XLS, XLSX. Size : 25MB Dimension : 100 X 100 + Allowed: XLS, XLSX. Size : 25MB diff --git a/app/Views/import_export.php b/app/Views/import_export.php index 89584e0f..84fe0c7c 100755 --- a/app/Views/import_export.php +++ b/app/Views/import_export.php @@ -258,7 +258,7 @@ table.dataTable thead th {