Commit bd5668c7 authored by Muhamad's avatar Muhamad

modal all

parents c5daf7f6 79b2e193
......@@ -73,5 +73,8 @@ urlpatterns = [
path('deletejalan', views.deletejalan, name='hapus-jalan'),
path('search_spes', views.search_spes, name='search_spes'),
path('search_lanjut', views.search_lanjut, name='search_lanjut'),
path('load_point_id', views.load_point_id)
path('load_point_id', views.load_point_id),
path('edit_detail_poin', views.edit_detail_poin),
path('download_perbaikan_data', views.download_perbaikan_data)
]
\ No newline at end of file
......@@ -2876,7 +2876,7 @@ def user_data(request):
au.first_name,
au.last_name,
au.is_active,
au.last_login,
DATE(au.last_login),
au.email,
ag.name,
au.is_staff,
......@@ -2900,7 +2900,7 @@ def user_data(request):
au.first_name,
au.last_name,
au.is_active,
au.last_login,
DATE(au.last_login),
au.email,
ag.name,
au.is_staff,
......@@ -3362,7 +3362,7 @@ def load_point_id(request):
'type',
'Feature',
'properties',
(id, namobj, alamat, luas_bangunan, perangkat),
(id, namobj, alamat, luas_bangunan, perangkat, gambar),
'geometry',
ST_AsGeoJSON ( geom :: geometry ) :: json
)
......@@ -3372,5 +3372,120 @@ def load_point_id(request):
id = %s
"""%(dtb, id))
poin = poi.fetchall()
print(poin)
context = {'result':poin}
return Response(context)
@api_view(('POST',))
def edit_detail_poin(request):
idkantor = request.POST.get('id')
namobj = request.POST.get('namobj')
luat_tanah = request.POST.get('luastanah')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
dbp = request.POST.get('db')
if alamat is None:
alamat = 'alamat'
elif alamat == '':
alamat = 'alamat'
else:
alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat')
if perangkat is None:
perangkat = 'Bpk'
elif perangkat == '':
perangkat = 'Bpk'
else:
perangkat = request.POST.get('perangkat')
point = request.POST.get("point")
cood_edit = json.loads(point)
co_edit = cood_edit['geometry']['coordinates']
file1 = request.FILES.get('file')
fss = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/static/img/image/')
try:
format = (file1.name).split(".")
num = random.randrange(1, 10000000000000)
namafile = f"{namobj}_{num}.{format[-1:][0]}"
filename = fss.save(namafile, file1)
# print(file.name)
url = fss.url(filename)
except:
namafile = gambar
with conn.cursor() as editka:
editka.execute("""update %s set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', luas_tanah = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(dbp, co_edit, namobj, luat_tanah, perangkat, alamat, namafile, idkantor))
conn.commit()
data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('GET',))
def download_perbaikan_data(request):
with conn.cursor() as tbl_p:
tbl_p.execute("""
SELECT
gl.NAME,
tp.name,
gj.remark,
st_length ( gj.geom :: geography ),
tp.tgl_pembuatan,
tp.tgl_perbaikan,
tp.tgl_selesai,
tp.anggaran,
tp.pj,
tp.pj_lapangan,
tp.kontraktor,
ST_AsGeoJSON ( tp.geom :: geometry ) :: json,
tp.pjg_perbaikan,
tp.lbr_perbaikan,
tp.id_object,
tp.id,
tp.proposal,
tp.bukti_selesai
FROM
tbl_perbaikan tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_jalan gj ON gj.ID = tp.id_object
ORDER BY
tp.id ASC
""")
tbl_per = tbl_p.fetchall()
per_res = []
for rows in tbl_per:
print(rows)
datas = {
"id": rows[15],
"jenis_perbaikan": rows[0],
"nama": rows[1],
"tipe": rows[2],
"panjang": rows[3],
"tgl_pembuatan": rows[4],
"tgl_perbaikan": rows[5],
"tgl_selesai": rows[6],
"anggaran": rows[7],
"pj": rows[8],
"pj_lapangan": rows[9],
"kontraktor": rows[10],
"panjang_per": rows[12],
"lebar_per": rows[13],
}
per_res.append(datas)
respon = {
'data' : per_res,
}
return Response(respon)
\ No newline at end of file
......@@ -746,12 +746,17 @@ li.active>a:after {
.modal-header {
background-color: #1B1F2D !important;
border: #1B1F2D;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px!important;
border-top-left-radius: 10px!important;
color: white;
}
#modal_adm>.modal-content {
border-radius: 10px;
.modal-header>button {
color: white;
}
.modal-content {
border-radius: 10px!important;
}
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(1)>div.gambar_keterangan>img {
......@@ -763,6 +768,46 @@ li.active>a:after {
display: none;
}
.icon-location3:before {
margin-left: -14px;
}
#maps_detail_p>div.leaflet-control-container>div.leaflet-top.leaflet-left {
display: none;
}
#map-edit-tuplah>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
#modal_bangunan_delete>div {
width: 360px!important;
}
.apexcharts-toolbar>div.apexcharts-menu-icon>div>span {
color: white;
position: absolute;
top: -22px;
font-size: 16px;
margin-left: 40px;
}
.apexcharts-toolbar>div.apexcharts-menu-icon>div>i {
color: white;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div.tombol-edit.text-center>a {
color: white;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div.tombol-edit.text-center>a:hover {
box-shadow: 0 0 0 100px rgb(0 0 0 / 0%) inset;
}
.apexcharts-menu.apexcharts-menu-open {
color: black!important;
}
@media (max-width: 1025px) {
.dock {
position: absolute;
......
<svg width="278" height="330" viewBox="0 0 278 330" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="278" height="330">
<rect width="278" height="330" rx="10" fill="url(#paint0_linear)"/>
</mask>
<g mask="url(#mask0)">
<path opacity="0.2" d="M199.78 294.593C292.322 334.061 278.284 169.675 277.764 130H297V332H262.687H101C113.477 306.835 147.667 272.367 199.78 294.593Z" fill="#4077B4"/>
<path d="M203.252 297.185C292.489 333.918 278.952 180.925 278.451 144H297V332H263.912H108C120.032 308.579 153 276.5 203.252 297.185Z" fill="#4077B4"/>
</g>
<defs>
<linearGradient id="paint0_linear" x1="169" y1="-34" x2="133.5" y2="359.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#3085E8"/>
<stop offset="1" stop-color="#3D7DB8"/>
</linearGradient>
</defs>
</svg>
......@@ -45,7 +45,7 @@ $("#upload_image").change(function() {
function getdetailper(id) {
$.ajax({
url: "apps/get-detail-perbaikan",
url: "get-detail-perbaikan",
data: {
'id': id
},
......@@ -93,6 +93,7 @@ function getdetailper(id) {
</a>`);
} else {
$(".nama_detail_dash").html(data[0]['name']);
$(".type_detail_dash").html(data[0]['type'])
$(".tanggal_perbaikan_detail_dash").text(data[0]['tgl_perbaikan'])
......@@ -104,13 +105,13 @@ function getdetailper(id) {
$(".lebar_jalan_detail_dash").html(data[0]['lbr_jln_reno'])
$(".proposal_detail_dash").html(`
<a href="media/proposal/` + data[0]['proposal'] + ` target="_blank" "id="downloadproposal">
<img src="{% static 'img/icon-1/proposal.svg' %} " alt=" " style="height: 65px;width: 65px; ">
<img src="static/img/icon-1/proposal.svg" alt=" " style="height: 65px;width: 65px; ">
</a>`);
$(".bukti_detail_perbaikan_dash").html(`
<a href="media/bukti_penyelesaian/` + data[0].bukti_selesai + ` target="_blank" id="view-bukti">
<img src="{% static 'img/icon-1/bukti.svg' %} " alt=" " style="height: 70px;
<img src="static/img/icon-1/bukti.svg" alt=" " style="height: 70px;
width: 50px;">
</a>`);
......@@ -136,7 +137,14 @@ function getdetailper(id) {
});
};
$("#pengaturan_btn").click(function() {
function load_manage() {
// $("#pengaturan_btn").click(function() {
$(".datatable-show-all.list_user").dataTable().fnDestroy();
$(".datatable-show-all.list_point").dataTable().fnDestroy();
$("#list_point").removeClass('list_point')
$("#list_user").removeClass('list_user')
$.ajax({
url: "api/user-data",
dataType: 'json',
......@@ -146,6 +154,9 @@ $("#pengaturan_btn").click(function() {
var number = 0;
for (var i = 0; i < data['data'].length; i++) {
$("#list_point").addClass('list_point')
$("#list_user").addClass('list_user')
number += 1;
var id = data['data'][i]['id'];
......@@ -228,13 +239,41 @@ $("#pengaturan_btn").click(function() {
$("#tbody_point_list").html(data_point)
$('.datatable-show-all.list_user').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
width: '10%',
targets: [0],
}, {
orderable: false,
width: '10%',
targets: [1],
}, {
orderable: false,
width: '20%',
targets: [2],
}, {
orderable: false,
width: '20%',
targets: [3],
}, {
orderable: false,
width: '20%',
targets: [4],
}, {
orderable: false,
width: '10%',
targets: [5],
}, {
orderable: false,
width: '10%',
targets: [6],
}, ],
dom: '<"float-left "B>frtip',
......@@ -261,9 +300,19 @@ $("#pengaturan_btn").click(function() {
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
width: '10%',
targets: [0],
}, {
orderable: false,
width: '10%',
targets: [3],
}, {
orderable: false,
width: '10%',
targets: [5],
}, ],
dom: '<"float-left "B>frtip',
language: {
......@@ -287,7 +336,8 @@ $("#pengaturan_btn").click(function() {
}
});
})
};
function btnuserclick(evt) {
var i, tabcontent, tablinks;
......@@ -512,9 +562,8 @@ function switchuserstatus(id, isactive) {
cancelButtonText: "Tidak!",
closeOnConfirm: false,
closeOnCancel: false
}).then((isConfirm) => {
console.log(isConfirm)
if (isConfirm.value) {
}, function(isConfirm) {
if (isConfirm == true) {
$.ajax({
url: "/switchStatus/",
......@@ -537,8 +586,8 @@ function switchuserstatus(id, isactive) {
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}).then((isok) => {
location.reload();
}, function(isok) {
load_manage()
})
} else {
alert("no data in database")
......@@ -593,10 +642,44 @@ function loaduserbyid(id) {
});
}
var map_poin_det = L.map('maps_detail_p', {
editable: true,
zoomControl: false,
drawControl: true
});
mapss = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_poin_det);
var map_edit_p = L.map('map-for-edit', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-2, 118], 5);
mapss_p = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_edit_p);
function modal_detail_point_pengaturan(id, db) {
$("#detail_right").html(``)
$("#modal_detail_point_pengaturan").modal("show")
if (map_poin_det.hasLayer(marker)) {
marker.clearLayers()
marker.remove()
}
if (map_edit_p.hasLayer(marker)) {
poinin.clearLayers()
poinin.remove()
}
$.ajax({
url: "/api/load_point_id",
data: {
......@@ -605,46 +688,308 @@ function modal_detail_point_pengaturan(id, db) {
},
dataType: 'json',
success: function(data) {
// console.log(data['result'][0][0])
$("#detail_right").html(`<div>
<span>
Informasi Peta Lokasi
</span>
</div>
<div id="maps_detail_p" style="height: 360px;outline: none;border-bottom-right-radius: 10px;margin-top: 10px;">
</div>`)
setTimeout(function() {
map_poin_det.invalidateSize();
}, 1000);
$("#id_adm_edit").val(id)
var map_poin_det = L.map('maps_detail_p', {
editable: true,
zoomControl: false,
drawControl: true
});
mapss = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_poin_det);
$(".nama_point").html(data['result'][0][0]['properties']['f2'])
$(".pj_bangunan").html(data['result'][0][0]['properties']['f5'])
$(".luas_bangunan").html(data['result'][0][0]['properties']['f4'])
$(".gambar_point").html(`<img src="/static/img/image/` + data['result'][0][0]['properties']['f6'] + `" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;">`)
$("#namobj_adm_edit").val(data['result'][0][0]['properties']['f2'])
$("#alamat_adm_edit").val(data['result'][0][0]['properties']['f3'])
$("#luas_tanah_adm_edit").val(data['result'][0][0]['properties']['f4'])
$("#perangkat_adm_edit").val(data['result'][0][0]['properties']['f5'])
$("#db_p").val(db)
var marker = L.marker([data['result'][0][0]['geometry']['coordinates'][1], data['result'][0][0]['geometry']['coordinates'][0]]).addTo(map_poin_det);
map_poin_det.setView([data['result'][0][0]['geometry']['coordinates'][1], data['result'][0][0]['geometry']['coordinates'][0]], 17)
document.querySelector("#maps_detail_p > div.leaflet-control-container > div.leaflet-top.leaflet-left").css("display", "none")
map_edit_p.setView([data['result'][0][0]['geometry']['coordinates'][1], data['result'][0][0]['geometry']['coordinates'][0]], 17);
let dapoin = [data['result'][0][0]['geometry']['coordinates'][1], data['result'][0][0]['geometry']['coordinates'][0]]
var poinin = L.marker(dapoin).addTo(map_edit_p)
poinin.enableEdit();
$('#saveedit_p').click(function() {
var hasil = (JSON.stringify(poinin.toGeoJSON()))
$("#coordinateZoneedit_p").val(hasil);
})
$("#edit_point_p").click(function() {
setTimeout(function() {
map_poin_det.invalidateSize();
map_edit_p.invalidateSize();
}, 1000);
})
}
});
}
$("#saveuser").on("click", function() {
addUser()
})
$("#edit_point_p").click(function() {
$("#modal_edit_p_point").modal("show")
// function destroyfade() {
// $(".modal-backdrop").css("display", "none")
// $(".modal-backdrop").removeClass('show');
// $("body").css('padding-right', '0px !important')
// }
function addUser() {
var isObject = {};
var ars = ''
var group = $("#select_group").val();
var iduser = $("#iduser").val();
if (iduser) {
isObject.id = iduser;
}
// for(i in group){
// if(i < group.length-1){
// ars += group[i]+"~";
// }else{
// ars += group[i];
// }
// }
// return false
isObject['username'] = $("#inUsername").val();
isObject['first_name'] = $("#inNameF").val();
isObject['last_name'] = $("#inNameL").val();
isObject['email'] = $("#inEmail").val();
isObject.group = group
isObject.isStaff = $('input[name="isStaff"]:checked').val();
$.ajax({
url: "adduser/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
$("#modal_edit_user").css('display', 'none');
// destroyfade();
swal({
title: response.info,
text: response.data + "reload untuk mendapatkan update",
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "alert",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
});
}
$("#saveedit_p").click(function() {
var idka = $('#id_adm_edit').val();
var poi = $('#coordinateZoneedit_p').val();
var data = new FormData();
data.append("file", $("input[id^='fileadm']")[0].files[0]);
data.append('id', idka)
data.append('namobj', $('#namobj_adm_edit').val())
data.append('luastanah', $('#luas_tanah_adm_edit').val())
data.append('alamat', $('#alamat_adm_edit').val())
data.append('perangkat', $('#perangkat_adm_edit').val())
data.append('point', poi)
data.append('db', $("#db_p").val())
data.append('gambar', $('#gambar_adm_edit').val())
$.ajax({
url: "/api/edit_detail_poin",
data: data,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
})
} else {
swal({
title: 'Error',
text: 'Hubungi Developer',
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
});
})
function changepassword() {
var isObject = {};
isObject.id = $("#iduseredt").val();
isObject.currPass = $('#currentPass').val();
isObject.newPass = $("#newPass").val();
isObject.renewPass = $("#renewPass").val();
isObject.username = $("#usernameedt").val();
if (isObject.currPass == "" || isObject.newPass == "" || isObject.renewPass == "") {
$("#notifications").css("display", "block")
$("#notifications").html("Inputan tidak boleh kosong")
return false;
}
$.ajax({
url: "changepassword/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
var datas = response.data
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#notifications").css("display", "none")
})
} else {
$("#notifications").html(response.data)
$("#notifications").css("display", "block")
}
}
});
}
function editprofile() {
var isObject = {}
isObject.id = $("#iduseredt").val();
isObject.first_name = $("#firstnameedt").val();
isObject.last_name = $("#lastnameedt").val();
isObject.email = $("#emailedts").val()
if (isObject.first_name == "" || isObject.last_name == "" || isObject.email == "") {
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Inputan tidak boleh kosong")
return false
} else {
var mail_format = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/;
if (!isObject.email.match(mail_format)) {
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Format email tidak valid, silahkan coba kembali.")
return false
}
}
$.ajax({
url: "editprofile/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
var datas = response.data
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#notificationsprop").css("display", "none")
})
} else {
$("#notificationsprop").html(response.data)
$("#notificationsprop").css("display", "block");
}
}
});
}
function changecur() {
var checkBox = document.getElementById("passcur");
var typ = document.getElementById("currentPass");
if (checkBox.checked == true) {
$("#matachange").html(`<i class="icon-eye"></i>`)
typ.type = 'text';
} else {
$("#matachange").html(`<i class="icon-eye-blocked"></i>`)
typ.type = 'password';
}
}
function changecur1() {
var checkBox = document.getElementById("passcur1");
var typ = document.getElementById("newPass");
if (checkBox.checked == true) {
$("#matachange1").html(`<i class="icon-eye"></i>`)
typ.type = 'text';
} else {
$("#matachange1").html(`<i class="icon-eye-blocked"></i>`)
typ.type = 'password';
}
}
function changecur2() {
var checkBox = document.getElementById("passcur2");
var typ = document.getElementById("renewPass");
if (checkBox.checked == true) {
$("#matachange2").html(`<i class="icon-eye"></i>`)
typ.type = 'text';
} else {
$("#matachange2").html(`<i class="icon-eye-blocked"></i>`)
typ.type = 'password';
}
}
$("#btnsaveuser").click(function() {
editprofile()
changepassword()
})
document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").css("right", "50px")
\ No newline at end of file
......@@ -91,6 +91,7 @@
{% endif %}{% endfor %}
<script>
//suk
var kantor_administrasi = "{{ kantor_administrasi }}".replace(/&#x27;/g, '"');
var result_kan_adm = JSON.parse("" + kantor_administrasi + "")
......@@ -441,7 +442,7 @@
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title">Delete Point</h6>
</div>
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div id="map-for-delete" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div>
<input style="display:none;" id="id_adm_del" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
<div class="row" style="margin-top: 15px;">
......@@ -468,7 +469,7 @@
</div>
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="savedeleteadm">Hapus</button>
</div>
</div>
......@@ -505,7 +506,7 @@
<div class="tab-pane" id="right-tab2-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_adm_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -579,7 +580,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditadm">Save changes</button>
</div>
</div>
......@@ -652,7 +652,6 @@
setTimeout(function() {
map_edit.invalidateSize();
}, 1000);
console.log(data)
// map_edit.setView([data['geometry']['coordinates'][0][0][0][1], data['geometry']['coordinates'][0][0][0][0]], 19);
map_edit.setView([data['geometry']['coordinates'][1], data['geometry']['coordinates'][0]], 19);
let dapoin = [data['geometry']['coordinates'][1], data['geometry']['coordinates'][0]]
......@@ -661,8 +660,6 @@
$('#saveeditadm').click(function() {
var hasil = (JSON.stringify(poinin.toGeoJSON()))
$("#coordinateZoneedit_adm_edit").val(hasil);
})
}
})
......@@ -700,8 +697,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -778,8 +776,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modald_adm").css('display', 'none');
location.reload();
$("#modald_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -926,7 +925,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_lk_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -1013,7 +1012,7 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditlk">Save changes</button>
</div>
</div>
......@@ -1132,8 +1131,10 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -1144,7 +1145,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
// location.reload()
}
})
......@@ -1279,7 +1280,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_puskes_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -1366,7 +1367,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditpuskes">Save changes</button>
</div>
</div>
......@@ -1485,8 +1485,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal("hide");
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -1497,7 +1498,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -1633,7 +1634,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_rs_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -1720,7 +1721,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditrs">Save changes</button>
</div>
</div>
......@@ -1823,8 +1823,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -1835,7 +1836,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -1973,7 +1974,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_si_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -2060,7 +2061,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditsi">Save changes</button>
</div>
</div>
......@@ -2235,8 +2235,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -2247,7 +2248,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -2365,7 +2366,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="id_sp_edit" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -2452,7 +2453,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditsp">Save changes</button>
</div>
</div>
......@@ -2628,8 +2628,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -2640,7 +2641,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
});
......@@ -2730,7 +2731,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="idspbu" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -2804,7 +2805,7 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditspbu">Save changes</button>
</div>
</div>
......@@ -2985,8 +2986,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -2997,7 +2999,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -3089,7 +3091,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="idst" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -3162,7 +3164,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditst">Save changes</button>
</div>
</div>
......@@ -3320,8 +3321,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -3332,7 +3334,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -3424,7 +3426,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="idtr" type="text" class="form-control" value="` + feature.administrasi.f16 + `"required>
......@@ -3488,7 +3490,7 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveedittr">Save changes</button>
</div>
</div>
......@@ -3647,8 +3649,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -3659,7 +3662,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -3751,7 +3754,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="idcb" type="text" class="form-control" value="` + feature.administrasi.f11 + `"required>
......@@ -3814,7 +3817,7 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditcb">Save changes</button>
</div>
</div>
......@@ -3898,8 +3901,8 @@
if (checkBox.checked == true) {
geo_po_cagar_budaya.addTo(map)
} else {
valket()
geo_po_cagar_budaya.remove()
valket()
}
}
......@@ -3975,8 +3978,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -3987,7 +3991,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -4080,7 +4084,7 @@
<div class="tab-pane" id="left-tab1-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="form-group">
<input style="display:none;" id="idgl" type="text" class="form-control" value="` + feature.administrasi.f15 + `"required>
......@@ -4154,7 +4158,6 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditgl">Save changes</button>
</div>
</div>
......@@ -4235,11 +4238,10 @@
function gl100() {
var checkBox = document.getElementById("gardu");
if (checkBox.checked == true) {
valket()
geo_po_gardu_listrik.addTo(map)
} else {
valket()
geo_po_gardu_listrik.remove()
valket()
}
}
......@@ -4315,8 +4317,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_adm").css('display', 'none');
location.reload();
$("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
})
} else {
swal({
......@@ -4327,7 +4330,7 @@
confirmButtonColor: "#00BCD4"
})
}
location.reload()
//location.reload()
}
})
......@@ -6599,7 +6602,7 @@
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Edit Polygon Bangunan dan Informasinya</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="row">
<div class="col-md-5">
<div id="map-edit" style="width:400px;height: 350px;">
......@@ -6733,7 +6736,6 @@
</div>
<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>
</div>
</div>
......@@ -6773,7 +6775,7 @@
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Renovasi Bangunan</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="modal-body" style="overflow-x: hidden;max-height: 300px;overflow-y: scroll;padding-left: 15px;">
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
......@@ -7106,6 +7108,7 @@
});
$(document).on("click", "#btn_edit_bangunan", function() {
$("#modal_detail_non_kelurahan").modal("hide")
var tipe1 = $('#tipe111').val();
$('#tipe_point_b_e option[value=' + tipe1 + ']').attr('selected', 'selected');
......@@ -7122,7 +7125,6 @@
},
dataType: 'json',
success: function(data) {
console.log(data)
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
......@@ -7223,6 +7225,9 @@
}, 1000);
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);
let lop_poly_edit = data['geometry']['coordinates'][0][0];
......@@ -7296,7 +7301,9 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, 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 {
swal({
......@@ -7314,6 +7321,7 @@
});
$(document).on("click", "#btn_delete_bangunan", function() {
$("#modal_detail_non_kelurahan").modal("hide")
var map_delete = new L.map('map-delete', {
editable: true,
zoomControl: false,
......@@ -7335,7 +7343,8 @@
},
dataType: 'json',
success: function(data) {
$("#modal_bangunan_delete").modal("show")
$(".modal_detail_non_kelurahan").modal("hide")
setTimeout(function() {
map_delete.invalidateSize();
}, 1000);
......@@ -7382,7 +7391,7 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_bangunan_delete").css('display', 'none');
$("#modal_bangunan_delete").modal("hide")
})
} else {
swal({
......
......@@ -192,6 +192,7 @@
</style>
{% endif %}{% endfor %}
<script>
//tes
function panel_samp() {
$("#panel-samping").addClass("move");
$("#button_unhide_panel").addClass("move-btn");
......@@ -2055,10 +2056,13 @@
</div>
`)
if (feature.properties.f16 != null) {
var list_history = feature.properties.f16
if (feature.properties.f7 != null) {
console.log(feature.properties.f7)
var list_history = feature.properties.f7
console.log(list_history[0].split(",")[0])
var perbaikan_pt = `<div class='row'>
var perbaikan_jl = `<div class='row'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
......@@ -2069,7 +2073,7 @@
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
} else {
var perbaikan_pt = `<div class='row'>
var perbaikan_jl = `<div class='row'>
<div class="col-md-6">
<label class="col-md-6">Null</label>
</div>
......@@ -2078,11 +2082,22 @@
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
`
}
$(".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 class="row">
<div class="col-md-6">
<div>
<span>Panjang Jalan</span>
</div>
......@@ -2090,7 +2105,7 @@
<span>` + feature.properties.f3 + `m</span>
</div>
</div>
<div>
<div class="col-md-6">
<div>
<span>Lebar Jalan</span>
</div>
......@@ -2099,6 +2114,8 @@
</div>
</div>
</div>
<div>
<div>
<span>Tipe Jalan</span>
......@@ -2169,7 +2186,6 @@
$('#lebarjalan').val(feature.properties.f4);
$('#tipejalan').val(feature.properties.f5);
$("#coordinatejalan").val(feature.geometry);
}
});
......@@ -2280,12 +2296,11 @@
});
$(document).on("click", "#btn_jalan", function() {
if (map_edit_jalan.hasLayer(polygon_edit_jalan)) {
polygon_edit_jalan.remove()
}
var id_poly = $('#idjalan').val();
$("#modal-jalan").modal("show")
$.ajax({
url: "{% url 'api:edit-jalan' %}",
data: {
......@@ -2294,8 +2309,8 @@
dataType: 'json',
success: function(data) {
loaderPage(false);
$("#modal-jalan").modal("show")
$(".modal_detail_non_kelurahan").modal("hide")
$("#modal_detail_non_kelurahan").modal("hide")
setTimeout(function() {
map_edit_jalan.invalidateSize();
}, 1000);
......@@ -2338,7 +2353,8 @@
$(document).on("click", "#btn_hapus_jalan", function() {
$("#modal-hapus-jalan").modal("show")
$("#modal_detail_non_kelurahan").modal("hide")
var id_poly = $('#idjalan').val();
$.ajax({
......@@ -2373,7 +2389,7 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal-hapus-jalan").css('display', 'none');
$("#modal-hapus-jalan").modal('hide');
})
} else {
swal({
......@@ -2418,7 +2434,7 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal-jalan").css('display', 'none');
$("#modal-jalan").modal('hide');
})
} else {
swal({
......@@ -2749,6 +2765,8 @@
$(".modal-backdrop").css("display", "none")
$(".modal-backdrop").removeClass('show');
$("body").css('padding-right', '0px !important')
document.querySelector("#right-tab2-feas-upli > div > div:nth-child(6) > div > label").html(`Pimpinan`)
document.querySelector("#right-tab2-feas-upli > div > div:nth-child(3)").css("display", "block")
}
function destroyWraper() {
......@@ -3838,7 +3856,7 @@
$(".tombol_action_create").html(``)
$(".tab_1").html("Koordinat")
$(".tab_2").html("Informasi Point")
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE" style="margin-right:30px;">
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE">
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">`)
$("#koordinatjalan").html(`
......
......@@ -198,7 +198,7 @@
<div class="modal-footer ">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<!-- <button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button> -->
<button type="button" id="btnsavejalan" class="btn btn-info">Save changes</button>
</div>
</div>
......@@ -219,7 +219,7 @@
</div>
<div class="modal-footer ">
<input class="hidden" type="text" name="" id="idjlnhps">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<!-- <button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button> -->
<button type="button" id="btnhpsjalan" class="btn btn-info">Hapus Jalan</button>
</div>
</div>
......@@ -397,13 +397,14 @@
</div>
</div>
</div>
<div class="tombol-edit text-center" style="background-color: #5A9AFB;
<div class="tombol-edit text-center" style="background-color: #5A9A6A;
position: absolute;
margin-top: 3px;
border-bottom-left-radius: 8px;
border-top-right-radius: 8px;
width: 80px;
height:45px;">
height: 45px;
border: 1pt solid gray;">
<a href="" class="btn">Edit</a>
</div>
</div>
......@@ -629,7 +630,7 @@
</div>
</div>
<div class="modal fade" id="modal__create" tabindex="-1" role="dialog">
<div class="modal fade" id="modal__create" tabindex="-1" role="dialog" style="overflow-y: hidden;">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
......@@ -646,24 +647,29 @@
<div class="tab-content">
<div class="tab-pane active koordinatjalan" id="koordinatjalan">
</div>
<div class="tab-pane" id="informasi_create">
<div class="tab-pane" id="informasi_create" style="overflow-x: hidden;max-height: 390px;overflow-y: scroll;padding-left: 15px;">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="tombol_save_create">
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="user_profile" tabindex="-1" role="dialog" style="margin-left: 50px;">
<div class="modal fade" id="user_profile" tabindex="-1" role="dialog" style="margin-left: 50px;padding-left:0px">
<div class="modal-dialog" style="width: 100%;
margin: 0px;
height: 100vh;">
<div class="modal-content" style="height: 100vh;">
<div class="modal-body">
<div class="row">
<div class="col-md-3" style="border-right: 0.1pt solid #E2E2E2;">
<div style="height: 100vh;">
......@@ -709,7 +715,7 @@
<div style="margin-bottom: 10px;">
<a href="#personalinformation" data-toggle="tab" class="tab-user btn btn-default " style="
<a href="#personalinformation" data-toggle="tab" class="tab-user btn btn-default active" style="
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
......@@ -779,13 +785,13 @@
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
border-radius: 5px;" onclick="btnuserclick(event)">
border-radius: 5px;display:none;" onclick="btnuserclick(event)">
<div class="row">
<div class="col-sm-2">
<img src="{% static 'img/icon-1/help.svg' %}" alt="">
</div>
<div class="col-sm-8 text-left" style="margin-top: 4px;">
Help
Help & Support
</div>
<div class="col-sm-2">
<i class="caret" style="transform: rotate(-90deg);margin-top: 4px;"></i>
......@@ -802,6 +808,18 @@
</div>
<div class="col-md-9">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="
margin: 0px 8px 0px 0px;
width: 25px;
height: 25px;
background-color: white;
top: -10px;
position: absolute;
right: -5px;
opacity: 1;
z-index: 999;
border-radius: 12px;
">×</button>
<div class="tab-content">
<div class="tab-pane active" id="personalinformation" style="font-family: 'gilroysemibold';">
<div style="border-bottom: 1pt solid #E2E2E2;">
......@@ -812,7 +830,9 @@
</div>
<div style="border-bottom: 1pt solid #E2E2E2;">
<div class="tab_personal_information" style="margin:0px;">
<div class="alert alert-danger" id="notificationsprop" style="display: none">
<div class="alert alert-danger" id="notificationsprop" style="display: none;margin: 0px;
padding-top: 0px;
padding-bottom: 0px;">
</div>
<form class="form-horizontal" id="formmen" method="post" enctype="multipart/form-data">
......@@ -864,7 +884,9 @@
<div style="border-bottom: 1pt solid #E2E2E2;">
<div class="tab_personal_information" style="margin:0px;">
<div>
<div class="alert alert-danger" id="notifications" style="display: none">
<div class="alert alert-danger" id="notifications" style="display: none;margin: 0px;
padding-top: 0px;
padding-bottom: 0px;">
</div>
</div>
......@@ -881,6 +903,17 @@
<div class="col-md-12">
<label class="control-label"> Password saat ini :</label>
<input type="password" id="currentPass" class="form-control">
<input type="checkbox" onclick="changecur()" id="passcur" style=" position: absolute;
top: 31px;
right: 20px;
width: 20px;
height: 20px;
opacity: 0;z-index:1;">
<div id="matachange" style="position: absolute;
top: 33px;
right: 20px;">
<i class="icon-eye-blocked"></i>
</div>
</div>
</div>
......@@ -888,6 +921,18 @@
<div class="col-md-12">
<label class="control-label"> Password baru :</label>
<input type="password" id="newPass" class="form-control">
<input type="checkbox" onclick="changecur1()" id="passcur1" style=" position: absolute;
top: 31px;
right: 20px;
width: 20px;
height: 20px;
opacity: 0;z-index:1;">
<div id="matachange1" style="position: absolute;
top: 33px;
right: 20px;">
<i class="icon-eye-blocked"></i>
</div>
</div>
</div>
......@@ -895,6 +940,18 @@
<div class="col-md-12">
<label class="control-label"> Ulangi password baru :</label>
<input type="password" id="renewPass" class="form-control">
<input type="checkbox" onclick="changecur2()" id="passcur2" style=" position: absolute;
top: 31px;
right: 20px;
width: 20px;
height: 20px;
opacity: 0;z-index:1;">
<div id="matachange2" style="position: absolute;
top: 33px;
right: 20px;">
<i class="icon-eye-blocked"></i>
</div>
</div>
</div>
</div>
......@@ -918,7 +975,7 @@
<div>
<div class="tab_personal_information">
<div style="float: right;">
<button type="button" class="btn btn-link" data-dismiss="modal" style="width: 120px;height: 35px;border-color: #BABABA;border-radius: 10px;">Close</button>
<!-- <button type="button" class="btn btn-link" data-dismiss="modal" style="width: 120px;height: 35px;border-color: #BABABA;border-radius: 10px;">Close</button> -->
<button type="button" id="btnsaveuser" class="btn btn-info" style="width: 120px;height: 35px;border-radius: 10px;">Save changes</button>
</div>
......@@ -1012,7 +1069,80 @@
</table>
</div>
<div class="tab-pane" id="help">
help
<div>
<div style="font-size: 22px;margin:10px">
Help & Support
</div>
<span>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque, minus. Obcaecati consequuntur, consequatur vitae soluta tempora doloremque quis eligendi officia illo ad nesciunt tenetur, nostrum cum deleniti, dolorum explicabo sed!
</span>
</div>
<div class="panel panel-flat" style="margin:10px;">
<div class="row">
<div class="col-md-4">
<div style="margin: 10px;background-color:#2F343A;border-radius:10px">
<div style="background-image: url(/static/img/icon-1/contact_info.svg);height:330px;border-radius:10px;">
<div style="margin:0px 20px;padding:20px;color:white">
<div style="margin-bottom: 10px;font-size:16px;">
Contact Information
</div>
<div style="margin-top: 20px;">
<div class="row" style="margin-top: 20px;">
<i class="col-md-4 icon-phone2"></i>
<span class="col-md-8">(0222) 0668202</span>
</div>
<div class="row" style="margin-top: 20px;">
<i class="col-md-4 icon-envelop3"></i>
<span class="col-md-8">admin@khansia.com</span>
</div>
<div class="row" style="margin-top: 20px;">
<i class="col-md-4 icon-location3"></i>
<span class="col-md-8">Komplek Taman Bumi Prima blok s14, Cibabat, Cimahi Utara, Kota Cimahi</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8" style="margin-top:10px">
<div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Nama :</label>
<input type="text" id="nama_pengirim" class="form-control">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Email:</label>
<input type="text" id="email_pengirim" class="form-control">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Pesan :</label>
<textarea rows="5" cols="5" class="form-control" id="pesan_pengirim" placeholder="Tuliskan Pesan disini"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -1315,7 +1445,7 @@
<div class="panel-footer">
<button type="button" class="btn btn-info" id="save-perbaikan" style="float: right; margin-right: 40px;">SAVE</button>
<button type="button" class="btn btn-link" onclick="destroyWraper()" style="float: right;">Close</button>
<!-- <button type="button" class="btn btn-link" onclick="destroyWraper()" style="float: right;">Close</button> -->
</div>
</div>
......@@ -1330,8 +1460,8 @@
<div id="modal_edit_user" class="modal fade">
<div class="modal-dialog md" style="margin-top: 100px;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color: #1a222f !important;">
<div class="modal-content" style="border-radius: 10px;">
<div class="modal-header bg-info" style="background-color: #1a222f !important;border-top-right-radius: 10px;border-top-left-radius: 10px;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title modstit">Modal Tambah User</h6>
</div>
......@@ -1406,7 +1536,7 @@
</div>
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<!-- <button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button> -->
<button type="button" class="btn btn-info" id="saveuser">Save changes</button>
</div>
</div>
......@@ -1431,7 +1561,7 @@
<div class="row">
<div class="col-md-5" style="padding-right: 0px;">
<div class="gambar_point">
<img src="/static/img/image_null.png" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;border-bottom-left-radius: 10px;">
<img src="/static/img/image_null.png" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;">
</div>
<div style="font-family: 'gilroybold';margin: 10px;" class="nama_point">
......@@ -1462,7 +1592,7 @@
</div>
</div>
<div style="background-color: white;
bottom: -40px;
bottom: -30px;
position: absolute;
right: 0px;
border: 1pt solid #E2E2E2;
......@@ -1472,7 +1602,7 @@
width: 100%;
height: 100%;
bottom: 0px;
color: black;" data-toggle="modal" data-target="#modal_adm" data-backdrop="static" data-keyboard="false"><i class="icon-pencil5"></i>
color: black;" data-toggle="modal" data-target="#modal_edit_p_point" data-backdrop="static" data-keyboard="false"><i class="icon-pencil5"></i>
Edit data
</a>
</div>
......@@ -1529,8 +1659,9 @@
<div class="modal fade" id="modal_edit_p_point">
<div class="modal-dialog md">
<div class="modal-content">
<div class="modal-header bg-info">
<div class="modal-content" style="border-radius:10px;">
<div class="modal-header bg-info" style=" border-top-left-radius: 10px;
border-top-right-radius: 10px;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title">Edit Point</h6>
</div>
......@@ -1553,13 +1684,16 @@
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="fileadm" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar_adm_edit" type="text" class="form-control" value="" required>
<input style="display:none;" id="coordinateZoneedit_p" type="text" class="form-control" value="" required>
<input style="display:none;" id="db_p" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-upli">
<div class="modal-body" style="min-height: 450px;overflow-y: auto;">
<div class="modal-body" style="min-height: 300px;overflow-y: auto;">
<div class="form-group">
<input style="display:none;" id="id_adm_edit" type="text" class="form-control" value="" required>
......@@ -1576,22 +1710,11 @@
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Tipe Point</label>
<div class="col-lg-8">
<select id="remark_adm_edit" style="margin-top: 15px;">
<option></option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Alamat</label>
<div class="col-lg-4">
<input id="alamat_adm_edit" type="text" class="form-control" value="` + data['result'][0][0]['properties']['f3'] + `" required>
<input id="alamat_adm_edit" type="text" class="form-control" required>
</div>
<div class="col-lg-4" style="margin-top: 15px;"></div>
</div>
......@@ -1600,25 +1723,19 @@
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas</label>
<div class="col-lg-6">
<input id="luas_tanah_adm_edit" type="text" class="form-control" value="` + data['result'][0][0]['properties']['f4'] + `" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah" style="margin-top: 15px;">
<option>m2</option>
<option>Km2</option>
<option>Hektar</option>
</select>
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas (m2)</label>
<div class="col-lg-9">
<input id="luas_tanah_adm_edit" type="text" class="form-control" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pimpinan</label>
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Penanggung Jawab</label>
<div class="col-lg-9">
<input id="perangkat_adm_edit" type="text" class="form-control" value="` + data['result'][0][0]['properties']['f5'] + `" required>
<input id="perangkat_adm_edit" type="text" class="form-control" required>
</div>
</div>
</div>
......@@ -1633,8 +1750,8 @@
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button>
<button type="button" class="btn btn-info" id="saveeditadm">Save changes</button>
<!-- <button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button> -->
<button type="button" class="btn btn-info" id="saveedit_p">Save changes</button>
</div>
</div>
</div>
......
......@@ -7,9 +7,7 @@
<input type="checkbox" name="checkbox" onclick="mapsganti()" id="mapschange" style="position: absolute;opacity: 0;width: 40px;height: 40px;margin-top: -5px;">
<div id="labelchange">
<img src="{% static 'img/icon-1/Vector3d.svg' %}" alt="" style="height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;">
width: 50px;">
</div>
</a>
......@@ -24,9 +22,7 @@
<div class="dropdown show-dropdown" style="top: 1px;">
<a href="#" data-toggle="dropdown">
<img src="{% static 'img/icon-1/Vectorbasemaps.svg' %}" alt="" style="height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;">
width: 50px;">
</a>
<ul class="dropdown-menu" x-placement="bottom-start">
<li class="header-title text-center">Maps BaseLayer</li>
......@@ -81,9 +77,7 @@
<div class="dropdown show-dropdown ">
<a href="#" data-toggle="dropdown">
<img src="{% static 'img/icon-1/Vectoroverlay.svg' %}" alt="" style="height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;">
width: 50px;">
</a>
<ul class="dropdown-menu" style="top: 12px;
width: 300px;
......
......@@ -15,7 +15,7 @@
</div>
<div class="sidebar-category sidebar-category-visible">
<div class="category-content no-padding">
<ul class="navigation navigation-main navigation-accordion" style="margin-bottom: 40vh;">
<ul class="navigation navigation-main navigation-accordion" style="margin-bottom: 45vh;">
<!-- Main -->
<li id="button_keterangan">
......@@ -29,7 +29,7 @@
</a>
</li>
<li style="margin-top: 60vh;position: absolute;">
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 20px;">
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 20px; display: block!important;">
<i class="icon-arrow-right13"></i>
</a>
</li>
......@@ -37,17 +37,23 @@
</ul>
<ul class="navigation navigation-main navigation-accordion">
<li>
<!-- <li>
<a href="#" class="side-bar-but">
<img src="{% static 'img/icon-1/Vectoriconwarning.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;">
</a>
</li>
</li> -->
<li>
<a href="{% url 'logout' %}" class="side-bar-but">
<img src="{% static 'img/icon-1/Vectoriconlogout.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;">
</a>
</li>
<hr>
<!-- <li>
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 1px; display: none;">
<i class="icon-arrow-left12"></i>
</a>
</li> -->
</ul>
</div>
</div>
......@@ -229,7 +235,7 @@
<div class="col-sm-7" style="margin-bottom: 2px;margin-top: -8px;">
Jumlah Layanan Kesehatan<br>
<b>
{{ global.13 }}
{{ global.24 }}
</b>
</div>
<div class="col-sm-2">
......@@ -499,7 +505,7 @@
</span>
</button>
<!-- <button class="modalMinimize" style="right: 50px;"> <i class='fa fa-minus'></i> </button> -->
<button type="button" class="close" data-dismiss="modal " style="color: white;padding: 3px;"> <i class='fa fa-times'></i> </button>
<button type="button" onclick="destroymodper()" class="close" data-dismiss="modal " style="color: white;padding: 3px;"> x </button>
</div>
<div class="isi text " style="margin-top: 50px;overflow-y: scroll;max-height: 607px;overflow-x: hidden; ">
<div class="isi_detail_cek ">
......@@ -668,10 +674,10 @@
<script type="text/javascript " src="{% static 'js/plugins/forms/selects/select2.min.js' %} "></script>
<script>
//tes
$("#sel-kec ").change(function() {
$("#list_perbaikan").removeClass("datatable-show-all")
var id_kec = $(this).val()
$(".datatable-show-all.list_perb").dataTable().fnDestroy();
$.ajax({
url: "api/filt_perbaikan_kecamatan",
......@@ -680,7 +686,7 @@
},
dataType: 'json',
success: function(data) {
$("#list_perbaikan").addClass("datatable-kecamatan")
var data_all_desa = []
for (var i = 0; i < data['res_kel'].length; i++) {
var id_k = data['res_kel'][i][0];
......@@ -694,11 +700,11 @@
$('#sel-desa').html(`<option>Pilih Desa</option>` + data_all_desa);
var data_perbaikan = []
var number = 1;
var number = 0;
for (var i = 0; i < data['res_perbaikan'].length; i++) {
number += i;
number += 1;
var name_perbaikan = data['res_perbaikan'][i]['name_perbaikan'];
var id_object = data['res_perbaikan'][i]['id_object'];
var name = data['res_perbaikan'][i]['name'];
......@@ -731,43 +737,7 @@
};
$("#tbody_perbaikan").html(data_perbaikan)
$('.datatable-kecamatan').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [6],
}, {
orderable: false,
width: '20px',
targets: [7],
}, ],
dom: '<"float-left "B>frtip',
language: {
search: ' _INPUT_',
searchPlaceholder: 'Data Perbaikan...',
lengthMenu: '<span>Show:</span><hr> _MENU_',
paginate: {
'first': 'First',
'last': 'Last',
'next': '&rarr;',
'previous': '&larr;'
}
},
drawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup');
},
preDrawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
}
});
datatatata()
}
});
......@@ -777,6 +747,7 @@
$("#sel-desa ").change(function() {
var id_desa = $(this).val()
$(".datatable-show-all.list_perb").dataTable().fnDestroy();
$.ajax({
url: "api/filt_perbaikan_desa",
......@@ -786,11 +757,11 @@
dataType: 'json',
success: function(data) {
var data_perbaikan = []
var number = 1;
var number = 0;
for (var i = 0; i < data['res_perbaikan'].length; i++) {
number += i;
number += 1;
var name_perbaikan = data['res_perbaikan'][i]['name_perbaikan'];
var id_object = data['res_perbaikan'][i]['id_object'];
var name = data['res_perbaikan'][i]['name'];
......@@ -823,7 +794,7 @@
};
$("#tbody_perbaikan ").html(data_perbaikan)
datatatataI()
}
......@@ -832,7 +803,9 @@
});
$('.datatable-show-all').DataTable({
function datatatata() {
$('.datatable-show-all.list_perb').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
......@@ -869,6 +842,12 @@
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
}
});
}
$("#perbaikan_manage").click(function() {
datatatata()
})
function loaddetailid(id) {
$(".map_detail_p").html(``)
......@@ -985,9 +964,152 @@
function download_user_list(type, fn, dl) {
$.ajax({
url: "api/user-data",
dataType: 'json',
success: function(data) {
var thead = `<thead>
<tr>
<th>No.</th>
<th>Id user</th>
<th>Username</th>
<th>Nama</th>
<th>Email</th>
<th>Last Login</th>
<th>Status</th>
</tr>
</thead>`
var data_user = []
var number = 0;
for (var i = 0; i < data['data'].length; i++) {
number += 1;
var id = data['data'][i]['id'];
var name = data['data'][i]['name'];
var username = data['data'][i]['username'];
var group = data['data'][i]['group'];
var email = data['data'][i]['email'];
var last = data['data'][i]['last'];
var isactive = data['data'][i]['isactive'];
var data_gab = `<tr>
<td>` + number + `</td>
<td>` + id + `</td>
<td>` + username + `</td>
<td>` + name + `</td>
<td>` + email + `</td>
<td>` + last + `</td>
<td>` + isactive + `</td>
</tr>`;
data_user.push(data_gab)
}
var tbody = `<tbody>
` + data_user + `
</tbody>`;
$("#table_downloader").html(thead + tbody)
var elt = document.getElementById('table_downloader');
var wb = XLSX.utils.table_to_book(elt, {
sheet: "sheet1"
});
return dl ?
XLSX.write(wb, {
bookType: type,
bookSST: true,
type: 'base64'
}) :
XLSX.writeFile(wb, fn || ('data_user.' + (type || 'xlsx')));
}
})
}
function download_all(type, fn, dl) {
var elt = document.getElementById('list_perbaikan');
$.ajax({
url: "api/download_perbaikan_data",
dataType: 'json',
success: function(data) {
var thead = `<thead>
<tr>
<th>No.</th>
<th>Id perbaikan</th>
<th>Jenis yang diperbaiki</th>
<th>Nama</th>
<th>Tipe</th>
<th>Panjang (Jika perbaikan jalan)</th>
<th>Tanggal Pembuatan/Peresmian</th>
<th>Tanggal Perbaikan</th>
<th>Tanggal Selesai</th>
<th>Anggaran</th>
<th>Penanggung Jawab</th>
<th>Penanggung Jawab Lapangan</th>
<th>Kontraktor</th>
<th>Panjang yang diperbaiki</th>
<th>Lebar yang diperbaiki</th>
</tr>
</thead>`
var data_user = []
var number = 0;
for (var i = 0; i < data['data'].length; i++) {
number += 1;
var id = data['data'][i]['id'];
var jenis_perbaikan = data['data'][i]['jenis_perbaikan'];
var nama = data['data'][i]['nama'];
var tipe = data['data'][i]['tipe'];
var panjang = data['data'][i]['panjang'];
var tgl_pembuatan = data['data'][i]['tgl_pembuatan'];
var tgl_perbaikan = data['data'][i]['tgl_perbaikan'];
var tgl_selesai = data['data'][i]['tgl_selesai'];
var anggaran = data['data'][i]['anggaran'];
var pj = data['data'][i]['pj'];
var pj_lapangan = data['data'][i]['pj_lapangan'];
var kontraktor = data['data'][i]['kontraktor'];
var panjang_per = data['data'][i]['panjang_per'];
var lebar_per = data['data'][i]['lebar_per'];
var data_gab = `<tr>
<td>` + number + `</td>
<td>` + id + `</td>
<td>` + jenis_perbaikan + `</td>
<td>` + nama + `</td>
<td>` + tipe + `</td>
<td>` + panjang + `</td>
<td>` + tgl_pembuatan + `</td>
<td>` + tgl_perbaikan + `</td>
<td>` + tgl_selesai + `</td>
<td>` + anggaran + `</td>
<td>` + pj + `</td>
<td>` + pj_lapangan + `</td>
<td>` + kontraktor + `</td>
<td>` + panjang_per + `</td>
<td>` + lebar_per + `</td>
</tr>`;
data_user.push(data_gab)
}
var tbody = `<tbody>
` + data_user + `
</tbody>`;
$("#table_downloader").html(thead + tbody)
var elt = document.getElementById('table_downloader');
var wb = XLSX.utils.table_to_book(elt, {
sheet: "sheet1"
});
......@@ -999,6 +1121,10 @@
}) :
XLSX.writeFile(wb, fn || ('data_perbaikan.' + (type || 'xlsx')));
}
});
}
var $content, $modal, $apnData, $modalCon;
......@@ -1034,20 +1160,31 @@
});
$("#btn-hide-all").click(function() {
$("#button_keterangan").removeClass("active");
$("#manage_perbaikan").removeClass("active");
$("#panel-sm").removeClass("active");
$("#panel-sm2").removeClass("active");
$(this).removeClass("hid");
});
function btn_hid_all_close() {
$("#button_keterangan").removeClass("active");
$("#manage_perbaikan").removeClass("active");
$("#panel-sm").removeClass("active");
$("#panel-sm2").removeClass("active");
$(this).removeClass("hid");
};
$("#keterangan_button").click(function() {
$("#btn-hide-all").toggleClass("hid")
$("#btn-hide-all").css('display', 'block');
// $("#btn-hide-all").toggleClass("hid");
});
$("#perbaikan_manage").click(function() {
$("#btn-hide-all").toggleClass("hid")
$("#btn-hide-all").css('display', 'block');
// $("#btn-hide-all").toggleClass("hid");
});
function gas_all() {
......@@ -1104,4 +1241,8 @@
}
}
function destroymodper() {
$("#modal_detail_perbaikan").css("display", "none")
}
</script>
\ No newline at end of file
......@@ -136,11 +136,12 @@
<span class="caret"></span>
</button>
<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="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="point" /><a href="#"><i class="icon-location3 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</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-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-location4 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</a></li>
</ul>
</div>
<!-- </div> -->
<input type="text" id="input_search" class="form-control" placeholder="search...">
......@@ -279,7 +280,7 @@
padding: 14px 41px;
text-align: center;
text-decoration: none;
width: 100%;" id="pengaturan_btn" data-toggle="modal" data-target="#user_profile" data-backdrop="static" data-keyboard="false"><i class="icon-user"></i>&nbsp;&nbsp;PENGATURAN</a>
width: 100%;" id="pengaturan_btn" data-toggle="modal" data-target="#user_profile" data-backdrop="static" data-keyboard="false" onclick="load_manage()"><i class="icon-user"></i>&nbsp;&nbsp;Management</a>
</div>
</div>
</li>
......@@ -378,6 +379,7 @@
<script>
var dar = null;
$('#search_spes li a').on('click', function() {
$('#input_search').val(null)
tes = $(this).text();
dar = tes
});
......@@ -454,7 +456,7 @@
},
dataType: 'json',
success: function(data) {
console.log(data)
}
});
......@@ -504,6 +506,7 @@
layer.on({
click: function(e) {
$("#modal_detail_non_kelurahan").modal('show');
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
if (result.address.Address != '') {
......@@ -736,7 +739,6 @@
</div>
<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>
</div>
</div>
......@@ -875,6 +877,161 @@
</div>
</div>
</div>`;
// content = `
// <table class="table tasks-list">
// <thead style="text-align: center;">
// <tr>
// <th style="padding: 0 0 0 0px;">
// <img src=` + path_img + ` alt="Image" style="width: 100%;max-height: 368px;height:368">
// </th>
// </tr>
// </thead>
// <tbody>
// <div class= "container">
// <tr style="height: 100px;">
// <th>
// <div>
// <h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
// letter-spacing: 0;
// font-weight: 400;">
// <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 + `
</span>
</div>
<div>
<span>
` + alamat + feature.administrasi.f1 + `, ` + feature.administrasi.f2 + `, ` + feature.administrasi.f3 + `, ` + feature.administrasi.f4 + `
</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>
<span>Jenis Bangunan</span>
</div>
<div>
<span>
` + feature.administrasi.f12 + `
</span>
</div>
</div>
<div>
<div>
<span>Luas Bangunan</span>
</div>
<div>
<span style="font-family: 'Roboto';">` + feature.administrasi.f6 + ` m</span>
</div>
</div>
<div>
<div>
<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>
`)
content = `
<table class="table tasks-list">
<thead style="text-align: center;">
......@@ -1698,29 +1855,73 @@
layer.on({
click: function(e) {
$("#modal_detail_non_kelurahan").modal(show);
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
$("#modal_detail_non_kelurahan").modal('show');
// var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
if (feature.properties.f2 == null) {
var namajalan = "unnamed"
}
if (feature.properties.f6 == 'None') {
var path_img = "static/img/image_null.png"
} else {
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(`
<input type="text" name="idtuplah" id="idtuplah" class="hidden" value="">
$(".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_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'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
<input type="text" name="coordinatetuplah" id="coordinatetuplah" class="hidden" value="">
<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">
<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>
<span>Panjang Jalan</span>
</div>
<div>
<span>` + feature.legend.f3 + `m</span>
<span>` + feature.properties.f3 + `m</span>
</div>
</div>
<div>
......@@ -1731,8 +1932,7 @@
<span style="font-family: 'Roboto';">` + feature.properties.f4 + ` m</span>
</div>
</div>
</div>
<div class="col-md-6">
<div>
<div>
<span>Tipe Jalan</span>
......@@ -1741,7 +1941,16 @@
<span>` + feature.properties.f5 + `</span>
</div>
</div>
<div>
<div>
<span>Perbaikan Terakhir</span>
</div>
<div>
<span>` + perbaikan_jl + `</span>
</div>
</div>
`)
//if (result.address.Address != '') {
// var nmjalan = result.address.Address
......@@ -1786,8 +1995,8 @@
//}
//
$('#namajalan').val(feature.legend.f2);
});
$('#namajalan').val(feature.properties.f2);
// });
$('#idjalan').val(feature.properties.f1);
$('#panjangjalan').val(feature.properties.f3);
......@@ -1796,6 +2005,8 @@
$("#coordinatejalan").val(feature.geometry);
var ijal = $('#idjalan').val();
console.log(ijal)
}
});
......@@ -1898,6 +2109,8 @@
polygon_edit_jalan.remove()
}
var id_poly = $('#idjalan').val();
console.log(id_poly)
// var id_poly = idm
$.ajax({
url: "{% url 'api:edit-jalan' %}",
......@@ -1947,7 +2160,7 @@
})
});
//tes
$(document).on("click", "#btn_hapus_jalan", function() {
var id_poly = $('#idjalan').val();
......@@ -2047,4 +2260,7 @@
});
}
});
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').css("right", "50px")
</script>
\ No newline at end of file
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