vehicle category

This commit is contained in:
pringgosutono
2026-06-12 15:33:51 +09:00
parent e3d92dfbd7
commit f69060c472
2 changed files with 33 additions and 6 deletions

View File

@ -170,6 +170,7 @@ class VehiclesController extends Controller
"vehicle_name" => $req->vhc_name,
"brand_id" => $req->brand_id,
"type_id" => $req->type_id,
"cat_id" => $req->cat_id,
"model_id" => $req->model_id,
"speed_limit" => $req->speed_limit,
"fuel_capacity" => $req->fuel_capacity,
@ -204,6 +205,7 @@ class VehiclesController extends Controller
"vehicle_name" => "required|string",
"brand_id" => "required|integer",
"type_id" => "required|integer",
"cat_id" => "required|in:car,motorcycle",
"model_id" => "nullable|integer",
"speed_limit" => "required|numeric",
// "fuel_capacity" => "required|numeric",
@ -274,9 +276,9 @@ class VehiclesController extends Controller
"dvc_id" => $req->dvc_id ?? 0,
"device_id" => $device_id,
"simcard" => $req->simcard ?? 0,
"cat_id" => Vehicles::DEFAULT_CAT_ID,
"brand_id" => $req->brand_id,
"type_id" => $req->type_id,
"cat_id" => $req->cat_id,
"nopol1" => strtoupper($req->nopol1),
// "nopol2" => strtoupper($req->nopol2),
// "nopol3" => strtoupper($req->nopol3),
@ -408,6 +410,7 @@ class VehiclesController extends Controller
"vehicle_name" => $req->vhc_name,
"brand_id" => $req->brand_id,
"type_id" => $req->type_id,
"cat_id" => $req->cat_id,
"model_id" => $req->model_id,
"speed_limit" => $req->speed_limit,
"sum_milleage" => $req->mileage,
@ -444,6 +447,7 @@ class VehiclesController extends Controller
"vehicle_name" => "required|string",
"brand_id" => "required|integer",
"type_id" => "required|integer",
"cat_id" => "required|integer",
"model_id" => "nullable|integer",
"speed_limit" => "required|numeric",
"sum_milleage" => "required|numeric",
@ -550,9 +554,9 @@ class VehiclesController extends Controller
"dvc_id" => $req->dvc_id,
"device_id" => $device_id,
"simcard" => (int) $req->simcard,
"cat_id" => Vehicles::DEFAULT_CAT_ID,
"brand_id" => $req->brand_id,
"type_id" => $req->type_id,
"cat_id" => $req->cat_id,
"nopol1" => strtoupper($req->nopol1),
"nopol2" => strtoupper($req->nopol2),
"nopol3" => strtoupper($req->nopol3),