Commit Graph
48 Commits
Author SHA1 Message Date
Bro 916a9e36df fix: checkbox toggle pake peer-checked CSS, gak perlu JS
Sebelum: onclick + onchange JS — checkbox gak berfungsi
Sesudah: peer-checked:opacity-100 — murni CSS, klik langsung
berfungsi, icon centang muncul/sembunyi otomatis
2026-07-24 19:31:48 +07:00
Bro 4afe6dbabe feat: UI premium Hak Akses Role
- Per group: card terpisah dengan gradient header + icon
- Role columns: badge dengan icon (crown untuk admin)
- Checkbox: toggle button blue modern dengan ikon check
- Hover: gradient biru tipis di baris + icon group berubah warna
- Save section: gradient card dengan shadow
- Transisi mulus semua interaksi
2026-07-24 19:29:43 +07:00
Bro 0ece259138 feat: custom halaman error 403 & 404 premium
- 403: icon shield, merah soft, pesan dinamis
- 404: icon map, amber soft
- Tombol Kembali + Dashboard
- Dekorasi dots
- Menggunakan layout app (navbar + sidebar tetap)
2026-07-24 19:25:43 +07:00
Bro 96178345cd fix: redirect user 'other' ke presensi setelah login 2026-07-24 19:22:28 +07:00
Bro 89e97c3679 fix: hak akses role - tambah label & cache untuk role other
- Role label: Other (Guest) di tabel permission
- Cache di-clearing untuk role 'other' setelah update
- Semua role dinamis dari controller
2026-07-24 19:17:15 +07:00
Bro 6f33f7712d feat: reset password user dari admin
- Tombol key (oranye) di samping edit user
- Klik → SweetAlert2 modal: input password baru + konfirmasi
- Validasi: min 6 karakter, harus cocok
- Admin tidak bisa reset password sendiri (lewat profil)
2026-07-24 19:08:40 +07:00
Bro dddb98d04c fix: duplicate isStaff() method di User model 2026-07-24 19:06:20 +07:00
Bro 243a609baf feat: tambah role 'other' untuk guest user
- PermissionController: tambah 'other' ke daftar role
- UserController validasi: in:admin,bk,wali_kelas,staff,other
- User model: helper isOther()
- Users view: filter dropdown + modal tambah user + label
- Role 'other' bisa diatur hak aksesnya di menu Hak Akses Role
2026-07-24 19:05:50 +07:00
Bro 5c0c3bdd48 feat: dropdown Kelas dependen berdasarkan Jurusan & Tingkat
Saat user pilih Jurusan dan/atau Tingkat Kelas, dropdown
Kelas otomatis terfilter hanya menampilkan kelas yang cocok.
Menggunakan JS client-side dengan data options dari backend.
2026-07-24 18:59:05 +07:00
Bro 9be9b4d939 fix: urutan filter data siswa: Jurusan → Tingkat → Kelas
- Dropdown diurutkan: Jurusan, Tingkat Kelas, Kelas
- Jurusan di-sort by department_name (alfabetis)
- Hapus kode jurusan dari option (cukup nama)
2026-07-24 18:56:50 +07:00
Bro 798c8c3baf fix: tombol Simpan setelah ganti token Kesiswaan 2026-07-24 18:54:01 +07:00
Bro c35c41f7ee fix: tambah tombol Ganti untuk token Kesiswaan 2026-07-24 18:52:48 +07:00
Bro a2a41adcef fix: escape character parse error di AttendanceSyncController 2026-07-24 18:49:18 +07:00
Bro 0e2c9fc7ea fix: tampilkan token Kesiswaan + test koneksi
- Token Database Kesiswaan ditampilkan sebagai text (bisa copy)
- Tambah tombol 'Test Koneksi' yang ping endpoint
  /api/integration/students dan tampilkan status
- Status indikator: abu=belum, hijau=terhubung, merah=gagal
2026-07-24 18:47:08 +07:00
Bro 8712c666ad fix: escape character parse error di StudentSyncService 2026-07-24 18:43:38 +07:00
Bro 5fce7af844 feat: auto-nonaktifkan siswa lulus/tidak aktif saat sync
Setelah sinkronasi, siswa yang tidak muncul di data
sumber (Database Kesiswaan) akan otomatis dinonaktifkan
(is_active=false) — mencakup siswa lulus & pindah.

Ini memastikan data siswa selalu sinkron dengan tahun
ajaran baru tanpa perlu manual cleanup.
2026-07-24 18:41:36 +07:00
Bro 4fa709509f feat: snapshot class_name di setiap presensi & pelanggaran
Migration: tambah kolom:
- attendances.class_name (varchar 100)
- violations.student_class (varchar 100)
- Backfill data existing dari students.class_name

