Commit dc9fbddb authored by Manggar Mahardhika's avatar Manggar Mahardhika

bug fix

minus
- delete jalan
- history bangunan
parent f0d124c1
...@@ -3863,8 +3863,8 @@ ...@@ -3863,8 +3863,8 @@
if (checkBox.checked == true) { if (checkBox.checked == true) {
geo_po_cagar_budaya.addTo(map) geo_po_cagar_budaya.addTo(map)
} else { } else {
valket()
geo_po_cagar_budaya.remove() geo_po_cagar_budaya.remove()
valket()
} }
} }
...@@ -4200,11 +4200,10 @@ ...@@ -4200,11 +4200,10 @@
function gl100() { function gl100() {
var checkBox = document.getElementById("gardu"); var checkBox = document.getElementById("gardu");
if (checkBox.checked == true) { if (checkBox.checked == true) {
valket()
geo_po_gardu_listrik.addTo(map) geo_po_gardu_listrik.addTo(map)
} else { } else {
valket()
geo_po_gardu_listrik.remove() geo_po_gardu_listrik.remove()
valket()
} }
} }
...@@ -6698,7 +6697,6 @@ ...@@ -6698,7 +6697,6 @@
</div> </div>
<div class="modal-footer "> <div class="modal-footer ">
<button type="button " class="btn btn-link " data-dismiss="modal ">Close</button>
<button type="button " id="btnsavebangunan" class="btn btn-info ">Save changes</button> <button type="button " id="btnsavebangunan" class="btn btn-info ">Save changes</button>
</div> </div>
</div> </div>
...@@ -7153,6 +7151,9 @@ ...@@ -7153,6 +7151,9 @@
}, 1000); }, 1000);
loaderPage(false); loaderPage(false);
$("#modal_bangunan_edit").modal("show")
$(".modal_detail_non_kelurahan").modal("hide")
map_edit.setView([data['geometry']['coordinates'][0][0][0][1], data['geometry']['coordinates'][0][0][0][0]], 19); map_edit.setView([data['geometry']['coordinates'][0][0][0][1], data['geometry']['coordinates'][0][0][0][0]], 19);
let lop_poly_edit = data['geometry']['coordinates'][0][0]; let lop_poly_edit = data['geometry']['coordinates'][0][0];
...@@ -7226,7 +7227,9 @@ ...@@ -7226,7 +7227,9 @@
icon: "success", icon: "success",
confirmButtonColor: "#00BCD4" confirmButtonColor: "#00BCD4"
}, function() { }, function() {
$("#modal_bangunan_edit").css('display', 'none'); // $("#modal_bangunan_edit").css('display', 'none');
$("#modal_bangunan_edit").modal("hide")
// $(".modal_detail_non_kelurahan").modal("hide")
}) })
} else { } else {
swal({ swal({
...@@ -7265,7 +7268,8 @@ ...@@ -7265,7 +7268,8 @@
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
$("#modal_bangunan_delete").modal("show")
$(".modal_detail_non_kelurahan").modal("hide")
setTimeout(function() { setTimeout(function() {
map_delete.invalidateSize(); map_delete.invalidateSize();
}, 1000); }, 1000);
...@@ -7312,7 +7316,7 @@ ...@@ -7312,7 +7316,7 @@
icon: "success", icon: "success",
confirmButtonColor: "#00BCD4" confirmButtonColor: "#00BCD4"
}, function() { }, function() {
$("#modal_bangunan_delete").css('display', 'none'); $("#modal_bangunan_delete").modal("hide")
}) })
} else { } else {
swal({ swal({
......
...@@ -2080,6 +2080,16 @@ ...@@ -2080,6 +2080,16 @@
</div>` </div>`
} }
$(".nama_keterangan").html(`
<div>
<span style="font-size: large;">
` + feature.properties.f2 + `
</span>
</div>
<div>
<span></span>
</div>
`)
$(".isi_keterangan").html(` $(".isi_keterangan").html(`
<input type="text" name="idjalan" id="idjalan" class="hidden" value=""> <input type="text" name="idjalan" id="idjalan" class="hidden" value="">
...@@ -2171,7 +2181,6 @@ ...@@ -2171,7 +2181,6 @@
$('#lebarjalan').val(feature.properties.f4); $('#lebarjalan').val(feature.properties.f4);
$('#tipejalan').val(feature.properties.f5); $('#tipejalan').val(feature.properties.f5);
$("#coordinatejalan").val(feature.geometry); $("#coordinatejalan").val(feature.geometry);
} }
}); });
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
</li> </li>
<hr> <hr>
<li> <li>
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 1px;"> <a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 1px; display: none;">
<i class="icon-arrow-right13"></i> <i class="icon-arrow-left12"></i>
</a> </a>
</li> </li>
...@@ -995,20 +995,22 @@ ...@@ -995,20 +995,22 @@
}); });
$("#btn-hide-all").click(function() { $("#btn-hide-all").click(function() {
$("#button_keterangan").removeClass("active"); $("#button_keterangan").removeClass("active");
$("#manage_perbaikan").removeClass("active"); $("#manage_perbaikan").removeClass("active");
$("#panel-sm").removeClass("active"); $("#panel-sm").removeClass("active");
$("#panel-sm2").removeClass("active"); $("#panel-sm2").removeClass("active");
$(this).css('display', 'none');
$(this).removeClass("hid"); $(this).removeClass("hid");
}); });
$("#keterangan_button").click(function() { $("#keterangan_button").click(function() {
$("#btn-hide-all").toggleClass("hid") $("#btn-hide-all").css('display', 'block');
// $("#btn-hide-all").toggleClass("hid");
}); });
$("#perbaikan_manage").click(function() { $("#perbaikan_manage").click(function() {
$("#btn-hide-all").toggleClass("hid") $("#btn-hide-all").css('display', 'block');
// $("#btn-hide-all").toggleClass("hid");
}); });
function gas_all() { function gas_all() {
......
...@@ -590,9 +590,9 @@ ...@@ -590,9 +590,9 @@
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu" id="search_spes"> <ul class="dropdown-menu" id="search_spes">
<li><input type="hidden" value="bangunan"/><a href="#"><i class="icon-home text-muted text-size-base" style="color: #5A9AFB;"></i> Bangunan</a></li> <li><input type="hidden" value="bangunan"/><a href="#"><i class="icon-home4 text-muted text-size-base" style="color: #5A9AFB;"></i> Bangunan</a></li>
<li><input type="hidden" value="jalan"/><a href="#"><i class="icon-arrow-up-right2 text-muted text-size-base" style="color: #5A9AFB;"></i> Jalan</a></li> <li><input type="hidden" value="jalan"/><a href="#"><i class="icon-git-branch text-muted text-size-base" style="color: #5A9AFB;"></i> Jalan</a></li>
<li><input type="hidden" value="point"/><a href="#"><i class="icon-location3 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</a></li> <li><input type="hidden" value="point"/><a href="#"><i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</a></li>
</ul> </ul>
</div> </div>
<!-- </div> --> <!-- </div> -->
...@@ -875,6 +875,7 @@ ...@@ -875,6 +875,7 @@
var dar = null; var dar = null;
$('#search_spes li a').on('click', function(){ $('#search_spes li a').on('click', function(){
$('#input_search').val(null)
tes = $(this).text(); tes = $(this).text();
dar = tes dar = tes
}); });
...@@ -945,7 +946,7 @@ ...@@ -945,7 +946,7 @@
data: {"type":dar, 'idx':idm, 'db':db}, data: {"type":dar, 'idx':idm, 'db':db},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(data)
} }
}); });
...@@ -992,6 +993,7 @@ ...@@ -992,6 +993,7 @@
layer.on({ layer.on({
click: function(e) { click: function(e) {
$("#modal_detail_non_kelurahan").modal('show');
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) { var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
if (result.address.Address != '') { if (result.address.Address != '') {
...@@ -1224,7 +1226,6 @@ ...@@ -1224,7 +1226,6 @@
</div> </div>
<div class="modal-footer "> <div class="modal-footer ">
<button type="button " class="btn btn-link " data-dismiss="modal ">Close</button>
<button type="button " id="btnsavebangunan" class="btn btn-info ">Save changes</button> <button type="button " id="btnsavebangunan" class="btn btn-info ">Save changes</button>
</div> </div>
</div> </div>
...@@ -1363,92 +1364,161 @@ ...@@ -1363,92 +1364,161 @@
</div> </div>
</div> </div>
</div>`; </div>`;
content = ` // content = `
<table class="table tasks-list"> // <table class="table tasks-list">
<thead style="text-align: center;"> // <thead style="text-align: center;">
<tr> // <tr>
<th style="padding: 0 0 0 0px;"> // <th style="padding: 0 0 0 0px;">
<img src=` + path_img + ` alt="Image" style="width: 100%;max-height: 368px;height:368"> // <img src=` + path_img + ` alt="Image" style="width: 100%;max-height: 368px;height:368">
</th> // </th>
</tr> // </tr>
</thead> // </thead>
<tbody> // <tbody>
<div class= "container"> // <div class= "container">
<tr style="height: 100px;"> // <tr style="height: 100px;">
<th> // <th>
<div> // <div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif; // <h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0; // letter-spacing: 0;
font-weight: 400;"> // font-weight: 400;">
<span style="font-size: x-large;"> // <span style="font-size: x-large;">
// ` + feature.properties.f2 + `
// </span>
// </h1>
// </div>
// </th>
// </tr>
// </div>
// <div class= "container">
// <tr style="height: 30px;">
// <th>
// <span>
// ` + feature.administrasi.f12 + `
// </span>
// </th>
// </tr>
// </div>
// <div class= "container">
// <tr style="height: 40px;">
// <th>
// <p style="text-align:center;">
// <img src="static/img/icon/samping_location.svg" alt="Image" style="height: 30px; width: 30px;">
// </p>
// <p>
// <span>
// ` + alamat + feature.administrasi.f1 + `, ` + feature.administrasi.f2 + `, ` + feature.administrasi.f3 + `, ` + feature.administrasi.f4 + `
// </span>
// </p>
// </th>
// </tr>
// </div>
// <div class= "container">
// <tr style="height: 40px;">
// <th>
// <p style="text-align:center;">
// <img src="static/img/icon/samping_informasi.svg" alt="Image" style="height: 30px; width: 30px;">
// </p>
// <p>
// <span>Luas Bangunan : ` + feature.administrasi.f6 + `</span>
// </p>
// <p>
// <span>Luas Tanah : ` + feature.administrasi.f7 + `</span>
// </p>
// <p>
// <span>Tinggi Bangunan : ` + feature.administrasi.f8 + `</span>
// </p>
// <p>
// <span>Pemilik : ` + feature.administrasi.f10 + `</span>
// </p>
// </th>
// </tr>
// </div>
// <div class= "container">
// <tr style="height: 40px;">
// <th>
// <p class="text-center" style="margin-top: 5px;">
// <a href="#" class="btn btn-primary" data-toggle="modal" data-target="#modal_bangunan_edit" id="btn_edit_bangunan" data-backdrop="static" data-keyboard="false" style="border-radius: 200px; margin-bottom: 5px;"><i class="fa fa-edit" style="color:#ffffff"> </i><i style="margin-left: 5px;">Edit Informasi Bangunan</i></a>
// <a href="#" id='btn_delete_bangunan' class='btn
// btn-primary btn_edit_bangunan' data-toggle="modal" data-target="#modal_bangunan_delete" data-backdrop="static" data-keyboard="false" style="border-radius: 200px; margin-bottom: 5px;"><i class="fa fa-trash" style="color:#ffffff"> </i><i style="margin-left: 5px;">Delete Bangunan</i></a>
// </p>
// </th>
// </tr>
// </div>
// <div class="container">
// `+history+`
// </div>
// </tbody>
// </table>`;
// $("#isi_panel").html(content);
$(".gambar_keterangan").html(`<img src="` + path_img + `" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;border-bottom-left-radius: 10px;">`)
$(".nama_keterangan").html(`<div>
<span style="font-size: large;">
` + feature.properties.f2 + ` ` + feature.properties.f2 + `
</span> </span>
</h1>
</div>
</th>
</tr>
</div> </div>
<div class= "container"> <div>
<tr style="height: 30px;">
<th>
<span> <span>
` + feature.administrasi.f12 + ` ` + alamat + feature.administrasi.f1 + `, ` + feature.administrasi.f2 + `, ` + feature.administrasi.f3 + `, ` + feature.administrasi.f4 + `
</span> </span>
</th>
</tr>
</div> </div>
<div class= "container">
<tr style="height: 40px;"> `)
<th>
<p style="text-align:center;"> $(".isi_keterangan").html(`<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<img src="static/img/icon/samping_location.svg" alt="Image" style="height: 30px; width: 30px;"> <input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
</p> <div>
<p> <div>
<span>Jenis Bangunan</span>
</div>
<div>
<span> <span>
` + alamat + feature.administrasi.f1 + `, ` + feature.administrasi.f2 + `, ` + feature.administrasi.f3 + `, ` + feature.administrasi.f4 + ` ` + feature.administrasi.f12 + `
</span> </span>
</p>
</th>
</tr>
</div> </div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p style="text-align:center;">
<img src="static/img/icon/samping_informasi.svg" alt="Image" style="height: 30px; width: 30px;">
</p>
<p>
<span>Luas Bangunan : ` + feature.administrasi.f6 + `</span>
</p>
<p>
<span>Luas Tanah : ` + feature.administrasi.f7 + `</span>
</p>
<p>
<span>Tinggi Bangunan : ` + feature.administrasi.f8 + `</span>
</p>
<p>
<span>Pemilik : ` + feature.administrasi.f10 + `</span>
</p>
</th>
</tr>
</div> </div>
<div class= "container"> <div>
<tr style="height: 40px;"> <div>
<th> <span>Luas Bangunan</span>
<p class="text-center" style="margin-top: 5px;"> </div>
<a href="#" class="btn btn-primary" data-toggle="modal" data-target="#modal_bangunan_edit" id="btn_edit_bangunan" data-backdrop="static" data-keyboard="false" style="border-radius: 200px; margin-bottom: 5px;"><i class="fa fa-edit" style="color:#ffffff"> </i><i style="margin-left: 5px;">Edit Informasi Bangunan</i></a> <div>
<a href="#" id='btn_delete_bangunan' class='btn <span style="font-family: 'Roboto';">` + feature.administrasi.f6 + ` m</span>
btn-primary btn_edit_bangunan' data-toggle="modal" data-target="#modal_bangunan_delete" data-backdrop="static" data-keyboard="false" style="border-radius: 200px; margin-bottom: 5px;"><i class="fa fa-trash" style="color:#ffffff"> </i><i style="margin-left: 5px;">Delete Bangunan</i></a>
</p>
</th>
</tr>
</div> </div>
<div class="container">
`+history+`
</div> </div>
</tbody> <div>
</table>`; <div>
$("#isi_panel").html(content); <span>Luas Tanah</span>
</div>
<div>
<span style="font-family: 'Roboto';">` + feature.administrasi.f7 + ` m</span>
</div>
</div>
<div>
<div>
<span>Tinggi Bangunan</span>
</div>
<div>
<span style="font-family: 'Roboto';">` + feature.administrasi.f8 + ` m</span>
</div>
</div>
<div>
<div>
<span>Pemilik</span>
</div>
<div>
<span style="font-family: 'Roboto';">` + feature.administrasi.f10 + ` m</span>
</div>
</div>`);
$(".btn_action").html(`<div class="tombol-edit-keterangan text-center" style="background-color: #5A9AFB;position: absolute;width: 40px;height: 40px;bottom: 2px;right: 5px;border: 1pt solid rosybrown;border-radius: 8px;">
<a href="#" id="btn_edit_bangunan" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;"><i class="icon-pencil5"></i></a>
</div>
<div class="tombol-delete-keterangan text-center" style="background-color: indianred;position: absolute;width: 40px;height: 40px;bottom: 2px;right: 50px;border: 1pt solid rosybrown;border-radius: 10px;">
<a href="#" id="btn_delete_bangunan" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;"><i class="icon-eraser2"></i></a>
</div>
`)
$("#modal_bangunan_edit").html(content_edit); $("#modal_bangunan_edit").html(content_edit);
$("#modal_bangunan_delete").html(content_delete); $("#modal_bangunan_delete").html(content_delete);
$("#input_perbaikan_bang").html(content_inp_his_bang); $("#input_perbaikan_bang").html(content_inp_his_bang);
...@@ -2187,29 +2257,73 @@ ...@@ -2187,29 +2257,73 @@
layer.on({ layer.on({
click: function(e) { click: function(e) {
$("#modal_detail_non_kelurahan").modal(show); $("#modal_detail_non_kelurahan").modal('show');
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) { // var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
if (feature.properties.f2 == null) {
var namajalan = "unnamed"
}
if (feature.properties.f6 == 'None') { if (feature.properties.f6 == 'None') {
var path_img = "static/img/image_null.png" var path_img = "static/img/image_null.png"
} else { } else {
var path_img = `"static/image/jalan/` + feature.properties.f6 + `"` var path_img = `"static/image/jalan/` + feature.properties.f6 + `"`
} }
$(".gambar_keterangan").html(`<img src="` + path_img + `" alt="" style="width:360px;height:290px;border-top-left-radius: 10px;border-top-right-radius: 10px;">`) $(".gambar_keterangan").html(`<img src="` + path_img + `" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;border-bottom-left-radius: 10px;">`)
$(".nama_keterangan").html(feature.legend.f2) $(".nama_keterangan").html(namajalan)
$(".isi_keterangan").html(` $(".btn_action").html(`<div class="tombol-edit-keterangan text-center" style="background-color: #5A9AFB;position: absolute;width: 40px;height: 40px;bottom: 2px;right: 5px;border: 1pt solid rosybrown;border-radius: 8px;">
<input type="text" name="idtuplah" id="idtuplah" class="hidden" value=""> <a href="#" id="btn_jalan" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;"><i class="icon-pencil5"></i></a>
</div>
<div class="tombol-delete-keterangan text-center" style="background-color: indianred;position: absolute;width: 40px;height: 40px;bottom: 2px;right: 50px;border: 1pt solid rosybrown;border-radius: 10px;">
<a href="#" id="btn_hapus_jalan" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;"><i class="icon-eraser2"></i></a>
</div>
`)
if (feature.properties.f7 != null) {
var list_history = feature.properties.f7
console.log(list_history[0].split(",")[0])
var perbaikan_jl = `<div class='row'>
<input type="text" name="coordinatetuplah" id="coordinatetuplah" class="hidden" value=""> <label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
<a class="col-md-4" onclick="getdetailper(` + list_history[0].split(",")[0] + `)" data-toggle="modal" data-target="#modal_detail_perbaikan_dash"><i>Detail</i></a>
</div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
} else {
var perbaikan_jl = `<div class='row'>
<div class="col-md-6"> <div class="col-md-6">
<label class="col-md-6">Null</label>
</div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
</div>`
}
$(".nama_keterangan").html(`
<div>
<span style="font-size: large;">
` + feature.properties.f2 + `
</span>
</div>
<div>
<span></span>
</div>
`)
$(".isi_keterangan").html(`
<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div> <div>
<div> <div>
<span>Panjang Jalan</span> <span>Panjang Jalan</span>
</div> </div>
<div> <div>
<span>` + feature.legend.f3 + `m</span> <span>` + feature.properties.f3 + `m</span>
</div> </div>
</div> </div>
<div> <div>
...@@ -2220,8 +2334,7 @@ ...@@ -2220,8 +2334,7 @@
<span style="font-family: 'Roboto';">` + feature.properties.f4 + ` m</span> <span style="font-family: 'Roboto';">` + feature.properties.f4 + ` m</span>
</div> </div>
</div> </div>
</div>
<div class="col-md-6">
<div> <div>
<div> <div>
<span>Tipe Jalan</span> <span>Tipe Jalan</span>
...@@ -2230,7 +2343,16 @@ ...@@ -2230,7 +2343,16 @@
<span>` + feature.properties.f5 + `</span> <span>` + feature.properties.f5 + `</span>
</div> </div>
</div> </div>
<div>
<div>
<span>Perbaikan Terakhir</span>
</div>
<div>
<span>` + perbaikan_jl + `</span>
</div>
</div> </div>
`) `)
//if (result.address.Address != '') { //if (result.address.Address != '') {
// var nmjalan = result.address.Address // var nmjalan = result.address.Address
...@@ -2275,8 +2397,8 @@ ...@@ -2275,8 +2397,8 @@
//} //}
// //
$('#namajalan').val(feature.legend.f2); $('#namajalan').val(feature.properties.f2);
}); // });
$('#idjalan').val(feature.properties.f1); $('#idjalan').val(feature.properties.f1);
$('#panjangjalan').val(feature.properties.f3); $('#panjangjalan').val(feature.properties.f3);
...@@ -2285,6 +2407,8 @@ ...@@ -2285,6 +2407,8 @@
$("#coordinatejalan").val(feature.geometry); $("#coordinatejalan").val(feature.geometry);
var ijal = $('#idjalan').val();
console.log(ijal)
} }
}); });
...@@ -2387,6 +2511,8 @@ ...@@ -2387,6 +2511,8 @@
polygon_edit_jalan.remove() polygon_edit_jalan.remove()
} }
var id_poly = $('#idjalan').val(); var id_poly = $('#idjalan').val();
console.log(id_poly)
// var id_poly = idm
$.ajax({ $.ajax({
url: "{% url 'api:edit-jalan' %}", url: "{% url 'api:edit-jalan' %}",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment