Commit 4d5698da authored by Manggar Mahardhika's avatar Manggar Mahardhika

men2 terakhir

parent 495122ee
...@@ -3277,13 +3277,31 @@ def user_data(request): ...@@ -3277,13 +3277,31 @@ def user_data(request):
} }
point.append(datap) point.append(datap)
with conn.cursor() as grup:
grup.execute("""
SELECT id, name from auth_group
""")
grp = grup.fetchall()
group = []
for g in grp:
datag = {
"id":g[0],
"name":g[1]
}
group.append(datag)
respon = { respon = {
'data' : user_res, 'data' : user_res,
'thisUser' : user_data, 'thisUser' : user_data,
'point':point 'point':point,
'group':group,
} }
return Response(respon) 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')
......
...@@ -838,9 +838,10 @@ def saveperbaikan(request): ...@@ -838,9 +838,10 @@ def saveperbaikan(request):
pj_lapangan = request.POST.get("pj_lapangan") pj_lapangan = request.POST.get("pj_lapangan")
kontraktor = request.POST.get("kontraktor") kontraktor = request.POST.get("kontraktor")
pjg_perbaikan = request.POST.get("pjg_perbaikan") pjg_perbaikan = request.POST.get("pjg_perbaikan")
sumber_dana = request.POST.get("sumber_dana")
lbr_perbaikan = request.POST.get("lbr_perbaikan") lbr_perbaikan = request.POST.get("lbr_perbaikan")
jenis_perbaikan = request.POST.get("jenis_perbaikan") jenis_perbaikan = request.POST.get("jenis_perbaikan")
luas = request.POST.get("luas") # luas = request.POST.get("luas")
coor = request.POST.get("coord") coor = request.POST.get("coord")
tgl_selesai = request.POST.get("tgl_selesai") tgl_selesai = request.POST.get("tgl_selesai")
...@@ -856,7 +857,7 @@ def saveperbaikan(request): ...@@ -856,7 +857,7 @@ def saveperbaikan(request):
pjg_perbaikan = re.sub('[^0-9.]+', '', str(pjg_perbaikan)) pjg_perbaikan = re.sub('[^0-9.]+', '', str(pjg_perbaikan))
lbr_perbaikan = re.sub('[^0-9.]+', '', str(lbr_perbaikan)) lbr_perbaikan = re.sub('[^0-9.]+', '', str(lbr_perbaikan))
luas = re.sub('[^0-9.]+', '', str(luas)) # luas = re.sub('[^0-9.]+', '', str(luas))
# if coord['features'][0]['geometry']['type'] == 'LineString': # if coord['features'][0]['geometry']['type'] == 'LineString':
# print("oke") # print("oke")
...@@ -925,6 +926,7 @@ def saveperbaikan(request): ...@@ -925,6 +926,7 @@ def saveperbaikan(request):
pjg_perbaikan, pjg_perbaikan,
lbr_perbaikan, lbr_perbaikan,
jenis_perbaikan, jenis_perbaikan,
sumber_dana,
geom geom
) )
VALUES VALUES
...@@ -945,6 +947,7 @@ def saveperbaikan(request): ...@@ -945,6 +947,7 @@ def saveperbaikan(request):
%s, %s,
%s, %s,
'%s', '%s',
'%s',
ST_GeomFromText('%s') ST_GeomFromText('%s')
) )
"""% ( """% (
...@@ -964,6 +967,7 @@ def saveperbaikan(request): ...@@ -964,6 +967,7 @@ def saveperbaikan(request):
float(pjg_perbaikan), float(pjg_perbaikan),
float(lbr_perbaikan), float(lbr_perbaikan),
jenis_perbaikan, jenis_perbaikan,
sumber_dana,
corcoran)) corcoran))
conn.commit() conn.commit()
data = "Sukses" data = "Sukses"
......
...@@ -89,6 +89,8 @@ DATABASES = { ...@@ -89,6 +89,8 @@ DATABASES = {
'PORT': '5432', 'PORT': '5432',
# 'HOST': '103.126.28.66', # 'HOST': '103.126.28.66',
# 'PORT': '8082', # 'PORT': '8082',
# 'HOST': '125.164.19.183',
# 'PORT': '5432',
} }
} }
......
...@@ -33,6 +33,7 @@ urlpatterns = [ ...@@ -33,6 +33,7 @@ urlpatterns = [
path('getallGroups/', views.listGroup, name="getallGroups"), path('getallGroups/', views.listGroup, name="getallGroups"),
path('switchStatus/', views.deactivateUser, name="switchStatus"), path('switchStatus/', views.deactivateUser, name="switchStatus"),
path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"), path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"),
path('loadgroup/', views.load_group_edit, name="loadgroup"),
path('addGroup/', views.addGroup, name="addGroup"), path('addGroup/', views.addGroup, name="addGroup"),
path('deleteGroup/', views.deleteGroup, name="deleteGroup"), path('deleteGroup/', views.deleteGroup, name="deleteGroup"),
path('getGroupById/', views.loadGroupByGroupId, name='getGroupById'), path('getGroupById/', views.loadGroupByGroupId, name='getGroupById'),
......
...@@ -446,6 +446,37 @@ def loadUserbyId(request): ...@@ -446,6 +446,37 @@ def loadUserbyId(request):
return Response(data) return Response(data)
@api_view(('POST',))
def load_group_edit(request):
if request.method == "POST":
idgroup = request.POST.get('id')
with conn.cursor() as cursor:
cursor.execute("SELECT a.id, a.name, b.name from auth_group a left join auth_group b on b.id = a.have_parent where a.id = "+idgroup+"")
result = cursor.fetchall()
resgroup = []
# if result[0][2] != None:
# group_res = loadGroupById(id)
# print(group_res)
# print(result[0][2])
# group_res = loadGroupById(id)
for i in result:
datas = {
"id" : i[0],
"name" : i[1],
"parent": i[2]
}
resgroup.append(datas)
print(datas)
data = {
"info" : "success",
"code" : 0,
"data" : datas,
}
return Response(data)
def loadGroupById(iduser): def loadGroupById(iduser):
with conn.cursor() as cursor: with conn.cursor() as cursor:
...@@ -467,15 +498,17 @@ def addGroup(request): ...@@ -467,15 +498,17 @@ def addGroup(request):
name = request.POST.get('name') name = request.POST.get('name')
idgroup = request.POST.get('id') idgroup = request.POST.get('id')
parent = request.POST.get('parent') parent = request.POST.get('parent')
print(parent)
if parent != None: if parent != '':
for s in Group.objects.all(): for s in Group.objects.all():
if s.name == parent: if s.name == parent:
userGroup = s.id userGroup = s.id
print(userGroup)
else: else:
for g in request.user.groups.all(): for g in request.user.groups.all():
userGroup = g.id userGroup = g.id
# # print(userGroup) print(userGroup)
try: try:
if idgroup: if idgroup:
with conn.cursor() as cursor: with conn.cursor() as cursor:
...@@ -487,9 +520,10 @@ def addGroup(request): ...@@ -487,9 +520,10 @@ def addGroup(request):
# print("ini parent ya gan") # print("ini parent ya gan")
# print(len(result)) # print(len(result))
if isParent == None: # print(isParent)
if parent == '':
with conn.cursor() as cursor: with conn.cursor() as cursor:
cursor.execute("UPDATE auth_group SET name = '"+name+"' WHERE id="+str(idgroup)) cursor.execute("UPDATE auth_group SET name = '"+name+"', have_parent = NULL WHERE id="+str(idgroup))
result = cursor.rowcount result = cursor.rowcount
else: else:
with conn.cursor() as cursor: with conn.cursor() as cursor:
...@@ -518,10 +552,15 @@ def addGroup(request): ...@@ -518,10 +552,15 @@ def addGroup(request):
} }
except Group.DoesNotExist: except Group.DoesNotExist:
if parent == '':
with conn.cursor() as cursor:
cursor.execute("INSERT INTO auth_group(name) VALUES ('"+name+"')")
result = cursor.rowcount
else:
with conn.cursor() as cursor: with conn.cursor() as cursor:
cursor.execute("INSERT INTO auth_group(name, have_parent) VALUES ('"+name+"', "+str(userGroup)+")") cursor.execute("INSERT INTO auth_group(name, have_parent) VALUES ('"+name+"', "+str(userGroup)+")")
result = cursor.rowcount result = cursor.rowcount
if result > 0: if result > 0:
data = { data = {
"code" : 0, "code" : 0,
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="752pt" height="752pt" version="1.1" viewBox="0 0 752 752" xmlns="http://www.w3.org/2000/svg">
<g fill="#3f3f3f">
<path d="m376 372.21c-40.727 0-73.879-33.152-73.879-73.879 0-40.727 33.152-73.875 73.879-73.875s73.879 33.152 73.879 73.879c0 40.727-33.148 73.875-73.879 73.875zm0-119.34c-25.102 0-45.465 20.363-45.465 45.465 0 25.102 20.363 45.465 45.465 45.465s45.465-20.363 45.465-45.465c0-25.102-20.363-45.465-45.465-45.465z"/>
<path d="m513.81 377.89c-29.836 0-53.988-24.152-53.988-53.988s24.152-53.988 53.988-53.988 53.988 24.152 53.988 53.988-24.152 53.988-53.988 53.988zm0-79.559c-14.207 0-25.574 11.367-25.574 25.574 0 14.207 11.367 25.574 25.574 25.574s25.574-11.367 25.574-25.574c0-14.211-11.367-25.574-25.574-25.574z"/>
<path d="m238.19 377.89c-29.836 0-53.988-24.152-53.988-53.988s24.152-53.988 53.988-53.988 53.988 24.152 53.988 53.988-24.152 53.988-53.988 53.988zm0-79.559c-14.207 0-25.574 11.367-25.574 25.574 0 14.207 11.367 25.574 25.574 25.574s25.574-11.367 25.574-25.574c0-14.211-11.363-25.574-25.574-25.574z"/>
<path d="m514.29 482.56c-19.418 0-31.73-0.94531-41.676-2.3672l-11.84-1.8945v-13.734c0-18.469-5.6836-36.938-17.051-53.516l-4.7344-7.1055 3.7891-7.5781c14.207-27.941 41.676-46.41 71.039-46.41 43.098 0 80.508 38.832 80.98 85.246 0.003906 47.359-44.516 47.359-80.508 47.359zm-25.57-29.363c8.0508 0.47266 17.051 0.94531 25.574 0.94531 47.832 0 52.094-4.7344 52.094-18.941-0.47266-30.309-25.102-56.828-52.566-56.828-16.102 0-31.73 8.9961-41.676 23.68 9.4688 16.098 15.152 33.621 16.574 51.145z"/>
<path d="m238.19 482.56c-35.992 0-80.508 0-80.508-47.359 0-46.41 36.938-85.246 80.508-85.246 28.887 0 56.828 17.996 71.039 46.41l3.7891 7.5781-4.7344 7.1055c-7.5781 11.367-17.051 30.309-16.574 53.516v14.207l-11.844 1.418c-9.9453 1.4219-22.258 2.3711-41.676 2.3711zm0-104.19c-27.941 0-52.094 26.52-52.094 56.828 0 14.207 4.2617 18.941 52.094 18.941 8.0508 0 17.051 0 25.574-0.94531 1.4219-17.523 7.1055-35.047 16.102-51.148-9.9453-14.68-25.57-23.676-41.676-23.676z"/>
<path d="m376 527.55c-53.043 0-113.19 0-113.19-63.461 0.003906-65.352 51.625-120.29 113.19-120.29 61.566 0 113.19 54.934 113.19 120.29 0 63.461-60.145 63.461-113.19 63.461zm0-155.34c-44.988 0-84.77 43.098-84.77 91.875 0 28.887 15.156 35.047 84.77 35.047 69.617 0 84.77-6.1562 84.77-35.047 0.003907-48.777-39.777-91.875-84.77-91.875z"/>
</g>
</svg>
...@@ -139,10 +139,11 @@ function getdetailper(id) { ...@@ -139,10 +139,11 @@ function getdetailper(id) {
function load_manage() { function load_manage() {
// $("#pengaturan_btn").click(function() { // $("#pengaturan_btn").click(function() {
$(".datatable-show-all.list_user").dataTable().fnDestroy(); $(".datatable-show-all.list_user").dataTable().fnDestroy();
$(".datatable-show-all.list_group").dataTable().fnDestroy();
$(".datatable-show-all.list_point").dataTable().fnDestroy(); $(".datatable-show-all.list_point").dataTable().fnDestroy();
$("#list_point").removeClass('list_point') $("#list_point").removeClass('list_point')
$("#list_user").removeClass('list_user') $("#list_user").removeClass('list_user')
$("#list_group").removeClass('list_group')
$.ajax({ $.ajax({
url: "api/user-data", url: "api/user-data",
...@@ -157,6 +158,7 @@ function load_manage() { ...@@ -157,6 +158,7 @@ function load_manage() {
for (var i = 0; i < data['data'].length; i++) { for (var i = 0; i < data['data'].length; i++) {
$("#list_point").addClass('list_point') $("#list_point").addClass('list_point')
$("#list_user").addClass('list_user') $("#list_user").addClass('list_user')
$("#list_group").addClass('list_group')
number += 1; number += 1;
var id = data['data'][i]['id']; var id = data['data'][i]['id'];
...@@ -226,6 +228,57 @@ function load_manage() { ...@@ -226,6 +228,57 @@ function load_manage() {
var switchery = new Switchery(primary_s[z], { color: '#5A9AFB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' }); var switchery = new Switchery(primary_s[z], { color: '#5A9AFB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' });
} }
//group
var data_group = []
var number = 0;
var all_id = []
var all_stat = []
console.log(data['group'])
for (var i = 0; i < data['group'].length; i++) {
number += 1;
var id = data['group'][i]['id'];
var name = data['group'][i]['name'];
var data_gab = `<tr>
<td>` + number + `</td>
<td>` + name + `</td>
<td class="text-center" style='padding:0px;'>
<div class='row'>
<div class='col-md-6 text-right' style='margin-top:8px'>
<a onclick="loadgroupbyid('` + id + `')"><i class=" icon-pencil7"></i>Edit</a>
</div>
</div>
</td>
</tr>`;
data_group.push(data_gab)
all_id.push(id)
all_stat.push(isactive)
};
$("#tbody_group_list").html(data_group)
if (Array.prototype.forEach) {
var elems = Array.prototype.slice.call(document.querySelectorAll('.switchery'));
elems.forEach(function(html) {
var switchery = new Switchery(html);
});
} else {
var elems = document.querySelectorAll('.switchery');
for (var i = 0; i < elems.length; i++) {
var switchery = new Switchery(elems[i]);
}
}
$(".switch").bootstrapSwitch();
var primary_s = document.querySelectorAll("[class^=switchery-custom-x");
for (var z = 0; z < primary_s.length; z++) {
var switchery = new Switchery(primary_s[z], { color: '#5A9AFB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' });
}
//endgroup
var data_point = [] var data_point = []
var number2 = 0; var number2 = 0;
...@@ -261,10 +314,9 @@ function load_manage() { ...@@ -261,10 +314,9 @@ function load_manage() {
data_point.push(data_gab) data_point.push(data_gab)
}; };
$("#tbody_point_list").html(data_point) $("#tbody_point_list").html(data_point)
//input_search
$('.datatable-show-all.list_user').DataTable({ $('.datatable-show-all.list_user').DataTable({
autoWidth: false, autoWidth: false,
columnDefs: [{ columnDefs: [{
...@@ -304,6 +356,45 @@ function load_manage() { ...@@ -304,6 +356,45 @@ function load_manage() {
} }
}); });
$('.datatable-show-all.list_group').DataTable({
autoWidth: false,
columnDefs: [{
orderable: false,
width: '10%',
targets: [0],
}, ],
dom: '<"float-left "B>frtip',
buttons: [{
text: 'Add new button',
action: function(e, dt, node, config) {
dt.button().add(1, {
text: 'Button ' + (counter++),
action: function() {
this.remove();
}
});
}
}],
language: {
search: ' _INPUT_',
searchPlaceholder: 'Data Group...',
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({ $('.datatable-show-all.list_point').DataTable({
autoWidth: false, autoWidth: false,
columnDefs: [{ columnDefs: [{
...@@ -341,7 +432,7 @@ function load_manage() { ...@@ -341,7 +432,7 @@ function load_manage() {
$(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup'); $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
} }
}); });
//
} }
}); });
}; };
...@@ -490,7 +581,6 @@ function download_point_list(type, fn, dl) { ...@@ -490,7 +581,6 @@ function download_point_list(type, fn, dl) {
}) })
} }
function loadGroups(isSelect) { function loadGroups(isSelect) {
var isObject = {} var isObject = {}
...@@ -543,6 +633,53 @@ function loadGroups(isSelect) { ...@@ -543,6 +633,53 @@ function loadGroups(isSelect) {
}); });
} }
function loadparent(isSelect) {
var isObject = {}
isObject.func_name = "loadparent";
$.ajax({
url: "/getallGroups/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
console.log(data)
let response = data;
if (response.code == 0) {
var groups = response.data;
var html = `<option value="" selected>-- Pilih Parent --</option>`;
for (i in groups) {
if (isSelect) {
if (isSelect.length >= 1) {
for (j in isSelect) {
if (isSelect[j] == groups[i]) {
html += `<option value="` + groups[i] + `" selected>` + groups[i] + `</option>`;
} else {
html += `<option value="` + groups[i] + `">` + groups[i] + `</option>`;
}
}
} else {
html += `<option value="` + groups[i] + `">` + groups[i] + `</option>`;
}
} else {
html += `<option value="` + groups[i] + `">` + groups[i] + `</option>`;
}
}
$("#select_parent").html(html);
// $("#select_group_parent").html(html);
} else {
$("#select_parent").html("group tidak tersedia");
// $("#select_group_parent").html("group tidak tersedia");
}
}
});
}
function swal_switch(isConfirm, c, isObject) { function swal_switch(isConfirm, c, isObject) {
var checkbox = document.getElementById("checkbox" + c); var checkbox = document.getElementById("checkbox" + c);
...@@ -598,7 +735,6 @@ function swal_switch(isConfirm, c, isObject) { ...@@ -598,7 +735,6 @@ function swal_switch(isConfirm, c, isObject) {
} }
} }
function switchuserstatus(id, c) { function switchuserstatus(id, c) {
var isObject = {} var isObject = {}
var params = id.split(","); var params = id.split(",");
...@@ -644,6 +780,7 @@ function loaduserbyid(id) { ...@@ -644,6 +780,7 @@ function loaduserbyid(id) {
dataType: 'json', dataType: 'json',
type: 'post', type: 'post',
success: function(data) { success: function(data) {
$("#modal_edit_user").css('display', 'block');
$("#modal_edit_user").modal("show") $("#modal_edit_user").modal("show")
$(".modstit").html("Update User") $(".modstit").html("Update User")
$("#inUsername").attr("disabled", true) $("#inUsername").attr("disabled", true)
...@@ -674,6 +811,51 @@ function loaduserbyid(id) { ...@@ -674,6 +811,51 @@ function loaduserbyid(id) {
}); });
} }
function loadgroupbyid(id) {
var isObject = {};
isObject.id = id;
$("#idgroup").val(id)
$.ajax({
url: "/loadgroup/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
$("#modal_edit_group").css('display', 'block');
$("#modal_edit_group").modal("show")
$(".modstit").html("Update Group")
// $("#ingroup").attr("disabled", true)
let response = data;
if (response.code == 0) {
var grup = response.data;
$("#ingroup").val(grup.name);
var gays = []
gays.push(grup.parent)
if (grup.parent == null){
loadparent()
} else {
loadparent(gays)
}
// if (user.is_staff) {
// $('input[name=isStaff][value=true]').attr('checked', true)
// } else {
// $('input[name=isStaff][value=false]').attr('checked', true)
// }
// loadparent(grup.have_parent)
$("#modalAddButton").click()
} else {
}
}
});
}
var map_poin_det = L.map('maps_detail_p', { var map_poin_det = L.map('maps_detail_p', {
editable: true, editable: true,
...@@ -760,7 +942,6 @@ function modal_detail_point_pengaturan(id, db) { ...@@ -760,7 +942,6 @@ function modal_detail_point_pengaturan(id, db) {
}); });
} }
$("#saveuser").on("click", function() { $("#saveuser").on("click", function() {
var isObject = {}; var isObject = {};
var ars = '' var ars = ''
...@@ -778,6 +959,7 @@ $("#saveuser").on("click", function() { ...@@ -778,6 +959,7 @@ $("#saveuser").on("click", function() {
isObject['phone'] = $("#phone").val(); isObject['phone'] = $("#phone").val();
isObject.group = group isObject.group = group
isObject.isStaff = $('input[name="isStaff"]:checked').val(); isObject.isStaff = $('input[name="isStaff"]:checked').val();
console.log(group)
$.ajax({ $.ajax({
url: "adduser/", url: "adduser/",
...@@ -810,7 +992,56 @@ $("#saveuser").on("click", function() { ...@@ -810,7 +992,56 @@ $("#saveuser").on("click", function() {
}); });
}) })
$("#savegroup").on("click", function() {
var isObject = {};
var ars = ''
var idgroup = $("#idgroup").val();
var group = $("#select_parent").val();
if (idgroup) {
isObject.id = idgroup;
}
isObject['name'] = $("#ingroup").val();
isObject['parent'] = $("#select_parent").val();
isObject.group = group
console.log(group)
console.log(isObject)
$.ajax({
url: "addGroup/",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
$("#modal_edit_group").css('display', 'none');
swal({
title: response.info,
text: response.data + "reload untuk mendapatkan update",
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "alert",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
}
});
})
$("#add_user").click(function() { $("#add_user").click(function() {
$("#modal_edit_user").css('display', 'block');
$("#modal_edit_user").modal("show") $("#modal_edit_user").modal("show")
$(".modstit").html("Tambah User") $(".modstit").html("Tambah User")
$("#inUsername").attr("disabled", false) $("#inUsername").attr("disabled", false)
...@@ -822,6 +1053,17 @@ $("#add_user").click(function() { ...@@ -822,6 +1053,17 @@ $("#add_user").click(function() {
$("#inEmail").val("") $("#inEmail").val("")
$("#phone").val("") $("#phone").val("")
$("#iduser").val("") $("#iduser").val("")
loadGroups()
})
$("#add_group").click(function() {
$("#modal_edit_group").css('display', 'block');
$("#modal_edit_group").modal("show")
$(".modstit").html("Tambah Group")
$("#ingroup").attr("disabled", false)
$("#ingroup").val("")
$("#idgroup").val("")
loadparent()
}) })
$("#saveedit_p").click(function() { $("#saveedit_p").click(function() {
......
...@@ -2117,6 +2117,10 @@ ...@@ -2117,6 +2117,10 @@
<label>Panjang Jalan Perbaikan :</label> <label>Panjang Jalan Perbaikan :</label>
<input type="text" id="panjangjalanperbaikan" class="form-control" value=""> <input type="text" id="panjangjalanperbaikan" class="form-control" value="">
</div> </div>
<div class="form-group">
<label>Sumber Dana :</label>
<input type="text" id="sumber_dana" class="form-control" value="">
</div>
<div class="form-group"> <div class="form-group">
<label>Lebar Jalan Perbaikan :</label> <label>Lebar Jalan Perbaikan :</label>
<input type="text" id="lebarjalanperbaikan" class="form-control" value=""> <input type="text" id="lebarjalanperbaikan" class="form-control" value="">
...@@ -2973,9 +2977,10 @@ ...@@ -2973,9 +2977,10 @@
var pj_lapangan = $("#pjlapangan").val(); var pj_lapangan = $("#pjlapangan").val();
var kontraktor = $("#kontraktor").val(); var kontraktor = $("#kontraktor").val();
var pjg_perbaikan = $("#panjangjalanperbaikan").val(); var pjg_perbaikan = $("#panjangjalanperbaikan").val();
var sumber_dana = $("#sumber_dana").val();
var lbr_perbaikan = $("#lebarjalanperbaikan").val(); var lbr_perbaikan = $("#lebarjalanperbaikan").val();
var jenis_perbaikan = $("#jenisperbaikan").val(); var jenis_perbaikan = $("#jenisperbaikan").val();
var luas = $("#luas").val(); // var luas = $("#luas").val();
var kelurahan = $("#kelurahan").val(); var kelurahan = $("#kelurahan").val();
var kecamatan = $("#kecamatan").val(); var kecamatan = $("#kecamatan").val();
...@@ -3005,18 +3010,21 @@ ...@@ -3005,18 +3010,21 @@
'kontraktor': kontraktor 'kontraktor': kontraktor
}, { }, {
'pjg_perbaikan': pjg_perbaikan 'pjg_perbaikan': pjg_perbaikan
}, {
'sumber_dana': sumber_dana
}, { }, {
'lbr_perbaikan': lbr_perbaikan 'lbr_perbaikan': lbr_perbaikan
}, { }, {
'jenis_perbaikan': jenis_perbaikan 'jenis_perbaikan': jenis_perbaikan
}, { // }, {
'luas': luas // 'luas': luas
}, { }, {
'kelurahan': kelurahan 'kelurahan': kelurahan
}, { }, {
'kecamatan': kecamatan 'kecamatan': kecamatan
}] }]
console.log(data_umum)
data = new FormData() data = new FormData()
data.append("proposal", $("input[id^='proposal']")[0].files[0]); data.append("proposal", $("input[id^='proposal']")[0].files[0]);
data.append("bukti_selesai", $("input[id^='buktiselesai']")[0].files[0]); data.append("bukti_selesai", $("input[id^='buktiselesai']")[0].files[0]);
......
...@@ -646,7 +646,7 @@ ...@@ -646,7 +646,7 @@
</div> </div>
</a> </a>
</div> </div>
<!-- <div class="col-md-4 text-center"> <div class="col-md-4 text-center">
<a href="#" class="btn btn_create_lahan"> <a href="#" class="btn btn_create_lahan">
<div> <div>
<img src="{% static 'img/icon-1/SquareHalflahan.svg' %}" alt="" style="width: 35px; <img src="{% static 'img/icon-1/SquareHalflahan.svg' %}" alt="" style="width: 35px;
...@@ -667,7 +667,7 @@ ...@@ -667,7 +667,7 @@
<span>KDB & KLB</span> <span>KDB & KLB</span>
</div> </div>
</a> </a>
</div> --> </div>
</div> </div>
</fieldset> </fieldset>
...@@ -805,6 +805,27 @@ ...@@ -805,6 +805,27 @@
</a> </a>
</div> </div>
<div style="margin-bottom: 10px;">
<a href="#grouproleuser" data-toggle="tab" class="tab-user btn btn-default" style="
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
border-radius: 5px;" onclick="btnuserclick(event)">
<div class="row">
<div class="col-sm-2">
<img src="{% static 'img/icon-1/groupuser.svg' %}" alt="" style="width: 29px;height: 29px;">
</div>
<div class="col-sm-8 text-left" style="margin-top: 4px;">
Groups & Role User
</div>
<div class="col-sm-2">
<i class="caret" style="transform: rotate(-90deg);margin-top: 4px;"></i>
</div>
</div>
</a>
</div>
{% endif %} {% endif %}
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<a href="#monitoringdatauser" data-toggle="tab" class="tab-user btn btn-default" style=" <a href="#monitoringdatauser" data-toggle="tab" class="tab-user btn btn-default" style="
...@@ -1042,7 +1063,7 @@ ...@@ -1042,7 +1063,7 @@
</a> </a>
</div> </div>
<div style="position: absolute;left: 250px;font-size: 10pt;background: #2196F3;border-radius: 10px;"> <div style="position: absolute;left: 292px;font-size: 10pt;background: #2196F3;border-radius: 10px;">
<a class="btn side-bar-but" id="add_user" style="z-index:9;color:white;"> <a class="btn side-bar-but" id="add_user" style="z-index:9;color:white;">
<div> <div>
<span>Tambah User</span> <span>Tambah User</span>
...@@ -1066,6 +1087,38 @@ ...@@ -1066,6 +1087,38 @@
</table> </table>
</div> </div>
<div class="tab-pane" id="grouproleuser">
<table class="table table-responsive datatable-show-all table-sm list_group" id="list_group" 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>
<div style="position: absolute;left: 292px;font-size: 10pt;background: #2196F3;border-radius: 10px;">
<a class="btn side-bar-but" id="add_group" style="z-index:9;color:white;">
<div>
<span>Tambah Group</span>
</div>
</a>
</div>
<thead style="font-size: 12px;line-height: 14px;font-family: 'gilroysemibold';text-transform: capitalize;">
<tr>
<th>No.</th>
<th>Groups User</th>
<th class="text-center" style='padding:0px;'>Action</th>
</tr>
</thead>
<tbody id="tbody_group_list">
</tbody>
</table>
</div>
{% endif %} {% endif %}
<div class="tab-pane" id="monitoringdatauser"> <div class="tab-pane" id="monitoringdatauser">
...@@ -1746,6 +1799,63 @@ ...@@ -1746,6 +1799,63 @@
</div> </div>
</div> </div>
<div id="modal_edit_group" class="modal fade">
<div class="modal-dialog md" style="margin-top: 100px;">
<div class="modal-content" style="border-radius: 10px;">
<div class="modal-header bg-info" style="background-color: #1a222f !important;border-top-right-radius: 10px;border-top-left-radius: 10px;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title modstit">Modal Tambah Group</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<input type="hidden" id="idgroup">
<div class="row">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Group</label>
<div class="col-lg-9">
<input id="ingroup" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" group_use>
<div class="form-group" style="margin-top: 10px !important;">
<label class="col-lg-3 control-label lbl-top">Parent</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="select_parent" data-placeholder="select parent.." class="select-size-xs">
<option value=""></option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 20px;">
<div class="form-group">
<label class="col-lg-3 control-label">Aktif</label>
<div class="col-lg-9">
<label class="radio-inline">
<input type="radio" class="styled" value="true" name="isactive" checked="checked">
Ya
</label>
<label class="radio-inline">
<input type="radio" class="styled" value="false" name="isactive">
Tidak
</label>
</div>
</div>
</div>
</div>
<hr>
<div class="modal-footer">
<!-- <button type="button" class="btn btn-link" data-dismiss="modal" onclick="destroyfade()">Close</button> -->
<button type="button" class="btn btn-info" id="savegroup">Save changes</button>
</div>
</div>
</div>
</div>
<div id="modal_detail_point_pengaturan" class="modal fade mymodal"> <div id="modal_detail_point_pengaturan" class="modal fade mymodal">
<div class="modal-dialog modal-md" style="top: 10%;"> <div class="modal-dialog modal-md" style="top: 10%;">
<div class="modal-content" style="border-radius:10px;"> <div class="modal-content" style="border-radius:10px;">
......
...@@ -1160,6 +1160,9 @@ background: none;border-color: transparent;"> ...@@ -1160,6 +1160,9 @@ background: none;border-color: transparent;">
width: 50px;"> width: 50px;">
</a>`); </a>`);
$('.isi_detail_cek_jalan').show()
$('.map_detail_p_jalan').show()
map_detail_perbaikan.setView([data[0]['geometry']['coordinates'][0][0][1], data[0]['geometry']['coordinates'][0][0][0]], 18) 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 myLines = [data[0]['geometry']];
......
...@@ -451,6 +451,10 @@ ...@@ -451,6 +451,10 @@
<label>Panjang Jalan Perbaikan :</label> <label>Panjang Jalan Perbaikan :</label>
<input type="text" id="panjangjalanperbaikan" class="form-control" value=""> <input type="text" id="panjangjalanperbaikan" class="form-control" value="">
</div> </div>
<div class="form-group">
<label>Sumber Dana :</label>
<input type="text" id="sumber_dana" class="form-control" value="">
</div>
<div class="form-group"> <div class="form-group">
<label>Lebar Jalan Perbaikan :</label> <label>Lebar Jalan Perbaikan :</label>
<input type="text" id="lebarjalanperbaikan" class="form-control" value=""> <input type="text" id="lebarjalanperbaikan" class="form-control" value="">
......
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