Controller manual: simpan class_name dari form
Sync E-Jurnal: simpan class_name dari lookup student
ViolationService: ambil class_name dari student saat buat
Model: tambah ke fillable

Ini menjamin data historis tetap akurat meskipun
 siswa naik kelas (X→XI→XII) di tahun ajaran baru.
2026-07-24 18:38:35 +07:00
Bro 30c6927658 fix: flatpickr lebih lebar 370px + day height 42px 2026-07-24 18:28:38 +07:00
Bro 2492b5ea28 fix: custom Flatpickr modern — glass border, gradient selected, scale hover
- Ganti tema Airbnb dengan CSS kustom total
- Glassmorphism: background putih transparan, blur, shadow 3D
- Selected day: gradient blue 135deg + shadow glow
- Hover: scale 105% + background slate
- Border radius 16px, ukuran 300px
- Font lebih modern, spacing lebih lapang
- Transisi mulus 120ms
2026-07-24 18:27:30 +07:00
Bro cd69638199 feat: flatpickr date picker premium di semua input tanggal
- Flatpickr (CDN) dengan tema Airbnb — bersih & modern
- Lokalisasi Bahasa Indonesia
- altInput: tampil dd/mm/yyyy, simpan yyyy-mm-dd
- Animasi mulus + shadow premium
- Berlaku otomatis ke semua <input type='date'> di seluruh app
- Style kustom: border-radius 12px, shadow 3D
2026-07-24 18:25:43 +07:00
Bro 4784a0d357 fix: alignment tombol Lanjutkan
Sebelum: pakai items-end — tombol turun karena
kolom pertama ada legend ekstra.
Sesudah: padding-top manual agar lurus dengan input.
2026-07-24 18:21:25 +07:00
Bro 3287268ff1 feat: UI premium halaman Input Presensi
- Filter card: gradient putih-abu, hover shadow, icon di label
- Tombol Lanjutkan: gradient blue, shadow lebih dalam
- Info bar: gradient with icon box + badge kelas biru
- Tabel: sticky student column dengan avatar rounded-xl
  gradient hover di baris & hover avatar berubah warna
- Tombol status: ukuran naik w-10 h-10 rounded-xl
  border lebih tebal, hover scale 110%, active scale 95%
- Bulk set: compact bg box, tombol hover scale
- Bottom: card terpisah untuk legend + submit
  dengan gradient putih-abu border
- Info box: gradient emerald-teal dengan icon box shadow
- Ukuran font konsisten, spacing lebih lapang
2026-07-24 18:18:41 +07:00
Bro f393f79ec0 feat: UI premium polish
- Sidebar: gradient blue tint background + subtle shadow
- Sidebar nav: active indicator gradient, border-left glow
- Halaman: fade-in animation tiap navigasi
- Stat cards: hover lift + shadow glow (stat-card-glow)
- Transisi halus di semua elemen interaktif
2026-07-24 18:15:25 +07:00
Bro 5df740fcf8 feat: status presensi per kelas di dropdown input
Dropdown kelas sekarang menampilkan:
- ⬜ Nama Kelas → belum ada data presensi
- ✅ Nama Kelas (5/36) → sudah terisi (X siswa terdata dari total)
- Legend kecil di bawah dropdown sebagai panduan
2026-07-24 18:12:39 +07:00
Bro 129d3456a9 fix: style kalender kembali ke grid bersih, tetap klikable
Style balik ke versi awal (putih, border tipis, badge pojok),
tapi seluruh kotak bisa diklik (pake <a> tag).
Legend diperbarui.
2026-07-24 18:09:50 +07:00
Bro e4e0b234f6 feat: kalender presensi full-kotak warna + klik
Sebelum: badge kecil merah/hijau di pojok, susah diklik.
Sesudah: seluruh kotak tanggal berwarna (merah=ada alpha,
hijau=semua hadir), bisa diklik langsung untuk input presensi.
- Info jumlah siswa & alpha di dalam kotak
- Legend yang lebih jelas
2026-07-24 18:07:58 +07:00
Bro f0d337a3eb fix: tampilkan 'E-Jurnal (Sinkron Otomatis)' di Dicatat Oleh
Jika violation dari sync E-Jurnal (recorded_by=null),
sekarang tampilkan ikon sync + label E-Jurnal,
bukan '?' atau '-' seperti sebelumnya.
2026-07-24 18:05:29 +07:00
Bro 9a6d3a8c1e fix: akumulasi alpha dari multiple push
Sebelum: violation update cuma dari alphaCount push saat itu,
        push ke-2 overwrite data push ke-1.
