update form surveyor alat berat, kapal, kendaraan, mesin

This commit is contained in:
majid
2024-11-05 16:54:04 +07:00
parent 0395235ce0
commit 2ae29fae23
16 changed files with 1110 additions and 283 deletions

View File

@@ -711,7 +711,8 @@ class SurveyorController extends Controller
$validate = $request->validated();
if ($validate) {
$type = $request->route('type');
try {
$type = $request->route('type');
$modelClass = $this->getModelClass($type);
@@ -733,6 +734,14 @@ class SurveyorController extends Controller
return redirect()
->route('basicdata.' . $type .'.index')
->with('success', 'created successfully');
} catch (Exeception $e) {
return response()->json(array('error' => $e->getMessage()), 400);
// return redirect()
// ->route('basicdata.' . $type .'.index')
// ->with('error', $th->getMessage());
}
}
}
@@ -940,7 +949,7 @@ class SurveyorController extends Controller
public function submitSurveyor(Request $request, $id)
{
$permohonan = Permohonan::find($id);
$permohonan->update([
'status' => 'done',
@@ -978,6 +987,7 @@ class SurveyorController extends Controller
'tingkat-keramaian' => TingkatKeramaian::class,
'gol-mas-sekitar' => GolonganMasySekitar::class,
'spek-kategori-bangunan' => SpekKategoritBangunan::class,
'spek-bangunan' => SpekBangunan::class,
'lantai-unit' => Lantai::class,
'view-unit' => ViewUnit::class,
];