perbaikan format kode web-gis
This commit is contained in:
+22
-22
@@ -2090,8 +2090,8 @@
|
||||
formData.append('gambar', fileInput.files[0]);
|
||||
}
|
||||
|
||||
fetch('save_jalan_rusak.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'save_jalan_rusak.php'))
|
||||
fetch('fitur_jalan_parsel/save_jalan_rusak.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'fitur_jalan_parsel/save_jalan_rusak.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
showMessage('✅ Laporan jalan rusak berhasil disimpan', 'bg-green-600 text-white');
|
||||
@@ -2152,7 +2152,7 @@
|
||||
function loadRoadDamage(force = false) {
|
||||
if (!force && (document.hidden || suppressAutoReload)) return;
|
||||
|
||||
fetch('get_jalan_rusak.php')
|
||||
fetch('fitur_jalan_parsel/get_jalan_rusak.php')
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error('HTTP Error: ' + res.status);
|
||||
return res.text();
|
||||
@@ -2367,8 +2367,8 @@
|
||||
const formData = new FormData();
|
||||
formData.append('id', id);
|
||||
|
||||
fetch('delete_jalan_rusak.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'delete_jalan_rusak.php'))
|
||||
fetch('fitur_jalan_parsel/delete_jalan_rusak.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'fitur_jalan_parsel/delete_jalan_rusak.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
showMessage('🗑️ Laporan berhasil dihapus', 'bg-orange-600 text-white');
|
||||
@@ -3065,7 +3065,7 @@
|
||||
formData.append('longitude', pendingRumahIbadahCoords.lng);
|
||||
formData.append('radius_m', radius);
|
||||
|
||||
const endpoint = id ? 'update_rumah_ibadah.php' : 'save_rumah_ibadah.php';
|
||||
const endpoint = id ? 'rancangan_sistem/update_rumah_ibadah.php' : 'rancangan_sistem/save_rumah_ibadah.php';
|
||||
if (id) {
|
||||
formData.append('id', id);
|
||||
}
|
||||
@@ -3090,8 +3090,8 @@
|
||||
const formData = new FormData();
|
||||
formData.append('id', id);
|
||||
|
||||
fetch('delete_rumah_ibadah.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'delete_rumah_ibadah.php'))
|
||||
fetch('rancangan_sistem/delete_rumah_ibadah.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'rancangan_sistem/delete_rumah_ibadah.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
showMessage('🗑️ Rumah ibadah berhasil dihapus', 'bg-orange-600 text-white');
|
||||
@@ -3134,7 +3134,7 @@
|
||||
formData.append('rumah_ibadah_nama', nearest.record.nama);
|
||||
formData.append('jarak_ke_rumah_ibadah_m', nearest.distance.toFixed(2));
|
||||
|
||||
const endpoint = id ? 'update_penduduk_miskin.php' : 'save_penduduk_miskin.php';
|
||||
const endpoint = id ? 'rancangan_sistem/update_penduduk_miskin.php' : 'rancangan_sistem/save_penduduk_miskin.php';
|
||||
if (id) {
|
||||
formData.append('id', id);
|
||||
}
|
||||
@@ -3160,8 +3160,8 @@
|
||||
const formData = new FormData();
|
||||
formData.append('id', id);
|
||||
|
||||
fetch('delete_penduduk_miskin.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'delete_penduduk_miskin.php'))
|
||||
fetch('rancangan_sistem/delete_penduduk_miskin.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'rancangan_sistem/delete_penduduk_miskin.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
showMessage('🗑️ Data penduduk miskin berhasil dihapus', 'bg-orange-600 text-white');
|
||||
@@ -3206,7 +3206,7 @@
|
||||
function loadRumahIbadah(force = false) {
|
||||
if (!force && (document.hidden || suppressAutoReload)) return;
|
||||
|
||||
fetch('get_rumah_ibadah.php')
|
||||
fetch('rancangan_sistem/get_rumah_ibadah.php')
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error('HTTP Error: ' + res.status);
|
||||
return res.text();
|
||||
@@ -3250,7 +3250,7 @@
|
||||
function loadPendudukMiskin(force = false) {
|
||||
if (!force && (document.hidden || suppressAutoReload)) return;
|
||||
|
||||
fetch('get_penduduk_miskin.php')
|
||||
fetch('rancangan_sistem/get_penduduk_miskin.php')
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error('HTTP Error: ' + res.status);
|
||||
return res.text();
|
||||
@@ -3566,7 +3566,7 @@
|
||||
function loadFeatures(force = false) {
|
||||
if (!force && (document.hidden || suppressAutoReload || isFeatureDrawing || isFeatureSaving)) return;
|
||||
|
||||
fetch('get_features.php')
|
||||
fetch('layer_groups_choropleth/get_features.php')
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error('HTTP Error: ' + res.status);
|
||||
return res.text();
|
||||
@@ -3638,8 +3638,8 @@
|
||||
formData.append('nilai', nilai);
|
||||
|
||||
isFeatureSaving = true;
|
||||
fetch('save_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'save_feature.php'))
|
||||
fetch('layer_groups_choropleth/save_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'layer_groups_choropleth/save_feature.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
showMessage('✅ Fitur berhasil disimpan', 'bg-green-600 text-white');
|
||||
@@ -3762,8 +3762,8 @@
|
||||
const formData = new FormData();
|
||||
Object.entries(payload).forEach(([key, value]) => formData.append(key, value));
|
||||
|
||||
fetch('update_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'update_feature.php'))
|
||||
fetch('layer_groups_choropleth/update_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'layer_groups_choropleth/update_feature.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
layer.featureData.nama_objek = payload.nama;
|
||||
@@ -3830,8 +3830,8 @@
|
||||
const formData = new FormData();
|
||||
Object.entries(payload).forEach(([key, value]) => formData.append(key, value));
|
||||
|
||||
fetch('update_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'update_feature.php'))
|
||||
fetch('layer_groups_choropleth/update_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'layer_groups_choropleth/update_feature.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
layer.featureData.geometry_data = JSON.parse(payload.geometry);
|
||||
@@ -3859,8 +3859,8 @@
|
||||
const formData = new FormData();
|
||||
formData.append('id', id);
|
||||
|
||||
fetch('delete_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'delete_feature.php'))
|
||||
fetch('layer_groups_choropleth/delete_feature.php', { method: 'POST', body: formData })
|
||||
.then(res => parseJsonResponse(res, 'layer_groups_choropleth/delete_feature.php'))
|
||||
.then(data => {
|
||||
if (data.status === 'success') {
|
||||
if (layer) removeSpatialFeatureLayer(layer, layer.featureType || 'polyline');
|
||||
|
||||
Reference in New Issue
Block a user