feat: redesign employee edit modal to spacious 2-column layout, add dedicated edit view, and sync simper scopes with qma heavy categories

This commit is contained in:
Ray1111-aa
2026-10-25 23:04:20 +07:00
parent 9897404f61
commit 01152a4260
9 changed files with 824 additions and 325 deletions
@@ -636,6 +636,24 @@ class EmployeeController extends Controller
return back()->with('success', "Data karyawan {$validated['name']} berhasil ditambahkan.");
}
/**
* Tampilkan halaman khusus edit data personil & SIMPER (View Terpisah).
*/
public function edit(int $id): View
{
$employee = Employee::with(['simpers.simperType'])->findOrFail($id);
$availableSimperTypes = SimperType::active()->orderBy('name')->get();
$employeeTypes = Employee::distinct()
->whereNotNull('employee_type')
->where('employee_type', '!=', '')
->pluck('employee_type')
->values()
->all();
return view('hse.employees_edit', compact('employee', 'availableSimperTypes', 'employeeTypes'));
}
/**
* Perpanjang atau perbarui data karyawan & SIMPER.
*/