Merge pull request 'refactor: streamline success message handling in destroy methods of AcademicTermController and DepartmentController' (#18) from refactor/return-back-inertia-handling into dev

Reviewed-on: #18
This commit is contained in:
pangestu 2026-08-21 15:34:25 +08:00
commit 8c81e990b8
2 changed files with 2 additions and 6 deletions

View File

@ -46,8 +46,6 @@ public function destroy(AcademicTerm $AcademicTerm): RedirectResponse
{
$this->service->delete($AcademicTerm);
Inertia::flash('toast', ['type' => 'success', 'message' => 'Periode akademik berhasil dihapus.']);
return back();
return Inertia::flash('toast', ['type' => 'success', 'message' => 'Periode akademik berhasil dihapus.'])->back();
}
}

View File

@ -46,8 +46,6 @@ public function destroy(Department $department): RedirectResponse
{
$this->service->delete($department);
Inertia::flash('toast', ['type' => 'success', 'message' => 'Jurusan berhasil dihapus.']);
return back();
return Inertia::flash('toast', ['type' => 'success', 'message' => 'Jurusan berhasil dihapus.'])->back();
}
}