From cb06e7799b89f540285ec115af3373cb103ebc08 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Tue, 26 Aug 2025 18:25:24 +0530 Subject: [PATCH 01/14] FIX_little changes --- app/Config/Routes.php | 3 +- app/Controllers/ThzController.php | 39 ++++++++++++++ app/Models/TicketTypesModel.php | 44 ++++++++++++++++ app/Views/thz_list.php | 87 ++++++++++++++++++++++++++----- app/Views/thz_notes.php | 17 +++++- 5 files changed, 175 insertions(+), 15 deletions(-) create mode 100644 app/Models/TicketTypesModel.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 75b95c76..acb156bd 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -659,4 +659,5 @@ $routes->post("ticketSave", "ThzController::ticketSave"); $routes->get("ticketList", "ThzController::ticketList"); $routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); $routes->get("ticketConversationList", "ThzController::ticketConversationList"); -$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails"); \ No newline at end of file +$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails"); +// $routes->match(['get','post','put'], 'ticketType', 'ThzController::ticketType'); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index e6703a0e..e286d651 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -13,6 +13,7 @@ use App\Models\UserModel; use App\Models\ClientPolicyModel; use App\Models\ClientModel; use App\Models\TicketMailTemplateModel; +// use App\Models\TicketTypesModel; class ThzController extends BaseController @@ -28,6 +29,7 @@ class ThzController extends BaseController protected $clientModel; protected $ticketMailTemplateModel; + // protected $ticketTypesModel; public function __construct() { @@ -226,6 +228,43 @@ class ThzController extends BaseController } + // public function ticketType() + // { + // $method = $this->request->getMethod(); // get, post + + // if ($method === 'get') { + + // $types = $this->ticketTypesModel->where('is_active', 1)->findAll(); + // if (empty($types)) { + // return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404); + // } + // return $this->response->setJSON(['status' => 'success','data' => $types])->setStatusCode(200); + + // } + + // if ($method === 'post') { + + // $data = $this->request->getPost(); + // if (!empty($data['id'])) { + // $text = "update"; + // $result = $this->ticketTypesModel->update($data['id'], $data); + // $updateID = $data['id']; + // } else { + // $text = "create"; + // $insertID = $this->ticketTypesModel->insert($data); + // $result = true; + // } + + // $id = isset($insertID) && !empty($insertID) ? $insertID : $updateID ; + + // return $this->response->setJSON([ + // 'status' => $id ? 'success' : 'error', + // 'message' => $id ? "Ticket Type {$text}d successfully " : "Unable to {$text} ticket type. Please try again." , + // 'id' => $id + // ])->setStatusCode($id ? 200 : 400); + // } + // return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404); + // } /************************************************** PRIVATE FUNCTIONS ********************************************************/ diff --git a/app/Models/TicketTypesModel.php b/app/Models/TicketTypesModel.php new file mode 100644 index 00000000..33f31915 --- /dev/null +++ b/app/Models/TicketTypesModel.php @@ -0,0 +1,44 @@ + -
- +
@@ -257,15 +254,17 @@ table thead th { @@ -359,7 +358,7 @@ table thead th {
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + @@ -241,7 +249,7 @@
- +
- +
- +
- +
- + @@ -302,108 +310,108 @@
Ticket ID format('d/m/Y') . "
" . $cdt->format('h:i a') . ""; + $cd = date("j F Y", strtotime($row['created_at'])); + $ct = date("h:i a", strtotime($row['created_at'])); + echo $cd . "
" . $ct . ""; endif; ?>
format('d/m/Y') . "
" . $udt->format('h:i a') . ""; + $ud = date("j F Y", strtotime($row['updated_at'])); + $ut = date("h:i a", strtotime($row['updated_at'])); + echo $ud . "
" . $ut . ""; endif; ?>
+
diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index 755a1af1..a5bf3ea1 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -1,12 +1,4 @@ @@ -917,7 +923,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus { - +
  • /assets/images/ticket.png" alt="Logo" height="20"> diff --git a/app/Views/notification old.php b/app/Views/notification old.php index ed5f8ee5..c606b064 100644 --- a/app/Views/notification old.php +++ b/app/Views/notification old.php @@ -1494,7 +1494,7 @@ template_name = ''; newRow.innerHTML = `
  • - + `; container.appendChild(newRow); diff --git a/app/Views/notification.php b/app/Views/notification.php index 316ebae9..cffe679b 100755 --- a/app/Views/notification.php +++ b/app/Views/notification.php @@ -860,7 +860,7 @@ newRow.innerHTML = ` - + `; container.appendChild(newRow); @@ -1155,7 +1155,7 @@ newRow.innerHTML = ` - + `; container.appendChild(newRow); diff --git a/app/Views/policy_gmc_terms.php b/app/Views/policy_gmc_terms.php index 596f7a21..13791cd2 100755 --- a/app/Views/policy_gmc_terms.php +++ b/app/Views/policy_gmc_terms.php @@ -861,8 +861,10 @@
    - Yes + + No +
    diff --git a/app/Views/policy_transaction_endorsement_form.php b/app/Views/policy_transaction_endorsement_form.php index 3400d1a2..60be9f72 100644 --- a/app/Views/policy_transaction_endorsement_form.php +++ b/app/Views/policy_transaction_endorsement_form.php @@ -1691,7 +1691,7 @@ function addInsurerColumn() { $('#insurerTable thead tr').append(`
    `); diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index 9e095f2e..ba236dd8 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -4047,7 +4047,7 @@ function addInsurerColumn() { $('#insurerTable thead tr').append(` `); diff --git a/app/Views/policy_transaction_inception_list.php b/app/Views/policy_transaction_inception_list.php index 03a9450b..ff8a98da 100644 --- a/app/Views/policy_transaction_inception_list.php +++ b/app/Views/policy_transaction_inception_list.php @@ -1073,7 +1073,7 @@ function appendFileTableBody(data) .attr('target', '_blank') // Open in a new tab .attr('style', 'font-size:18px;') .attr('data-id', item.id) - .addClass('fa fa-download') + .addClass('mdi mdi-download') // Append the tag inside the
    Ticket ID ${item.file_name} ${item.file_name} ${item.file_name} Insurer ${insurerCount} - ${insurerCount > 1 ? `` : ''} + ${insurerCount > 1 ? `` : ''} Insurer ${insurerCount} - ${insurerCount > 1 ? `` : ''} + ${insurerCount > 1 ? `` : ''} @@ -1168,14 +1168,14 @@ function appendVehicleFileTableBody(data) .attr('href', '' + item.file_name) .attr('style', 'font-size:18px;') .attr('data-id', item.id) - .addClass('fa fa-download') + .addClass('mdi mdi-download') .text(' '); // Space after the icon // Create the delete link var deleteLink = $('') .attr('style', 'font-size:18px;') .attr('data-id', item.id) - .addClass('fa fa-trash') + .addClass('mdi mdi-delete') .text(' '); // Space after the icon // Append the download and delete icons inside the same diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index 89cf7748..3709fb15 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -399,7 +399,9 @@
    - +
    @@ -5827,3 +5829,4 @@ + diff --git a/public/assets/libs/bootstrap-daterangepicker/index.html b/public/assets/libs/bootstrap-daterangepicker/index.html index 459d6138..5ff06a07 100755 --- a/public/assets/libs/bootstrap-daterangepicker/index.html +++ b/public/assets/libs/bootstrap-daterangepicker/index.html @@ -60,7 +60,7 @@   -   Download ZIP +   Download ZIP
    diff --git a/public/assets/libs/bootstrap-daterangepicker/website/index.html b/public/assets/libs/bootstrap-daterangepicker/website/index.html index 407c4bfb..48eee18a 100755 --- a/public/assets/libs/bootstrap-daterangepicker/website/index.html +++ b/public/assets/libs/bootstrap-daterangepicker/website/index.html @@ -60,7 +60,7 @@   -   Download ZIP +   Download ZIP
    From a3f84efe3b4a00b1419d004944b5cbfc7467f37e Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 29 Aug 2025 16:38:12 +0530 Subject: [PATCH 12/14] 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 13/14] 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{