Commit 696fadf2 authored by Manggar Mahardhika's avatar Manggar Mahardhika

push go

parent 96f254b9
...@@ -15,6 +15,7 @@ urlpatterns = [ ...@@ -15,6 +15,7 @@ urlpatterns = [
path('input-perbaikan', views.inpuperbaikan, name='input-perbaikan'), path('input-perbaikan', views.inpuperbaikan, name='input-perbaikan'),
path('input-perbaikan-bang', views.inputperbaikanbangunan, name='input-perbaikan-bang'), path('input-perbaikan-bang', views.inputperbaikanbangunan, name='input-perbaikan-bang'),
path('save-perbaikan', views.saveperbaikan, name='save-perbaikan'), path('save-perbaikan', views.saveperbaikan, name='save-perbaikan'),
path('save-perbaikan-bang', views.saveperbaikanbangunan, name='save-perbaikan-bang'),
path('load-jl-by-id-detail', views.loadbyiddetail, name='load-jl-by-id-detail'), path('load-jl-by-id-detail', views.loadbyiddetail, name='load-jl-by-id-detail'),
path('get-jalan-perbaikan', views.getjalanperbaikan, name='get-jalan-perbaikan'), path('get-jalan-perbaikan', views.getjalanperbaikan, name='get-jalan-perbaikan'),
......
...@@ -648,9 +648,12 @@ def inputperbaikanbangunan(request): ...@@ -648,9 +648,12 @@ def inputperbaikanbangunan(request):
data_per.execute(""" data_per.execute("""
SELECT SELECT
name, name,
type, type_id,
json_build_object ( 'type', 'Feature', 'geometry', ST_AsGeoJSON ( geom :: geometry ) :: json ), json_build_object ( 'type', 'Feature', 'geometry', ST_AsGeoJSON ( geom :: geometry ) :: json ),
ID ID,
remark,
address_1,
address_2
FROM FROM
geo_bangunan geo_bangunan
WHERE WHERE
...@@ -714,6 +717,7 @@ def saveperbaikan(request): ...@@ -714,6 +717,7 @@ def saveperbaikan(request):
ll = ll.replace("[[","(") ll = ll.replace("[[","(")
coordinat = f'MULTILINESTRING({ll})' coordinat = f'MULTILINESTRING({ll})'
print(ll)
if coord['features'][0]['geometry']['type'] == 'Polygon': if coord['features'][0]['geometry']['type'] == 'Polygon':
print('tidakoke') print('tidakoke')
...@@ -801,6 +805,143 @@ def saveperbaikan(request): ...@@ -801,6 +805,143 @@ def saveperbaikan(request):
respon = {"data":data,"info":info,"code":code} respon = {"data":data,"info":info,"code":code}
return Response(respon) return Response(respon)
# from django.core.files.storage import FileSystemStorage
# import random
# import re
# import json
@api_view(('POST',))
def saveperbaikanbangunan(request):
type_id = '1'
id_object = request.POST.get("object_idbang")
name = request.POST.get("namebang")
type = request.POST.get("typebang")
# tgl_pembuatan = request.POST.get("tgl_pembuatanbang")
tgl_perbaikan = request.POST.get("tgl_perbaikanbang")
tgl_disetujui = request.POST.get("tgl_disetujuibang")
anggaran = request.POST.get("anggaranbang")
pj = request.POST.get("pjbang")
pj_lapangan = request.POST.get("pj_lapanganbang")
kontraktor = request.POST.get("kontraktorbang")
jenis_perbaikan = request.POST.get("jenis_perbaikanbang")
coor = request.POST.get("coordbang")
# for co in coor['features']:
# ll = coor['geometry']['coordinates']
# ll += ll
# ll = ll.replace(", "," ")
# ll = ll.replace("]][[","),(")
# ll = ll.replace("] [",", ")
# ll = ll.replace("]]",")")
# ll = ll.replace("[[","(")
# corcoran = ll
# p_create = coor.replace('"','')
# po_create = p_create.replace(', ','],[')
# cood_edit = json.loads(coor)
# co_edit = cood_edit['geometry']['coordinates']
yak = str(coor)
suk = yak.replace("""{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":""","")
sik = suk.replace("""}}""","")
cor = sik.replace("""[[[""","((")
coran = cor.replace("""]]]""","))")
ll = coran.replace(","," ")
ii = ll.replace("] [",",")
corcoran = f'MULTIPOLYGON({ii})'
print("-------------------")
print(str(corcoran))
print("-------------------")
# print(yak)
tgl_selesai = request.POST.get("tgl_selesaibang")
proposal = request.FILES.get("proposal_bang")
bukti_selesai = request.FILES.get("bukti_selesai_bang")
fss_p = FileSystemStorage(location='media/proposal/')
fss_b = FileSystemStorage(location='media/bukti_penyelesaian/')
try:
format = (proposal.name).split(".")
num = random.randrange(1, 10000000000000)
nproposal = f"{name}_{num}.{format[-1:][0]}"
nproposal = nproposal.replace(" ","-")
filename_p = fss_p.save(nproposal, proposal)
url_p = fss_p.url(filename_p)
nbukti = f"{name}_{num}.{format[-1:][0]}"
nbukti = nbukti.replace(" ","-")
filename_b = fss_b.save(nbukti, bukti_selesai)
url_b = fss_b.url(filename_b)
with conn.cursor() as data_per:
data_per.execute("""
INSERT INTO tbl_perbaikan (
type_id,
id_object,
name,
type,
tgl_selesai,
tgl_perbaikan,
tgl_disetujui,
anggaran,
proposal,
bukti_selesai,
pj,
pj_lapangan,
kontraktor,
jenis_perbaikan,
geom
)
VALUES
(
%s,
%s,
'%s',
'%s',
'%s',
'%s',
'%s',
%s,
'%s',
'%s',
'%s',
'%s',
'%s',
'%s',
ST_GeomFromText('%s')
)
"""% (
int(type_id),
int(id_object),
name,
type,
tgl_selesai,
tgl_perbaikan,
tgl_disetujui,
int(anggaran),
nproposal,
nbukti,
pj,
pj_lapangan,
kontraktor,
jenis_perbaikan,
corcoran))
conn.commit()
data = "Sukses"
info = "Data Telah Berhasil di Perbaharui"
code = 0
except:
data = "Pastikan Semua Data Terisi Termasuk Proposal dan Bukti Selesai"
info = "Oops"
code = 1
respon = {"data":data,"info":info,"code":code}
return Response(respon)
@api_view(('GET',)) @api_view(('GET',))
def loadbyiddetail(request): def loadbyiddetail(request):
id = request.GET.get('id') id = request.GET.get('id')
......
...@@ -130,21 +130,21 @@ ...@@ -130,21 +130,21 @@
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<button type="button" class="close" onclick="destroyWraper()">&times;</button> <button type="button" class="close" onclick="destroyWraper()">&times;</button>
<li class="active"><a href="#left-tab-input-coordinat" data-toggle="tab">Koordinat</a></li> <li class="active"><a href="#left-tab-input-coordinat_bang" data-toggle="tab">Koordinat</a></li>
<li><a href="#right-tab-input-informasi" data-toggle="tab">Insert Informasi</a></li> <li><a href="#right-tab-input-informasi_bang" data-toggle="tab">Insert Informasi</a></li>
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="left-tab-input-coordinat"> <div class="tab-pane active" id="left-tab-input-coordinat_bang">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;"> <div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<input type="text" class="hidden" id="poly_create_input_bang"> <input type="text" class="hidden" id="poly_create_input_bang">
<input type="text" class="hidden" id="id_bang_perbaikan"> <input type="text" class="hidden" id="id_bang_perbaikan">
<input type="text" class="hidden" id="type_id_bang"> <input type="text" class="hidden" id="type_id_bang">
<div id="map-insert-bang" style="height: 375px;width: 100%"> <div id="map-insert-renov-bang" style="height: 375px;width: 100%">
</div> </div>
</div> </div>
</div> </div>
<div class="tab-pane" id="right-tab-input-informasi"> <div class="tab-pane" id="right-tab-input-informasi_bang">
<div class="modal-body" style="max-height: 415px;overflow-y: auto;"> <div class="modal-body" style="max-height: 415px;overflow-y: auto;">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
...@@ -232,6 +232,7 @@ ...@@ -232,6 +232,7 @@
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<input type="text" id="coorbangbaru" class="form-control" value="">
<button type="button" class="btn btn-info" id="save-perbaikan_bang" style="float: right; margin-right: 40px;">SAVE</button> <button type="button" class="btn btn-info" id="save-perbaikan_bang" style="float: right; margin-right: 40px;">SAVE</button>
<button type="button" class="btn btn-link" onclick="destroyWraper()" style="float: right;">Close</button> <button type="button" class="btn btn-link" onclick="destroyWraper()" style="float: right;">Close</button>
......
...@@ -5031,6 +5031,112 @@ ...@@ -5031,6 +5031,112 @@
</div> </div>
</div> </div>
</div>`; </div>`;
content_inp_his_bang = `
<div class="modal-dialog" style="height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Renovasi Bangunan</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-upl" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upl" data-toggle="tab">Informasi Umum</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-upl">
<input type="text" class="hidden" id="poly_create_input_bang">
<input type="text" class="hidden" id="id_bang_perbaikan">
<input type="text" class="hidden" id="type_id_bang">
<div id="map-insert-renov-bang" style="height: 375px;width: 100%">
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-upl">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama :</label>
<input type="text" id="nama_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Jenis :</label>
<input type="text" id="type_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kelurahan :</label>
<input type="text" id="kelurahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kecamatan :</label>
<input type="text" id="kecamatan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Disetujui :</label>
<input type="date" id="tgldisetujui_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Mulai Perbaikan :</label>
<input type="date" id="tglmulaiperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Selesai Perbaikan :</label>
<input type="date" id="tglselesaiperbaikan_bang" class="form-control" value="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Anggaran :</label>
<input type="text" id="anggaran_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Pihak yang Mengesahkan :</label>
<input type="text" id="pihakpengesahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Penanggung Jawab Lapangan :</label>
<input type="text" id="pjlapangan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Jenis Perbaikan :</label>
<input type="text" id="jenisperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kontraktor/Vendor :</label>
<input type="text" id="kontraktor_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Proposal (.pdf):</label>
<input type="file" id="proposal_bang">
</div>
<div class="form-group">
<label>Bukti Selesai Perbaikan (.png/.jpg/.jpeg/):</label>
<input type="file" id="buktiselesai_bang">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="text" id="coorbangbaru" class="hidden" value="">
<button type="button" class="btn btn-info" id="save-perbaikan_bang" style="float: right; margin-top: 5px; margin-right: 10px;">SAVE</button>
</div>
</div>
</div>`;
content = ` content = `
<table class="table tasks-list"> <table class="table tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
...@@ -5060,7 +5166,7 @@ ...@@ -5060,7 +5166,7 @@
<tr style="height: 30px;"> <tr style="height: 30px;">
<th> <th>
<span> <span>
` + feature.properties.f3 + ` ` + feature.administrasi.f12 + `
</span> </span>
</th> </th>
</tr> </tr>
...@@ -5105,7 +5211,7 @@ ...@@ -5105,7 +5211,7 @@
</p> </p>
<br> <br>
<p class="text-center" style="margin-top: 10px;"> <p class="text-center" style="margin-top: 10px;">
<a href="#" id='btn_perbaikan_bangunan' class="btn btn-default"><i>Tambah History Perbaikan</i></a> <a href="#" id='btn_perbaikan_bangunan' data-toggle="modal" data-target="#input_perbaikan_bang" data-backdrop="static" data-keyboard="false" class="btn btn-default"><i>Tambah History Perbaikan</i></a>
</p> </p>
</th> </th>
</tr> </tr>
...@@ -5115,6 +5221,7 @@ ...@@ -5115,6 +5221,7 @@
$("#isi_panel").html(content); $("#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);
}); });
// $("#tipe_point_b_e").val('feature.administrasi.f11').change(); // $("#tipe_point_b_e").val('feature.administrasi.f11').change();
// $('#tipe_point_b_e').val(feature.properties.f11).attr('selected','selected'); // $('#tipe_point_b_e').val(feature.properties.f11).attr('selected','selected');
...@@ -5264,9 +5371,10 @@ ...@@ -5264,9 +5371,10 @@
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 option").val(tipe1).change();
$("#tipe_point_b_e").change(function() { $("#tipe_point_b_e").change(function() {
$('#tipe_point_2_b_e').empty();
$('#tipe_point_3_b_e').empty();
var tipe = $(this).val(); var tipe = $(this).val();
$.ajax({ $.ajax({
...@@ -5295,7 +5403,6 @@ ...@@ -5295,7 +5403,6 @@
}); });
var tipe2 = $('#tipe222').val(); var tipe2 = $('#tipe222').val();
// $('#tipe_point_2_b_e option[value='+tipe2+']').attr('selected','selected');
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{
...@@ -5303,6 +5410,7 @@ ...@@ -5303,6 +5410,7 @@
} }
$("#tipe_point_2_b_e").change(function() { $("#tipe_point_2_b_e").change(function() {
$('#tipe_point_3_b_e').empty();
var jenis = $(this).val(); var jenis = $(this).val();
var tipx = $("#tipe_point_b_e").val(); var tipx = $("#tipe_point_b_e").val();
...@@ -5331,7 +5439,6 @@ ...@@ -5331,7 +5439,6 @@
var tipe3 = $('#tipe333').val(); var tipe3 = $('#tipe333').val();
var tipe4 = $('#tipe444').val(); var tipe4 = $('#tipe444').val();
// $('#tipe_point_3_b_e option[value='+tipe3+']').attr('selected','selected');
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>`);
...@@ -5375,8 +5482,6 @@ ...@@ -5375,8 +5482,6 @@
}); });
$(document).on("click", "#btnsavebangunan", function() { $(document).on("click", "#btnsavebangunan", function() {
var data = new FormData(); var data = new FormData();
data.append("file", $("input[id^='imgbangunan']")[0].files[0]); data.append("file", $("input[id^='imgbangunan']")[0].files[0]);
...@@ -5515,62 +5620,187 @@ ...@@ -5515,62 +5620,187 @@
}); });
// var map_bang = new L.map('map-insert-bang', { var map_bang = new L.map('map-insert-renov-bang', {
// editable: true, editable: true,
// zoomControl: false, zoomControl: false,
// drawControl: true drawControl: true
// }).setView([-2, 118], 5); }).setView([-2, 118], 5);
// mapss = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', { mapssx = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
// maxZoom: 22, maxZoom: 22,
// minZoom: 4, minZoom: 4,
// }).addTo(map_bang); }).addTo(map_bang);
// var polyxxx = L.polygon([ var polyxxx = L.polygon([
// [-4.1283969, 104.1674575], [-4.1283969, 104.1674575],
// [-4.128396, 104.1674947], [-4.128396, 104.1674947],
// [-4.1284664, 104.1674964], [-4.1284664, 104.1674964],
// [-4.1284674, 104.1674593], [-4.1284674, 104.1674593],
// [-4.1283969, 104.1674575] [-4.1283969, 104.1674575]
// ]).addTo(map_bang) ]).addTo(map_bang)
// var geo_bangunan_input = L.geoJson(null, {
// style: function(feature) {
// return {
// color: "#06FF08",
// weight: 8,
// opacity: 2,
// zIndex: 1000
// };
// }
// }).addTo(map_bang);
$(document).on("click", "#btn_perbaikan_bangunan", function() { $(document).on("click", "#btn_perbaikan_bangunan", function() {
// if (map_bang.hasLayer(polyxxx)) { var map_bang = new L.map('map-insert-renov-bang', {
// polyxxx.remove() editable: true,
// } zoomControl: false,
// var id_polyx = $('#idbangunan').val(); drawControl: true
}).setView([-2, 118], 5);
mapssx = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_bang);
$("#input_perbaikan_bang").css("display", "block"); $("#input_perbaikan_bang").css("display", "block");
if (map_bang.hasLayer(polyxxx)) {
polyxxx.remove()
}
var id_polyx = $('#idbangunan').val();
// $.ajax({ $.ajax({
// url: "{% url 'apps:input-perbaikan-bang' %}", url: "{% url 'apps:input-perbaikan-bang' %}",
// data: { data: {
// 'id_bangunan': id_polyx 'id_bangunan': id_polyx
// }, },
// dataType: 'json', dataType: 'json',
// success: function(data) { success: function(data) {
// $("#nama_bang").val(data[0]); console.log(data)
// $("#type_bang").val(data[1]); $("#nama_bang").val(data[0]);
// $("#id_bang_perbaikan").val(data[3]); $("#type_bang").val(data[4]);
// $("#type_id_bang").val("1") $("#id_bang_perbaikan").val(data[3]);
$("#type_id_bang").val("1");
// var latlngs = data[2]; $("#kelurahan_bang").val(data[5]);
// map_bang.setView([latlngs['geometry']['coordinates'][0][0][1], latlngs['geometry']['coordinates'][0][0][0]], 19) $("#kecamatan_bang").val(data[6]);
// let lop_poly_edit = data['geometry']['coordinates'][0][0]; var latlngs = data[2];
// let list_poly_edit = []; console.log(data[2])
// for (var i = 0; i < lop_poly_edit.length; i++) { var lattitud, longitud;
// geoj = lop_poly_edit[i][0];
// polygigi = [lop_poly_edit[i][1], lop_poly_edit[i][0]] map_bang.setView([data[2]['geometry']['coordinates'][0][0][0][1], data[2]['geometry']['coordinates'][0][0][0][0]], 19);
// list_poly_edit.push(polygigi);
// }; let lop_poly_edit = data[2]['geometry']['coordinates'][0][0];
let list_poly_edit = [];
// polylyly = L.polygon(list_poly_edit).addTo(map_bang) for (var i = 0; i < lop_poly_edit.length; i++) {
// polylyly.enableEdit(); geoj = lop_poly_edit[i][0];
// var hasil = (JSON.stringify(polylyly.toGeoJSON())) polygigi = [lop_poly_edit[i][1], lop_poly_edit[i][0]]
list_poly_edit.push(polygigi);
// } };
// })
polylyly = L.polygon(list_poly_edit).addTo(map_bang)
polylyly.enableEdit();
var hasil = (JSON.stringify(polylyly.toGeoJSON()))
$('#save-perbaikan_bang').click(function() {
$("#coorbangbaru").val(hasil);
})
}
})
}) })
$(document).on("click", "#save-perbaikan_bang", function(e) {
var polyginbang = $('#coorbangbaru').val();
var type_id = $("#type_id").val();
var idbang = $('#id_bang_perbaikan').val();
var namabang = $('#nama_bang').val();
var type = $("#type_bang").val();
var tgl_perbaikan = $("#tglmulaiperbaikan_bang").val();
var tgl_selesai = $("#tglselesaiperbaikan_bang").val();
var tgl_disetujui = $("#tgldisetujui_bang").val();
var anggaran = $("#anggaran_bang").val();
var proposal = $("#proposal_bang").val();
var bukti_selesai = $("#buktiselesai_bang").val();
var pj = $("#pihakpengesahan_bang").val();
var pj_lapangan = $("#pjlapangan_bang").val();
var kontraktor = $("#kontraktor_bang").val();
var jenis_perbaikan = $("#jenisperbaikan_bang").val();
var kelurahan = $("#kelurahan_bang").val();
var kecamatan = $("#kecamatan_bang").val();
var data_umum = [{
'coordbang': polyginbang
}, {
'object_idbang': idbang
}, {
'type_idbang': type_id
}, {
'namebang': namabang
}, {
'typebang': type
}, {
'tgl_selesaibang': tgl_selesai
}, {
'tgl_perbaikanbang': tgl_perbaikan
}, {
'tgl_disetujuibang': tgl_disetujui
}, {
'anggaranbang': anggaran
}, {
'pjbang': pj
}, {
'pj_lapanganbang': pj_lapangan
}, {
'jenis_perbaikanbang': jenis_perbaikan
}, {
'kontraktorbang': kontraktor
}, {
'kelurahanbang': kelurahan
}, {
'kecamatanbang': kecamatan
}]
data = new FormData()
data.append("proposal_bang", $("input[id^='proposal_bang']")[0].files[0]);
data.append("bukti_selesai_bang", $("input[id^='buktiselesai_bang']")[0].files[0]);
for (var i = 0; i < data_umum.length; i++) {
var keyss = Object.keys(data_umum[i]);
data.append(keyss[0], data_umum[i][keyss[0]])
}
$.ajax({
url: "{% url 'apps:save-perbaikan-bang' %}",
data: data,
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"
}, function() {
$("#input_perbaikan_bang").css("display", "none");
// $("#info-jalan").css("display", "block");
// $("#info-pendidikan").css("display", "none");
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
})
});
</script> </script>
{% include 'includes/insert.html' %} {% include 'includes/insert.html' %}
\ No newline at end of file
...@@ -358,7 +358,6 @@ ...@@ -358,7 +358,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div id="modal_bangunan_delete" class="modal fade"> <div id="modal_bangunan_delete" class="modal fade">
<div class="modal-dialog" style="width: max-content;height: max-content;"> <div class="modal-dialog" style="width: max-content;height: max-content;">
...@@ -392,6 +391,127 @@ ...@@ -392,6 +391,127 @@
</div> </div>
</div> </div>
<div id="input_perbaikan_bang" class="modal fade">
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Renovasi Bangunan</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-upl" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upl" data-toggle="tab">Informasi Umum</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-upl">
<input type="text" class="hidden" id="poly_create_input_bang">
<input type="text" class="hidden" id="id_bang_perbaikan">
<input type="text" class="hidden" id="type_id_bang">
<div id="map-insert-renov-bang" style="height: 375px;width: 100%">
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-upl">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama :</label>
<input type="text" id="nama_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Type :</label>
<input type="text" id="type_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kelurahan :</label>
<input type="text" id="kelurahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kecamatan :</label>
<input type="text" id="kecamatan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Disetujui :</label>
<input type="date" id="tgldisetujui_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Mulai Perbaikan :</label>
<input type="date" id="tglmulaiperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Selesai Perbaikan :</label>
<input type="date" id="tglselesaiperbaikan_bang" class="form-control" value="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Anggaran :</label>
<input type="text" id="anggaran_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Pihak yang Mengesahkan :</label>
<input type="text" id="pihakpengesahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Penanggung Jawab Lapangan :</label>
<input type="text" id="pjlapangan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kontraktor :</label>
<input type="text" id="kontraktor_bang" class="form-control" value="">
</div>
<!-- <div class="form-group">
<label>Panjang Jalan Keseluruhan :</label>
<input type="text" id="panjangjalanall" class="form-control" value="">
</div>
<div class="form-group">
<label>Panjang Jalan Perbaikan :</label>
<input type="text" id="panjangjalanperbaikan" class="form-control" value="">
</div>
<div class="form-group">
<label>Lebar Jalan Perbaikan :</label>
<input type="text" id="lebarjalanperbaikan" class="form-control" value="">
</div> -->
<div class="form-group">
<label>Jenis Perbaikan :</label>
<input type="text" id="jenisperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Proposal (.pdf):</label>
<input type="file" id="proposal_bang">
</div>
<div class="form-group">
<label>Bukti Selesai Perbaikan (.png/.jpg/.jpeg/):</label>
<input type="file" id="buktiselesai_bang">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="text" id="coorbangbaru" class="form-control" value="">
<button type="button" class="btn btn-info" id="save-perbaikan_bang" style="float: right; margin-right: 40px;">SAVE</button>
</div>
</div>
</div>
</div>
<!-- modal tuplah --> <!-- modal tuplah -->
<div id="modal-edit-tuplah" class="modal fade"> <div id="modal-edit-tuplah" class="modal fade">
<div class="modal-dialog" style="width: max-content;height: max-content;"> <div class="modal-dialog" style="width: max-content;height: max-content;">
......
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