feat: penanganan pelanggaran (handling system)
- Migration: handling_status, handled_at, handled_by ke violations - Migration: tabel violation_handlings, handling_participants - Model: ViolationHandling, HandlingParticipant + relasi - Routes: storeHandling, resolveHandling, destroyHandling, calendar data - ViolationController: CRUD penanganan + filter status handling - DashboardController: data handling stats + calendar endpoint - Dashboard view: kalender pelanggaran interaktif (Alpine.js) - Violations index: filter status penanganan + kolom status - Violations show: stat card penanganan + timeline + modal tambah - Menambahkan handling_status filter di index
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Student;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use App\Models\SpLetter;
|
||||
use App\Models\SpThreshold;
|
||||
use App\Models\Violation;
|
||||
@@ -88,4 +89,28 @@ class StudentReportController extends Controller
|
||||
'spThresholds', 'currentSpLevel', 'nextSpThreshold', 'activeSpLetters'
|
||||
));
|
||||
}
|
||||
|
||||
public function update(Request $request, Student $student): RedirectResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'full_name' => ['required', 'string', 'max:255'],
|
||||
'nisn' => ['nullable', 'string', 'max:50'],
|
||||
'student_number' => ['nullable', 'string', 'max:50'],
|
||||
'gender' => ['nullable', 'in:L,P'],
|
||||
'place_of_birth' => ['nullable', 'string', 'max:255'],
|
||||
'date_of_birth' => ['nullable', 'date'],
|
||||
'address' => ['nullable', 'string', 'max:500'],
|
||||
'phone_number' => ['nullable', 'string', 'max:30'],
|
||||
'email' => ['nullable', 'string', 'email', 'max:255'],
|
||||
'class_name' => ['nullable', 'string', 'max:100'],
|
||||
'class_level' => ['nullable', 'string', 'max:20'],
|
||||
'department_code' => ['nullable', 'string', 'max:20'],
|
||||
'department_name' => ['nullable', 'string', 'max:100'],
|
||||
]);
|
||||
|
||||
$student->update($validated);
|
||||
|
||||
return redirect()->route('students.show', $student->id)
|
||||
->with('success', 'Data siswa berhasil diperbarui.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user