Repository navigation
Fix: Impor Toilet & Sanitasi berhasil tetapi redirect error 500 (nama route salah) - #1808
Merged
analisopendesa merged 2 commits intoNov 25, 2026
Merged
Conversation
… route salah) Redirect setelah impor memakai route data.toilet_sanitasi.index yang tidak terdaftar; route yang benar adalah data.toilet-sanitasi.index. Tambah feature test regresi untuk do_import. Fixes #1795 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
🔄 AI PR Review sedang antri di server...
|
analisopendesa
deleted the
fix/issue-1795-redirect-impor-toilet-sanitasi
branch
November 25, 2026 19:35
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.
Closes #1795
🎯 Deskripsi
Pull request ini memperbaiki bug pada impor data Toilet & Sanitasi (
/data/toilet-sanitasi/import). Setelah file dikirim, job impor sudah masuk antrean, tetapi pengguna justru mendapat halaman HTTP 500 (RouteNotFoundException: Route [data.toilet_sanitasi.index] not defined.).Penyebabnya,
ToiletSanitasiController::do_importmelakukan redirect ke routedata.toilet_sanitasi.index(garis bawah). Route yang terdaftar diroutes/web.phpbernamadata.toilet-sanitasi.index(tanda hubung). Nama dengan garis bawah tertukar dengan nama permission (access.data.toilet_sanitasi) dan folder view (data.toilet_sanitasi.*). Methodupdatedandestroydi controller yang sama sudah memakai nama route yang benar.PR ini juga menambahkan feature test regresi untuk
do_import, yang sebelumnya belum punya test sama sekali.🛠️ Perubahan yang Dilakukan
1.
app/Http/Controllers/Data/ToiletSanitasiController.phpFix: koreksi nama route redirect setelah impor (sekaligus menghapus trailing whitespace di baris yang sama).
2.
tests/Feature/ToiletSanitasiImportTest.php(baru)Test: regresi untuk endpoint
data.toilet-sanitasi.do_import.Excel::fake()sehingga job impor tidak benar-benar diproses dan tidak butuh file fixture atau queue worker.das_toilet_sanitasidi dalam transaksi test (otomatis di-rollback) agar validasiuniquebulan/tahun tidak bentrok dengan data lama.3.
catatan_rilis.md✅ Test Cases yang Diimplementasikan
data.toilet-sanitasi.indexdengan flashData berhasil diimpor!, dan job impor masuk antrean.file(tanpa error 500).Route [data.toilet_sanitasi.index] not defined.ToiletSanitasiExportTesttetap lolos.📸 Cara Menjalankan Uji Coba Manual
access.data.toilet_sanitasi..xlsxyang valid, lalu klik Impor.🤖 Cara Menjalankan Uji Coba Otomatis (Automated Test)
php artisan test tests/Feature/ToiletSanitasiImportTest.php tests/Feature/ToiletSanitasiExportTest.phpHasil lokal: 7 passed (21 assertions).
🤖 Generated with Claude Code