Commit 6298bfae authored by Muhamad's avatar Muhamad

downloader user list, downloader point list

parent 19264452
......@@ -72,7 +72,5 @@ urlpatterns = [
path('user-data', views.user_data, name='user-data'),
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('search_lanjut', views.search_lanjut, name='search_lanjut'),
]
\ No newline at end of file
......@@ -2913,7 +2913,8 @@ def user_data(request):
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id AND
ag.id IN("""+ars+")"
ORDER BY
au.username ASC"""
else:
print('not staff')
userlist_.execute(sql)
......@@ -2959,7 +2960,51 @@ def user_data(request):
with conn.cursor() as po:
po.execute("select id, namobj, alamat, luas_bangunan, perangkat from geo_kantor_administrasi")
po.execute("""
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_kantor_administrasi
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_layanan_kesehatan
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_puskesmas
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_rumah_sakit
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_sarana_ibadah
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_sarana_pendidikan
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_spbu
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_stasiun
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_terminal_bus
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_cagar_budaya
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_gardu_listrik
""")
poi = po.fetchall()
point = []
......@@ -2980,7 +3025,6 @@ def user_data(request):
'point':point
}
return Response(respon)
return Response(respon)
@api_view(('GET',))
def search_spes(request):
......
......@@ -253,8 +253,510 @@ body>div.page-container>div>div.sidebar.sidebar-main>div>img {
} */
.tab-user.active {
border: 1pt solid #4C97DC;
color: #4C97DC;
border: 1pt solid #4C97DC!important;
color: #4C97DC!important;
}
#map {
width: auto;
height: 100%;
}
.filter>label:after {
content: "\e98e";
font-family: 'icomoon';
font-size: 12px;
display: inline-block;
position: absolute;
top: 50%;
left: 12px;
margin-top: -6px;
color: #999999;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#searchResult {
list-style: none;
padding: 0px;
width: 200px;
position: absolute;
margin: 0;
z-index: 9999;
}
#searchResult li {
background: white;
padding: 4px;
margin-bottom: 1px;
}
#searchResult li:nth-child(even) {
background: white;
}
#searchResult li:hover {
cursor: pointer;
}
#map>div.leaflet-control-container>div.leaflet-top.leaflet-left>div.leaflet-draw.leaflet-control>div>div {
display: none;
}
#map_detail_perbaikan>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
.modal-backdrop {
z-index: -999!important;
}
.geocoder-control {
margin: auto;
margin-left: 100px;
padding-left: 200px;
}
.feature-row {
cursor: pointer;
width: 250px;
}
.page_loader {
position: fixed;
background: url('../../static/img/loadingz.gif') 50% 50% no-repeat rgb(249, 249, 249);
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
opacity: .5;
}
.search_desa,
.search_kab {
outline: 0;
width: 100%;
height: 38px;
padding: 8px 0;
padding-right: 24px;
font-size: 13px;
line-height: 1.5384616;
color: #333333;
background-color: transparent;
border: 1px solid transparent;
border-width: 1px 0;
border-bottom-color: #ddd;
}
.table_input input {
outline: 0;
padding: 2px 0;
color: #333333;
background-color: transparent;
border: 1px solid transparent;
border-width: 1px 0;
border-bottom-color: #ddd;
}
/* width */
::-webkit-scrollbar {
width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #bfbfbf;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgb(138, 138, 138);
}
#input_perbaikan {
padding: 60px;
z-index: 1000;
}
.input_perbaikan {
left: 375px;
width: 1020px!important;
z-index: 1000;
}
#button_hide_panel {
line-height: 30px;
width: 10px;
font-size: 10pt;
font-family: tahoma;
margin-top: 0px;
/* margin-right: 3px; */
position: absolute;
/* top: 0; */
left: 370px;
z-index: 998;
display: none;
}
.navbar {
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
}
.navbar-brand {
font-size: 20px !important;
}
.navbar-brand>[class^="icon-"],
[class*=" icon-"] {
font-size: 24px !important;
}
.bg-none {
background-color: #ffffff00 !important;
/* border-color: #3F51B5; */
/* color: #fff; */
}
/* .navbar-inverse .navbar-brand {
font-size: 20px;
color: linear-gradient(258.09deg, #D77E7C -3.66%, #AE4F88 37.2%, #7B43BD 129.85%);
background: -webkit-linear-gradient(#2c9e6a,#2495cc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
} */
.gradient-text {
display: inline-block;
background-image: -webkit-gradient(linear, left top, right top, from(#2c9e6a), to(#2495cc));
background-image: linear-gradient(to right, #2c9e6a, #2495cc);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.fa-gradient {
background: -webkit-gradient(linear, left top, right top, from(#2c9e6a), to(#2495cc));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.navbar-inverse .navbar-nav>li>a {
color: #2799a4 !important;
}
.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus {
color: #2799a4 !important;
/* background-color: rgba(0, 0, 0, 0.1); */
background: linear-gradient(to right, #2c9e6a38, #2495cc2e);
}
#map {
height: 100vh;
width: 100%;
}
.content-wrapper {
display: block;
position: fixed;
top: 0;
}
.content {
padding: 0 !important;
}
.widget-pane {
width: 408px;
position: absolute;
top: 0;
z-index: 1002;
opacity: 1;
/* height: 0; */
left: -408px;
max-width: 100%;
float: right;
/* left: -5px; */
position: absolute;
z-index: 1000;
display: block;
background-color: rgba(255, 255, 255, 0.836);
opacity: 1;
height: 100vh;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: rgba(255, 255, 255, 0.801);
overflow: auto;
transition: all 1s ease;
}
.widget-pane-visible {
opacity: 1;
height: 100vh !important;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #fff;
}
.panel {
margin-bottom: 0 !important;
}
.widget-pane-toggle-button-container {
position: absolute;
z-index: 0;
top: calc(50% - 24px);
left: 100%;
display: none;
}
.content-footer {
background: #6f99c330;
border-radius: 10px 10px 0px 0px;
padding: 10px 20px 10px 20px;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
}
#button_hide {
padding: 5px 0px 5px 5px;
line-height: 15px;
text-align: center;
width: 48px;
font-size: 10pt;
height: 23px;
font-family: tahoma;
margin-top: 3px;
margin-right: 3px;
position: absolute;
top: calc(100% - 196px);
right: calc(95% / 2);
z-index: 99999999;
border-radius: 8px 8px 0 0;
border: 0;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #ffffff85;
}
#button_unhide {
padding: 5px 0px 5px 5px;
line-height: 15px;
text-align: center;
width: 48px;
font-size: 10pt;
height: 23px;
font-family: tahoma;
margin-right: 3px;
position: absolute;
top: calc(100% - 23px);
right: calc(95%/2);
z-index: 99999999;
border-radius: 8px 8px 0 0;
border: 0;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #ffffff85;
}
.move {
left: 330px !important;
transform: translate(-330px, 0);
}
.move-btn {
transform: rotate(180deg)
}
.fixed-plugin {
position: absolute;
z-index: 1000;
right: 10px;
background: #FFFFFF;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
border-radius: 10px;
margin-top: 5px;
width: 48px;
height: 48px;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
display: inline-block;
}
.fixed-plugin .dropdown-menu {
float: right;
position: absolute;
right: 0px;
width: 550px;
margin-left: -560px !important;
margin-top: -40px !important;
top: 10px;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
border-radius: 8px 8px 8px 8px;
}
li.fixed-plugin:hover {
transform: scale(1.3);
right: 10px;
}
li.fixed-plugin .dropdown-menu {
transform: scale(0.769230);
float: right;
position: absolute;
right: -550px;
width: 550px;
margin-left: -490px !important;
margin-top: -40px !important;
top: 10px;
margin-right: -550px;
}
li.fixed-plugin .fa:hover {
transform: rotate(360deg);
transition: all 0.3s linear;
}
/*.move-btn .caret {*/
/* transform: rotate(90deg)!important;*/
/* transition: all 0.3s linear;*/
/*}*/
.btn-login:hover {
transform: scale(1.3);
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div:nth-child(2)>div.row>div>div>div:nth-child(1) {
margin-bottom: 5px;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div:nth-child(2)>div.row>div>div>div:nth-child(2) {
margin-bottom: 10px;
font-family: 'gilroysemibold';
}
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(2)>div>div>div>div:nth-child(2) {
margin-bottom: 10px;
font-family: 'gilroysemibold';
}
li.active>a:after {
border-bottom: 2pt solid #60B2FD;
}
.apexcharts-menu-icon {
width: 150px;
color: white;
left: -16px;
}
.apexcharts-toolbar {
right: -50px!important;
top: 104%!important;
background-color: #5A9AFB;
border-top-left-radius: 10px;
width: 150px;
height: 45px;
border-bottom-right-radius: 10px;
}
.apexcharts-menu {
top: -98px!important;
right: 0px!important;
}
#map-insert>div.leaflet-control-container {
display: block;
}
#map-create-admin>div.leaflet-control-container {
display: block;
}
#map-create-admin>a.leaflet-draw-draw-polyline {
display: none!important;
}
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(1)>div>div>a.leaflet-draw-draw-polyline,
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2) {
display: none;
}
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-right {
display: none!important;
}
#map-insert>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2) {
display: none;
}
.leaflet-draw-draw-polygon,
.leaflet-draw-draw-rectangle,
.leaflet-draw-draw-circle,
.leaflet-draw-draw-circlemarker {
display: none!important;
}
.leaflet-draw-toolbar {
position: absolute;
}
.leaflet-draw-actions {
padding: 0px 0px 0px 40px;
list-style-type: none;
}
.leaflet-container ul li a {
color: #333333;
}
.modal-dialog {
margin-top: 48px;
}
.navbar-nav>.dropdown-user img {
max-height: 37px;
max-width: 37px;
margin-top: -4.5px;
border-radius: 50%;
}
.modal-header {
background-color: #1B1F2D !important;
border: #1B1F2D;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
#modal_adm>.modal-content {
border-radius: 10px;
}
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(1)>div.gambar_keterangan>img {
border-bottom-left-radius: 0px!important;
border-bottom-right-radius: 10px;
}
@media (max-width: 1025px) {
......
$("#upload_image").change(function() {
loaderPage(true)
readURL(this);
const fileupload1 = $(this).prop('files')[0];
var formData = new FormData();
formData.append("id", $("#iduseredt").val());
formData.append("inifile", fileupload1)
$.ajax({
url: "editpp",
data: formData,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.code == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}).then((isConfirm) => {
location.reload()
})
} else {
swal({
title: 'Error',
text: 'Hubungi Developer',
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
})
});
function getdetailper(id) {
$.ajax({
url: "apps/get-detail-perbaikan",
data: {
'id': id
},
dataType: 'json',
success: function(data) {
var map_detail_perbaikan = L.map('map_detail_perbaikan_dash', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.125826277307029, 104.1881561279297], 10);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 21,
minZoom: 4,
}).addTo(map_detail_perbaikan);
setTimeout(function() {
map_detail_perbaikan.invalidateSize();
}, 500);
if (data.length === 0) {
$(".nama_detail_dash").text("Null");
$(".type_detail_dash").html("Null");
$(".tanggal_perbaikan_detail_dash").html("Null")
$(".anggaran_detail_dash").html("Null")
$(".penanggung_jawab_detail_dash").html("Null")
$(".penanggung_jawab_lapangan_detail_dash").html("Null")
$(".kontraktor_detail_dash").html("Null")
$(".panjang_jalan_detail_dash").html("Null")
$(".lebar_jalan_detail_dash").html("Null")
$(".proposal_detail_dash").html(`
<a href="media/proposal/null" id="downloadproposal ">
<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/null" onclick="viewBukti() " id="view-bukti ">
<img src="{% static 'img/icon-1/bukti.svg' %} " alt=" " style="height: 70px;
width: 50px;">
</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'])
$(".anggaran_detail_dash").html(data[0]['anggaran'])
$(".penanggung_jawab_detail_dash").html(data[0]['pj'])
$(".penanggung_jawab_lapangan_detail_dash").html(data[0]['pj_lapangan'])
$(".kontraktor_detail_dash").html(data[0]['kontraktor'])
$(".panjang_jalan_detail_dash").html(data[0]['panjang'])
$(".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; ">
</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;
width: 50px;">
</a>`);
map_detail_perbaikan.setView([data[0]['geometry']['coordinates'][0][0][1], data[0]['geometry']['coordinates'][0][0][0]], 18)
var myLines = [data[0]['geometry']];
var geo_jalan_perbaikan = L.geoJson(data[0]['geometry'], {
style: function(feature) {
return {
color: "#FAFA00",
weight: 10,
opacity: 2,
zIndex: 1001
};
}
}).addTo(map_detail_perbaikan);
}
}
});
};
$("#pengaturan_btn").click(function() {
$.ajax({
url: "api/user-data",
dataType: 'json',
success: function(data) {
var data_user = []
var number = 1;
for (var i = 0; i < data['data'].length; i++) {
number += i;
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>` + email + `</td>
<td>` + last + `</td>
<td>` + isactive + `</td>
<td class="text-center ">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " style="background-color: #5A9AFB;color: white;border-radius: 5px;width: 85px;height: 25px; ">
<div style="margin-top: -5px; ">
<i class="icon-search4 text-muted text-size-base " style="color: white;font-size: 10px; "></i>
<span>&nbsp;&nbsp;
Detail</span>
</div>
</a>
</td>
</tr>`;
data_user.push(data_gab)
};
$("#tbody_list_user").html(data_user)
var data_point = []
var number2 = 0;
for (var i = 0; i < data['point'].length; i++) {
number2 += 1;
var id = data['point'][i]['id'];
var nama_tempat = data['point'][i]['nama_tempat'];
var alamat = data['point'][i]['alamat'];
var luas = data['point'][i]['luas'];
var pj = data['point'][i]['pj']
var data_gab = `<tr>
<td>` + number2 + `</td>
<td>` + nama_tempat + `</td>
<td>` + alamat + `</td>
<td>` + luas + `</td>
<td>` + pj + `</td>
<td class="text-center " style="padding: 0px;">
<div class="row">
<div class="col-md-3" style="padding: 0px;">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " >
<div>
<img src="static/img/icon-1/detailpoi.svg" alt="">
</div>
</a>
</div>
<div class="col-md-3" style="padding: 0px;">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " >
<div>
<img src="static/img/icon-1/editpoi.svg" alt="">
</div>
</a>
</div>
</div>
</td>
</tr>`;
data_point.push(data_gab)
};
$("#tbody_list_point").html(data_point)
$('.datatable-show-all.list_user').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [5],
}, {
orderable: false,
width: '20px',
targets: [6],
}, ],
dom: '<"float-left "B>frtip',
language: {
search: ' _INPUT_',
searchPlaceholder: 'Data User...',
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');
}
});
$('.datatable-show-all.list_point').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [4],
}, {
orderable: false,
width: '20px',
targets: [5],
}, ],
dom: '<"float-left "B>frtip',
language: {
search: ' _INPUT_',
searchPlaceholder: 'Data Tempat Penting...',
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');
}
});
}
});
})
function btnuserclick(evt) {
var i, tabcontent, tablinks;
tablinks = document.getElementsByClassName("tab-user");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
evt.currentTarget.className += " active";
}
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_point_list(type, fn, dl) {
$.ajax({
url: "api/user-data",
dataType: 'json',
success: function(data) {
var thead = `<thead>
<tr>
<th>No.</th>
<th>Nama Tempat</th>
<th>Alamat</th>
<th>Luas Bangunan</th>
<th>Penanggung Jawab</th>
</tr>
</thead>`
var data_point = []
var number2 = 0;
for (var i = 0; i < data['point'].length; i++) {
number2 += 1;
var id = data['point'][i]['id'];
var nama_tempat = data['point'][i]['nama_tempat'];
var alamat = data['point'][i]['alamat'];
var luas = data['point'][i]['luas'];
var pj = data['point'][i]['pj']
var data_gab = `<tr>
<td>` + number2 + `</td>
<td>` + nama_tempat + `</td>
<td>` + alamat + `</td>
<td>` + luas + `</td>
<td>` + pj + `</td>
</tr>`;
data_point.push(data_gab)
};
var tbody = `<tbody>
` + data_point + `
</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_point.' + (type || 'xlsx')));
}
})
}
\ No newline at end of file
......@@ -115,79 +115,6 @@ $("#manage_perbaikan").click(function() {
$("#perbaikan-dashboard").toggleClass("perbaikan-dashboard");
// var content_perbaikan = `
// <div id="panel-samping-child" class="sidebar-2" style="background: #1B1F2D;position: absolute;z-index: 9;width: 23%;height:100vh;left: -30%;transition: all 0.5s ease;">
// <div style="margin-left: 50px;background: #1B1F2D;">
// <div class="header" style="margin-top: 25px;background: #2F3445;">
// <h6 class="panel-title" style="color: #ffff;margin-left: 20px;font-size: 12pt;">Laporan Perbaikan<a class="heading-elements-toggle"><i class="icon-more"></i></a></h6>
// </div>
// <div class="bod" style="margin-top: 10px;margin-left:6px;">
// <div style="color: white;">
// <span>Filter:</span>
// </div>
// <div class="form-group" style="margin-top: 15px;width: 250px;">
// <select name="select" id="sel-kec" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
// <option value="opt1">Pilih Kecamatan</option>
// <option value="opt1">Pilih Kecamatan</option>
// <option value="opt1">Pilih Kecamatan</option>
// {% for nama_kecamatan in kec_res %}
// {% endfor %}
// </select>
// </div>
// <div class="form-group" style="margin-top: 15px;width: 250px;">
// <select name="select" id="sel-desa" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
// <option value="opt1">Pilih Desa</option>
// </select>
// </div>
// </div>
// </div>
// </div>
// <div class="panel panel-flat" id="perbaikan-dashboard" style="background: #181B27;position: absolute;z-index: 9;width: 77%;height:100vh;left: 23%;transition: all 0.5s ease;color: white; border: none;">
// <div class="panel-heading" style="background-color:#181B27;border-bottom: 0.5pt solid #313649;">
// <h6 class="panel-title">Table Data Perbaikan</h6>
// </div>
// <div class="panel-body">
// <table class="table table-responsive datatable-show-all table-sm" id="userList" style="word-wrap:break-word;">
// <thead>
// <tr>
// <th>No.</th>
// <th>Sarana Perbaiakn</th>
// <th>Nama</th>
// <th>Type</th>
// <th>Tanggal Mulai</th>
// <th>Tanggal Selesai</th>
// <th>Anggaran</th>
// <th>Keterangan</th>
// </tr>
// </thead>
// <tbody id="loop-perbaikan">
// {% for all in res_all %}
// <tr>
// <td>{{forloop.counter}}</td>
// <td>{{all.name_perbaikan}}</td>
// <td>{{all.name}}</td>
// <td>{{all.type}}</td>
// <td>{{all.tgl_perbaikan}}</td>
// <td>{{all.tgl_selesai}}</td>
// <td>{{all.anggaran}}</td>
// <td class="text-center">
// <a class="mdlFire" onclick="loadjlbyid('{{all.id_object}}')" data-toggle="modal" data-target="#modal_detail">Detail</a>
// </td>
// </tr>
// {% endfor %}
// </tbody>
// </table>
// </div>
// </div>`;
// $("#panel-samping").html(content_perbaikan)
})
......
......@@ -92,7 +92,6 @@
<script>
var kantor_administrasi = "{{ kantor_administrasi }}".replace(/&#x27;/g, '"');
console.log(kantor_administrasi)
var result_kan_adm = JSON.parse("" + kantor_administrasi + "")
......@@ -7165,7 +7164,7 @@
for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0];
var data_po = data['result'][i][1];
var data_kab = `<option value="` +data_id + `">` + data_po + `</option>`;
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
console.log(data_id)
console.log(data_po)
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
......
......@@ -342,47 +342,6 @@
</div>
</div>
<style>
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div:nth-child(2)>div.row>div>div>div:nth-child(1) {
margin-bottom: 5px;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div:nth-child(2)>div.row>div>div>div:nth-child(2) {
margin-bottom: 10px;
font-family: 'gilroysemibold';
}
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(2)>div>div>div>div:nth-child(2) {
margin-bottom: 10px;
font-family: 'gilroysemibold';
}
li.active>a:after {
border-bottom: 2pt solid #60B2FD;
}
.apexcharts-menu-icon {
width: 150px;
color: white;
left: -16px;
}
.apexcharts-toolbar {
right: -50px!important;
top: 104%!important;
background-color: #5A9AFB;
border-top-left-radius: 10px;
width: 150px;
height: 45px;
border-bottom-right-radius: 10px;
}
.apexcharts-menu {
top: -98px!important;
right: 0px!important;
}
</style>
<div class="modal fade" id="modal_detail_kelurahan" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" style="width: 820px;max-height: 500px;min-height: 500px;">
<div class="modal-content" style="border-radius:10px;max-height: 500px;min-height: 500px;">
......@@ -750,7 +709,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 " style="
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
......@@ -1027,7 +986,7 @@
<div class="tab-pane" id="monitoringdatauser">
<table class="table table-responsive datatable-show-all table-sm list_point" id="list_point" style="font-size : 8pt;padding:0px;border-top:0.5pt solid #EFEFEF;border-bottom:0.5pt solid #EFEFEF;margin-bottom: 10px;">
<div style="position: absolute;right: 30px;font-size: 10pt;">
<a class="btn side-bar-but" id="download_perbaikan" onclick="download_user_list('xlsx')" style="z-index:9;">
<a class="btn side-bar-but" id="download_perbaikan" onclick="download_point_list('xlsx')" style="z-index:9;">
<div>
<i class="icon-download4"></i><span>&nbsp;&nbsp;&nbsp;Download</span>
</div>
......@@ -1365,77 +1324,5 @@
</div>
<script>
function btnuserclick(evt) {
var i, tabcontent, tablinks;
tablinks = document.getElementsByClassName("tab-user");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
evt.currentTarget.className += " active";
//$(".tab-user").style.border = "#4C97DC";
}
// $('.datatable-show-all.list_user').DataTable({
// autoWidth: false,
// columnDefs: [{
// orderable: false,
// width: '20px',
// targets: [0],
//
// }, {
// orderable: false,
// width: '20px',
// targets: [5],
//
// }, {
// orderable: false,
// width: '20px',
// targets: [6],
//
// }, ],
// 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');
// }
// });
function download_user_list(type, fn, dl) {
var elt = document.getElementById('list_user');
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')));
}
</script>
<style>
.tab-user.active {
border: 1pt solid #4C97DC!important;
color: #4C97DC!important;
}
.tab-user.active {}
</style>
\ No newline at end of file
<table id="table_downloader" style="display: none;">
</table>
\ No newline at end of file
......@@ -48,12 +48,6 @@
</a>
</li>
<hr>
<li>
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 1px;">
<i class="icon-arrow-right13"></i>
</a>
</li>
</ul>
</div>
</div>
......@@ -429,6 +423,7 @@
</div>
</div>
</div>
<div class="panel panel-flat " id="perbaikan-dashboard " style="background: #181B27;position: absolute;z-index: 9;width: 77%;height:100vh;left: 23%;transition: all 0.5s ease;color: white; border: none; ">
<div class="panel-body " style="padding:14px 0px;">
......
......@@ -49,458 +49,6 @@
font-family: 'gilroyultralight';
src: url('/static/css/Gilroy-UltraLight.woff') format('woff');
}
#map {
width: auto;
height: 100%;
}
.filter>label:after {
content: "\e98e";
font-family: 'icomoon';
font-size: 12px;
display: inline-block;
position: absolute;
top: 50%;
left: 12px;
margin-top: -6px;
color: #999999;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#searchResult {
list-style: none;
padding: 0px;
width: 200px;
position: absolute;
margin: 0;
z-index: 9999;
}
#searchResult li {
background: white;
padding: 4px;
margin-bottom: 1px;
}
#searchResult li:nth-child(even) {
background: white;
}
#searchResult li:hover {
cursor: pointer;
}
#map>div.leaflet-control-container>div.leaflet-top.leaflet-left>div.leaflet-draw.leaflet-control>div>div {
display: none;
}
#map_detail_perbaikan>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
.modal-backdrop {
z-index: -999!important;
}
.geocoder-control {
margin: auto;
margin-left: 100px;
padding-left: 200px;
}
.feature-row {
cursor: pointer;
width: 250px;
}
.page_loader {
position: fixed;
background: url('../../static/img/loadingz.gif') 50% 50% no-repeat rgb(249, 249, 249);
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
opacity: .5;
}
.search_desa,
.search_kab {
outline: 0;
width: 100%;
height: 38px;
padding: 8px 0;
padding-right: 24px;
font-size: 13px;
line-height: 1.5384616;
color: #333333;
background-color: transparent;
border: 1px solid transparent;
border-width: 1px 0;
border-bottom-color: #ddd;
}
.table_input input {
outline: 0;
padding: 2px 0;
color: #333333;
background-color: transparent;
border: 1px solid transparent;
border-width: 1px 0;
border-bottom-color: #ddd;
}
/* width */
::-webkit-scrollbar {
width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #bfbfbf;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: rgb(138, 138, 138);
}
</style>
<style>
#input_perbaikan {
padding: 60px;
z-index: 1000;
}
.input_perbaikan {
left: 375px;
width: 1020px!important;
z-index: 1000;
}
#button_hide_panel {
line-height: 30px;
width: 10px;
font-size: 10pt;
font-family: tahoma;
margin-top: 0px;
/* margin-right: 3px; */
position: absolute;
/* top: 0; */
left: 370px;
z-index: 998;
display: none;
}
</style>
<style>
.navbar {
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
}
.navbar-brand {
font-size: 20px !important;
}
.navbar-brand>[class^="icon-"],
[class*=" icon-"] {
font-size: 24px !important;
}
.bg-none {
background-color: #ffffff00 !important;
/* border-color: #3F51B5; */
/* color: #fff; */
}
/* .navbar-inverse .navbar-brand {
font-size: 20px;
color: linear-gradient(258.09deg, #D77E7C -3.66%, #AE4F88 37.2%, #7B43BD 129.85%);
background: -webkit-linear-gradient(#2c9e6a,#2495cc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
} */
.gradient-text {
display: inline-block;
background-image: -webkit-gradient(linear, left top, right top, from(#2c9e6a), to(#2495cc));
background-image: linear-gradient(to right, #2c9e6a, #2495cc);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.fa-gradient {
background: -webkit-gradient(linear, left top, right top, from(#2c9e6a), to(#2495cc));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.navbar-inverse .navbar-nav>li>a {
color: #2799a4 !important;
}
.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus {
color: #2799a4 !important;
/* background-color: rgba(0, 0, 0, 0.1); */
background: linear-gradient(to right, #2c9e6a38, #2495cc2e);
}
#map {
height: 100vh;
width: 100%;
}
.content-wrapper {
display: block;
position: fixed;
top: 0;
}
.content {
padding: 0 !important;
}
.widget-pane {
width: 408px;
position: absolute;
top: 0;
z-index: 1002;
opacity: 1;
/* height: 0; */
left: -408px;
max-width: 100%;
float: right;
/* left: -5px; */
position: absolute;
z-index: 1000;
display: block;
background-color: rgba(255, 255, 255, 0.836);
opacity: 1;
height: 100vh;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: rgba(255, 255, 255, 0.801);
overflow: auto;
transition: all 1s ease;
}
.widget-pane-visible {
opacity: 1;
height: 100vh !important;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #fff;
}
.panel {
margin-bottom: 0 !important;
}
.widget-pane-toggle-button-container {
position: absolute;
z-index: 0;
top: calc(50% - 24px);
left: 100%;
display: none;
}
.content-footer {
background: #6f99c330;
border-radius: 10px 10px 0px 0px;
padding: 10px 20px 10px 20px;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
}
#button_hide {
padding: 5px 0px 5px 5px;
line-height: 15px;
text-align: center;
width: 48px;
font-size: 10pt;
height: 23px;
font-family: tahoma;
margin-top: 3px;
margin-right: 3px;
position: absolute;
top: calc(100% - 196px);
right: calc(95% / 2);
z-index: 99999999;
border-radius: 8px 8px 0 0;
border: 0;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #ffffff85;
}
#button_unhide {
padding: 5px 0px 5px 5px;
line-height: 15px;
text-align: center;
width: 48px;
font-size: 10pt;
height: 23px;
font-family: tahoma;
margin-right: 3px;
position: absolute;
top: calc(100% - 23px);
right: calc(95%/2);
z-index: 99999999;
border-radius: 8px 8px 0 0;
border: 0;
backdrop-filter: blur(8px);
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
background: #ffffff85;
}
.move {
left: 330px !important;
transform: translate(-330px, 0);
}
.move-btn {
transform: rotate(180deg)
}
.fixed-plugin {
position: absolute;
z-index: 1000;
right: 10px;
background: #FFFFFF;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
border-radius: 10px;
margin-top: 5px;
width: 48px;
height: 48px;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
display: inline-block;
}
.fixed-plugin .dropdown-menu {
float: right;
position: absolute;
right: 0px;
width: 550px;
margin-left: -560px !important;
margin-top: -40px !important;
top: 10px;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);
border-radius: 8px 8px 8px 8px;
}
li.fixed-plugin:hover {
transform: scale(1.3);
right: 10px;
}
li.fixed-plugin .dropdown-menu {
transform: scale(0.769230);
float: right;
position: absolute;
right: -550px;
width: 550px;
margin-left: -490px !important;
margin-top: -40px !important;
top: 10px;
margin-right: -550px;
}
li.fixed-plugin .fa:hover {
transform: rotate(360deg);
transition: all 0.3s linear;
}
/*.move-btn .caret {*/
/* transform: rotate(90deg)!important;*/
/* transition: all 0.3s linear;*/
/*}*/
.btn-login:hover {
transform: scale(1.3);
}
</style>
<style>
#map-insert>div.leaflet-control-container {
display: block;
}
#map-create-admin>div.leaflet-control-container {
display: block;
}
#map-create-admin>a.leaflet-draw-draw-polyline {
display: none!important;
}
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(1)>div>div>a.leaflet-draw-draw-polyline,
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2) {
display: none;
}
#map-create-admin>div.leaflet-control-container>div.leaflet-top.leaflet-right {
display: none!important;
}
#map-insert>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2) {
display: none;
}
.leaflet-draw-draw-polygon,
.leaflet-draw-draw-rectangle,
.leaflet-draw-draw-circle,
.leaflet-draw-draw-circlemarker {
display: none!important;
}
.leaflet-draw-toolbar {
position: absolute;
}
.leaflet-draw-actions {
padding: 0px 0px 0px 40px;
list-style-type: none;
}
.leaflet-container ul li a {
color: #333333;
}
.modal-dialog {
margin-top: 48px;
}
.navbar-nav>.dropdown-user img {
max-height: 37px;
max-width: 37px;
margin-top: -4.5px;
border-radius: 50%;
}
.modal-header {
background-color: #1B1F2D !important;
border: #1B1F2D;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
#modal_adm>.modal-content {
border-radius: 10px;
}
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(1)>div.gambar_keterangan>img {
border-bottom-left-radius: 0px!important;
border-bottom-right-radius: 10px;
}
</style>
{% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %}
......@@ -559,9 +107,7 @@
<!-- Page content -->
<div class="page-content" style="overflow: hidden;">
{% if user.is_authenticated %}
{% include 'includes/sidebar.html' %}
{% endif %}
{% if user.is_authenticated %} {% include 'includes/sidebar.html' %} {% endif %}
......@@ -590,9 +136,9 @@
<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-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>
</ul>
</div>
<!-- </div> -->
......@@ -714,7 +260,7 @@
padding: 8px 16px;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;" data-toggle="modal" data-target="#user_profile" data-backdrop="static" data-keyboard="false">Kelola Akun</a>
text-overflow: ellipsis;" id="pengaturan_btn" data-toggle="modal" data-target="#user_profile" data-backdrop="static" data-keyboard="false">Pengaturan</a>
</div>
</div>
......@@ -821,60 +367,17 @@
<script type="text/javascript" src="{% static 'js/maps.js' %}"></script>
<script src="{% static 'js/scripts.js' %}"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js" ></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
</body>
</html>
{% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %}
<script type="text/javascript" src="{% static 'js/action.js' %}"></script>
<script>
$("#upload_image").change(function() {
loaderPage(true)
readURL(this);
const fileupload1 = $(this).prop('files')[0];
var formData = new FormData();
formData.append("id", $("#iduseredt").val());
formData.append("inifile", fileupload1)
$.ajax({
url: "{% url 'editpp' %}",
data: formData,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.code == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}).then((isConfirm) => {
location.reload()
})
} else {
swal({
title: 'Error',
text: 'Hubungi Developer',
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
})
});
var dar = null;
$('#search_spes li a').on('click', function(){
$('#search_spes li a').on('click', function() {
tes = $(this).text();
dar = tes
});
......@@ -886,7 +389,10 @@
$.ajax({
url: "{% url 'api:search_spes' %}",
data: {"type":dar, 'inp':inp},
data: {
"type": dar,
'inp': inp
},
dataType: 'json',
success: function(data) {
......@@ -894,11 +400,10 @@
for (let i = 0; i < data.result.length; i++) {
var tt = null;
var mm = null;
if (dar == ' Point'){
if (dar == ' Point') {
tt = data.result[i][1];
mm = [data.result[i][0], data.result[i][2], data.result[i][3], data.result[i][4]];
}
else{
} else {
tt = data.result[i][1];
mm = [data.result[i][0], data.result[i][2]];
}
......@@ -911,7 +416,7 @@
}
$( "#input_search").autocomplete({
$("#input_search").autocomplete({
source: availableTags,
select: function(event, ui) {
var e = ui.item;
......@@ -934,7 +439,7 @@
geo = null;
db = null;
if (dar == ' Point'){
if (dar == ' Point') {
nama = res_in;
idm = res_id[0];
rem = res_id[1];
......@@ -942,7 +447,11 @@
db = res_id[3];
$.ajax({
url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm, 'db':db},
data: {
"type": dar,
'idx': idm,
'db': db
},
dataType: 'json',
success: function(data) {
......@@ -957,7 +466,10 @@
$.ajax({
url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm},
data: {
"type": dar,
'idx': idm
},
dataType: 'json',
success: function(data) {
var geocodeService = L.esri.Geocoding.geocodeService();
......@@ -1028,9 +540,9 @@
// <option value="gardu_listrik">Gardu Listrik</option>`
// }
var history
if (feature.administrasi.f11 == 'kantor_administrasi' || feature.administrasi.f11 == 'layanan_kesehatan' || feature.administrasi.f11 == 'puskesmas'
|| feature.administrasi.f11 == 'rumah_sakit' || feature.administrasi.f11 == 'sarana_pendidikan' || feature.administrasi.f11 == 'stasiun'
|| feature.administrasi.f11 == 'terminal_bus' || feature.administrasi.f11 == 'cagar_budaya' || feature.administrasi.f11 == 'gardu_listrik'){
if (feature.administrasi.f11 == 'kantor_administrasi' || feature.administrasi.f11 == 'layanan_kesehatan' || feature.administrasi.f11 == 'puskesmas' ||
feature.administrasi.f11 == 'rumah_sakit' || feature.administrasi.f11 == 'sarana_pendidikan' || feature.administrasi.f11 == 'stasiun' ||
feature.administrasi.f11 == 'terminal_bus' || feature.administrasi.f11 == 'cagar_budaya' || feature.administrasi.f11 == 'gardu_listrik') {
if (feature.properties.f4 != null) {
var list_history = feature.properties.f4
var list_history_panel = ``
......@@ -1097,7 +609,7 @@
</div>
</div>
<div class="col-md-4">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="`+feature.geometry+`">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="` + feature.geometry + `">
<table>
<tr style="margin-top: 10px">
<th>
......@@ -1105,28 +617,28 @@
</th>
<td>
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="`+feature.administrasi.f9+`"required>
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f9 + `"required>
</td>
</tr>
<tr>
<td>
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="` + feature.properties.f1 + `" disable>
<input style="display:none;" id="coordinateZoneeditbang" type="text" class="form-control" value=""required>
</td>
</tr>
<tr>
<th>Nama Bangunan</th>
<td>
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="`+feature.properties.f2+`">
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="` + feature.properties.f2 + `">
</td>
</tr>
<tr>
<th>Jenis Bangunan</th>
<td>
<input type="text" class="hidden" name="tipe1" id="tipe111" value="`+feature.administrasi.f11+`">
<input type="text" class="hidden" name="tipe1" id="tipe222" value="`+feature.administrasi.f12+`">
<input type="text" class="hidden" name="tipe1" id="tipe333" value="`+feature.administrasi.f13+`">
<input type="text" class="hidden" name="tipe1" id="tipe444" value="`+feature.administrasi.f14+`">
<input type="text" class="hidden" name="tipe1" id="tipe111" value="` + feature.administrasi.f11 + `">
<input type="text" class="hidden" name="tipe1" id="tipe222" value="` + feature.administrasi.f12 + `">
<input type="text" class="hidden" name="tipe1" id="tipe333" value="` + feature.administrasi.f13 + `">
<input type="text" class="hidden" name="tipe1" id="tipe444" value="` + feature.administrasi.f14 + `">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_b_e" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="bangunan">Bangunan Biasa</option>
......@@ -1160,31 +672,31 @@
<tr>
<th>Informasi Bangunan</th>
<td>
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="`+feature.properties.f3+`">
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="` + feature.properties.f3 + `">
</td>
</tr>
<tr>
<th>Kelurahan</th>
<td>
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="`+feature.administrasi.f1+`">
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="` + feature.administrasi.f1 + `">
</td>
</tr>
<tr>
<th>Kecamatan</th>
<td>
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="`+feature.administrasi.f2+`">
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="` + feature.administrasi.f2 + `">
</td>
</tr>
<tr>
<th>Kab/Kota</th>
<td>
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="`+feature.administrasi.f3+`">
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="` + feature.administrasi.f3 + `">
</td>
</tr>
<tr>
<th>Provinsi</th>
<td>
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="`+feature.administrasi.f4+`">
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="` + feature.administrasi.f4 + `">
</td>
</tr>
......@@ -1197,25 +709,25 @@
<tr>
<th>Luas Bangunan</th>
<td>
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value="`+feature.administrasi.f6+`">
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value="` + feature.administrasi.f6 + `">
</td>
</tr>
<tr>
<th>Luas Tanah</th>
<td>
<input type="text " name="luastanah " id="luastanah" class="form-control " value="`+feature.administrasi.f7+`">
<input type="text " name="luastanah " id="luastanah" class="form-control " value="` + feature.administrasi.f7 + `">
</td>
</tr>
<tr>
<th>Tinggi Bangunan</th>
<td>
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value="`+feature.administrasi.f8+`">
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value="` + feature.administrasi.f8 + `">
</td>
</tr>
<tr>
<th>Pemilik</th>
<td>
<input type="text " name="pemilik " id="pemilik" class="form-control " value="`+feature.administrasi.f10+`">
<input type="text " name="pemilik " id="pemilik" class="form-control " value="` + feature.administrasi.f10 + `">
</td>
</tr>
</table>
......@@ -1229,7 +741,7 @@
</div>
</div>
</div>`;
content_delete=`
content_delete = `
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
......@@ -1245,9 +757,9 @@
<div class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunanhps" value="">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="`+feature.properties.f2+`">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="`+feature.properties.f3+`">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="` + feature.properties.f1 + `" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="` + feature.properties.f2 + `">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="` + feature.properties.f3 + `">
</div>
</div>
</div>
......@@ -1444,7 +956,7 @@
</tr>
</div>
<div class="container">
`+history+`
` + history + `
</div>
</tbody>
</table>`;
......@@ -1529,9 +1041,9 @@
$.ajax({
url: "{% url 'api:search_lanjut' %}",
data: {
'type':dar,
'idx':idm,
'db':db
'type': dar,
'idx': idm,
'db': db
},
dataType: 'json',
success: function(data) {
......@@ -1599,7 +1111,7 @@
$(document).on("click", "#btn_edit_bangunan", function() {
var tipe1 = $('#tipe111').val();
$('#tipe_point_b_e option[value='+tipe1+']').attr('selected','selected');
$('#tipe_point_b_e option[value=' + tipe1 + ']').attr('selected', 'selected');
$("#tipe_point_b_e").change(function() {
$('#tipe_point_2_b_e').empty();
......@@ -1613,7 +1125,7 @@
},
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];
......@@ -1634,8 +1146,8 @@
var tipe2 = $('#tipe222').val();
if (tipe2 == 'null') {
$('#tipe_point_2_b_e').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>`);
} else{
$('#tipe_point_2_b_e').html(`<option value="`+tipe2+`" selected>`+tipe2+`</option>`);
} else {
$('#tipe_point_2_b_e').html(`<option value="` + tipe2 + `" selected>` + tipe2 + `</option>`);
}
$("#tipe_point_2_b_e").change(function() {
......@@ -1655,7 +1167,7 @@
for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0];
var data_po = data['result'][i][1];
var data_kab = `<option value="` +data_id + `">` + data_po + `</option>`;
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
......@@ -1668,8 +1180,8 @@
if (tipe3 == 'null') {
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>`);
} else{
$('#tipe_point_3_b_e').html(`<option value="`+tipe3+`" selected>`+tipe4+`</option>`);
} else {
$('#tipe_point_3_b_e').html(`<option value="` + tipe3 + `" selected>` + tipe4 + `</option>`);
}
var map_edit = new L.map('map-edit', {
......@@ -1741,7 +1253,7 @@
data.append('polygon', $('#coordinatebangunan').val())
var polyg = $("#coordinatebangunan").val();
console.log(polyg)
data.append('info_b', $('#infobangunan').val())
data.append('desa_b', $('#nmkelurahan').val())
......@@ -1757,9 +1269,6 @@
var remark = $('#tipe_point_2_b_e').val();
var poin_id = $('#tipe_point_3_b_e').val();
var napo = $("#tipe_point_3_b_e option:selected").text();
console.log(remark)
console.log(poin_id)
console.log(napo)
data.append('napo', $('#tipe_point_3_b_e option:selected').text())
data.append('luasbangunan_b', $('#luasbangunan').val())
......@@ -1941,7 +1450,6 @@
},
dataType: 'json',
success: function(data) {
console.log(data)
$("#nama_bang").val(data[0]);
$("#type_bang").val(data[4]);
$("#id_bang_perbaikan").val(data[3]);
......@@ -1950,7 +1458,7 @@
$("#kecamatan_bang").val(data[6]);
var latlngs = data[2];
console.log(data[2])
var lattitud, longitud;
map_bang.setView([data[2]['geometry']['coordinates'][0][0][0][1], data[2]['geometry']['coordinates'][0][0][0][0]], 19);
......@@ -1985,7 +1493,7 @@
var anggaran = $("#anggaran_bang").val();
var proposal = $("#proposal_bang").val();
var bukti_selesai = $("#buktiselesai_bang").val();
console.log(bukti_selesai)
var pj = $("#pihakpengesahan_bang").val();
var pj_lapangan = $("#pjlapangan_bang").val();
var kontraktor = $("#kontraktor_bang").val();
......@@ -2122,13 +1630,16 @@
}
});
} else if (dar == ' Jalan'){
} else if (dar == ' Jalan') {
nama = res_in;
idm = res_id[0];
geo = res_id[1];
$.ajax({
url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm},
data: {
"type": dar,
'idx': idm
},
dataType: 'json',
success: function(data) {
var geo_jalan = L.geoJson(null, {
......@@ -2334,8 +1845,8 @@
$.ajax({
url: "{% url 'api:search_lanjut' %}",
data: {
'type':dar,
'idx':idm,
'type': dar,
'idx': idm,
},
dataType: 'json',
success: function(data) {
......@@ -2536,274 +2047,4 @@
});
}
});
</script>
<script>
function getdetailper(id) {
$.ajax({
url: "{% url 'apps:get-detail-perbaikan' %}",
data: {
'id': id
},
dataType: 'json',
success: function(data) {
console.log(data)
var map_detail_perbaikan = L.map('map_detail_perbaikan_dash', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.125826277307029, 104.1881561279297], 10);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 21,
minZoom: 4,
}).addTo(map_detail_perbaikan);
setTimeout(function() {
map_detail_perbaikan.invalidateSize();
}, 500);
if (data.length === 0) {
$(".nama_detail_dash").text("Null");
$(".type_detail_dash").html("Null");
$(".tanggal_perbaikan_detail_dash").html("Null")
$(".anggaran_detail_dash").html("Null")
$(".penanggung_jawab_detail_dash").html("Null")
$(".penanggung_jawab_lapangan_detail_dash").html("Null")
$(".kontraktor_detail_dash").html("Null")
$(".panjang_jalan_detail_dash").html("Null")
$(".lebar_jalan_detail_dash").html("Null")
$(".proposal_detail_dash").html(`
<a href="media/proposal/null" id="downloadproposal ">
<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/null" onclick="viewBukti() " id="view-bukti ">
<img src="{% static 'img/icon-1/bukti.svg' %} " alt=" " style="height: 70px;
width: 50px;">
</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'])
$(".anggaran_detail_dash").html(data[0]['anggaran'])
$(".penanggung_jawab_detail_dash").html(data[0]['pj'])
$(".penanggung_jawab_lapangan_detail_dash").html(data[0]['pj_lapangan'])
$(".kontraktor_detail_dash").html(data[0]['kontraktor'])
$(".panjang_jalan_detail_dash").html(data[0]['panjang'])
$(".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; ">
</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;
width: 50px;">
</a>`);
map_detail_perbaikan.setView([data[0]['geometry']['coordinates'][0][0][1], data[0]['geometry']['coordinates'][0][0][0]], 18)
var myLines = [data[0]['geometry']];
var geo_jalan_perbaikan = L.geoJson(data[0]['geometry'], {
style: function(feature) {
return {
color: "#FAFA00",
weight: 10,
opacity: 2,
zIndex: 1001
};
}
}).addTo(map_detail_perbaikan);
}
}
});
};
$("#kelolaakun_btn").click(function() {
$.ajax({
url: "{% url 'api:user-data' %}",
dataType: 'json',
success: function(data) {
var data_user = []
var number = 1;
for (var i = 0; i < data['data'].length; i++) {
number += i;
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>` + email + `</td>
<td>` + last + `</td>
<td>` + isactive + `</td>
<td class="text-center ">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " style="background-color: #5A9AFB;color: white;border-radius: 5px;width: 85px;height: 25px; ">
<div style="margin-top: -5px; ">
<i class="icon-search4 text-muted text-size-base " style="color: white;font-size: 10px; "></i>
<span>&nbsp;&nbsp;
Detail</span>
</div>
</a>
</td>
</tr>`;
data_user.push(data_gab)
};
$("#tbody_list_user").html(data_user)
var data_point = []
var number2 = 0;
for (var i = 0; i < data['point'].length; i++) {
number2 += 1;
var id = data['point'][i]['id'];
var nama_tempat = data['point'][i]['nama_tempat'];
var alamat = data['point'][i]['alamat'];
var luas = data['point'][i]['luas'];
var pj = data['point'][i]['pj']
var data_gab = `<tr>
<td>` + number2 + `</td>
<td>` + nama_tempat + `</td>
<td>` + alamat + `</td>
<td>` + luas + `</td>
<td>` + pj + `</td>
<td class="text-center " style="padding: 0px;">
<div class="row">
<div class="col-md-3" style="padding: 0px;">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " >
<div>
<img src="static/img/icon-1/detailpoi.svg" alt="">
</div>
</a>
</div>
<div class="col-md-3" style="padding: 0px;">
<a class="btn mdlFire " data-toggle="modal " data-target="#modal_detail_perbaikan " >
<div>
<img src="static/img/icon-1/editpoi.svg" alt="">
</div>
</a>
</div>
</div>
</td>
</tr>`;
data_point.push(data_gab)
};
$("#tbody_list_point").html(data_point)
$('.datatable-show-all.list_user').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [5],
}, {
orderable: false,
width: '20px',
targets: [6],
}, ],
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');
}
});
$('.datatable-show-all.list_point').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [4],
}, {
orderable: false,
width: '20px',
targets: [5],
}, ],
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');
}
});
}
});
})
</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