Commit bd5668c7 authored by Muhamad's avatar Muhamad

modal all

parents c5daf7f6 79b2e193
...@@ -73,5 +73,8 @@ urlpatterns = [ ...@@ -73,5 +73,8 @@ urlpatterns = [
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_spes', views.search_spes, name='search_spes'),
path('search_lanjut', views.search_lanjut, name='search_lanjut'), path('search_lanjut', views.search_lanjut, name='search_lanjut'),
path('load_point_id', views.load_point_id) path('load_point_id', views.load_point_id),
path('edit_detail_poin', views.edit_detail_poin),
path('download_perbaikan_data', views.download_perbaikan_data)
] ]
\ No newline at end of file
...@@ -2876,7 +2876,7 @@ def user_data(request): ...@@ -2876,7 +2876,7 @@ def user_data(request):
au.first_name, au.first_name,
au.last_name, au.last_name,
au.is_active, au.is_active,
au.last_login, DATE(au.last_login),
au.email, au.email,
ag.name, ag.name,
au.is_staff, au.is_staff,
...@@ -2900,7 +2900,7 @@ def user_data(request): ...@@ -2900,7 +2900,7 @@ def user_data(request):
au.first_name, au.first_name,
au.last_name, au.last_name,
au.is_active, au.is_active,
au.last_login, DATE(au.last_login),
au.email, au.email,
ag.name, ag.name,
au.is_staff, au.is_staff,
...@@ -3362,7 +3362,7 @@ def load_point_id(request): ...@@ -3362,7 +3362,7 @@ def load_point_id(request):
'type', 'type',
'Feature', 'Feature',
'properties', 'properties',
(id, namobj, alamat, luas_bangunan, perangkat), (id, namobj, alamat, luas_bangunan, perangkat, gambar),
'geometry', 'geometry',
ST_AsGeoJSON ( geom :: geometry ) :: json ST_AsGeoJSON ( geom :: geometry ) :: json
) )
...@@ -3372,5 +3372,120 @@ def load_point_id(request): ...@@ -3372,5 +3372,120 @@ def load_point_id(request):
id = %s id = %s
"""%(dtb, id)) """%(dtb, id))
poin = poi.fetchall() poin = poi.fetchall()
print(poin)
context = {'result':poin} context = {'result':poin}
return Response(context) return Response(context)
@api_view(('POST',))
def edit_detail_poin(request):
idkantor = request.POST.get('id')
namobj = request.POST.get('namobj')
luat_tanah = request.POST.get('luastanah')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
dbp = request.POST.get('db')
if alamat is None:
alamat = 'alamat'
elif alamat == '':
alamat = 'alamat'
else:
alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat')
if perangkat is None:
perangkat = 'Bpk'
elif perangkat == '':
perangkat = 'Bpk'
else:
perangkat = request.POST.get('perangkat')
point = request.POST.get("point")
cood_edit = json.loads(point)
co_edit = cood_edit['geometry']['coordinates']
file1 = request.FILES.get('file')
fss = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/static/img/image/')
try:
format = (file1.name).split(".")
num = random.randrange(1, 10000000000000)
namafile = f"{namobj}_{num}.{format[-1:][0]}"
filename = fss.save(namafile, file1)
# print(file.name)
url = fss.url(filename)
except:
namafile = gambar
with conn.cursor() as editka:
editka.execute("""update %s set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', luas_tanah = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(dbp, co_edit, namobj, luat_tanah, perangkat, alamat, namafile, idkantor))
conn.commit()
data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('GET',))
def download_perbaikan_data(request):
with conn.cursor() as tbl_p:
tbl_p.execute("""
SELECT
gl.NAME,
tp.name,
gj.remark,
st_length ( gj.geom :: geography ),
tp.tgl_pembuatan,
tp.tgl_perbaikan,
tp.tgl_selesai,
tp.anggaran,
tp.pj,
tp.pj_lapangan,
tp.kontraktor,
ST_AsGeoJSON ( tp.geom :: geometry ) :: json,
tp.pjg_perbaikan,
tp.lbr_perbaikan,
tp.id_object,
tp.id,
tp.proposal,
tp.bukti_selesai
FROM
tbl_perbaikan tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_jalan gj ON gj.ID = tp.id_object
ORDER BY
tp.id ASC
""")
tbl_per = tbl_p.fetchall()
per_res = []
for rows in tbl_per:
print(rows)
datas = {
"id": rows[15],
"jenis_perbaikan": rows[0],
"nama": rows[1],
"tipe": rows[2],
"panjang": rows[3],
"tgl_pembuatan": rows[4],
"tgl_perbaikan": rows[5],
"tgl_selesai": rows[6],
"anggaran": rows[7],
"pj": rows[8],
"pj_lapangan": rows[9],
"kontraktor": rows[10],
"panjang_per": rows[12],
"lebar_per": rows[13],
}
per_res.append(datas)
respon = {
'data' : per_res,
}
return Response(respon)
\ No newline at end of file
...@@ -746,12 +746,17 @@ li.active>a:after { ...@@ -746,12 +746,17 @@ li.active>a:after {
.modal-header { .modal-header {
background-color: #1B1F2D !important; background-color: #1B1F2D !important;
border: #1B1F2D; border: #1B1F2D;
border-top-right-radius: 10px; border-top-right-radius: 10px!important;
border-top-left-radius: 10px; border-top-left-radius: 10px!important;
color: white;
} }
#modal_adm>.modal-content { .modal-header>button {
border-radius: 10px; color: white;
}
.modal-content {
border-radius: 10px!important;
} }
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(1)>div.gambar_keterangan>img { #modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(1)>div.gambar_keterangan>img {
...@@ -763,6 +768,46 @@ li.active>a:after { ...@@ -763,6 +768,46 @@ li.active>a:after {
display: none; display: none;
} }
.icon-location3:before {
margin-left: -14px;
}
#maps_detail_p>div.leaflet-control-container>div.leaflet-top.leaflet-left {
display: none;
}
#map-edit-tuplah>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div {
display: none;
}
#modal_bangunan_delete>div {
width: 360px!important;
}
.apexcharts-toolbar>div.apexcharts-menu-icon>div>span {
color: white;
position: absolute;
top: -22px;
font-size: 16px;
margin-left: 40px;
}
.apexcharts-toolbar>div.apexcharts-menu-icon>div>i {
color: white;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div.tombol-edit.text-center>a {
color: white;
}
#modal_detail_kelurahan>div>div>div>fieldset>div>div:nth-child(1)>div.tombol-edit.text-center>a:hover {
box-shadow: 0 0 0 100px rgb(0 0 0 / 0%) inset;
}
.apexcharts-menu.apexcharts-menu-open {
color: black!important;
}
@media (max-width: 1025px) { @media (max-width: 1025px) {
.dock { .dock {
position: absolute; position: absolute;
......
<svg width="278" height="330" viewBox="0 0 278 330" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="278" height="330">
<rect width="278" height="330" rx="10" fill="url(#paint0_linear)"/>
</mask>
<g mask="url(#mask0)">
<path opacity="0.2" d="M199.78 294.593C292.322 334.061 278.284 169.675 277.764 130H297V332H262.687H101C113.477 306.835 147.667 272.367 199.78 294.593Z" fill="#4077B4"/>
<path d="M203.252 297.185C292.489 333.918 278.952 180.925 278.451 144H297V332H263.912H108C120.032 308.579 153 276.5 203.252 297.185Z" fill="#4077B4"/>
</g>
<defs>
<linearGradient id="paint0_linear" x1="169" y1="-34" x2="133.5" y2="359.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#3085E8"/>
<stop offset="1" stop-color="#3D7DB8"/>
</linearGradient>
</defs>
</svg>
This diff is collapsed.
This diff is collapsed.
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
</style> </style>
{% endif %}{% endfor %} {% endif %}{% endfor %}
<script> <script>
//tes
function panel_samp() { function panel_samp() {
$("#panel-samping").addClass("move"); $("#panel-samping").addClass("move");
$("#button_unhide_panel").addClass("move-btn"); $("#button_unhide_panel").addClass("move-btn");
...@@ -2055,10 +2056,13 @@ ...@@ -2055,10 +2056,13 @@
</div> </div>
`) `)
if (feature.properties.f16 != null) {
var list_history = feature.properties.f16 if (feature.properties.f7 != null) {
console.log(feature.properties.f7)
var list_history = feature.properties.f7
console.log(list_history[0].split(",")[0]) console.log(list_history[0].split(",")[0])
var perbaikan_pt = `<div class='row'> var perbaikan_jl = `<div class='row'>
<label class="col-md-8">` + list_history[0].split(",")[1] + `</label> <label class="col-md-8">` + list_history[0].split(",")[1] + `</label>
...@@ -2069,7 +2073,7 @@ ...@@ -2069,7 +2073,7 @@
<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_pt = `<div class='row'> var perbaikan_jl = `<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>
...@@ -2078,11 +2082,22 @@ ...@@ -2078,11 +2082,22 @@
<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>
` `
} }
$(".nama_keterangan").html(`
<div>
<span style="font-size: large;">
` + feature.properties.f2 + `
</span>
</div>
<div>
<span></span>
</div>
`)
$(".isi_keterangan").html(` $(".isi_keterangan").html(`
<input type="text" name="idjalan" id="idjalan" class="hidden" value=""> <input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value=""> <input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div> <div class="row">
<div class="col-md-6">
<div> <div>
<span>Panjang Jalan</span> <span>Panjang Jalan</span>
</div> </div>
...@@ -2090,7 +2105,7 @@ ...@@ -2090,7 +2105,7 @@
<span>` + feature.properties.f3 + `m</span> <span>` + feature.properties.f3 + `m</span>
</div> </div>
</div> </div>
<div> <div class="col-md-6">
<div> <div>
<span>Lebar Jalan</span> <span>Lebar Jalan</span>
</div> </div>
...@@ -2099,6 +2114,8 @@ ...@@ -2099,6 +2114,8 @@
</div> </div>
</div> </div>
</div>
<div> <div>
<div> <div>
<span>Tipe Jalan</span> <span>Tipe Jalan</span>
...@@ -2169,7 +2186,6 @@ ...@@ -2169,7 +2186,6 @@
$('#lebarjalan').val(feature.properties.f4); $('#lebarjalan').val(feature.properties.f4);
$('#tipejalan').val(feature.properties.f5); $('#tipejalan').val(feature.properties.f5);
$("#coordinatejalan").val(feature.geometry); $("#coordinatejalan").val(feature.geometry);
} }
}); });
...@@ -2280,12 +2296,11 @@ ...@@ -2280,12 +2296,11 @@
}); });
$(document).on("click", "#btn_jalan", function() { $(document).on("click", "#btn_jalan", function() {
if (map_edit_jalan.hasLayer(polygon_edit_jalan)) { if (map_edit_jalan.hasLayer(polygon_edit_jalan)) {
polygon_edit_jalan.remove() polygon_edit_jalan.remove()
} }
var id_poly = $('#idjalan').val(); var id_poly = $('#idjalan').val();
$("#modal-jalan").modal("show")
$.ajax({ $.ajax({
url: "{% url 'api:edit-jalan' %}", url: "{% url 'api:edit-jalan' %}",
data: { data: {
...@@ -2294,8 +2309,8 @@ ...@@ -2294,8 +2309,8 @@
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
loaderPage(false); loaderPage(false);
$("#modal-jalan").modal("show")
$(".modal_detail_non_kelurahan").modal("hide") $("#modal_detail_non_kelurahan").modal("hide")
setTimeout(function() { setTimeout(function() {
map_edit_jalan.invalidateSize(); map_edit_jalan.invalidateSize();
}, 1000); }, 1000);
...@@ -2338,7 +2353,8 @@ ...@@ -2338,7 +2353,8 @@
$(document).on("click", "#btn_hapus_jalan", function() { $(document).on("click", "#btn_hapus_jalan", function() {
$("#modal-hapus-jalan").modal("show")
$("#modal_detail_non_kelurahan").modal("hide")
var id_poly = $('#idjalan').val(); var id_poly = $('#idjalan').val();
$.ajax({ $.ajax({
...@@ -2373,7 +2389,7 @@ ...@@ -2373,7 +2389,7 @@
icon: "success", icon: "success",
confirmButtonColor: "#00BCD4" confirmButtonColor: "#00BCD4"
}, function() { }, function() {
$("#modal-hapus-jalan").css('display', 'none'); $("#modal-hapus-jalan").modal('hide');
}) })
} else { } else {
swal({ swal({
...@@ -2418,7 +2434,7 @@ ...@@ -2418,7 +2434,7 @@
icon: "success", icon: "success",
confirmButtonColor: "#00BCD4" confirmButtonColor: "#00BCD4"
}, function() { }, function() {
$("#modal-jalan").css('display', 'none'); $("#modal-jalan").modal('hide');
}) })
} else { } else {
swal({ swal({
...@@ -2749,6 +2765,8 @@ ...@@ -2749,6 +2765,8 @@
$(".modal-backdrop").css("display", "none") $(".modal-backdrop").css("display", "none")
$(".modal-backdrop").removeClass('show'); $(".modal-backdrop").removeClass('show');
$("body").css('padding-right', '0px !important') $("body").css('padding-right', '0px !important')
document.querySelector("#right-tab2-feas-upli > div > div:nth-child(6) > div > label").html(`Pimpinan`)
document.querySelector("#right-tab2-feas-upli > div > div:nth-child(3)").css("display", "block")
} }
function destroyWraper() { function destroyWraper() {
...@@ -3838,7 +3856,7 @@ ...@@ -3838,7 +3856,7 @@
$(".tombol_action_create").html(``) $(".tombol_action_create").html(``)
$(".tab_1").html("Koordinat") $(".tab_1").html("Koordinat")
$(".tab_2").html("Informasi Point") $(".tab_2").html("Informasi Point")
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE" style="margin-right:30px;"> $(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE">
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">`) <input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">`)
$("#koordinatjalan").html(` $("#koordinatjalan").html(`
......
This diff is collapsed.
...@@ -7,9 +7,7 @@ ...@@ -7,9 +7,7 @@
<input type="checkbox" name="checkbox" onclick="mapsganti()" id="mapschange" style="position: absolute;opacity: 0;width: 40px;height: 40px;margin-top: -5px;"> <input type="checkbox" name="checkbox" onclick="mapsganti()" id="mapschange" style="position: absolute;opacity: 0;width: 40px;height: 40px;margin-top: -5px;">
<div id="labelchange"> <div id="labelchange">
<img src="{% static 'img/icon-1/Vector3d.svg' %}" alt="" style="height: 50px; <img src="{% static 'img/icon-1/Vector3d.svg' %}" alt="" style="height: 50px;
width: 50px; width: 50px;">
margin-top: -1px;
margin-left: -4px;">
</div> </div>
</a> </a>
...@@ -24,9 +22,7 @@ ...@@ -24,9 +22,7 @@
<div class="dropdown show-dropdown" style="top: 1px;"> <div class="dropdown show-dropdown" style="top: 1px;">
<a href="#" data-toggle="dropdown"> <a href="#" data-toggle="dropdown">
<img src="{% static 'img/icon-1/Vectorbasemaps.svg' %}" alt="" style="height: 50px; <img src="{% static 'img/icon-1/Vectorbasemaps.svg' %}" alt="" style="height: 50px;
width: 50px; width: 50px;">
margin-top: -1px;
margin-left: -4px;">
</a> </a>
<ul class="dropdown-menu" x-placement="bottom-start"> <ul class="dropdown-menu" x-placement="bottom-start">
<li class="header-title text-center">Maps BaseLayer</li> <li class="header-title text-center">Maps BaseLayer</li>
...@@ -81,9 +77,7 @@ ...@@ -81,9 +77,7 @@
<div class="dropdown show-dropdown "> <div class="dropdown show-dropdown ">
<a href="#" data-toggle="dropdown"> <a href="#" data-toggle="dropdown">
<img src="{% static 'img/icon-1/Vectoroverlay.svg' %}" alt="" style="height: 50px; <img src="{% static 'img/icon-1/Vectoroverlay.svg' %}" alt="" style="height: 50px;
width: 50px; width: 50px;">
margin-top: -1px;
margin-left: -4px;">
</a> </a>
<ul class="dropdown-menu" style="top: 12px; <ul class="dropdown-menu" style="top: 12px;
width: 300px; width: 300px;
......
This diff is collapsed.
This diff is collapsed.
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