From c3e0b7b1fd43bf444f2fb91069d9857c97b10d17 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 17 Mar 2026 10:30:07 +0530 Subject: [PATCH 1/4] FIX_BENIFITS_LOGIN_ISSUE --- app/Config/Acl.php | 4 ++-- app/Controllers/RestAuthenticationController.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Config/Acl.php b/app/Config/Acl.php index 45ca160a..cb6547a0 100644 --- a/app/Config/Acl.php +++ b/app/Config/Acl.php @@ -221,11 +221,11 @@ class Acl ], '#^/rfq#' => [ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID], - 'teams' => [SALES_TEAM_ID] + 'teams' => [BUSINESS_SUPPORT_TEAM_ID, SALES_TEAM_ID] ], '#^/sales#' => [ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID], - 'teams' => [SALES_TEAM_ID] + 'teams' => [BUSINESS_SUPPORT_TEAM_ID, SALES_TEAM_ID] ], // ===================== CMS / CONTENT ===================== diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index ab536240..14600e38 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -1272,7 +1272,7 @@ class RestAuthenticationController extends AdminController log_message('error', ' '); log_message('error', ' ************************************* POST END **************************************** '); log_message('error', ' '); - return $this->respond(['status' => 'success','code' => 200,'data' => "", 'message' => "Mpin - exist" , 'Mpin' =>$employeeData["mpin"], 'is_mpin_skipped' => $employeeData['is_mpin_skipped'] ?? 0, 'is_biometric_enabled' => $employeeData['is_biometric_enabled'] ?? 0],200); + return $this->respond(['status' => 'success','code' => 200,'data' => "", 'message' => "Mpin - exist" , 'Mpin' =>$employeeData["mpin"], 'is_mpin_skipped' => $employeeData['is_mpin_skipped'] ?? '0', 'is_biometric_enabled' => $employeeData['is_biometric_enabled'] ?? '0'],200); } else { $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - checkMpin: Mpin - not found"); log_message('error', ' '); From f5750d08c0c8f59a695416a09e02b0bfc92ba923 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 17 Mar 2026 11:12:41 +0530 Subject: [PATCH 2/4] FIX_LIVE_ISSUES --- app/Controllers/TicketController.php | 17 ++- app/Controllers/UserController.php | 198 +++++++++++++-------------- app/Views/layout/header.php | 4 +- app/Views/ticket_form_gmc.php | 5 +- 4 files changed, 116 insertions(+), 108 deletions(-) diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index a0df4c9d..d8452e8d 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -1280,8 +1280,13 @@ class TicketController extends BaseController 'rules' => 'permit_empty|numeric', 'errors' => ['numeric' => 'Claim Amount must contain only numbers.'] ], - 'pod_no' => ['label' => 'POD No','rules' => 'permit_empty','errors' => []], - + 'pod_no' => [ + 'label' => 'POD No', + 'rules' => 'permit_empty|regex_match[/^[a-zA-Z0-9 \/_-]+$/]', + 'errors' => [ + 'regex_match' => 'The {field} may only contain letters, numbers, spaces, slashes, underscores, and hyphens.', + ] + ], // --- ADDITIONAL / CONDITIONAL FIELDS --- 'claim_number' => ['label' => 'Claim Number','rules' => 'permit_empty|alpha_numeric_punct','errors' => ['alpha_numeric_punct' => 'Invalid Claim Number.']], 'denial_date' => ['label' => 'Denial Date','rules' => 'permit_empty|regex_match[/^\d{2}\/\d{2}\/\d{4}$/]','errors' => ['regex_match' => 'Denial Date must be dd/mm/yyyy.']], @@ -1633,7 +1638,13 @@ class TicketController extends BaseController 'rules' => 'permit_empty|numeric', 'errors' => ['numeric' => 'Claim Amount must contain only numbers.'] ], - 'pod_no' => ['label' => 'POD No','rules' => 'permit_empty','errors' => []], + 'pod_no' => [ + 'label' => 'POD No', + 'rules' => 'permit_empty|regex_match[/^[a-zA-Z0-9 \/_-]+$/]', + 'errors' => [ + 'regex_match' => 'The {field} may only contain letters, numbers, spaces, slashes, underscores, and hyphens.', + ] + ], // --- ADDITIONAL / CONDITIONAL FIELDS --- 'claim_number' => ['label' => 'Claim Number','rules' => 'permit_empty|alpha_numeric_punct','errors' => ['alpha_numeric_punct' => 'Invalid Claim Number.']], diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index e2947d7d..145ab807 100755 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -192,59 +192,59 @@ class UserController extends AdminController $insert = $this->userModel->insert($userData); - $bookStackData = [ - 'name' => $userData['first_name'], - 'email' => $userData['email'], + // $bookStackData = [ + // 'name' => $userData['first_name'], + // 'email' => $userData['email'], - ]; - $this->bookStack->createEditUser($bookStackData); + // ]; + // $this->bookStack->createEditUser($bookStackData); - if ($insert) { - $teamData['user_id'] = $insert; - foreach ($teams as $value) { - $teamData['team_id'] = $value; - $teamData['created_by'] = get_session_userid(); - $this->userTeamsModel->insert($teamData); - } + // if ($insert) { + // $teamData['user_id'] = $insert; + // foreach ($teams as $value) { + // $teamData['team_id'] = $value; + // $teamData['created_by'] = get_session_userid(); + // $this->userTeamsModel->insert($teamData); + // } - $db = \Config\Database::connect(); - $tableName = 'hdz_staff'; + // $db = \Config\Database::connect(); + // $tableName = 'hdz_staff'; - // Set default values - $admin = 0; - $acm = 0; - $acm_id = null; + // // Set default values + // $admin = 0; + // $acm = 0; + // $acm_id = null; - if ($userData['role'] == 3) { - $admin = 0; - $acm = 1; - $acm_id = $insert; - } else if (in_array($userData['role'], [1, 5])) { - $admin = 1; - $acm = 0; - $acm_id = null; - } + // if ($userData['role'] == 3) { + // $admin = 0; + // $acm = 1; + // $acm_id = $insert; + // } else if (in_array($userData['role'], [1, 5])) { + // $admin = 1; + // $acm = 0; + // $acm_id = null; + // } - $password = '12345678'; // Default password - $hashedPassword = password_hash($password, PASSWORD_DEFAULT); + // $password = '12345678'; // Default password + // $hashedPassword = password_hash($password, PASSWORD_DEFAULT); - $hdz_staff = [ - 'emp_code' => $userData['emp_code'], - 'fullname' => $userData['first_name'], - 'username' => strtolower($userData['first_name']), - 'email' => $userData['email'], - 'admin' => $admin, - 'acm' => $acm, - 'acm_id' => $acm_id, - 'registration' => time(), - 'password' => $hashedPassword, - 'active' => 1, - 'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}', - ]; + // $hdz_staff = [ + // 'emp_code' => $userData['emp_code'], + // 'fullname' => $userData['first_name'], + // 'username' => strtolower($userData['first_name']), + // 'email' => $userData['email'], + // 'admin' => $admin, + // 'acm' => $acm, + // 'acm_id' => $acm_id, + // 'registration' => time(), + // 'password' => $hashedPassword, + // 'active' => 1, + // 'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}', + // ]; - $db->table($tableName)->insert($hdz_staff); + // $db->table($tableName)->insert($hdz_staff); - } + // } } $this->myLogger->logme('error', 'User create Successfully created by id {data}', ['data' => get_session_userid()]); return redirect()->to(base_url('/user/list')); @@ -384,76 +384,76 @@ class UserController extends AdminController $userData['updated_by'] = get_session_userid(); $update = $this->userModel->where('id', $id)->set($userData)->update(); - $bookStackData = [ - 'name' => $userData['first_name'], - 'email' => $userData['email'], - ]; + // $bookStackData = [ + // 'name' => $userData['first_name'], + // 'email' => $userData['email'], + // ]; - $this->bookStack->createEditUser($bookStackData,$existingData); + // $this->bookStack->createEditUser($bookStackData,$existingData); - if ($update) { + // if ($update) { - if ($teams) { - $this->userTeamsModel->where('user_id', $id)->delete(); - $teamData['user_id'] = $id; - foreach ($teams as $value) { - $teamData['team_id'] = $value; - $teamData['created_by'] = get_session_userid(); - $this->userTeamsModel->insert($teamData); - } - } + // if ($teams) { + // $this->userTeamsModel->where('user_id', $id)->delete(); + // $teamData['user_id'] = $id; + // foreach ($teams as $value) { + // $teamData['team_id'] = $value; + // $teamData['created_by'] = get_session_userid(); + // $this->userTeamsModel->insert($teamData); + // } + // } - $db = \Config\Database::connect(); - $tableName = 'hdz_staff'; + // $db = \Config\Database::connect(); + // $tableName = 'hdz_staff'; - $hdz_staff = [ - 'emp_code' => $userData['emp_code'], - 'fullname' => $userData['first_name'], - 'username' => strtolower($userData['first_name']), - 'email' => $userData['email'], - 'registration' => time(), - 'active' => 1, - 'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}', - ]; + // $hdz_staff = [ + // 'emp_code' => $userData['emp_code'], + // 'fullname' => $userData['first_name'], + // 'username' => strtolower($userData['first_name']), + // 'email' => $userData['email'], + // 'registration' => time(), + // 'active' => 1, + // 'department' => 'a:7:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";i:3;s:1:"3";i:4;s:1:"9";i:5;s:1:"4";i:6;s:2:"10";}', + // ]; - if ($userData['role'] == 3) { - $hdz_staff['admin'] = 0; - $hdz_staff['acm'] = 1; - $hdz_staff['acm_id'] = $id; - } elseif (in_array($userData['role'], [1, 5])) { - $hdz_staff['admin'] = 1; - $hdz_staff['acm'] = 0; - $hdz_staff['acm_id'] = null; - } else { + // if ($userData['role'] == 3) { + // $hdz_staff['admin'] = 0; + // $hdz_staff['acm'] = 1; + // $hdz_staff['acm_id'] = $id; + // } elseif (in_array($userData['role'], [1, 5])) { + // $hdz_staff['admin'] = 1; + // $hdz_staff['acm'] = 0; + // $hdz_staff['acm_id'] = null; + // } else { - return redirect()->to(base_url('/user/list')); - } + // return redirect()->to(base_url('/user/list')); + // } - // Check if staff data exists - $staffData = $db->table($tableName) - // ->where('emp_code', $userData['emp_code']) - ->where('email', $userData['email']) - ->get()->getResult(); + // // Check if staff data exists + // $staffData = $db->table($tableName) + // // ->where('emp_code', $userData['emp_code']) + // ->where('email', $userData['email']) + // ->get()->getResult(); - if (!empty($staffData)) { + // if (!empty($staffData)) { - // Update existing record - $db->table($tableName) - // ->where('emp_code', $userData['emp_code']) - ->where('email', $userData['email']) - ->set($hdz_staff)->update(); + // // Update existing record + // $db->table($tableName) + // // ->where('emp_code', $userData['emp_code']) + // ->where('email', $userData['email']) + // ->set($hdz_staff)->update(); - } else { + // } else { - $password = '12345678'; // Default password - $hdz_staff['password'] = password_hash($password, PASSWORD_DEFAULT); + // $password = '12345678'; // Default password + // $hdz_staff['password'] = password_hash($password, PASSWORD_DEFAULT); - // Insert new record - $db->table($tableName)->insert($hdz_staff); - } + // // Insert new record + // $db->table($tableName)->insert($hdz_staff); + // } - } + // } return redirect()->to(base_url('/user/list')); } diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 2bc18794..ee744b5d 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -2330,13 +2330,13 @@ body[data-sidebar-size="condensed"] .footer { -
  • + diff --git a/app/Views/ticket_form_gmc.php b/app/Views/ticket_form_gmc.php index 782cc30d..447746d7 100644 --- a/app/Views/ticket_form_gmc.php +++ b/app/Views/ticket_form_gmc.php @@ -346,10 +346,7 @@
    - +
    From aec134abb0a6b2b41f101fa6f9fd519898d4a7bf Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 17 Mar 2026 11:35:48 +0530 Subject: [PATCH 3/4] FIX_CLAIM_LIST_LOADING --- app/Controllers/TicketController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index d8452e8d..dfbac180 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -573,6 +573,7 @@ class TicketController extends BaseController ->join('ticket_claim_status tcs', 'tcs.id = tm.claim_status_id AND tcs.is_active = 1', 'left') ->join("({$subquery->getCompiledSelect()}) tat_category", 'tm.id = tat_category.ticket_id', 'left') ->where('tm.is_active', 1) + ->whereNotIn('claim_status_id', [11, 12, 13, 22, 24, 32, 34, 42, 44, 47, 53, 58, 65]) ->orderBy('tm.id', 'DESC'); $data = $query->get()->getResultArray(); @@ -628,6 +629,7 @@ class TicketController extends BaseController } } } + $query = $db->table('ticket_master tm') ->select([ 'tm.id', From 0e03cd1da09cffdfa1a79934d6b158228da1efd6 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 17 Mar 2026 12:10:52 +0530 Subject: [PATCH 4/4] FIX_CLAIMS_FILTER --- app/Views/ticket_search.php | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/app/Views/ticket_search.php b/app/Views/ticket_search.php index 9abd8e4e..171a6167 100644 --- a/app/Views/ticket_search.php +++ b/app/Views/ticket_search.php @@ -126,9 +126,8 @@
    - - + +
    @@ -227,6 +226,7 @@ function fetchTicketListData() { closeFilterNav(); + var ticket_type = $('#ticket_type').val(); var pod_no = $('#pod_no').val(); var claim_no = $('#claim_no').val(); @@ -242,9 +242,24 @@ var end_date = $('#endDate').val(); var date_type = $('#date_type').val(); + function isEmpty(value) { + return value === null || value === undefined || value.toString().trim() === '' || value == 0; + } + + if (isEmpty(claim_no) && isEmpty(emp_code) && isEmpty(claim_status) && isEmpty(emp_mobile_no) && isEmpty(tpa_id) && isEmpty(client_id) && isEmpty(insurer_id) && isEmpty(date_type)) { + toastr.warning('Please enter at least one search criteria.'); + return false; + } + + if (date_type) { + if (!start_date || !end_date) { + toastr.warning('Please select both Start Date and End Date.'); + return false; + } + } + var requestData = { ticket_type_id: ticket_type, - pod_no: pod_no, claim_number: claim_no, emp_code: emp_code, claim_status_id: claim_status, @@ -412,22 +427,24 @@ $('#pod_no').val(''); $('#claim_no').val(''); $('#emp_code').val(''); - $('#claim_status').val('0'); $('#emp_mobile_no').val(''); - $('#tpa_id').val('0'); - $('#client_id').val('0'); - $('#insurer_id').val('0'); + $('#date_div').hide(); $('#date_type').val('0'); $('#start_date').val(''); $('#end_date').val(''); + $('#claim_status').val('0').select2(); + $('#tpa_id').val('0').select2(); + $('#client_id').val('0').select2(); + $('#insurer_id').val('0').select2(); + // Reset the date range picker to default $('#reportrange').data('daterangepicker').setStartDate(moment().subtract(29, 'days')); $('#reportrange').data('daterangepicker').setEndDate(moment()); cb(start, end); // Update the displayed date range - localStorage.setItem('filterData', JSON.stringify(filterData)); + // localStorage.setItem('filterData', JSON.stringify(filterData)); window.location.href = ""; });