From fadcd8d6857a0b6a15e1651915f58b039be3ecf2 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 13 Oct 2025 14:36:36 +0530 Subject: [PATCH 1/2] FEAT_MASTERS : RV --- app/Controllers/MasterController.php | 91 +- app/Models/VehicleTypeModel.php | 54 + app/Views/nhance_branch_list.php | 207 ++++ app/Views/vehicle_type_list.php | 1692 ++++++++++++++++++++++++++ 4 files changed, 2043 insertions(+), 1 deletion(-) create mode 100644 app/Models/VehicleTypeModel.php create mode 100644 app/Views/nhance_branch_list.php create mode 100644 app/Views/vehicle_type_list.php diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 013a9324..cde00cf7 100755 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -33,6 +33,7 @@ use App\Models\ClientDepositModel; use App\Models\EmployeePolicyModel; use App\Models\FileModel; use App\Models\InsurerExcelExportTemplateModel; +use App\Models\NhanceBranchModel; use App\Models\SettingsModel; use App\Models\VehicleModel; @@ -1618,7 +1619,8 @@ class MasterController extends AdminController //Vehicle Master data Function public function VehicleMasterList() - { $data['tab_name'] = 'Vehicle Master'; + { + $data['tab_name'] = 'Vehicle Master'; $data['page_name'] = 'Vehicles'; $data['vehicle_type'] = [ 'two_wheeler' => 'Two Wheeler', @@ -2020,4 +2022,91 @@ class MasterController extends AdminController dd($result); } + public function nhanceBranchMaster() + { + $nhanceBranchModel = new NhanceBranchModel(); + + if ($this->request->is('post')) { + + $id = $this->request->getPost('pk') ?? null; + $data = $this->request->getPost(); + print_r($data); die; + + if (empty($id)) { + $update_status = $nhanceBranchModel->insert($data); + } else { + $update_status = $nhanceBranchModel->where('id', $id)->set($data)->update(); + } + + if ($update_status) { + return $this->respond([ + 'status' => true, + 'code' => 200, + 'message' => 'Nhance Branch Master updated successfully', + 'data' => $data + ], 200); + } else { + return $this->respond([ + 'status' => false, + 'code' => 400, + 'message' => 'Failed to update', + 'data' => $data + ], 200); + } + + } elseif ($this->request->is('get')) { + + $id = $this->request->getGet('pk') ?? null; + + if (!empty($id)) { + $data = $nhanceBranchModel->where('is_active', 1)->where('id', $id)->findAll(); + if (!empty($data)) { + return $this->respond(['status' => true, 'code' => 200, 'data' => $data], 200); + } else { + return $this->respond(['status' => false, 'code' => 400, 'message' => 'No data found'], 200); + } + } + + $data = $nhanceBranchModel->where('is_active', 1)->findAll(); + return $this->loadLayout('nhance_branch_list', ['data' => $data]); + + } elseif ($this->request->is('delete')) { + + $input = $this->request->getRawInput(); + $id = $input['pk'] ?? null; + + if (empty($id)) { + return $this->respond([ + 'status' => false, + 'code' => 404, + 'message' => 'No ID provided for deletion' + ], 200); + } + + $update_status = $nhanceBranchModel->where('id', $id)->set(['is_active' => 0])->update(); + + if ($update_status) { + return $this->respond([ + 'status' => true, + 'code' => 200, + 'message' => 'Data removed successfully', + 'pk' => $id + ], 200); + } else { + return $this->respond([ + 'status' => false, + 'code' => 400, + 'message' => 'Failed to remove data', + 'pk' => $id + ], 200); + } + } + } + + + public function vehicleTypeMaster() + { + + } + } \ No newline at end of file diff --git a/app/Models/VehicleTypeModel.php b/app/Models/VehicleTypeModel.php new file mode 100644 index 00000000..46fdc3c9 --- /dev/null +++ b/app/Models/VehicleTypeModel.php @@ -0,0 +1,54 @@ + +.dataTables_filter { + position: absolute; +} + + + +
+
+
+
+ + + + + + + + + + $row) { ?> + + + + + + + + +
S.No.Branch NameAction
+ +
+
+
+
+
+ + + + + + + diff --git a/app/Views/vehicle_type_list.php b/app/Views/vehicle_type_list.php new file mode 100644 index 00000000..3cc0de76 --- /dev/null +++ b/app/Views/vehicle_type_list.php @@ -0,0 +1,1692 @@ + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
S.No.Mobile NoRoleStatusAction
first_name; ?>email; ?>mobile; ?>user_role; ?> + + is_active == 1){ echo 'Active'; }else{ echo 'In-Active'; } ?> + + + +
+ + +
+
+
+ +
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TeamModuleAccess Rights
ManagementBDS - All accessAll access
FinanceBDS - Policy TransactionPolicy | Endorsement | Statement Upload
BDS - ReportTAT wise | ACM Status wise | ACM TAT wise
BDS - Pending ActionsFinance Team
BDS - MastersVehicle | CD
BDS - Documents
BusinessBDS - Policy TransactionPolicy | Endorsement
BDS - ReportTAT wise | ACM Status wise | ACM TAT wise
BDS - Pending ActionsBusiness Team
BDS - MastersVehicle | CD
BDS - Documents
POSBDS - Policy TransactionPolicy | Endorsement
BDS - ReportBDS, TAT wise | ACM Status wise | ACM TAT wise
EnrollmentInception File UploadAll access
ClaimsClaimsAll access
SalesLEADLead creation | RFQ creation
Business SupportLEADAll access
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TeamModuleAccess Rights
HeadAll modulesAll access
AdminAll modulesAll access
ManagerAccess to all modules except the "Masters" moduleAll access
Account ManagerAccess to all modules except the "Masters" moduleAll access without "Delete option"
StaffBased on the "Teams"Based on the "Teams"
+
+
+ + + + + + \ No newline at end of file From 654041d725377580c7f914546f85a7de4549f194 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 13 Oct 2025 14:44:59 +0530 Subject: [PATCH 2/2] CHANGE_ROUTE --- app/Config/Routes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 31453be4..0cd7f7fe 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -395,6 +395,8 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) { $routes->get('getMemberDataExcelFileErrors', 'LeadsController::getMemberDataExcelFileErrors'); $routes->post('savePlacementDataAndValidateMemberDataFile', 'LeadsController::savePlacementDataAndValidateMemberDataFile'); $routes->get('checkMemberDataFileValidationStatus', 'LeadsController::checkMemberDataFileValidationStatus'); + $routes->match(['get', 'post', 'delete'], 'nhanceBranchMaster', 'MasterController::nhanceBranchMaster'); + }); $routes->post("policy_tranction/sendInstallmentRemainderMail","PolicyTransactionController::sendInstallmentRemainderMail");