From f19c1b9627b2a081a8a1091cc3b02a8e12ef4196 Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Fri, 17 Apr 2026 10:39:42 +0530 Subject: [PATCH 1/8] FIX_sAles Tracker Oppunity Changes --- app/Views/leads_form.php | 61 +++++++++++++++++++++++++++++++------- app/Views/leads_list.php | 38 +++++++++++++++++++----- app/Views/leads_non_eb.php | 60 ++++++++++++++++++++++++++++++------- 3 files changed, 131 insertions(+), 28 deletions(-) diff --git a/app/Views/leads_form.php b/app/Views/leads_form.php index 9e561ad4..d0745283 100644 --- a/app/Views/leads_form.php +++ b/app/Views/leads_form.php @@ -474,6 +474,8 @@ + \ No newline at end of file From fc10f71680b3b1927030464726a95dd1ee1f6a19 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Sat, 18 Apr 2026 11:40:35 +0530 Subject: [PATCH 7/8] FIX_LEAD_TO_OPPRTUTITIES_AND_MEDIASSIST_CLAIMS_STATUS_MAPPING --- app/Controllers/LeadsController.php | 4 ++-- app/Controllers/MediAssistApiController.php | 6 ++--- app/Views/leads_form.php | 3 +++ app/Views/leads_form_handler.php | 10 +++++--- app/Views/leads_non_eb.php | 26 ++++++++++++--------- 5 files changed, 30 insertions(+), 19 deletions(-) diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index b6f5f35f..765afe8f 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -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 @@ -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 3a70329b..e553b989 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/Views/leads_form.php b/app/Views/leads_form.php index af7fbeff..c4b3e57a 100644 --- a/app/Views/leads_form.php +++ b/app/Views/leads_form.php @@ -2516,6 +2516,9 @@ $('#client_name').val(actualLeadClientName); $('#gst').val(actual_lead_client_details.gst_number || ''); + if (actual_lead_client_details.client_type !== undefined && actual_lead_client_details.client_type !== null && actual_lead_client_details.client_type !== '') { + $('#client_type').val(String(actual_lead_client_details.client_type)); + } // existingShortName = actual_lead_client_details.short_name || ''; // if (existingShortName) { diff --git a/app/Views/leads_form_handler.php b/app/Views/leads_form_handler.php index 1e984f08..6665a52a 100644 --- a/app/Views/leads_form_handler.php +++ b/app/Views/leads_form_handler.php @@ -525,9 +525,13 @@ if (isset($selected_lead_type)) { } if(client_type == ""){ - toastr.warning('Please select the client type', 'Warning'); - $('#client_short_name').val('') - return; + var aid = $('#actual_lead_id').val(); + if (!aid || aid === '0') { + toastr.warning('Please select the client type', 'Warning'); + $('#client_short_name').val(''); + return; + } + // Actual-lead autofill: short name may be set before client type is chosen; do not clear it. } let value = $(input).val(); diff --git a/app/Views/leads_non_eb.php b/app/Views/leads_non_eb.php index 3fdbc536..7ee7ca64 100644 --- a/app/Views/leads_non_eb.php +++ b/app/Views/leads_non_eb.php @@ -853,8 +853,10 @@ var pageBackButton = '" class="topbar-icon $('#client_name').val(actualLeadClientName); $('#gst').val(actual_lead_client_details.gst_number || ''); - // existingShortName = actual_lead_client_details.short_name || ''; - // if (existingShortName) { - // // ── Short name EXISTS — just populate and validate ──────── - // $('#client_short_name').val(existingShortName); - // // validateInput($('#client_short_name')[0], 'clients', 'short_name'); - - // } else {} - // Auto-generate short name from company name - // Use a small delay to ensure DOM is ready + if (actual_lead_client_details.client_type !== undefined && actual_lead_client_details.client_type !== null && actual_lead_client_details.client_type !== '') { + $('#client_type').val(String(actual_lead_client_details.client_type)); + } + let existingShortName = actual_lead_client_details.short_name || ''; + if (existingShortName) { + // Prefer persisted short name while editing. + actualLeadShortName = existingShortName; + $('#client_short_name').val(existingShortName); + } else { + // Fallback: generate only when short name is unavailable. setTimeout(function () { let baseName = actual_lead_client_details.company_name .trim() @@ -1377,6 +1380,7 @@ var pageBackButton = ' Date: Sat, 18 Apr 2026 13:55:35 +0530 Subject: [PATCH 8/8] FIX_UI issues noted --- app/Controllers/TicketController.php | 2 + app/Views/batch_list.php | 212 ++++++++++++++++-- app/Views/claim_dump_file_list.php | 8 +- app/Views/client_basic_info.php | 4 +- app/Views/file_list.php | 2 +- app/Views/hr_file_upload.php | 2 +- app/Views/import_export.php | 2 +- app/Views/insurer_basic_info.php | 2 +- .../policy_transaction_endorsement_list.php | 2 +- .../policy_transaction_inception_form.php | 8 +- .../policy_transaction_inception_list.php | 2 +- .../policy_transaction_inception_list_2.php | 2 +- app/Views/pt_form_file_upload_tab.php | 1 + app/Views/ticket_feedback_list.php | 9 +- app/Views/ticket_form_gmc.php | 10 +- app/Views/ticket_form_gpa.php | 10 +- app/Views/ticket_form_motor.php | 10 +- app/Views/ticket_mail_template.php | 8 +- public/assets/css/custom.css | 28 +++ 19 files changed, 283 insertions(+), 41 deletions(-) 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 f368adcd..be7b1e6a 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,15 +268,25 @@ - - + + - + @@ -347,7 +466,7 @@
S.No 
+ -
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 {