diff --git a/app/Http/Controllers/AttendanceController.php b/app/Http/Controllers/AttendanceController.php
index 57fbee0..8383ee4 100644
--- a/app/Http/Controllers/AttendanceController.php
+++ b/app/Http/Controllers/AttendanceController.php
@@ -153,6 +153,9 @@ class AttendanceController extends Controller
if (!isset($data['student_id'], $data['lesson_hour'], $data['status'])) {
continue;
}
+ if ($data['status'] === 'belum') {
+ continue;
+ }
$data['lesson_hour'] = (int) $data['lesson_hour'];
Attendance::updateOrCreate(
[
diff --git a/resources/views/attendances/create.blade.php b/resources/views/attendances/create.blade.php
index d09dfcd..edeaed9 100644
--- a/resources/views/attendances/create.blade.php
+++ b/resources/views/attendances/create.blade.php
@@ -52,7 +52,7 @@
-
+
+ class="w-8 h-8 rounded-lg text-xs font-bold bg-emerald-100 text-emerald-700 border-2 border-emerald-300 hover:bg-emerald-200 hover:scale-110 active:scale-95 transition-all duration-150 shadow-sm">H
+ class="w-8 h-8 rounded-lg text-xs font-bold bg-purple-100 text-purple-700 border-2 border-purple-300 hover:bg-purple-200 hover:scale-110 active:scale-95 transition-all duration-150 shadow-sm">S
+ class="w-8 h-8 rounded-lg text-xs font-bold bg-blue-100 text-blue-700 border-2 border-blue-300 hover:bg-blue-200 hover:scale-110 active:scale-95 transition-all duration-150 shadow-sm">I
+ class="w-8 h-8 rounded-lg text-xs font-bold bg-red-100 text-red-700 border-2 border-red-300 hover:bg-red-200 hover:scale-110 active:scale-95 transition-all duration-150 shadow-sm">A
+ class="w-8 h-8 rounded-lg text-xs font-bold bg-yellow-100 text-yellow-700 border-2 border-yellow-300 hover:bg-yellow-200 hover:scale-110 active:scale-95 transition-all duration-150 shadow-sm">T
|
@@ -168,8 +168,9 @@
@foreach($lessonHours as $lh)
@php
$key = $s->id . '-' . $lh;
- $currentStatus = isset($existing[$key]) ? $existing[$key]->status : 'hadir';
+ $currentStatus = isset($existing[$key]) ? $existing[$key]->status : 'belum';
$statusColors = [
+ 'belum' => 'bg-gray-100 border-gray-300 text-gray-400 hover:bg-gray-200',
'hadir' => 'bg-emerald-100 border-emerald-300 text-emerald-700 hover:bg-emerald-200',
'sakit' => 'bg-purple-100 border-purple-300 text-purple-700 hover:bg-purple-200',
'izin' => 'bg-blue-100 border-blue-300 text-blue-700 hover:bg-blue-200',
@@ -177,10 +178,12 @@
'terlambat' => 'bg-yellow-100 border-yellow-300 text-yellow-700 hover:bg-yellow-200',
];
$statusLabels = [
+ 'belum' => '—',
'hadir' => 'H', 'sakit' => 'S', 'izin' => 'I',
'alpha' => 'A', 'terlambat' => 'T',
];
$statusFull = [
+ 'belum' => 'Belum diisi',
'hadir' => 'Hadir', 'sakit' => 'Sakit', 'izin' => 'Izin',
'alpha' => 'Alpha', 'terlambat' => 'Terlambat',
];
@@ -237,7 +240,7 @@