From a3f84efe3b4a00b1419d004944b5cbfc7467f37e Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 29 Aug 2025 16:38:12 +0530 Subject: [PATCH 1/2] FIX_Small Fixes --- app/Controllers/EmpDataServiceController.php | 12 +++++-- app/Controllers/EmployeeController.php | 8 +++++ app/Controllers/LeadsController.php | 1 + app/Controllers/ThzController.php | 4 ++- app/Models/BatchFileModel.php | 1 + app/Views/insurer_or_tpa_data.php | 33 +++++++++++++++++++- 6 files changed, 55 insertions(+), 4 deletions(-) diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 506b39a1..285207f4 100755 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -1862,6 +1862,7 @@ class EmpDataServiceController extends BaseController $status = $file['status']; $batch_code = $file['batch_code']; $user_id = $file['created_by']; + $policy_issue_date = $file['policy_issue_date']; $insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first(); @@ -2086,6 +2087,7 @@ class EmpDataServiceController extends BaseController 'no_of_dependent' => count($no_of_dependent ?? []) ?? null, 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null, 'gst' => $base_bremium_and_gst['gst'] ?? null, + 'policy_issue_date' => $policy_issue_date ?? null, ]]); // $this->cashDepositCalculationForInception($depositeData); @@ -2417,6 +2419,7 @@ class EmpDataServiceController extends BaseController $batch_code = $file['batch_code']; $user_id = $file['created_by']; $event_type = $file['event_type']; + $policy_issue_date = $file['policy_issue_date']; $status_val = 'success'; @@ -2519,6 +2522,7 @@ class EmpDataServiceController extends BaseController 'endorsement_no' => $endorsement_id[0] ?? null, 'emp_count' => $emp_count ?? null, 'action_type' => $file['event_type'] ?? null, + 'policy_issue_date' => $policy_issue_date ?? null, ]]); @@ -2999,6 +3003,7 @@ class EmpDataServiceController extends BaseController $status = $file['status']; $batch_code = $file['batch_code']; $user_id = $file['created_by']; + $policy_issue_date = $file['policy_issue_date']; $insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first(); @@ -3179,6 +3184,7 @@ class EmpDataServiceController extends BaseController 'no_of_dependent' => count($no_of_dependent ?? []) ?? null, 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null, 'gst' => $base_bremium_and_gst['gst'] ?? null, + 'policy_issue_date' => $policy_issue_date ?? null, ]]); } @@ -3537,6 +3543,7 @@ class EmpDataServiceController extends BaseController $status = $file['status']; $batch_code = $file['batch_code']; $user_id = $file['created_by']; + $policy_issue_date = $file['policy_issue_date']; $insurer_id = $this->clientPolicyModel->where('id', $client_policy_id)->first(); @@ -3687,6 +3694,7 @@ class EmpDataServiceController extends BaseController 'no_of_dependent' => count($no_of_dependent ?? []) ?? null, 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null, 'gst' => $base_bremium_and_gst['gst'] ?? null, + 'policy_issue_date' => $policy_issue_date ?? null, ]]); } @@ -4981,7 +4989,7 @@ class EmpDataServiceController extends BaseController 'policy_no' => $policy_data['policy_no'] ?? null, 'cd_ac_no' => $policy_data['cd_ac_no'] ?? null, 'cd_ac_pk' => $policy_data['cd_ac_pk'] ?? null, - 'policy_issue_date' => $policy_data['policy_start_date'] ?? null, + 'policy_issue_date' => $policy_data['policy_issue_date'] ?? null, 'policy_start_date' => $policy_data['policy_start_date'] ?? null, 'policy_end_date' => $policy_data['policy_end_date'] ?? null, 'data_received_date' => $policy_data['data_received_date'] ?? null, @@ -4992,7 +5000,7 @@ class EmpDataServiceController extends BaseController 'co_share' => $policy_data['co_share'] ?? 0, 'pre_payable_by' => $policy_data['pre_payable_by'] ?? 1, 'renewal_date' => $policy_data['policy_end_date'] ?? null, - 'month' => date('Y-m-01', strtotime($policy_data['policy_start_date'])) ?? null, + 'month' => date('Y-m-01', strtotime($policy_data['policy_issue_date'] ?? "")) ?? null, 'ct_type' => 1, 'is_cd_reduce_from_bds' => 0, 'client_type_id' => 0, diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 40e8af2b..91ed4ef6 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -515,6 +515,7 @@ class EmployeeController extends AdminController $client_branch_id = $this->request->getPost('client_branch_id'); $insurer_or_tpa = $this->request->getPost('insurer_or_tpa'); $actions = $this->request->getPost('action_type'); + $policy_issue_date = $this->request->getPost('policy_issue_date'); $client_data = $this->clientPolicyModel->getCliendDataForExcelFileName($client_policy_id); $file_name = generate_filename($client_data['short_name'], $event_type, $actions, $insurer_or_tpa, $client_data['policy_type'], $client_data['branch_code']); @@ -530,6 +531,13 @@ class EmployeeController extends AdminController 'actions' => $actions, 'file_name' => $file_name, ]; + + + $batch_data['policy_issue_date'] = (!empty($policy_issue_date) && strtotime($policy_issue_date) !== false) + ? change_date_format($policy_issue_date) + : null; + + if ($actions == 'export') { if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition' || $event_type == 'missed_inception' || ($event_type == 'MultipleEvents' && $insurer_or_tpa == 'tpa')) { diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 742ca2cf..545662e3 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -3676,6 +3676,7 @@ class LeadsController extends BaseController $result = $this->gmailSentHistoryModel ->where('pk', $id) ->where('module',"leads") + ->orderBy('created_at', 'desc') ->findAll(); if(!empty($result)){ $result = !empty($result) ? $result : []; diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index fe6ad35b..ad3633e2 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -299,7 +299,9 @@ class ThzController extends BaseController // $details = $this->thzHistoryModal->whereIn('thz_id', $thz_id)->where('is_active', 1)->get()->getResultArray(); $details = $this->thzHistoryModel->select('thz_history.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as created_name') ->join('user_profiles', 'user_profiles.id = thz_history.created_by', 'left') - ->where('thz_history.thz_id', $thz_id)->where('thz_history.is_active', 1)->get()->getResultArray(); + ->where('thz_history.thz_id', $thz_id)->where('thz_history.is_active', 1) + ->orderBy('thz_history.created_at', 'desc') + ->get()->getResultArray(); diff --git a/app/Models/BatchFileModel.php b/app/Models/BatchFileModel.php index b8ebc8e9..e791553a 100755 --- a/app/Models/BatchFileModel.php +++ b/app/Models/BatchFileModel.php @@ -25,6 +25,7 @@ class BatchFileModel extends Model "status", "error_data", "client_branch_id", + "policy_issue_date", ]; // Callbacks diff --git a/app/Views/insurer_or_tpa_data.php b/app/Views/insurer_or_tpa_data.php index 6c22b23c..dc07ab1c 100755 --- a/app/Views/insurer_or_tpa_data.php +++ b/app/Views/insurer_or_tpa_data.php @@ -90,9 +90,15 @@ +
-
 [ ] @@ -144,6 +150,16 @@ }); + $(document).ready(function() { + + var policy_issue_datePicker = flatpickr("#policy_issue_date", { + dateFormat: "d/m/Y", + allowInput: false, + }); + + $('#insurer_or_tpa, #action_type').on('change', togglePolicyIssueDate); + }); + $(document).ready(function() { has('error')) : ?> @@ -730,4 +746,19 @@ //------------------------------------------------------------------------------------------------------ + + \ No newline at end of file From 485cb61ae9232a83a7f4f52a07840443976240de Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 29 Aug 2025 17:23:15 +0530 Subject: [PATCH 2/2] FIX_THZ White color --- app/Views/thz_list.php | 29 ++++++++++++++--------------- app/Views/thz_notes.php | 15 ++++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index 4c38f373..f0e3d6ea 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -167,7 +167,7 @@ table thead th { .form-control { background-color: #ECECEC !important; border: 1px solid #ccc; /* optional */ - color: #000; /* keep text readable */ + /* color: #000; keep text readable */ } .form-control:focus { @@ -184,12 +184,11 @@ table thead th { /* Text inside */ .select2-container .select2-selection__rendered { - color: #000 !important; line-height: 36px !important; } .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { - background-color: #ECECEC !important; + background-color: #00999E !important; } @@ -202,7 +201,7 @@ table thead th {
-

Tickets

+

Tickets

@@ -295,7 +294,7 @@ table thead th {
- @@ -314,7 +313,7 @@ table thead th {
- +
@@ -428,7 +427,7 @@ table thead th {
@@ -746,31 +745,31 @@ $(document).ready(function() { "<'row'<'col-sm-5'i><'col-sm-7'p>>", buttons: [ { - text: ' Create New Ticket ', - className: 'btn app-btn-primary app-btn-border-radius app-text-white mr-2', + text: ' Create New Ticket ', + className: 'btn app-btn-primary app-btn-border-radius mr-2', action: function(e, dt, node, config) { openTicket(); } }, { extend: 'collection', - text: ' Export ', - className: 'btn app-btn-secondary app-btn-border-radius app-text-white', + text: ' Export ', + className: 'btn app-btn-secondary app-btn-border-radius', buttons: [ { extend: 'csv', - text: ' CSV ', + text: ' CSV ', title: 'Tickets', - className: 'app-btn-primary app-text-white', + className: 'app-btn-primary ', }, { extend: 'excel', - text: ' EXCEL ', + text: ' EXCEL ', title: 'Tickets', exportOptions: { orthogonal: 'sort' }, - className: 'app-btn-primary app-text-white', + className: 'app-btn-primary ', } ] } diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index a5bf3ea1..7121dee7 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -125,12 +125,12 @@ hr{ /* Text inside */ .select2-container .select2-selection__rendered { - color: #000 !important; + /* color: #000 !important; */ line-height: 36px !important; } .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { - background-color: #ECECEC !important; + background-color: #00999E !important; } @@ -472,7 +472,7 @@ hr{
- @@ -601,12 +601,13 @@ hr{