Repository navigation
feat: Log Entri Audit DataSpasial (KAB-08) - #1315
Open
pandigresik wants to merge 41 commits into
Open
pandigresik wants to merge 41 commits into
pandigresik wants to merge 41 commits into
Conversation
…-dashboard)\n\n- spec.md with US1–US5, FR-001–FR-017, SC-001–SC-007 (no reload, tanpa data!=nol, clustering, popup flags)\n- plan.md + research.md + data-model.md + quickstart.md + contracts/view-contract.md\n- requirements checklist all pass
…oard) with US1–US5 phases
…asial sectors); no sektor picker; kecamatan-only filter
… filter, hover/click popup
…matan filter, hover/click popup
…/click popup, kecamatan-only filter, no sektor picker
Contributor
|
🔄 AI PR Review sedang antri di server...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: feat: Log Entri Audit DataSpasial (KAB-08)
Description
Menambahkan halaman Log Entri pada modul DataSpasial untuk menelusuri seluruh entri dan perubahan beserta pelaku serta asalnya (OpenKab atau OpenSID desa). Halaman ini membaca data lewat API Satu Data (
GET /dataspasial/audit,GET /dataspasial/audit/ringkasan) dengan pemanggilan terpusat diDataSpasialApiService, menampilkan badge sumber berwarna beda, filter lengkap tersimpan di URL, detail perbandingan sebelum/sesudah per isian, kartu ringkasan per sumber, ekspor Excel hasil filter, serta tautan ke log entri dari halaman Monitoring KAB-07.Changes made:
Log Entridi grup DataSpasial (App\Enums\Modul), permissiondataspasial-audit-readvia migrasi baru (database/migrations/2026_10_22_070004_add_dataspasial_audit_permission_and_menu.php) serta pemberian akses ke role DataSpasial (admin skema, operator impor, analis opd). Menu hanya muncul bagi yang berhak.audit(),auditDetail(),auditRingkasan()diApp\Services\DataSpasialApiServicedengan header auditX-OpenKab-User-Id/X-OpenKab-User-Namedan skip cache agar log audit selalu segar.App\Services\AuditDataSpasialServiceuntuk normalisasi filter, pemetaan baris tabel, ringkasan per sumber, perbandingan sebelum/sesudah per isian, detail entri, serta ekspor seluruh hasil filter.App\Http\Controllers\DataSpasial\AuditDataSpasialController(index/data/detail/ekspor) danApp\Http\Requests\DataSpasial\AuditDataRequestdengan validasi filter + bentuk galatmeta.validation.dataspasial/audit,dataspasial/audit/data,dataspasial/audit/detail/{id},dataspasial/audit/ekspordengan middlewarepermission:dataspasial-audit-read.resources/views/dataspasial/audit/index.blade.php, komponen pakai-ulangresources/views/components/dataspasial-dropdown-desa.blade.php, JSpublic/js/dataspasial/audit.js, serta enumApp\Enums\SumberEntriuntuk label/badge sumber.App\Exports\AuditDataSpasialExport(OpenSpout) dengan kolom sesuai tampilan layar.Logper desa di tabel Monitoring (public/js/dataspasial/monitoring.js,resources/views/dataspasial/monitoring/index.blade.php) yang mengarahkan ke halaman Log Entri dengan filterkode_desaterkait.alert()bawaan denganSweetAlert(window.Swal) di JS audit & monitoring.tests/Feature/DataSpasial/AuditDataTest.phpuntuk akses, badge sumber, filter (termasuk URL), ringkasan, detail sebelum/sesudah, ekspor, serta penanganan unavailable.Reason for change:
/dataspasial/audit,/dataspasial/audit/ringkasan) melaluiDataSpasialApiServicedengan header audit sesuai kebutuhan auditabilitas.Impact of change:
Related Issue
Testing
Manual Testing
/dataspasial/audithanya bisa diakses user berhak audit, ditolak bila tanpa izinAutomated Testing
vendor/bin/pest tests/Feature/DataSpasial/AuditDataTest.php(15 passed, 57 assertions)Browser Compatibility
Technical Details
DataSpasialApiService), hasil dibungkusDataSpasialResult, cache dilewati untuk endpoint audit demi freshness.GET /api/v1/dataspasial/audit,GET /api/v1/dataspasial/audit/ringkasan,GET /api/v1/dataspasial/audit/{id}(Fractal JSON:API).Breaking Changes
None
Migration Guide
Jalankan migrasi untuk menambahkan permission/menu Log Entri:
Screenshots / Video
Additional notes
X-OpenKab-User-Id/X-OpenKab-User-NameolehDataSpasialApiServiceagar tercatat di audit API.