Sesudah: hitung total alpha dari DB (Attendance::count),
        violation selalu mencerminkan total akumulasi.
2026-07-24 17:58:50 +07:00
Bro 5206e2396b feat: reset presensi (attendances) di menu Reset
Menambahkan opsi 'Presensi' pada form reset aplikasi:
- Hapus seluruh data attendances (dari sync E-Jurnal & manual)
- Tampilkan jumlah data presensi di card
- Dapat dipilih terpisah dari pelanggaran
2026-07-24 17:41:20 +07:00
Bro a867b3a267 fix: anti-duplikat violation di input manual presensi
Sama seperti fix di sync controller:
- Cek existing violation (student_id + type + date + recorded_by)
- Ada alpha → update atau create
- Tidak alpha → hapus violation lama
- Berlaku untuk alpha dan terlambat
- Mencegah duplikat tiap kali admin submit ulang form
2026-07-24 17:32:22 +07:00
Bro 3aa84387f3 fix: hapus violation jika status berubah dari alpha ke hadir
Sebelumnya violation hanya di-create/update, tidak pernah
dihapus. Jika guru edit jurnal dari alpha jadi hadir, violation
lama tetap ada.

Sekarang: untuk setiap siswa dalam push, sistem cek:
- alpha > 0: create/update violation
- alpha = 0 & ada violation lama: hapus (soft delete)
- siswa tidak ada di push: violation tidak disentuh
2026-07-24 13:38:41 +07:00
Bro f184f43df7 fix: anti-duplikat pelanggaran alpha dari push ulang E-Jurnal
Setiap kali E-Jurnal push ulang (misal edit jurnal), sistem
sekarang cek dulu apakah sudah ada pelanggaran alpha untuk
(student_id + violation_type_id + violation_date) dengan
recorded_by = NULL (system-generated).

- Jika sudah ada: update points + description
- Jika belum: buat baru via ViolationService

Ini mencegah akumulasi pelanggaran duplikat tiap kali guru
mengedit jurnal di E-Jurnal.
2026-07-24 13:33:35 +07:00
Bro a5db795eda fix: auto-violasi dari E-Jurnal via ViolationService + notifikasi realtime
Sync controller sekarang pake ViolationService::recordViolation()
biar notifikasi realtime (AppNotification + broadcast event)
dan pengecekan SP threshold tetap jalan untuk data dari E-Jurnal.

ViolationService: recordViolation() & generateSpLetter()
diubah jadi nullable userId supaya bisa dipanggil tanpa user
(0 = system-generated dari sync)
2026-07-24 13:20:40 +07:00
Bro 1ac4a0ef74 feat: auto-generate pelanggaran alpha dari sync E-Jurnal
AttendanceSyncController sekarang otomatis bikin catatan
pelanggaran (Violation) untuk siswa yang statusnya alpha,
sama seperti mekanisme input manual di Aplikasi Ketertiban.

- Hitung jumlah jam alpha per siswa
- Cari ViolationType dengan slug 'alpha'
- Buat Violation dengan points proporsional
- Recorded_by = null (system-generated dari sync)
2026-07-24 13:18:14 +07:00
Bro 91b7f1e591 fix: rekap alpha proporsional berdasarkan max 10 jam/hari
Sebelum: alpha = alphaCount / totalRecord (jika jadwal 1 jam,
  1 alpha = 1 hari — tidak akurat)
Sesudah: alpha = alphaCount / 10 (max jam sekolah per hari)
  1 alpha = 0.1 hari, 10 alpha = 1 hari
- Berlaku untuk rekap mingguan dan bulanan
2026-07-24 13:12:55 +07:00
Bro a1dfd75d7d feat: API penerima push presensi dari e-jurnal
- AttendanceSyncController: POST /api/v1/attendance/sync
  Token auth, upsert per (student_id, date, lesson_hour)
