Commit 79b2e193 authored by Manggar Mahardhika's avatar Manggar Mahardhika

Merge branch 'master' of http://git.khansia.co.id/Nahrowi/oku-gis

 Conflicts:
	templates/includes/sidebar.html
	templates/layout/layout.html
parents 7c1dd83d 6298bfae
...@@ -63,9 +63,14 @@ urlpatterns = [ ...@@ -63,9 +63,14 @@ urlpatterns = [
path('edit-jalan-valid', views.editjalanvalid, name='edit-jalan-valid'), path('edit-jalan-valid', views.editjalanvalid, name='edit-jalan-valid'),
path('3d-maps', views.maps3d, name='3d-maps'), path('3d-maps', views.maps3d, name='3d-maps'),
path('deletejalan', views.deletejalan, name='hapus-jalan'), 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('filt_perbaikan_kecamatan', views.filt_perbaikan_kecamatan),
path('filt_perbaikan_desa', views.filt_perbaikan_desa),
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'),
] ]
\ No newline at end of file
...@@ -2771,6 +2771,261 @@ def createpoint(request): ...@@ -2771,6 +2771,261 @@ def createpoint(request):
respon={'data':data, 'info': info, 'status':status} respon={'data':data, 'info': info, 'status':status}
return Response(respon) return Response(respon)
@api_view(('GET',))
def filt_perbaikan_kecamatan(request):
id_kec = request.GET.get('id_kec')
with conn.cursor() as kel:
kel.execute("""SELECT ID,
desa
FROM
geo_data_kelurahan gd
WHERE
kecamatan = ( SELECT kecamatan FROM geo_data_kecamatan WHERE ID = %s )
"""% int(id_kec))
res_kel = kel.fetchall()
with conn.cursor() as data_per:
data_per.execute("""
SELECT
gl.NAME,
tp.id_object,
tp.NAME,
tp.TYPE,
tp.tgl_perbaikan,
tp.anggaran,
tp.tgl_selesai
FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kecamatan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326))
WHERE
rn = 1 and gdk.ID = %s
LIMIT 10
"""% int(id_kec))
res_perbaikan = data_per.fetchall()
res_all = []
for j in res_perbaikan:
data_all = {
'name_perbaikan':j[0],
'id_object':j[1],
'name':j[2],
'type':j[3],
'tgl_perbaikan':j[4],
'anggaran':j[5],
'tgl_selesai':j[6],
}
res_all.append(data_all)
respon = {'res_kel':res_kel,'res_perbaikan':res_all}
return Response(respon)
@api_view(('GET',))
def filt_perbaikan_desa(request):
id_desa = request.GET.get('id_desa')
with conn.cursor() as data_per:
data_per.execute("""
SELECT
gl.NAME,
tp.id_object,
tp.NAME,
tp.TYPE,
tp.tgl_perbaikan,
tp.anggaran,
tp.tgl_selesai
FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kelurahan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326))
WHERE
rn = 1 and gdk.ID = %s
"""% int(id_desa))
res_perbaikan = data_per.fetchall()
res_all = []
for j in res_perbaikan:
data_all = {
'name_perbaikan':j[0],
'id_object':j[1],
'name':j[2],
'type':j[3],
'tgl_perbaikan':j[4],
'anggaran':j[5],
'tgl_selesai':j[6],
}
res_all.append(data_all)
respon = {'res_perbaikan':res_all}
return Response(respon)
@api_view(('GET',))
def user_data(request):
with conn.cursor() as userlist_:
if request.user.is_superuser:
# print("is superuser")
sql = """
SELECT
au.id,
au.username,
au.first_name,
au.last_name,
au.is_active,
au.last_login,
au.email,
ag.name,
au.is_staff,
au.is_superuser,
au.file_path
FROM
auth_user au,
auth_user_groups aug,
auth_group ag
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id
ORDER BY
au.username ASC"""
else:
if request.user.is_staff:
sql = """
SELECT
au.id,
au.username,
au.first_name,
au.last_name,
au.is_active,
au.last_login,
au.email,
ag.name,
au.is_staff,
au.is_superuser,
au.file_path
FROM
auth_user au,
auth_user_groups aug,
auth_group ag
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id AND
ORDER BY
au.username ASC"""
else:
print('not staff')
userlist_.execute(sql)
allUser = userlist_.fetchall()
user_res = []
for rows in allUser:
datas = {
"id": rows[0],
"username": rows[1],
"name": rows[2] +" "+ rows[3],
"email": rows[6],
"isactive": rows[4],
"last": rows[5],
"group": rows[7],
"filepath": rows[10]
}
user_res.append(datas)
current_user = request.user
thisUser = current_user.id
# print()
sql = "select * from auth_user where id = "+str(thisUser)
with conn.cursor() as userprop:
userprop.execute(sql)
us = userprop.fetchall()
user_data = []
for row in us:
datas = {
"id": row[0],
"username": row[4],
"firstname": row[5],
"lastname": row[6],
"email" : row[7],
"filepath": row[11],
# "password": row[1]
}
user_data.append(datas)
with conn.cursor() as po:
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 = []
for p in poi:
datap = {
"id":p[0],
"nama_tempat":p[1],
"alamat":p[2],
"luas":p[3],
"pj":p[4]
}
point.append(datap)
respon = {
'data' : user_res,
'thisUser' : user_data,
'point':point
}
return Response(respon)
@api_view(('GET',)) @api_view(('GET',))
def search_spes(request): def search_spes(request):
tipe = request.GET.get('type') tipe = request.GET.get('type')
......
...@@ -63,7 +63,16 @@ class Dashboard(generic.TemplateView): ...@@ -63,7 +63,16 @@ class Dashboard(generic.TemplateView):
b.kabupaten, b.kabupaten,
c.kecamatan, c.kecamatan,
d.desa, d.desa,
a.id a.id,
(
SELECT ARRAY_AGG
( '' || ID || ',' || tgl_perbaikan || ',' || jenis_perbaikan || '' ORDER BY tgl_perbaikan DESC )
FROM
tbl_perbaikan
WHERE
id_object = A.ID
AND type_id = 1
)
), ),
'geometry', 'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json ST_AsGeoJSON ( A.geom :: geometry ) :: json
...@@ -78,6 +87,8 @@ class Dashboard(generic.TemplateView): ...@@ -78,6 +87,8 @@ class Dashboard(generic.TemplateView):
kantor_administrasi_result = [] kantor_administrasi_result = []
for i in kantor_administrasi_res: for i in kantor_administrasi_res:
if i[0]['administrasi']['f16'] == None:
i[0]['administrasi']['f16'] = "None"
kantor_administrasi_result.append(i[0]) kantor_administrasi_result.append(i[0])
with conn.cursor() as layanan_kesehatan: with conn.cursor() as layanan_kesehatan:
...@@ -518,7 +529,74 @@ class Dashboard(generic.TemplateView): ...@@ -518,7 +529,74 @@ class Dashboard(generic.TemplateView):
} }
user_data.append(datas) user_data.append(datas)
with conn.cursor() as userlist_:
if request.user.is_superuser:
# print("is superuser")
sql = """
SELECT
au.id,
au.username,
au.first_name,
au.last_name,
au.is_active,
au.last_login,
au.email,
ag.name,
au.is_staff,
au.is_superuser,
au.file_path
FROM
auth_user au,
auth_user_groups aug,
auth_group ag
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id
ORDER BY
au.username ASC"""
else:
if request.user.is_staff:
sql = """
SELECT
au.id,
au.username,
au.first_name,
au.last_name,
au.is_active,
au.last_login,
au.email,
ag.name,
au.is_staff,
au.is_superuser,
au.file_path
FROM
auth_user au,
auth_user_groups aug,
auth_group ag
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id AND
ORDER BY
au.username ASC"""
else:
print('not staff')
userlist_.execute(sql)
allUser = userlist_.fetchall()
user_res = []
for rows in allUser:
datas = {
"id": rows[0],
"username": rows[1],
"name": rows[2] +" "+ rows[3],
"email": rows[6],
"isactive": rows[4],
"last": rows[5],
"group": rows[7],
"filepath": rows[10]
}
user_res.append(datas)
context = { context = {
'title':'Dashboard', 'title':'Dashboard',
...@@ -537,7 +615,8 @@ class Dashboard(generic.TemplateView): ...@@ -537,7 +615,8 @@ class Dashboard(generic.TemplateView):
'gardu_listrik':gardu_listrik_result, 'gardu_listrik':gardu_listrik_result,
'global':all[0], 'global':all[0],
'res_all':res_all, 'res_all':res_all,
'thisUser' : user_data 'thisUser' : user_data,
'user_res':user_res
} }
return render (request, self.template_name, context) return render (request, self.template_name, context)
......
...@@ -85,10 +85,10 @@ DATABASES = { ...@@ -85,10 +85,10 @@ DATABASES = {
'NAME': 'oku_gis_new', 'NAME': 'oku_gis_new',
'USER': 'postgres', 'USER': 'postgres',
'PASSWORD' : 'khansia215758', 'PASSWORD' : 'khansia215758',
# 'HOST': '30.10.20.102', 'HOST': '30.10.20.102',
# 'PORT': '5432', 'PORT': '5432',
'HOST': '103.126.28.66', # 'HOST': '103.126.28.66',
'PORT': '8082', # 'PORT': '8082',
} }
} }
......
...@@ -234,6 +234,531 @@ body>div.page-container>div>div.sidebar.sidebar-main>div>img { ...@@ -234,6 +234,531 @@ body>div.page-container>div>div.sidebar.sidebar-main>div>img {
font-family: 'gilroylight'; font-family: 'gilroylight';
} }
#map-edit>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
#map-for-edit>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
#map-for-delete>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
/* #user_profile>div>div>div>div>div.col-md-3>div>div.text-left>div>.active {
border: 1pt solid #4C97DC;
color: #4C97DC;
} */
.tab-user.active {
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) { @media (max-width: 1025px) {
.dock { .dock {
position: absolute; position: absolute;
......
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="8" cy="8" r="8" fill="#D5A266"/>
<path d="M7.53125 10.8125C9.34343 10.8125 10.8125 9.34343 10.8125 7.53125C10.8125 5.71907 9.34343 4.25 7.53125 4.25C5.71907 4.25 4.25 5.71907 4.25 7.53125C4.25 9.34343 5.71907 10.8125 7.53125 10.8125Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.85107 9.85156L11.7495 11.75" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="8" cy="8" r="8" fill="url(#paint0_linear)"/>
<path d="M6.75 11.4375H4.875C4.79212 11.4375 4.71263 11.4045 4.65403 11.3459C4.59542 11.2873 4.5625 11.2078 4.5625 11.125V9.3794C4.5625 9.33836 4.57058 9.29772 4.58629 9.25981C4.60199 9.22189 4.62501 9.18744 4.65403 9.15842L9.34153 4.47092C9.40014 4.41232 9.47962 4.37939 9.5625 4.37939C9.64538 4.37939 9.72487 4.41232 9.78347 4.47092L11.529 6.21648C11.5876 6.27509 11.6206 6.35457 11.6206 6.43745C11.6206 6.52033 11.5876 6.59982 11.529 6.65842L6.75 11.4375Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.3125 5.5L10.5 7.6875" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.4375 11.4375H6.75" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear" x1="8" y1="-15" x2="28.9097" y2="18.3913" gradientUnits="userSpaceOnUse">
<stop stop-color="#4C97DC"/>
<stop offset="1" stop-color="#4969DA"/>
</linearGradient>
</defs>
</svg>
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.0755 25.1478C19.9057 25.1478 24.6319 20.4215 24.6319 14.5914C24.6319 8.7612 19.9057 4.03491 14.0755 4.03491C8.24533 4.03491 3.51904 8.7612 3.51904 14.5914C3.51904 20.4215 8.24533 25.1478 14.0755 25.1478Z" stroke="url(#paint0_linear)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M14.0755 25.1478C19.9057 25.1478 24.6319 20.4215 24.6319 14.5914C24.6319 8.7612 19.9057 4.03491 14.0755 4.03491C8.24533 4.03491 3.51904 8.7612 3.51904 14.5914C3.51904 20.4215 8.24533 25.1478 14.0755 25.1478Z" stroke="#343539" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14.0753 18.1103C16.5045 18.1103 18.4738 16.141 18.4738 13.7118C18.4738 11.2825 16.5045 9.31323 14.0753 9.31323C11.646 9.31323 9.67676 11.2825 9.67676 13.7118C9.67676 16.141 11.646 18.1103 14.0753 18.1103Z" stroke="url(#paint1_linear)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M14.0753 18.1103C16.5045 18.1103 18.4738 16.141 18.4738 13.7118C18.4738 11.2825 16.5045 9.31323 14.0753 9.31323C11.646 9.31323 9.67676 11.2825 9.67676 13.7118C9.67676 16.141 11.646 18.1103 14.0753 18.1103Z" stroke="#343539" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.01562 22.4399C7.67827 21.1371 8.68852 20.043 9.93452 19.2789C11.1805 18.5147 12.6137 18.1102 14.0753 18.1102C15.537 18.1102 16.9702 18.5147 18.2162 19.2789C19.4622 20.043 20.4724 21.1371 21.1351 22.4399" stroke="url(#paint2_linear)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M7.01562 22.4398C7.67827 21.137 8.68852 20.0429 9.93452 19.2787C11.1805 18.5146 12.6137 18.1101 14.0753 18.1101C15.537 18.1101 16.9702 18.5146 18.2162 19.2787C19.4622 20.0429 20.4724 21.1369 21.1351 22.4398" stroke="#343539" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear" x1="14.0755" y1="-15.7584" x2="41.667" y2="28.3032" gradientUnits="userSpaceOnUse">
<stop stop-color="#4C97DC"/>
<stop offset="1" stop-color="#4969DA"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="14.0753" y1="1.066" x2="25.5717" y2="19.425" gradientUnits="userSpaceOnUse">
<stop stop-color="#4C97DC"/>
<stop offset="1" stop-color="#4969DA"/>
</linearGradient>
<linearGradient id="paint2_linear" x1="14.0753" y1="14.0511" x2="16.4049" y2="26.1829" gradientUnits="userSpaceOnUse">
<stop stop-color="#4C97DC"/>
<stop offset="1" stop-color="#4969DA"/>
</linearGradient>
</defs>
</svg> </svg>
$("#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() { ...@@ -115,79 +115,6 @@ $("#manage_perbaikan").click(function() {
$("#perbaikan-dashboard").toggleClass("perbaikan-dashboard"); $("#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)
}) })
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
//suk //suk
var kantor_administrasi = "{{ kantor_administrasi }}".replace(/&#x27;/g, '"'); var kantor_administrasi = "{{ kantor_administrasi }}".replace(/&#x27;/g, '"');
var result_kan_adm = JSON.parse("" + kantor_administrasi + "") var result_kan_adm = JSON.parse("" + kantor_administrasi + "")
console.log(result_kan_adm)
geo_po_adm = L.geoJson(null, { geo_po_adm = L.geoJson(null, {
pointToLayer: function(feature, latlng) { pointToLayer: function(feature, latlng) {
...@@ -362,6 +362,30 @@ ...@@ -362,6 +362,30 @@
`) `)
if (feature.administrasi.f16 != "None") {
var list_history = feature.administrasi.f16
console.log(list_history[0].split(",")[0])
var perbaikan_pt = `<div class='row'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
<a class="col-md-4" onclick="getdetailper(` + list_history[0].split(",")[0] + `)" data-toggle="modal" data-target="#modal_detail_perbaikan_dash"><i>Detail</i></a>
</div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
} else {
var perbaikan_pt = `<div class='row'>
<div class="col-md-6">
<label class="col-md-6">Null</label>
</div>
</div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
`
}
$(".isi_keterangan").html(`<input type="text" name="idjalan" id="idjalan" class="hidden" value=""> $(".isi_keterangan").html(`<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value=""> <input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div> <div>
...@@ -390,7 +414,18 @@ ...@@ -390,7 +414,18 @@
<div> <div>
<span>` + raja + `</span> <span>` + raja + `</span>
</div> </div>
</div>`); </div>
<div>
<div>
<span>Perbaikan Terakhir</span>
</div>
<div>
<span>` + perbaikan_pt + `</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;"> $(".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_adm" data-toggle="modal" data-target="#modal_adm" data-backdrop="static" data-keyboard="false" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;" title="Edit"><i class="icon-pencil5"></i></a> <a href="#" id="btn_edit_adm" data-toggle="modal" data-target="#modal_adm" data-backdrop="static" data-keyboard="false" class="btn" style="border-bottom-left-radius: 8px;border-top-right-radius: 8px;width: 100%;height: 100%;bottom: 0px;color: white;" title="Edit"><i class="icon-pencil5"></i></a>
...@@ -6714,7 +6749,7 @@ ...@@ -6714,7 +6749,7 @@
</table> </table>
</div> </div>
<div class="form-group" style="margin-bottom:10px;"> <div class="form-group" style="margin-bottom:10px;">
<div id="map-delete" style="width: 300px;height: 250px;position: relative;margin-left: 10px;margin-right: 10px;margin-top: 10px;"></div> <!-- <div id="map-delete" style="width: 300px;height: 250px;position: relative;margin-left: 10px;margin-right: 10px;margin-top: 10px;"></div> -->
<div class="form-group"> <div class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;"> <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" class="hidden" name="coordinatebangunan" id="coordinatebangunanhps" value="">
...@@ -6838,7 +6873,28 @@ ...@@ -6838,7 +6873,28 @@
</div>`; </div>`;
if (feature.properties.f4 != null) {
var list_history = feature.properties.f4
console.log(list_history[0].split(",")[0])
var perbaikan_bg = `<div class='row'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
<a class="col-md-4" onclick="getdetailper(` + list_history[0].split(",")[0] + `)" data-toggle="modal" data-target="#input_perbaikan_bang"><i>Detail</i></a>
</div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
} else {
var perbaikan_bg = `<div class='row'>
<div class="col-md-6">
<label class="col-md-6">Null</label>
</div>
</div>
<a class="btn" id="btn_perbaikan_hist" data-toggle="modal" data-target="#input_perbaikan_bang"><i>Input Perbaikan</i></a>
`
}
$(".gambar_keterangan").html(`<img src="` + path_img + `" alt="" style="width:100%;height:240px;border-top-left-radius: 10px;border-bottom-left-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;">`)
...@@ -6857,6 +6913,7 @@ ...@@ -6857,6 +6913,7 @@
$(".isi_keterangan").html(`<input type="text" name="idjalan" id="idjalan" class="hidden" value=""> $(".isi_keterangan").html(`<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value=""> <input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div class="col-md-6">
<div> <div>
<div> <div>
<span>Jenis Bangunan</span> <span>Jenis Bangunan</span>
...@@ -6883,7 +6940,8 @@ ...@@ -6883,7 +6940,8 @@
<span style="font-family: 'Roboto';">` + feature.administrasi.f7 + ` m</span> <span style="font-family: 'Roboto';">` + feature.administrasi.f7 + ` m</span>
</div> </div>
</div> </div>
</div>
<div class="col-md-6">
<div> <div>
<div> <div>
<span>Tinggi Bangunan</span> <span>Tinggi Bangunan</span>
...@@ -6900,13 +6958,25 @@ ...@@ -6900,13 +6958,25 @@
<div> <div>
<span style="font-family: 'Roboto';">` + feature.administrasi.f10 + ` m</span> <span style="font-family: 'Roboto';">` + feature.administrasi.f10 + ` m</span>
</div> </div>
</div>`); </div>
</div>
<div>
<div style="margin-top: 150px;">
<span>Perbaikan Terakhir</span>
</div>
<div>
<span>` + perbaikan_bg + `</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;"> $(".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> <a href="#" id="btn_edit_bangunan" data-toggle="modal" data-target="#modal_bangunan_edit" 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>
<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;"> <div class="tombol-delete-keterangan text-center" data-toggle="modal" data-target="#modal_bangunan_delete" 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> <a href="#" id="btn_delete_bangunan" data-toggle="modal" data-target="#modal_bangunan_delete" 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> </div>
`) `)
...@@ -7093,7 +7163,7 @@ ...@@ -7093,7 +7163,7 @@
for (var i = 0; i < data['result'].length; i++) { for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0]; var data_id = data['result'][i][0];
var data_po = data['result'][i][1]; 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_id)
console.log(data_po) console.log(data_po)
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`; var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
......
...@@ -2056,10 +2056,10 @@ ...@@ -2056,10 +2056,10 @@
</div> </div>
`) `)
if (feature.properties.f7 != null) { if (feature.properties.f16 != null) {
var list_history = feature.properties.f7 var list_history = feature.properties.f16
console.log(list_history[0].split(",")[0]) console.log(list_history[0].split(",")[0])
var perbaikan_jl = `<div class='row'> var perbaikan_pt = `<div class='row'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label> <label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
...@@ -2070,16 +2070,14 @@ ...@@ -2070,16 +2070,14 @@
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>` <a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
} else { } else {
var perbaikan_jl = `<div class='row'> var perbaikan_pt = `<div class='row'>
<div class="col-md-6"> <div class="col-md-6">
<label class="col-md-6">Null</label> <label class="col-md-6">Null</label>
</div> </div>
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
</div>
</div>` <a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
`
} }
$(".nama_keterangan").html(` $(".nama_keterangan").html(`
<div> <div>
...@@ -2855,103 +2853,6 @@ ...@@ -2855,103 +2853,6 @@
}); });
}; };
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);
}
}
});
};
var geo_jalan_input = L.geoJson(null, { var geo_jalan_input = L.geoJson(null, {
style: function(feature) { style: function(feature) {
return { return {
...@@ -3104,108 +3005,108 @@ ...@@ -3104,108 +3005,108 @@
}) })
}); });
$('.datatable-show-all').DataTable({ // $('.datatable-show-all').DataTable({
autoWidth: false, // autoWidth: false,
columnDefs: [{ // columnDefs: [{
orderable: false, // orderable: false,
width: '20px', // width: '20px',
targets: [0], // targets: [0],
//
}, // },
// { // // {
// width: '100px', // // width: '100px',
// targets: [ 4 ] // // targets: [ 4 ]
// }, // // },
{ // {
orderable: false, // orderable: false,
width: '20px', // width: '20px',
targets: [6], // targets: [6],
//
}, { // }, {
orderable: false, // orderable: false,
width: '20px', // width: '20px',
targets: [7], // targets: [7],
//
}, // },
], // ],
dom: '<"float-left"B>frtip', // dom: '<"float-left"B>frtip',
buttons: [{ // buttons: [{
text: 'Tambah User', // text: 'Tambah User',
action: function(e, dt, node, config) { // action: function(e, dt, node, config) {
$("#modalAddButton").click() // $("#modalAddButton").click()
$("#inUsername").attr("disabled", false); // $("#inUsername").attr("disabled", false);
$("#inUsername").val(null); // $("#inUsername").val(null);
$("#inNameF").val(null); // $("#inNameF").val(null);
$("#inNameL").val(null); // $("#inNameL").val(null);
$("#inEmail").val(null); // $("#inEmail").val(null);
$("#iduser").val(null); // $("#iduser").val(null);
$(".modstit").html("Tambah User") // $(".modstit").html("Tambah User")
loadGroups(null) // loadGroups(null)
} // }
}], // }],
language: { // language: {
search: '<span>Filter:</span> _INPUT_', // search: '<span>Filter:</span> _INPUT_',
searchPlaceholder: 'Type to filter...', // searchPlaceholder: 'Type to filter...',
lengthMenu: '<span>Show:</span> _MENU_', // lengthMenu: '<span>Show:</span> _MENU_',
paginate: { // paginate: {
'first': 'First', // 'first': 'First',
'last': 'Last', // 'last': 'Last',
'next': '&rarr;', // 'next': '&rarr;',
'previous': '&larr;' // 'previous': '&larr;'
} // }
}, // },
drawCallback: function() { // drawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup'); // $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup');
}, // },
preDrawCallback: function() { // preDrawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup'); // $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
} // }
//
}); // });
//
//
$('.datatable-groups').DataTable({ // $('.datatable-groups').DataTable({
autoWidth: false, // autoWidth: false,
columnDefs: [{ // columnDefs: [{
orderable: false, // orderable: false,
width: '100px', // width: '100px',
targets: [2] // targets: [2]
}, { // }, {
orderable: false, // orderable: false,
width: '100px', // width: '100px',
targets: [0] // targets: [0]
}], // }],
dom: '<"float-left"B>frtip', // dom: '<"float-left"B>frtip',
buttons: [{ // buttons: [{
text: 'Tambah Group', // text: 'Tambah Group',
action: function(e, dt, node, config) { // action: function(e, dt, node, config) {
$("#modalAddButtong").click(); // $("#modalAddButtong").click();
$("#idgroup").val(null); // $("#idgroup").val(null);
$(".modstitg").html("Tambah Group") // $(".modstitg").html("Tambah Group")
$("#inGroupName").val(null) // $("#inGroupName").val(null)
$("#container_sparent").css("display", "block") // $("#container_sparent").css("display", "block")
loadGroups(null) // loadGroups(null)
} // }
}], // }],
language: { // language: {
search: '<span>Filter:</span> _INPUT_', // search: '<span>Filter:</span> _INPUT_',
searchPlaceholder: 'Type to filter...', // searchPlaceholder: 'Type to filter...',
lengthMenu: '<span>Show:</span> _MENU_', // lengthMenu: '<span>Show:</span> _MENU_',
paginate: { // paginate: {
'first': 'First', // 'first': 'First',
'last': 'Last', // 'last': 'Last',
'next': '&rarr;', // 'next': '&rarr;',
'previous': '&larr;' // 'previous': '&larr;'
} // }
}, // },
drawCallback: function() { // drawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup'); // $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup');
}, // },
preDrawCallback: function() { // preDrawCallback: function() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup'); // $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
} // }
//
}); // });
$("#modalAddButton").click(function() { $("#modalAddButton").click(function() {
$("body").css("padding-right", "0px !important") $("body").css("padding-right", "0px !important")
......
...@@ -342,47 +342,6 @@ ...@@ -342,47 +342,6 @@
</div> </div>
</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 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-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;"> <div class="modal-content" style="border-radius:10px;max-height: 500px;min-height: 500px;">
...@@ -750,12 +709,11 @@ ...@@ -750,12 +709,11 @@
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<a href="#personalinformation" data-toggle="tab" class="btn btn-default" style=" <a href="#personalinformation" data-toggle="tab" class="tab-user btn btn-default " style="
width: 90%; width: 90%;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #4A7ADB;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px;"> border-radius: 5px;" onclick="btnuserclick(event)">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<img src="{% static 'img/icon-1/personalinfo.svg' %}" alt=""> <img src="{% static 'img/icon-1/personalinfo.svg' %}" alt="">
...@@ -774,12 +732,11 @@ ...@@ -774,12 +732,11 @@
{% if user.is_superuser %} {% if user.is_superuser %}
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<a href="#informationdatauser" data-toggle="tab" class="btn btn-default" style=" <a href="#informationdatauser" data-toggle="tab" class="tab-user btn btn-default" style="
width: 90%; width: 90%;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #4A7ADB;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px;"> border-radius: 5px;" onclick="btnuserclick(event)">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<img src="{% static 'img/icon-1/infodatauser.svg' %}" alt=""> <img src="{% static 'img/icon-1/infodatauser.svg' %}" alt="">
...@@ -797,12 +754,11 @@ ...@@ -797,12 +754,11 @@
</div> </div>
{% endif %} {% endif %}
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<a href="#monitoringdatauser" data-toggle="tab" class="btn btn-default" style=" <a href="#monitoringdatauser" data-toggle="tab" class="tab-user btn btn-default" style="
width: 90%; width: 90%;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #4A7ADB;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px;"> border-radius: 5px;" onclick="btnuserclick(event)">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<img src="{% static 'img/icon-1/monitordatauser.svg' %}" alt=""> <img src="{% static 'img/icon-1/monitordatauser.svg' %}" alt="">
...@@ -819,12 +775,11 @@ ...@@ -819,12 +775,11 @@
</a> </a>
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<a href="#help" data-toggle="tab" class="btn btn-default" style=" <a href="#help" data-toggle="tab" class="tab-user btn btn-default" style="
width: 90%; width: 90%;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #4A7ADB;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px;"> border-radius: 5px;" onclick="btnuserclick(event)">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<img src="{% static 'img/icon-1/help.svg' %}" alt=""> <img src="{% static 'img/icon-1/help.svg' %}" alt="">
...@@ -977,12 +932,83 @@ ...@@ -977,12 +932,83 @@
</div> </div>
{% if user.is_superuser %} {% if user.is_superuser %}
<div class="tab-pane" id="informationdatauser"> <div class="tab-pane" id="informationdatauser">
informationdatauser <table class="table table-responsive datatable-show-all table-sm list_user" id="list_user" 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;">
<div>
<i class="icon-download4"></i><span>&nbsp;&nbsp;&nbsp;Download</span>
</div>
</a>
</div>
<thead style="font-size: 12px;line-height: 14px;font-family: 'gilroysemibold';text-transform: capitalize;">
<tr>
<th>No.</th>
<th>Id user</th>
<th>Nama</th>
<th>Email</th>
<th>Last Login</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tbody_user_list">
{% for all in user_res %}
<tr>
<td>{{forloop.counter}}</td>
<td>{{all.id}}</td>
<td>{{all.username}}</td>
<td>{{all.email}}</td>
<td>{{all.last}}</td>
<td>{{all.isactive}}</td>
<td class="text-center ">
<a class="btn mdlFire " onclick="loaddetailid( '{{all.id}}') " 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>
{% endfor %}
</tbody>
</table>
</div> </div>
{% endif %} {% endif %}
<div class="tab-pane" id="monitoringdatauser"> <div class="tab-pane" id="monitoringdatauser">
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_point_list('xlsx')" style="z-index:9;">
<div>
<i class="icon-download4"></i><span>&nbsp;&nbsp;&nbsp;Download</span>
</div>
</a>
</div>
<thead style="font-size: 12px;line-height: 14px;font-family: 'gilroysemibold';text-transform: capitalize;">
<tr>
<th>No.</th>
<th>Nama Tempat</th>
<th>Alamat</th>
<th>Luas Bangunan</th>
<th>Penanggung Jawab</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tbody_list_point">
</tbody>
</table>
</div> </div>
<div class="tab-pane" id="help"> <div class="tab-pane" id="help">
help help
...@@ -1296,4 +1322,7 @@ ...@@ -1296,4 +1322,7 @@
</div> </div>
<!-- /main charts --> <!-- /main charts -->
</div> </div>
\ No newline at end of file
<table id="table_downloader" style="display: none;">
</table>
\ No newline at end of file
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
<i class="icon-pie-chart5"></i> <i class="icon-pie-chart5"></i>
</a> </a>
</li> </li>
<li style="margin-top: 60vh;position: absolute;">
<a href="#" id="btn-hide-all" class="side-bar-but" style="position: absolute;margin-top: 20px;">
<i class="icon-arrow-right13"></i>
</a>
</li>
</ul> </ul>
...@@ -55,7 +59,7 @@ ...@@ -55,7 +59,7 @@
</div> </div>
</div> </div>
<div id="panel-sm" class="sidebar-2" style="display:none;background: #1B1F2D;position: absolute;z-index: 9;width: 23%;height:100vh;left: 0%;transition: all 0.5s ease;"> <div id="panel-sm" class="sidebar-2" style="display:none;background: #1B1F2D;position: absolute;z-index: 9;width:330px;height:100vh;left: 0%;transition: all 0.5s ease;">
<div style="margin-left: 50px;background: #1B1F2D;"> <div style="margin-left: 50px;background: #1B1F2D;">
<div class="header" style="margin-top: 25px;background: #2F3445;"> <div class="header" style="margin-top: 25px;background: #2F3445;">
...@@ -425,10 +429,11 @@ ...@@ -425,10 +429,11 @@
</div> </div>
</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 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;"> <div class="panel-body " style="padding:14px 0px;">
<table class="table table-responsive datatable-show-all table-sm bg-slate-610" id="list_perbaikan" style="font-size : 8pt;padding:0px;border-top:0.5pt solid #343434;border-bottom:0.5pt solid #343434;margin-bottom: 10px;"> <table class="table table-responsive datatable-show-all table-sm bg-slate-610 list_perb" id="list_perbaikan" style="font-size : 8pt;padding:0px;border-top:0.5pt solid #343434;border-bottom:0.5pt solid #343434;margin-bottom: 10px;">
<div style="position: absolute;right: 30px;font-size: 10pt;"> <div style="position: absolute;right: 30px;font-size: 10pt;">
<a class="btn side-bar-but" id="download_perbaikan" onclick="download_all('xlsx')" style="color: white;z-index:9;"> <a class="btn side-bar-but" id="download_perbaikan" onclick="download_all('xlsx')" style="color: white;z-index:9;">
<div> <div>
...@@ -671,6 +676,7 @@ ...@@ -671,6 +676,7 @@
<script> <script>
//tes //tes
$("#sel-kec ").change(function() { $("#sel-kec ").change(function() {
var id_kec = $(this).val() var id_kec = $(this).val()
$.ajax({ $.ajax({
...@@ -729,8 +735,7 @@ ...@@ -729,8 +735,7 @@
data_perbaikan.push(data_gab) data_perbaikan.push(data_gab)
}; };
$("#tbody_perbaikan ").html(data_perbaikan) $("#tbody_perbaikan").html(data_perbaikan)
} }
}); });
......
...@@ -49,458 +49,6 @@ ...@@ -49,458 +49,6 @@
font-family: 'gilroyultralight'; font-family: 'gilroyultralight';
src: url('/static/css/Gilroy-UltraLight.woff') format('woff'); 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> </style>
{% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %} {% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %}
...@@ -559,9 +107,7 @@ ...@@ -559,9 +107,7 @@
<!-- Page content --> <!-- Page content -->
<div class="page-content" style="overflow: hidden;"> <div class="page-content" style="overflow: hidden;">
{% if user.is_authenticated %} {% if user.is_authenticated %} {% include 'includes/sidebar.html' %} {% endif %}
{% include 'includes/sidebar.html' %}
{% endif %}
...@@ -569,7 +115,7 @@ ...@@ -569,7 +115,7 @@
<div class="content"> <div class="content">
<div id="map"> <div id="map">
<div class="col-md-4 col-md-offset-4 input-group content-group head"> <div class="col-md-4 col-md-offset-4 input-group content-group head">
<!-- <div class="input-group"> <!-- <div class="input-group">
<input type="TextBox" ID="datebox" Class="form-control"></input> <input type="TextBox" ID="datebox" Class="form-control"></input>
<div class="input-group-btn"> <div class="input-group-btn">
...@@ -585,8 +131,8 @@ ...@@ -585,8 +131,8 @@
</div> --> </div> -->
<!-- <div class="input-group"> <!-- <div class="input-group">
<input type="TextBox" ID="valss" Class="form-control" type="hidden"></input> --> <input type="TextBox" ID="valss" Class="form-control" type="hidden"></input> -->
<div class="input-group-btn"> <div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle btn-icon" data-toggle="dropdown" aria-expanded="true" id="btn_s_s"> <button type="button" class="btn btn-default dropdown-toggle btn-icon" data-toggle="dropdown" aria-expanded="true" id="btn_s_s">
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu" id="search_spes"> <ul class="dropdown-menu" id="search_spes">
...@@ -595,20 +141,21 @@ ...@@ -595,20 +141,21 @@
<li><input type="hidden" value="point"/><a href="#"><i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</a></li> <li><input type="hidden" value="point"/><a href="#"><i class="icon-location4 text-muted text-size-base" style="color: #5A9AFB;"></i> Point</a></li>
</ul> </ul>
</div> </div>
<!-- </div> --> <!-- </div> -->
<input type="text" id="input_search" class="form-control" placeholder="search..."> <input type="text" id="input_search" class="form-control" placeholder="search...">
<input type="text" id="input_search_id" class="form-control hidden"> <input type="text" id="input_search_id" class="form-control hidden">
<span class="input-group-btn"> <span class="input-group-btn">
<button type="submit" id="btn_search_spes" class="btn btn-primary " style="border-radius: 0px 10px 10px 0px; <button type="submit" id="btn_search_spes" class="btn btn-primary " style="border-radius: 0px 10px 10px 0px;
outline: none; outline: none;
background: linear-gradient( background: linear-gradient(
201.55deg 201.55deg
, #72BBFF -24.21%, #3D5CCA 130.65%);"><i class="icon-search4 text-muted text-size-base" style="color: white;"></i></button> , #72BBFF -24.21%, #3D5CCA 130.65%);"><i class="icon-search4 text-muted text-size-base" style="color: white;"></i></button>
</span> </span>
</div> </div>
{% if user.is_authenticated %} {% else %} {% if user.is_authenticated %} {% else %}
...@@ -714,7 +261,7 @@ ...@@ -714,7 +261,7 @@
padding: 8px 16px; padding: 8px 16px;
text-align: center; text-align: center;
text-decoration: none; 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>
</div> </div>
...@@ -821,58 +368,15 @@ ...@@ -821,58 +368,15 @@
<script type="text/javascript" src="{% static 'js/maps.js' %}"></script> <script type="text/javascript" src="{% static 'js/maps.js' %}"></script>
<script src="{% static 'js/scripts.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> </body>
</html> </html>
{% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %} {% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %}
<script type="text/javascript" src="{% static 'js/action.js' %}"></script>
<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; var dar = null;
$('#search_spes li a').on('click', function(){ $('#search_spes li a').on('click', function(){
$('#input_search').val(null) $('#input_search').val(null)
...@@ -884,35 +388,37 @@ ...@@ -884,35 +388,37 @@
var res_id = null; var res_id = null;
$('#input_search').on('input', function() { $('#input_search').on('input', function() {
var inp = $('#input_search').val() var inp = $('#input_search').val()
$.ajax({ $.ajax({
url: "{% url 'api:search_spes' %}", url: "{% url 'api:search_spes' %}",
data: {"type":dar, 'inp':inp}, data: {
"type": dar,
'inp': inp
},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
var availableTags = [] var availableTags = []
for (let i = 0; i < data.result.length; i++) { for (let i = 0; i < data.result.length; i++) {
var tt = null; var tt = null;
var mm = null; var mm = null;
if (dar == ' Point'){ if (dar == ' Point') {
tt = data.result[i][1]; tt = data.result[i][1];
mm = [data.result[i][0], data.result[i][2], data.result[i][3], data.result[i][4]]; mm = [data.result[i][0], data.result[i][2], data.result[i][3], data.result[i][4]];
} } else {
else{
tt = data.result[i][1]; tt = data.result[i][1];
mm = [data.result[i][0], data.result[i][2]]; mm = [data.result[i][0], data.result[i][2]];
} }
var source = { var source = {
label: tt, label: tt,
id: mm id: mm
} }
availableTags.push(source) availableTags.push(source)
} }
$( "#input_search").autocomplete({ $("#input_search").autocomplete({
source: availableTags, source: availableTags,
select: function(event, ui) { select: function(event, ui) {
var e = ui.item; var e = ui.item;
...@@ -928,14 +434,14 @@ ...@@ -928,14 +434,14 @@
}); });
$(document).on("click", "#btn_search_spes", function() { $(document).on("click", "#btn_search_spes", function() {
nama = null; nama = null;
idm = null; idm = null;
rem = null; rem = null;
geo = null; geo = null;
db = null; db = null;
if (dar == ' Point'){ if (dar == ' Point') {
nama = res_in; nama = res_in;
idm = res_id[0]; idm = res_id[0];
rem = res_id[1]; rem = res_id[1];
...@@ -943,7 +449,11 @@ ...@@ -943,7 +449,11 @@
db = res_id[3]; db = res_id[3];
$.ajax({ $.ajax({
url: "{% url 'api:search_lanjut' %}", url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm, 'db':db}, data: {
"type": dar,
'idx': idm,
'db': db
},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(data) console.log(data)
...@@ -955,10 +465,13 @@ ...@@ -955,10 +465,13 @@
nama = res_in; nama = res_in;
idm = res_id[0]; idm = res_id[0];
geo = res_id[1]; geo = res_id[1];
$.ajax({ $.ajax({
url: "{% url 'api:search_lanjut' %}", url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm}, data: {
"type": dar,
'idx': idm
},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
var geocodeService = L.esri.Geocoding.geocodeService(); var geocodeService = L.esri.Geocoding.geocodeService();
...@@ -1030,9 +543,9 @@ ...@@ -1030,9 +543,9 @@
// <option value="gardu_listrik">Gardu Listrik</option>` // <option value="gardu_listrik">Gardu Listrik</option>`
// } // }
var history var history
if (feature.administrasi.f11 == 'kantor_administrasi' || feature.administrasi.f11 == 'layanan_kesehatan' || feature.administrasi.f11 == 'puskesmas' 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 == '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'){ feature.administrasi.f11 == 'terminal_bus' || feature.administrasi.f11 == 'cagar_budaya' || feature.administrasi.f11 == 'gardu_listrik') {
if (feature.properties.f4 != null) { if (feature.properties.f4 != null) {
var list_history = feature.properties.f4 var list_history = feature.properties.f4
var list_history_panel = `` var list_history_panel = ``
...@@ -1099,7 +612,7 @@ ...@@ -1099,7 +612,7 @@
</div> </div>
</div> </div>
<div class="col-md-4"> <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> <table>
<tr style="margin-top: 10px"> <tr style="margin-top: 10px">
<th> <th>
...@@ -1107,28 +620,28 @@ ...@@ -1107,28 +620,28 @@
</th> </th>
<td> <td>
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif"> <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> </td>
</tr> </tr>
<tr> <tr>
<td> <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> <input style="display:none;" id="coordinateZoneeditbang" type="text" class="form-control" value=""required>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>Nama Bangunan</th> <th>Nama Bangunan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Jenis Bangunan</th> <th>Jenis Bangunan</th>
<td> <td>
<input type="text" class="hidden" name="tipe1" id="tipe111" value="`+feature.administrasi.f11+`"> <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="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="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="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"> <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="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="bangunan">Bangunan Biasa</option> <option value="bangunan">Bangunan Biasa</option>
...@@ -1162,31 +675,31 @@ ...@@ -1162,31 +675,31 @@
<tr> <tr>
<th>Informasi Bangunan</th> <th>Informasi Bangunan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Kelurahan</th> <th>Kelurahan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Kecamatan</th> <th>Kecamatan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Kab/Kota</th> <th>Kab/Kota</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Provinsi</th> <th>Provinsi</th>
<td> <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> </td>
</tr> </tr>
...@@ -1199,25 +712,25 @@ ...@@ -1199,25 +712,25 @@
<tr> <tr>
<th>Luas Bangunan</th> <th>Luas Bangunan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Luas Tanah</th> <th>Luas Tanah</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Tinggi Bangunan</th> <th>Tinggi Bangunan</th>
<td> <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> </td>
</tr> </tr>
<tr> <tr>
<th>Pemilik</th> <th>Pemilik</th>
<td> <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> </td>
</tr> </tr>
</table> </table>
...@@ -1230,7 +743,7 @@ ...@@ -1230,7 +743,7 @@
</div> </div>
</div> </div>
</div>`; </div>`;
content_delete=` content_delete = `
<div class="modal-dialog" style="width: max-content;height: max-content;"> <div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;"> <div class="modal-header bg-info" style="background-color:#40777c;">
...@@ -1246,9 +759,9 @@ ...@@ -1246,9 +759,9 @@
<div class="form-group"> <div class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;"> <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" 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="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="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="infobangunan" id="infobangunanhps" class="form-control" value="` + feature.properties.f3 + `">
</div> </div>
</div> </div>
</div> </div>
...@@ -1519,6 +1032,92 @@ ...@@ -1519,6 +1032,92 @@
</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);
$("#modal_bangunan_edit").html(content_edit); $("#modal_bangunan_edit").html(content_edit);
$("#modal_bangunan_delete").html(content_delete); $("#modal_bangunan_delete").html(content_delete);
$("#input_perbaikan_bang").html(content_inp_his_bang); $("#input_perbaikan_bang").html(content_inp_his_bang);
...@@ -1599,9 +1198,9 @@ ...@@ -1599,9 +1198,9 @@
$.ajax({ $.ajax({
url: "{% url 'api:search_lanjut' %}", url: "{% url 'api:search_lanjut' %}",
data: { data: {
'type':dar, 'type': dar,
'idx':idm, 'idx': idm,
'db':db 'db': db
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -1620,56 +1219,56 @@ ...@@ -1620,56 +1219,56 @@
} }
}); });
map.setView([data['gen'][0][0]['geometry']['coordinates'][0][0][0][1], data['gen'][0][0]['geometry']['coordinates'][0][0][0][0]], 19); map.setView([data['gen'][0][0]['geometry']['coordinates'][0][0][0][1], data['gen'][0][0]['geometry']['coordinates'][0][0][0][0]], 19);
geo_bangunan.addTo(map)
// if (checkBox_building.checked == false) {
// geo_bangunan.clearLayers();
// geo_bangunan.remove();
// }
// map.eachLayer(function (layer) { geo_bangunan.addTo(map)
// if (!!geo_bangunan.toGeoJSON) { // if (checkBox_building.checked == false) {
// map.removeLayer(geo_bangunan);
// }
// geo_bangunan.clearLayers()
// map.on("movestart", function() {
// geo_bangunan.clearLayers(); // geo_bangunan.clearLayers();
// }); // geo_bangunan.remove();
// function gasin(){
// $.ajax({
// url: "{% url 'api:search_lanjut' %}",
// data: {
// 'type':dar,
// 'idx':idm,
// 'db':db
// },
// dataType: 'json',
// success: function(data) {
// // if (map.hasLayer(geo_bangunan)) {
// // geo_bangunan.clearLayers()
// // geo_bangunan.remove()
// // }
// let list_poly = [];
// for (var i = 0; i < data['gen'].length; i++) {
// geoj = data['gen'][i][0];
// list_poly.push(geoj);
// };
// // geo_bangunan.clearLayers()
// // geo_bangunan.remove()
// geo_json_bangunan(list_poly);
// }
// });
// map.setView([data['gen'][0][0]['geometry']['coordinates'][0][0][0][1], data['gen'][0][0]['geometry']['coordinates'][0][0][0][0]], 19);
// // geo_bangunan.clearLayers()
// geo_bangunan.addTo(map)
// } // }
// map.eachLayer(function (layer) {
// if (!!geo_bangunan.toGeoJSON) {
// map.removeLayer(geo_bangunan);
// }
// geo_bangunan.clearLayers()
// map.on("movestart", function() {
// geo_bangunan.clearLayers();
// });
// function gasin(){
// $.ajax({
// url: "{% url 'api:search_lanjut' %}",
// data: {
// 'type':dar,
// 'idx':idm,
// 'db':db
// },
// dataType: 'json',
// success: function(data) {
// // if (map.hasLayer(geo_bangunan)) {
// // geo_bangunan.clearLayers()
// // geo_bangunan.remove()
// // }
// let list_poly = [];
// for (var i = 0; i < data['gen'].length; i++) {
// geoj = data['gen'][i][0];
// list_poly.push(geoj);
// };
// // geo_bangunan.clearLayers()
// // geo_bangunan.remove()
// geo_json_bangunan(list_poly);
// }
// });
// map.setView([data['gen'][0][0]['geometry']['coordinates'][0][0][0][1], data['gen'][0][0]['geometry']['coordinates'][0][0][0][0]], 19);
// // geo_bangunan.clearLayers()
// geo_bangunan.addTo(map)
// }
// }); // });
$(document).on("click", "#btn_edit_bangunan", function() { $(document).on("click", "#btn_edit_bangunan", function() {
var tipe1 = $('#tipe111').val(); 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_b_e").change(function() {
$('#tipe_point_2_b_e').empty(); $('#tipe_point_2_b_e').empty();
...@@ -1683,11 +1282,11 @@ ...@@ -1683,11 +1282,11 @@
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(data)
var data_all_kab = [] var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) { for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0]; var data_k = data['result'][i][0];
// if (feature.administrasi.f12 == data_k){ // if (feature.administrasi.f12 == data_k){
// var data_kab = `<option value="` + data_k + `" selected>` + data_k + `</option>`; // var data_kab = `<option value="` + data_k + `" selected>` + data_k + `</option>`;
// } else{ // } else{
...@@ -1704,8 +1303,8 @@ ...@@ -1704,8 +1303,8 @@
var tipe2 = $('#tipe222').val(); var tipe2 = $('#tipe222').val();
if (tipe2 == 'null') { if (tipe2 == 'null') {
$('#tipe_point_2_b_e').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>`); $('#tipe_point_2_b_e').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>`);
} else{ } else {
$('#tipe_point_2_b_e').html(`<option value="`+tipe2+`" selected>`+tipe2+`</option>`); $('#tipe_point_2_b_e').html(`<option value="` + tipe2 + `" selected>` + tipe2 + `</option>`);
} }
$("#tipe_point_2_b_e").change(function() { $("#tipe_point_2_b_e").change(function() {
...@@ -1725,7 +1324,7 @@ ...@@ -1725,7 +1324,7 @@
for (var i = 0; i < data['result'].length; i++) { for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0]; var data_id = data['result'][i][0];
var data_po = data['result'][i][1]; 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) data_all_kab.push(data_kab)
}; };
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab); $('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
...@@ -1735,13 +1334,13 @@ ...@@ -1735,13 +1334,13 @@
var tipe3 = $('#tipe333').val(); var tipe3 = $('#tipe333').val();
var tipe4 = $('#tipe444').val(); var tipe4 = $('#tipe444').val();
if (tipe3 == 'null') { if (tipe3 == 'null') {
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>`); $('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>`);
} else{ } else {
$('#tipe_point_3_b_e').html(`<option value="`+tipe3+`" selected>`+tipe4+`</option>`); $('#tipe_point_3_b_e').html(`<option value="` + tipe3 + `" selected>` + tipe4 + `</option>`);
} }
var map_edit = new L.map('map-edit', { var map_edit = new L.map('map-edit', {
editable: true, editable: true,
zoomControl: false, zoomControl: false,
...@@ -1811,7 +1410,7 @@ ...@@ -1811,7 +1410,7 @@
data.append('polygon', $('#coordinatebangunan').val()) data.append('polygon', $('#coordinatebangunan').val())
var polyg = $("#coordinatebangunan").val(); var polyg = $("#coordinatebangunan").val();
console.log(polyg)
data.append('info_b', $('#infobangunan').val()) data.append('info_b', $('#infobangunan').val())
data.append('desa_b', $('#nmkelurahan').val()) data.append('desa_b', $('#nmkelurahan').val())
...@@ -1827,9 +1426,6 @@ ...@@ -1827,9 +1426,6 @@
var remark = $('#tipe_point_2_b_e').val(); var remark = $('#tipe_point_2_b_e').val();
var poin_id = $('#tipe_point_3_b_e').val(); var poin_id = $('#tipe_point_3_b_e').val();
var napo = $("#tipe_point_3_b_e option:selected").text(); 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('napo', $('#tipe_point_3_b_e option:selected').text())
data.append('luasbangunan_b', $('#luasbangunan').val()) data.append('luasbangunan_b', $('#luasbangunan').val())
...@@ -2011,7 +1607,6 @@ ...@@ -2011,7 +1607,6 @@
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(data)
$("#nama_bang").val(data[0]); $("#nama_bang").val(data[0]);
$("#type_bang").val(data[4]); $("#type_bang").val(data[4]);
$("#id_bang_perbaikan").val(data[3]); $("#id_bang_perbaikan").val(data[3]);
...@@ -2020,7 +1615,7 @@ ...@@ -2020,7 +1615,7 @@
$("#kecamatan_bang").val(data[6]); $("#kecamatan_bang").val(data[6]);
var latlngs = data[2]; var latlngs = data[2];
console.log(data[2])
var lattitud, longitud; var lattitud, longitud;
map_bang.setView([data[2]['geometry']['coordinates'][0][0][0][1], data[2]['geometry']['coordinates'][0][0][0][0]], 19); map_bang.setView([data[2]['geometry']['coordinates'][0][0][0][1], data[2]['geometry']['coordinates'][0][0][0][0]], 19);
...@@ -2032,7 +1627,7 @@ ...@@ -2032,7 +1627,7 @@
polygigi = [lop_poly_edit[i][1], lop_poly_edit[i][0]] polygigi = [lop_poly_edit[i][1], lop_poly_edit[i][0]]
list_poly_edit.push(polygigi); list_poly_edit.push(polygigi);
}; };
polylyly = L.polygon(list_poly_edit).addTo(map_bang) polylyly = L.polygon(list_poly_edit).addTo(map_bang)
polylyly.enableEdit(); polylyly.enableEdit();
var hasil = (JSON.stringify(polylyly.toGeoJSON())) var hasil = (JSON.stringify(polylyly.toGeoJSON()))
...@@ -2055,7 +1650,7 @@ ...@@ -2055,7 +1650,7 @@
var anggaran = $("#anggaran_bang").val(); var anggaran = $("#anggaran_bang").val();
var proposal = $("#proposal_bang").val(); var proposal = $("#proposal_bang").val();
var bukti_selesai = $("#buktiselesai_bang").val(); var bukti_selesai = $("#buktiselesai_bang").val();
console.log(bukti_selesai)
var pj = $("#pihakpengesahan_bang").val(); var pj = $("#pihakpengesahan_bang").val();
var pj_lapangan = $("#pjlapangan_bang").val(); var pj_lapangan = $("#pjlapangan_bang").val();
var kontraktor = $("#kontraktor_bang").val(); var kontraktor = $("#kontraktor_bang").val();
...@@ -2192,13 +1787,16 @@ ...@@ -2192,13 +1787,16 @@
} }
}); });
} else if (dar == ' Jalan'){ } else if (dar == ' Jalan') {
nama = res_in; nama = res_in;
idm = res_id[0]; idm = res_id[0];
geo = res_id[1]; geo = res_id[1];
$.ajax({ $.ajax({
url: "{% url 'api:search_lanjut' %}", url: "{% url 'api:search_lanjut' %}",
data: {"type":dar, 'idx':idm}, data: {
"type": dar,
'idx': idm
},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
var geo_jalan = L.geoJson(null, { var geo_jalan = L.geoJson(null, {
...@@ -2454,12 +2052,12 @@ ...@@ -2454,12 +2052,12 @@
geo_jalan.remove() geo_jalan.remove()
}); });
$.ajax({ $.ajax({
url: "{% url 'api:search_lanjut' %}", url: "{% url 'api:search_lanjut' %}",
data: { data: {
'type':dar, 'type': dar,
'idx':idm, 'idx': idm,
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -2662,5 +2260,4 @@ ...@@ -2662,5 +2260,4 @@
}); });
} }
}); });
</script> </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