From b7e1e01b8a4bbb13db44989bc8d081a36199b6b0 Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Fri, 10 Apr 2026 12:20:38 +0530 Subject: [PATCH] FIX_UI phase 1 --- app/Controllers/LeadsController.php | 46 +- app/Views/UserList.php | 201 ++- app/Views/add_image_list.php | 153 ++- app/Views/bds_dump_file_list.php | 32 +- app/Views/cd_master_add_modal.php | 54 +- app/Views/cd_master_list.php | 188 +-- app/Views/claim_dump_file_list.php | 32 +- app/Views/claim_mis_file_list.php | 2 +- app/Views/client_branch.php | 17 + app/Views/client_policy.php | 125 +- app/Views/faq_list.php | 221 ++-- app/Views/file_list.php | 44 + app/Views/frontend_content_list.php | 154 ++- app/Views/hr_activity_history.php | 26 +- app/Views/import_export.php | 4 +- app/Views/insurer_basic_info.php | 89 +- app/Views/insurer_branch.php | 548 ++++---- app/Views/insurer_export_templete.php | 84 +- app/Views/insurer_list.php | 213 +--- app/Views/invoice_policy_mapping.php | 44 +- app/Views/kyc_docs.php | 81 +- app/Views/kyc_entity_type_basic_info.php | 40 +- app/Views/kyc_onboarding.php | 2 +- app/Views/layout/footer.php | 481 +++++++ app/Views/layout/header.php | 180 ++- app/Views/leads_list.php | 303 +---- app/Views/nhance_branch_list.php | 30 +- app/Views/payout_list.php | 42 +- .../policy_transaction_endorsement_list.php | 185 +-- app/Views/policy_type_basic_info.php | 79 +- app/Views/pos_list.php | 157 +-- app/Views/retail_endorsement_list.php | 43 +- app/Views/rto_master_list.php | 61 +- app/Views/sales/tracker_view.php | 1132 +++++++++++------ app/Views/test_members_list.php | 179 +-- app/Views/thz_list.php | 205 ++- app/Views/thz_notes.php | 92 +- app/Views/ticket_mail_template.php | 2 +- app/Views/tpa_basic_info.php | 63 +- app/Views/tpa_branch.php | 120 +- app/Views/tpa_onboarding.php | 2 +- app/Views/vehicle_master_list.php | 225 +--- app/Views/vehicle_type_list.php | 51 +- app/Views/vehicle_type_master_list.php | 30 +- public/assets/css/custom.css | 821 ++++++++++++ 45 files changed, 4321 insertions(+), 2562 deletions(-) create mode 100644 public/assets/css/custom.css diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 9384b60d..b046ee78 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -454,19 +454,44 @@ class LeadsController extends BaseController 'errors' => ['required' => 'Entity Type is required'], ]; + $clientNameRules = 'required|regex_match[/^[a-zA-Z0-9_ -]+$/]'; + $clientShortNameRules = 'required|regex_match[/^[a-zA-Z0-9_-]+$/]'; + + // Only validate for uniqueness if it's a new client being specified. + // If an existing client is selected from the dropdown, `client_id` will be present. + if (empty($postData['client_id'])) { + $ignoreClientId = null; + if ($id) { // This is an update of a lead + $lead = $this->leadsModel->find($id); + if ($lead && !empty($lead['is_client_created'])) { + $ignoreClientId = $lead['is_client_created']; + } + } + + if ($ignoreClientId) { + $clientNameRules .= '|is_unique[clients.client_name,id,' . $ignoreClientId . ']'; + $clientShortNameRules .= '|is_unique[clients.short_name,id,' . $ignoreClientId . ']'; + } else { + $clientNameRules .= '|is_unique[clients.client_name]'; + $clientShortNameRules .= '|is_unique[clients.short_name]'; + } + } + $rules['client_name'] = [ - 'rules' => 'required|regex_match[/^[a-zA-Z0-9_ -]+$/]', + 'rules' => $clientNameRules, 'errors' => [ 'required' => 'Client Name is required', 'regex_match' => 'Client Name only letters, numbers, space, hyphens and underscores are allowed', + 'is_unique' => 'This Client Name already exists.', ], ]; $rules['client_short_name'] = [ - 'rules' => 'required|regex_match[/^[a-zA-Z0-9_-]+$/]', + 'rules' => $clientShortNameRules, 'errors' => [ - 'required' => 'Client Short Name is required', - 'regex_match' => 'Client Short Name only letters, numbers, hyphens and underscores are allowed' + 'required' => 'Client Short Name is required', + 'regex_match' => 'Client Short Name only letters, numbers, hyphens and underscores are allowed', + 'is_unique' => 'This Client Short Name already exists.', ], ]; } @@ -925,6 +950,11 @@ class LeadsController extends BaseController $insertCount[] = $insert; $this->insertLeadStatus($insert, $value['status'], 3); + if ($value['lead_type'] == 1 && $value['status'] == 'won') { + $leadDataForClient = $this->leadsModel->find($insert); + $this->createClientWithLeadData($leadDataForClient); + } + if ($value['lead_form_type'] == 1) { //for this push the job to the calculateMembersDemography() function $job_details = new Jobs(); @@ -950,6 +980,14 @@ 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') { + $leadDataForClient = $this->leadsModel->find($id); + if (empty($leadDataForClient['is_client_created'])) { + $this->createClientWithLeadData($leadDataForClient); + } + } + return $this->respond(['status' => true, 'lead_id' => $id, 'message' => "Opportunity updated successfully", 'data' => $data], 200); } return $this->respond(['status' => false, 'lead_id' => $id, 'message' => "Failed to update Opportunity", 'data' => $data], 200); diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 3e927271..0adae2ad 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -78,13 +78,8 @@ table.dataTable tbody td { float: left !important; } - .table th, - .table td { - padding: 8px; - } - - table.dataTable tbody td { - padding: 4px 4px !important; + .col-12 { + max-width: 98% !important; } /* Tooltip Styles */ @@ -247,9 +242,12 @@ table.dataTable tbody td { border:1px solid rgba(41, 139, 142, 1); } - .dt-buttons.btn-group{ - display: grid; - grid-template-columns: 1fr .4fr .5fr .2fr; + .dt-buttons.btn-group{ + width: 100%; + display: flex; + align-items: center; + justify-content: flex-end; + gap: 8px; } #user-table_filter input{ width:100%; } @@ -361,15 +359,15 @@ table.dataTable tbody td {

Users

--> - +
- - - - - - + + + + + + @@ -384,8 +382,8 @@ table.dataTable tbody td { is_active == 1){ echo 'Active'; }else{ echo 'In-Active'; } ?> -
NameEmailMobile NoRoleStatusActionName Email Mobile No Role Status Action 
- +