From f705ec2708b76080feab23dacaeb012bea6f968a Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Wed, 17 Dec 2025 12:46:54 +0530 Subject: [PATCH] fual and vehicle typr master --- app/Config/Routes.php | 2 ++ app/Controllers/PolicyController.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 7e2c641..4ade84d 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -117,6 +117,8 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) { $routes->post('policy/uploadPolicyFile', 'PolicyController::uploadPolicyFile'); $routes->get("policy/searchThePolicies", "PolicyController::searchThePolicies"); $routes->post('policy/calculateCommissionRequest', 'PolicyController::calculateCommissionRequest'); + $routes->get("policy/vehicleTypeMaster", "PolicyController::vehicleTypeMaster"); + $routes->get("policy/fuelTypeMaster", "PolicyController::fuelTypeMaster"); //claims diff --git a/app/Controllers/PolicyController.php b/app/Controllers/PolicyController.php index 0631f8d..9afcf3f 100644 --- a/app/Controllers/PolicyController.php +++ b/app/Controllers/PolicyController.php @@ -1121,6 +1121,29 @@ class PolicyController extends ResourceController } } + public function vehicleTypeMaster() + { + // Get only values & make unique + $vehicleTypes = array_values(array_unique($this->tier1VehicleTypeMap)); + + return $this->respond([ + 'status' => 'success', + 'data' => $vehicleTypes + ], 200); + } + + public function fuelTypeMaster() + { + $fuelTypes = array_values(array_unique($this->fuelType)); + + return $this->respond([ + 'status' => 'success', + 'data' => $fuelTypes + ], 200); + } + + +