fix(surveyor): tambah nama desa dan ganti n/a ke angak 0
This commit is contained in:
@@ -546,7 +546,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="village_code" class="form-label max-w-56">Kelurahan</label>
|
||||
<label for="village_code" class="form-label max-w-56">Desa/Kelurahan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
<option value="">Pilih Kelurahan</option>
|
||||
@@ -559,32 +559,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
function loadCities() {
|
||||
const citySelect = document.getElementById("city_code");
|
||||
|
||||
if (citySelect) {
|
||||
// Hapus semua opsi sebelumnya
|
||||
citySelect.innerHTML = '<option value="">Pilih Kota/Kabupaten</option>';
|
||||
|
||||
cities.forEach((city) => {
|
||||
// Ubah nama kota menjadi lowercase
|
||||
const cityNameLowercase = city.name.toLowerCase();
|
||||
|
||||
// Tambahkan opsi ke dropdown
|
||||
const option = document.createElement("option");
|
||||
option.value = city.code;
|
||||
option.textContent = cityNameLowercase; // Nama dalam lowercase
|
||||
citySelect.appendChild(option);
|
||||
});
|
||||
} else {
|
||||
console.error("Element with ID 'city_code' not found.");
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
loadSavedLocationData();
|
||||
loadCities();
|
||||
});
|
||||
|
||||
</script>
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
Reference in New Issue
Block a user