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"); 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