From 3661ac99edfab241fd93a0f44fb265d9304ffd3d Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 5 Sep 2025 15:30:53 +0530 Subject: [PATCH 1/3] LIVE_Thz Fixes --- app/Views/thz_list.php | 6 +++--- app/Views/thz_notes.php | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index e493cfc5..8441c85f 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -379,9 +379,9 @@ table.dataTable td.wrap { var form = document.getElementById("ticketForm"); // your form ID var formData = new FormData(form); - var btn = document.querySelector("button[onclick='submitTicket()']"); - btn.disabled = true; - btn.innerText = "Saving..."; + var btn = event.target; + btn.disabled = true; + btn.innerText = "Saving..."; $.ajax({ url: "", diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index c7a23bb8..98443f8f 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -533,10 +533,17 @@ hr{ var form = document.getElementById("ticketForm"); var id = form.querySelector("[name='thz_id']").value; var formData = new FormData(form); - + form.classList.remove('was-validated'); var btn = document.querySelector("button[onclick='submitTicket()']"); btn.disabled = true; btn.innerText = "Saving..."; + + var ticketType = document.getElementById('ticket_type').value.trim(); + if (ticketType === "") { + toastr.warning('Please fill all required fields.', 'Warning'); + form.classList.add('was-validated'); + return; + } $.ajax({ url: "", From 88edf67aa15c6cdb0b91d49af2f2f9d432f705f5 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 5 Sep 2025 17:17:32 +0530 Subject: [PATCH 2/3] CHANGE_Motor Cliams --- app/Config/Routes.php | 2 + app/Controllers/TicketController.php | 78 +- app/Models/PartnerPolicyModel.php | 42 + app/Views/ticket_form_handler.php | 2 + app/Views/ticket_form_motor.php | 1146 ++++++++++++++++++++++++++ app/Views/ticket_type_modal.php | 1 + 6 files changed, 1270 insertions(+), 1 deletion(-) create mode 100755 app/Models/PartnerPolicyModel.php create mode 100644 app/Views/ticket_form_motor.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9a762179..8240c1c1 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -628,6 +628,8 @@ $routes->group("/ticket", ["filter" => "authMVC"], function ($routes) { $routes->post('upload_url',"TicketController::upload_url"); $routes->post('getUrlDataByTicketId',"TicketController::getUrlDataByTicketId"); $routes->get('remove_url',"TicketController::remove_url"); + $routes->get('fetchVehiclePolicy/(:any)','TicketController::fetchVehiclePolicy/$1'); + }); $routes->group("clientApi",["filter" => "AuthClientApi"], function ($routes){ diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 0fe8752b..c9548469 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -22,6 +22,8 @@ use App\Models\EmployeeModel; use App\Models\TPAModel; use App\Models\ClaimFilesModel; use App\Models\ClaimDumpFileModel; +use App\Models\VehicleModel; +use App\Models\PartnerPolicyModel; use DOMDocument; use Psr\Log\LoggerInterface; @@ -62,6 +64,8 @@ class TicketController extends BaseController protected $TPAModel; protected $claimFilesModel; protected $claimDumpFileModel; + protected $vehicleModel; + protected $partnerPolicyModel; public function __construct() { @@ -71,7 +75,7 @@ class TicketController extends BaseController $this->ticketMasterModel = new TicketMasterModel(); - $this->ticketType = [1 => "Claim-GMC", 2 => "Claim-GPA", 3 => "EDLI", 4 => "GTLI"]; + $this->ticketType = [1 => "Claim-GMC", 2 => "Claim-GPA", 3 => "EDLI", 4 => "GTLI", 8 => "Motor"]; $this->priorityType = [ 1 => "Low", 2 => "Medium", @@ -348,6 +352,8 @@ class TicketController extends BaseController $this->TPAModel = new TPAModel(); $this->claimFilesModel = new ClaimFilesModel(); $this->claimDumpFileModel = new ClaimDumpFileModel(); + $this->vehicleModel = new VehicleModel(); + $this->partnerPolicyModel = new PartnerPolicyModel(); } public function ticketList() @@ -684,6 +690,9 @@ class TicketController extends BaseController case 4: $data['ticket_form'] = 'GTLI'; break; + case 8: + $data['ticket_form'] = 'Motor'; + break; } // Fetch ACM Users @@ -719,11 +728,78 @@ class TicketController extends BaseController $data['claim_type'] = $this->claimType[2]; } + $data['client_for_motor'] = $this->clientModel->select('id,client_name')->where('client_type', 2)->where('is_active', 1)->findAll(); + $this->myLogger->logme('error', "Ticket form data fetched successfully for Ticket Type: $ticket_type"); return $data; } + public function fetchVehiclePolicy($id) + { + $method = $this->request->getMethod(); + + try { + if (!$id) { + throw new \Exception('Invalid ID', 400); + } + + if ($method === 'get') { + $data['vehicle_list'] = $this->vehicleModel + ->where('is_active', 1) + ->where('owner', $id) + ->findAll(); + + $data['partner_policy_list'] = $this->partnerPolicyModel + ->where('is_active', 1) + ->findAll(); + + $client = $this->clientModel + ->where('is_active', 1) + ->where('id', $id) + ->first(); + + $data['email'] = !empty($client) ? $client['email'] : null; + $data['phone'] = !empty($client) ? $client['phone'] : null; + + if (empty($data['vehicle_list']) && empty($data['partner_policy_list'])) { + throw new \Exception('No Records found', 404); + } + + return $this->response + ->setJSON(['status' => 'success', 'data' => $data]) + ->setStatusCode(200); + } + + throw new \Exception('Invalid request method', 405); + + } catch (\Throwable $e) { + $code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500; + + $isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException + || $e instanceof \mysqli_sql_exception + || $e instanceof \PDOException; + + $context = [ + 'title' => get_class($e), + 'type' => get_class($e), + 'code' => $code, + 'message' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine() + ]; + + $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); + + return $this->response->setJSON([ + 'status' => 'error', + 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), + 'ref' => ($isDbError ? 'database - ' : 'application - ') . $code . ' - ' . $e->getLine() + ])->setStatusCode($code); + } + } + + //transform the claim status public function transFormClaimStatus($claimStatusId, $ticket_type) { diff --git a/app/Models/PartnerPolicyModel.php b/app/Models/PartnerPolicyModel.php new file mode 100755 index 00000000..8c14ba06 --- /dev/null +++ b/app/Models/PartnerPolicyModel.php @@ -0,0 +1,42 @@ + + .readonly-select { + pointer-events: none; + background-color: #e0e0e0; + color: #666; + } + + .info-icon { + color: #007bff; + font-size: 15px; + transition: 0.3s ease; + cursor: pointer; + } + + .info-icon:hover { + color: #0056b3; + font-size: 24px; + } + + .label-font-size{ + font-size:0.875rem; + } + + + +
+
+
" style="margin-right: 23px;"> +
+ + +
+
+

Motor

+
+
+ + + +
+
+ +
+ + + + + +
+
+ +
+ + + + + +
+ + + + + + + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + + +
+ +
+ + +
+ +
+ + +
+ + + +
+ + +
+ + + + + + + + +
+ + +

+
Claim Details
+
+ + +
+
+ + +
+ +
+ + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+ + + Rejected Approve + +
+
+ +
+
+
+ + + + + + \ No newline at end of file diff --git a/app/Views/ticket_type_modal.php b/app/Views/ticket_type_modal.php index d16b53a9..4a4728b1 100644 --- a/app/Views/ticket_type_modal.php +++ b/app/Views/ticket_type_modal.php @@ -14,6 +14,7 @@ + From 9f043dcf080d5751d8002a860dda9a5ed175ce12 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 5 Sep 2025 18:30:49 +0530 Subject: [PATCH 3/3] CHANGE_UI_FIX - VADIVEL J 2025-09-05 --- app/Views/client_basic_info.php | 35 ++- app/Views/client_info.php | 79 ++---- app/Views/client_kyc.php | 47 +++- app/Views/client_list.php | 53 ++-- app/Views/client_onboarding.php | 59 +++- app/Views/client_policy.php | 10 +- app/Views/client_rm.php | 6 +- app/Views/hr_access_controll.php | 4 +- app/Views/hr_activity_history.php | 1 - app/Views/layout/header.php | 106 ++++++-- app/Views/notification.php | 48 +--- app/Views/policy_gpa_terms.php | 399 ++++++++++++---------------- app/Views/policy_grid.php | 11 +- app/Views/ticket_edit_onbording.php | 2 +- app/Views/ticket_form_handler.php | 2 +- app/Views/view_deposit.php | 227 ++++++++-------- public/assets/images/avatar_2x.png | Bin 626 -> 787 bytes 17 files changed, 595 insertions(+), 494 deletions(-) diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index 335b55eb..0cf659a3 100755 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -64,6 +64,28 @@ input:checked + .slider:before {
+
+ +
+
+ " + width="75" height="75" + id="uploadPreview" + class="avatar img-circle img-thumbnail" + style="border-radius:25px; border:1px solid #00999E;padding:10px;color:#00999E;" + alt="avatar"/> + +
+ ( Image dimensions 100 x 100 pixels and size of 200KB. ) +
+
+ +
+
+ + +
@@ -125,16 +147,7 @@ input:checked + .slider:before {

-
-
- -
- ( Image dimensions 100 x 100 pixels and size of 200KB. ) -
-
- " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/> -
-
+ - -
- - - - - -
Relationship Manager
- -
- -
- -
- -
- - - -
- - - - - - - - - - -
- -
-
diff --git a/app/Views/client_kyc.php b/app/Views/client_kyc.php index aff9953a..0c3e8b40 100755 --- a/app/Views/client_kyc.php +++ b/app/Views/client_kyc.php @@ -1,4 +1,35 @@ @@ -12,19 +43,19 @@ + +
S.no Document Name Status Action
-
- - + @@ -34,6 +65,7 @@
+

Additional Documents

@@ -44,18 +76,20 @@
-
- +
- +
@@ -412,6 +446,7 @@ $.each(res.data, function(index, item) { var row = ` + ${index+1} ${item.file_name} diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 8275c156..b46846e3 100755 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -48,6 +48,26 @@ table.dataTable thead th { color: #16181b !important; cursor: pointer !important; } + + + +.add-from-lead{ + color:#E26828; + border : 0px solid white ; + background-color: white; + text-decoration: underline ; +} + +.add-from-lead:hover{ + color:#E26828; + border : 0px solid white ; + background-color: white; + text-decoration: underline ; +} + + + +
@@ -69,6 +89,7 @@ table.dataTable thead th { id="tickets-table"> + S.No Client Name Account Manager Action @@ -76,8 +97,9 @@ table.dataTable thead th { - + $row){ ?> + client_name; ?> ( short_name; ?> ) @@ -278,6 +300,21 @@ $(document).ready(function() "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-5'i><'col-sm-7'p>>", buttons: [ + + { + text: 'Add From Lead', + className: 'btn-filter add-from-lead', // custom class + action: function(e, dt, node, config) { + showModal(); + } + }, + { + text: '+ create New Client', + className: 'btn-filter buttons-html5', // custom class + action: function(e, dt, node, config) { + addClient(); + } + }, { extend: 'csv', text: 'CSV', @@ -286,20 +323,6 @@ $(document).ready(function() exportOptions: { columns: ':not(:last-child)' }, - }, - { - text: 'Add From Lead', - className: 'btn-filter', // custom class - action: function(e, dt, node, config) { - showModal(); - } - }, - { - text: 'Add', - className: 'btn-filter', // custom class - action: function(e, dt, node, config) { - addClient(); - } } ], diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php index 059e07fa..5366d1a8 100755 --- a/app/Views/client_onboarding.php +++ b/app/Views/client_onboarding.php @@ -258,6 +258,49 @@ body { border-radius: 4px; border: 1px solid #dee2e6; } + + #client_add .nav-pills , + #client_add .nav-link + { + background-color: #F5FFFF !important; + color : #00999E !important; + border-radius:10px; + + } + + #client_add .nav-pills + { + background-color: #F5FFFF !important; + color : #00999E !important; + box-shadow: 0px 2px 4px 0px #00000040; + padding-top: 5px ; + } + + + #client_add .nav-link.active-tab { + color: white !important; + background-color: #00999E !important; + font-size: small !important; + padding:8px 16px; + border-radius: 10px !important; + box-shadow: 0px 2px 4px 0px #00000040; + + } + + #hr_activity_history_append_area{ + padding-top:0; + margin-top:0; + background-color: #F5FFFF !important; + border: 2px solid #F5FFFF; + border-radius: 10px; + box-shadow: 0px 4px 4px 0px #00000040; + } + + #hr_activity_history_append_area tbody tr{ + background-color: white !important; + } + + @@ -277,7 +320,7 @@ body {
-