- Ping endpoint: GET /api/v1/attendance/ping?token=
- CSRF exclusion for api/* routes
- Settings: generate/regenerate E-Jurnal token + copy
- Menu Sinkron: form input token E-Jurnal
2026-07-24 12:54:09 +07:00
Novy San87 fb5e349ae6 feat: add Open Graph meta tags for social preview 2026-07-23 11:59:12 +07:00
Novy San87 9e1b5c34e5 feat: rekap presensi harian, mingguan, bulanan + export excel
- Add 3 jenis rekap presensi (harian/mingguan/bulanan) per kelas
- Weekly recap: tabel H,S,I,A per hari + kolom TOTAL
- Alpha proporsional: A = jam_alpha / total_jam
- Pemisah border antar hari dan kolom TOTAL
- Export Excel rekap mingguan (.xlsx)
- Fix max_input_vars PHP limit (1000→5000)
- Fix Carbon date object issue di groupBy
2026-07-23 11:11:28 +07:00
Novy San87 9c741f13f7 feat: dynamic role-based permission system
- Add permissions & role_permissions tables with migration
- Add PermissionMiddleware for route-level access control
- Add CheckRole middleware for role-based fallback
- Add PermissionController with UI (Settings > Hak Akses Role)
- Add @canPermission Blade directive for view-level checks
- Convert all routes to use dynamic permission middleware
- Add canPermission() method to User model
- All access rights configurable via admin UI
2026-07-23 06:49:28 +07:00
Bro 5eb3830895 feat: replace attendance history list with interactive calendar
- Calendar shows per-date student count badge (green=all hadir, red=ada alpha)
- Click badge to go to attendance input for that date
- Prev/next month navigation with API fetch
- Controller passes initial month data inline (no flash on load)
2026-07-23 00:00:21 +07:00
Bro e4fef817b0 fix: attendance stats count based on unique students, not records per lesson-hour 2026-07-22 23:56:57 +07:00
Bro 31ef9c0b0b system-locked violation types (alpha & terlambat) + proporsional poin alpha per jam
- Migration: add is_system column to violation_types, mark alpha & terlambat
- DestroyType guard: system types cannot be deleted
- UpdateType guard: slug tetap walau nama diubah untuk system types
- UI: delete button hidden, badge lock untuk system types
- Seeder: ViolationTypeDefaultsSeeder untuk fresh deploy
- AttendanceController: lookup by slug (alpha/terlambat) instead of fuzzy match
- Alpha auto-violation: poin proporsional per jam (round((points/10)*count), min 1)
- Terlambat auto-violation: poin fix sesuai jenis (2 poin)
- Also handles both A (alpha) and T (terlambat) statuses for auto-violations
2026-07-22 23:55:27 +07:00
Bro 4bc3a84203 feat: multi-pilih jenis pelanggaran, filter handling, export excel
- Multi-pilih pelanggaran dalam satu form input
- Export Excel dengan 19 kolom (termasuk data penanganan)
- Filter handling_status di index pelanggaran
- Handling info di riwayat pelanggaran siswa
- Fix format handled_at casting
- Perbaikan UI form input (5 bagian terstruktur, severity indicator)
2026-07-22 22:46:51 +07:00
Bro 8529a49174 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
2026-07-22 22:19:19 +07:00
Bro f86aa84d12 feat: reset selektif + import Excel jenis pelanggaran
- Reset selektif: admin bisa pilih data mana yang akan dikosongkan
- Auto-seed kategori & SP threshold default setelah direset
- Deteksi admin via role (tidak hardcoded ID 1)
- UI reset full-width dengan checkbox card
- Import Excel jenis pelanggaran (.xlsx) dengan template download
- Drag & drop upload, validasi header, auto-match kategori, skip duplikat
- Tombol Import + Download Template di halaman Jenis Pelanggaran
2026-07-22 20:23:08 +07:00
Novy San87 23f124e8d5 feat: realtime notifications, fix broadcasting, add notifications page
- Fix: broadcasting.php config (was missing, broadcast failed)
- Fix: Echo class global scope (window.EchoClass)
- Fix: Nginx WebSocket proxy for Reverb
- Fix: Firewall port 8087 opened
- Fix: Duplicate event listener cleanup
- Fix: Mark as read functionality
- Add: CreateViolationNotification listener
- Add: Notifications index page with pagination
- Add: Timezone Asia/Jakarta support
- Add: Real-time badge across all pages
- Remove: toOthers() so recorder also gets notification
- Update: .env.example with new variables
2026-07-22 08:35:10 +07:00
Bro 9670ae06d3 Update README with full deploy guide
- Replace default Laravel README with project docs + deploy guide
- Remove deploy/DEPLOY.md (merged into README)
2026-07-21 22:46:28 +07:00
Bro 1c35734f7b Initial commit: Aplikasi Ketertiban Siswa
- Fitur: input pelanggaran, sistem poin, surat peringatan otomatis, SP progress
- Realtime notifikasi via Laravel Reverb + Echo
- Dashboard statistik, manajemen user, manajemen master data
- Login 2 kolom premium, user dropdown, pengaturan akun
- Tema biru kalem, logo sekolah dinamis, sidebar brand dinamis
- Sinkronisasi siswa dari Database Kesiswaan via API
2026-07-21 22:43:13 +07:00