Repository navigation
Feat: Penerbitan & Adopsi Skema Data Spasial - #1309
Open
pandigresik wants to merge 6 commits into
Open
pandigresik wants to merge 6 commits into
pandigresik wants to merge 6 commits into
Conversation
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.
Description
Implementasi fitur KAB-03 (Penerbitan & Adopsi Skema) sesuai OpenSID/OpenKab#1298. Fitur ini menambahkan dialog "Layar Terbitan" pada halaman pengelola skema untuk mempermudah admin kabupaten dalam menerbitkan skema dengan aman melalui ringkasan perubahan, peringatan dampak/bentrok, riwayat & perbandingan versi, serta pemantauan status adopsi per desa.
Perubahan ini mencakup backend (controller, service, enum, request, routes), frontend (dialog terbitan + integrasi tombol Terbitan pada editor), serta pengujian fitur dan smoke test browser. Implementasi juga menangani kondisi endpoint pra-terbit API Satu Data yang belum tersedia dengan menampilkan status "belum dapat dihitung" tanpa mengarang data (FR-043/FR-071).
Changes made:
[Backend] Controller (
app/Http/Controllers/DataSpasial/SkemaDataSpasialController.php)Menambahkan endpoint JSON untuk KAB-03:
previewTerbit,terbitkan,riwayat,bandingkan,adopsi,eksporAdopsi. Menyertakan validasi sektor, penanganan ketersediaan data dari API, validasi "tidak ada perubahan" (FR-016), pra-pemeriksaan terbit (FR-045), integrasi pra-terbit dengan fallbackunavailable, serta normalisasi respons adopsi/ekspor.[Backend] Services
app/Services/SkemaVersiService.php(baru): menghitung ringkasan perubahan (isian baru/diubah/diarsipkan) dengan pemotongan daftar "… dan N isian lainnya" (FR-011), mendeteksi ada/tidaknya perubahan (FR-016), pra-pemeriksaan terbit (FR-045), peringatan terbit (dampak, bentrok lokal, info), riwayat versi, isian per versi, serta utilitas draf/terbit terakhir.app/Services/AdopsiDesaService.php(baru): memformat data adopsi desa (status: Terpusat/Menunggu adopsi/Mandiri/Konflik isian), filter pencarian, normalisasi ekspor CSV/XLSX-style (header Indonesia), dan pembangkitan nama berkas ekspor.app/Services/DataSpasialApiService.php(dimodifikasi): menambahkan metodepraTerbit(sektor, nomorVersi)dengan dokumentasi utang kontrak U10 (endpoint pra-terbit belum tersedia di API Satu Data) dan mengembalikanDataSpasialResultsehingga caller dapat membedakanunavailablevs error.[Backend] Validation & Enum
app/Http/Requests/DataSpasial/TerbitSkemaRequest.php(dimodifikasi): menambahkan aturan validasi untukterbitkan(konfirmasi penerbitansaya_mengerti, catatan perubahan opsional, serta validasi terkait ringkasan).app/Enums/StatusAdopsiDesa.php(baru): enum status adopsi desa dengan label Indonesia sesuai spesifikasi (Terpusat, Menunggu adopsi, Mandiri, Konflik isian).[Frontend] Dialog Terbitan (
public/js/dataspasial/terbit-dialog.js, baru)Mengimplementasikan layar terbitan KAB-03 dengan 5 bagian: (1) Ringkasan perubahan, (2) Peringatan dampak & bentrok lokal desa, (3) Riwayat versi & perbandingan dua versi, (4) Tabel status adopsi desa + ekspor, (5) Catatan perubahan + konfirmasi + tombol Terbitkan.
Aturan terjaga: tidak mengirim permintaan terbit saat buka/tutup dialog (FR-046), ekspor tidak memicu terbit (FR-047), tanpa
alert/confirm/prompt(FR-008g), pesan via SweetAlert2 bila tersedia, serta state disegarkan via eventdataspasial:terbit-berhasiltanpa reload halaman (FR-022/SC-013). Termasuk perbaikan typowawah→wadahpada render ringkasan.[Frontend] Integrasi Editor (
public/js/dataspasial/schema-editor.js, dimodifikasi)Menambahkan listener event
dataspasial:terbit-dibuka(dari KAB-02) untuk membuka dialog terbitan dengan sektor terpilih, serta inisialisasi/pembersihan dialog. Menghilangkan/menyelaraskan kode terkait tombol terbitan sesuai integrasi KAB-02→KAB-03.[View] UI Dialog & Halaman
resources/views/dataspasial/skema/partials/layar-terbitan.blade.php(baru): markup dialog terbitan lengkap dengan test-id, blok pesan, dropdown perbandingan versi, tabel adopsi, checkbox konfirmasi, textarea catatan, tombol aksi.resources/views/dataspasial/skema/partials/adopsi-ekspor.blade.php(baru): komponen/modal/opsi ekspor adopsi (tersedia untuk integrasi tombol ekspor).resources/views/dataspasial/skema/index.blade.php(dimodifikasi): menyertakan partial dialog terbitan dan scriptterbit-dialog.js.[Routing] (
routes/web.php, dimodifikasi)Menambahkan route JSON untuk KAB-03:
GET /dataspasial/skema/terbit/previewPOST /dataspasial/skema/terbitGET /dataspasial/skema/riwayatGET /dataspasial/skema/perbandinganGET /dataspasial/skema/adopsiGET /dataspasial/skema/adopsi/export[Testing] Fitur & Browser
tests/Feature/DataSpasial/Fixtures.php(baru): fixtures konsisten untuk skema/versi/isian/adopsi, termasuk data draf/terbit untuk skenario terbitan.tests/Feature/DataSpasial/SkemaEditorTerbitTest.php(dimodifikasi): penyesuaian terkait alur terbitan.tests/Feature/DataSpasial/SkemaTerbitKonfirmasiTest.php,SkemaDampakTerbitTest.php,SkemaRiwayatPerbandinganTest.php,AdopsiDesaTest.php,AdopsiEksporTest.php,SkemaVersiServiceTest.php(baru): cakupan pengujian fitur KAB-03.tests/Browser/SmokeDataSpasialTerbitTest.php(baru): smoke test browser untuk alur dialog terbitan.Screenshots
simplescreenrecorder-2026-10-19_08.12.46.mp4