Commit Graph
96 Commits
Author SHA1 Message Date
Sari 3bfad9cf42 hak akses konsisten: sidebar Master Data pakai permission per-menu (+directive canAnyPermission); FIX direktif canPermission pakai canPermission() model (sebelumnya hanya role kolom — multi-role & user tanpa kolom role tidak dapat menu) + test 2026-08-03 09:58:52 +07:00
Sari 465be127ec update hak akses role: view-point-audit terkunci 'Khusus Admin' (badge + kunci di UI, proteksi di backend update()) + test 2026-08-03 09:51:28 +07:00
Sari 156841a4e7 fix: kirim WA tidak menutup aplikasi — fetch AJAX + SweetAlert dengan tombol Buka WhatsApp (tab baru, aplikasi tetap terbuka) + test JSON 2026-08-03 09:46:00 +07:00
Sari 5a4fada9a9 feat: tombol Kirim Akun via WhatsApp di manajemen user (generate password baru, link+username+password via wa.me, konfirmasi, disable tanpa HP) + test 2026-08-03 09:39:20 +07:00
Sari f5a80fd4e2 feat: kolom phone di manajemen user (tampil di tabel, input modal, validasi regex) + FIX bug: catch-all exception handler mengubah ValidationException jadi 500 (kini redirect+error normal) 2026-08-03 09:30:14 +07:00
Sari 2dda08bb8d feat: audit log poin — catat pencatatan/penghapusan pelanggaran (sebelum/sesudah/delta, metadata snapshot, actor, IP) + halaman Riwayat Poin (filter, permission view-point-audit) + 4 feature test 2026-08-03 09:12:46 +07:00
Sari 6f430f35d7 kop laporan: format resmi sekolah (logo lambang Jatim kiri + 6 baris teks tengah + garis hitam tebal) — settings Kop Surat baru + upload logo kop 2026-08-03 09:07:50 +07:00
Sari b1662e6242 polish: halaman Laporan premium full-width (hero gradient, filter cepat, KPI 4 kartu, rekap jenis progress bar + kelas, rincian terbaru) + refactor controller (baseQuery/filters/stats) 2026-08-03 08:56:31 +07:00
Sari c5a2ad6913 feat: laporan rekap pelanggaran PDF (per periode/kelas, scoping wali kelas) + infrastruktur test MySQL (phpunit, fix migrasi 1093, UserFactory username) 2026-08-03 08:50:52 +07:00
Novy San87 58ffd06625 fix: presensi - filter tanggal-kelas live, urutan tanggal di depan, pembersihan data yatim 2026-08-02 20:57:14 +07:00
Novy San87 6e256661dd feat: Face ID (scan, register, liveness) + role baru KS/Waka/Ketua Tim + notifikasi WA ortu + scoping wali kelas + error pages premium 2026-08-02 20:57:11 +07:00
Novy San87 0a5f471854 fix: default presensi 'belum', perbesar tombol rekap & bulk H/S/I/A/T
- Default status per jam dari 'hadir' jadi 'belum' (abu-abu '—')
- Tambah validasi skip 'belum' saat simpan
- Tombol bulk H/S/I/A/T diperbesar (w-8 h-8, border-2)
- Tombol Rekap Presensi diubah ke gradien violet-indigo
- Gradien tombol Lanjutkan & Simpan konsisten
2026-07-28 12:37:43 +07:00
Bro 4da06fa55d fix: tambah method ping() yg ilang pas revert 2026-07-24 20:01:37 +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 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 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 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 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