update form surveyor alat berat, kapal, kendaraan, mesin
This commit is contained in:
@@ -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,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user