Commit fdc72fd1 authored by Muhamad's avatar Muhamad

new again

parent ea31f528
...@@ -62,4 +62,6 @@ urlpatterns = [ ...@@ -62,4 +62,6 @@ 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')
] ]
\ No newline at end of file
...@@ -138,7 +138,7 @@ def building(request): ...@@ -138,7 +138,7 @@ def building(request):
FROM FROM
geo_bangunan gb geo_bangunan gb
WHERE WHERE
st_intersects ( gb.geom, 'SRID=0;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' )"""% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor)) st_intersects ( st_setsrid(gb.geom,4326) , 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' )"""% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor))
prov_res = buldings.fetchall() prov_res = buldings.fetchall()
polbang = [] polbang = []
...@@ -252,6 +252,31 @@ def editjalanvalid(request): ...@@ -252,6 +252,31 @@ def editjalanvalid(request):
respon={'data':data, 'info':info, 'code':status} respon={'data':data, 'info':info, 'code':status}
return Response(respon) return Response(respon)
@api_view(('GET',))
@renderer_classes((TemplateHTMLRenderer, JSONRenderer))
def deletejalan(request):
idjalan = request.GET.get("idjalan")
# try:
with conn.cursor() as jalan:
jalan.execute("DELETE from geo_jalan WHERE id = %s"% idjalan)
conn.commit()
data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
# except:
# data = 'Oops!!'
# info = 'Hubungi Developer'
# status = 1
respon={'data':data, 'info':info, 'code':status}
return Response(respon)
@api_view(('GET',)) @api_view(('GET',))
@renderer_classes((TemplateHTMLRenderer, JSONRenderer)) @renderer_classes((TemplateHTMLRenderer, JSONRenderer))
......
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
# Create your forms here.
class NewUserForm(UserCreationForm):
email = forms.EmailField(required=True)
class Meta:
model = User
fields = ("username", "email", "password1", "password2")
def save(self, commit=True):
user = super(NewUserForm, self).save(commit=False)
user.email = self.cleaned_data['email']
if commit:
user.save()
return user
\ No newline at end of file
...@@ -13,10 +13,14 @@ urlpatterns = [ ...@@ -13,10 +13,14 @@ urlpatterns = [
path('perbaikan', views.perbaikanrenovasi, name='perbaikan'), path('perbaikan', views.perbaikanrenovasi, name='perbaikan'),
path('loadDetail', views.loadDetail, name='loadDetail'), path('loadDetail', views.loadDetail, name='loadDetail'),
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('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'),
path('get-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'), path('get-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'),
path('get-detail-perbaikan-bang', views.getdetailperbaikanbangunan, name='get-detail-perbaikan-bang'),
path('registration_new_app', views.registrasi_new_app, name='reg_new_app'),
] ]
\ No newline at end of file
...@@ -12,6 +12,7 @@ from django.db import connection as conn ...@@ -12,6 +12,7 @@ from django.db import connection as conn
def get_per_user(req): def get_per_user(req):
us = req us = req
id = us.id id = us.id
print(id)
with conn.cursor() as perm: with conn.cursor() as perm:
perm.execute("""SELECT perm.execute("""SELECT
json_build_object ( 'kab', gpk.kabupaten, 'pro', gpk.provinsi, 'id_apps', uaa.id_apps, 'apps', uaa.NAME ) json_build_object ( 'kab', gpk.kabupaten, 'pro', gpk.provinsi, 'id_apps', uaa.id_apps, 'apps', uaa.NAME )
...@@ -21,39 +22,630 @@ def get_per_user(req): ...@@ -21,39 +22,630 @@ def get_per_user(req):
WHERE WHERE
uaa.id_user = %s"""% id) uaa.id_user = %s"""% id)
per = perm.fetchall() per = perm.fetchall()
print(per)
permm = per[0][0]
return us, permm
def ui_params(id_app):
with conn.cursor() as perm:
perm.execute("""SELECT
json_build_object ( 'title', v1, 'logo', v2)
FROM
ui_params
WHERE
id_apps = %s"""% int(id_app))
per = perm.fetchall()
permm = per[0][0] permm = per[0][0]
return permm
# Create your views here.
class Dashboard(generic.TemplateView):
template_name = "layout/layout.html"
# @method_decorator(login_required(login_url='/login/'))
def get(self, request):
# if user.
if request.user.is_authenticated:
usern, perm = get_per_user(request.user)
kab = perm['kab']
# print(perm)
ui_param = ui_params(perm['id_apps'])
title = ui_param['title']
logo = ui_param['logo']
# print(ui_param)
with conn.cursor() as batas:
batas.execute("SELECT json_build_object('type', 'Feature', 'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_prov_kab where kabupaten = '%s'"% kab)
bts_res_ = batas.fetchall()
bts_res = []
for i in bts_res_:
bts_res.append(i[0])
with conn.cursor() as all_:
all_.execute("SELECT * from global where kabupaten = '%s'"% kab)
all = all_.fetchall()
if all == []:
all = [[]]
with conn.cursor() as kel:
kel.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
( kode_desa, desa, kecamatan, kab_kota, gdk.provinsi, jumlah_pen, jumlah_kk, luas_desa, 'NONE' ),
'penduduk',
(
pria,
wanita,
belum_kawin,
kawin,
cerai_hidup,
cerai_mati,
wajib_ktp,
islam,
kristen,
khatolik,
hindu,
budha,
konghucu,
kepercayaan_lain,
u0,
u5,
u10,
u15,
u20,
u25,
u30,
u35,
u40,
u45,
u50,
u55,
u60,
u65,
u70,
u75
),
'pekerjaan_pendidikan',
(
tidak_sekolah,
belum_tamat,
tamat_sd,
sltp,
slta,
diploma_i,
diploma_ii,
diploma_iv,
strata_ii,
strata_iii,
tidak_bekerja,
aparatur_pemerintah,
tenaga_pendidik,
wiraswasta,
pertanian,
tenaga_kesehatan,
pensiunan,
pegawai,
tentara,
kepolisian,
pedagang,
petani,
peternak,
nelayan,
karyawan,
buruh,
pembantu,
tukang,
pendeta,
pastor,
ustadz,
dosen,
guru,
pilot,
pengacara,
notaris,
arsitek,
akuntan,
konsultan,
dokter,
bidan,
perawat,
psikiater,
sopir,
lainnya
),
'poi',
( jml_puskesma, jml_sekolah, jml_sarib ),
'geometry',
ST_AsGeoJSON ( gdk.geom :: geometry ) :: json
)
FROM
geo_data_kelurahan gdk
JOIN geo_prov_kab gpk ON st_intersects(gdk.geom, gpk.geom)
WHERE gpk.kabupaten = '%s'"""% kab)
kel_res_ = kel.fetchall()
with conn.cursor() as kec:
kec.execute("""SELECT
kecamatan,
json_build_object (
'type',
'Feature',
'administrasi',
( gdk.ID, gdk.kecamatan ),
'geometry',
ST_AsGeoJSON ( gdk.geom :: geometry ) :: json
)
FROM
geo_data_kecamatan gdk
JOIN geo_prov_kab gpk ON st_intersects ( gdk.geom, gpk.geom )
WHERE
gpk.kabupaten = '%s'"""% kab)
kec_res_ = kec.fetchall()
kec_res = []
for i in kec_res_:
kec_res.append(i[1])
kel_res = []
for i in kel_res_:
kel_res.append(i[0])
with conn.cursor() as kantor_administrasi:
kantor_administrasi.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_kantor_administrasi A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
kantor_administrasi_res = kantor_administrasi.fetchall()
kantor_administrasi_result = []
for i in kantor_administrasi_res:
kantor_administrasi_result.append(i[0])
with conn.cursor() as layanan_kesehatan:
layanan_kesehatan.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_layanan_kesehatan A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
layanan_kesehatan_res = layanan_kesehatan.fetchall()
layanan_kesehatan_result = []
for i in layanan_kesehatan_res:
layanan_kesehatan_result.append(i[0])
with conn.cursor() as puskesmas:
puskesmas.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_puskesmas A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
puskesmas_res = puskesmas.fetchall()
puskesmas_result = []
for i in puskesmas_res:
puskesmas_result.append(i[0])
with conn.cursor() as rumah_sakit:
rumah_sakit.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_rumah_sakit A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
rumah_sakit_res = rumah_sakit.fetchall()
rumah_sakit_result = []
for i in rumah_sakit_res:
rumah_sakit_result.append(i[0])
with conn.cursor() as sarana_ibadah:
sarana_ibadah.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_sarana_ibadah A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
sarana_ibadah_res = sarana_ibadah.fetchall()
sarana_ibadah_result = []
for i in sarana_ibadah_res:
if i[0]["administrasi"]['f1'] == None:
i[0]["administrasi"]['f1'] = "None"
sarana_ibadah_result.append(i[0])
with conn.cursor() as sarana_pendidikan:
sarana_pendidikan.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_sarana_pendidikan A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
sarana_pendidikan_res = sarana_pendidikan.fetchall()
sarana_pendidikan_result = []
for i in sarana_pendidikan_res:
if i[0]["administrasi"]['f1'] == None:
i[0]["administrasi"]['f1'] = "None"
sarana_pendidikan_result.append(i[0])
with conn.cursor() as spbu:
spbu.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_spbu A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
spbu_res = spbu.fetchall()
spbu_result = []
for i in spbu_res:
spbu_result.append(i[0])
with conn.cursor() as stasiun:
stasiun.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_stasiun A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
stasiun_res = stasiun.fetchall()
stasiun_result = []
for i in stasiun_res:
stasiun_result.append(i[0])
with conn.cursor() as terminal:
terminal.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.luas,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_terminal_bus A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
terminal_res = terminal.fetchall()
terminal_result = []
for i in terminal_res:
terminal_result.append(i[0])
with conn.cursor() as cagar_budaya:
cagar_budaya.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.gambar,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.luas,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_cagar_budaya A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
cagar_budaya_res = cagar_budaya.fetchall()
return us, permm cagar_budaya_result = []
for i in cagar_budaya_res:
cagar_budaya_result.append(i[0])
def ui_params(id_app): with conn.cursor() as gardu_listrik:
with conn.cursor() as perm: gardu_listrik.execute("""SELECT
perm.execute("""SELECT json_build_object (
json_build_object ( 'title', v1, 'logo', v2) 'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM FROM
ui_params geo_gardu_listrik A
WHERE JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
id_apps = %s"""% int(id_app)) JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
per = perm.fetchall() join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
where b.kabupaten = '%s'"""% kab)
permm = per[0][0] gardu_listrik_res = gardu_listrik.fetchall()
return permm
# Create your views here. gardu_listrik_result = []
class Dashboard(generic.TemplateView): for i in gardu_listrik_res:
template_name = "layout/layout.html" gardu_listrik_result.append(i[0])
@method_decorator(login_required(login_url='/login/'))
def get(self, request): parameter_ui = {'logo':logo, 'title':title}
print(parameter_ui)
context = {
'parameter_ui':parameter_ui,
'batas':bts_res,
'title':title,
'logo':logo,
'kelurahan':kec_res,
'kecamatan':kec_res,
'kantor_administrasi':kantor_administrasi_result,
'layanan_kesehatan':layanan_kesehatan_result,
'puskesmas':puskesmas_result,
'rumah_sakit':rumah_sakit_result,
'sarana_ibadah':sarana_ibadah_result,
'sarana_pendidikan':sarana_pendidikan_result,
'spbu':spbu_result,
'stasiun':stasiun_result,
'terminal':terminal_result,
'cagar_budaya':cagar_budaya_result,
'gardu_listrik':gardu_listrik_result,
'global':all[0]
}
return render (request, self.template_name, context)
else:
usern, perm = get_per_user(request.user) kab = 'KOTA CIMAHI'
kab = perm['kab'] title = 'KAMI (Khansia Aset Manajemen and Inventory)'
# print(perm) logo = 'khatulistiwalogotanpanama.png'
ui_param = ui_params(perm['id_apps'])
title = ui_param['title']
logo = ui_param['logo']
# print(ui_param)
with conn.cursor() as batas: with conn.cursor() as batas:
batas.execute("SELECT json_build_object('type', 'Feature', 'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_prov_kab where kabupaten = '%s'"% kab) batas.execute("SELECT json_build_object('type', 'Feature', 'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_prov_kab where kabupaten = '%s'"% kab)
...@@ -64,16 +656,19 @@ class Dashboard(generic.TemplateView): ...@@ -64,16 +656,19 @@ class Dashboard(generic.TemplateView):
bts_res.append(i[0]) bts_res.append(i[0])
with conn.cursor() as all_: with conn.cursor() as all_:
all_.execute("SELECT * from global_oku") all_.execute("SELECT * from global where kabupaten = '%s'"% kab)
all = all_.fetchall() all = all_.fetchall()
if all == []:
all = [[]]
with conn.cursor() as kel: with conn.cursor() as kel:
kel.execute("""SELECT kel.execute("""SELECT
json_build_object ( json_build_object (
'type', 'type',
'Feature', 'Feature',
'administrasi', 'administrasi',
( kode_desa, desa, kecamatan, kab_kota, gdk.provinsi, jumlah_pen, jumlah_kk, luas_desa, gambar ), ( kode_desa, desa, kecamatan, kab_kota, provinsi, jumlah_pen, jumlah_kk, luas_desa, gambar ),
'penduduk', 'penduduk',
( (
pria, pria,
...@@ -162,8 +757,7 @@ class Dashboard(generic.TemplateView): ...@@ -162,8 +757,7 @@ class Dashboard(generic.TemplateView):
) )
FROM FROM
geo_data_kelurahan gdk geo_data_kelurahan gdk
JOIN geo_prov_kab gpk ON st_intersects(gdk.geom, gpk.geom) WHERE kab_kota = '%s'"""% kab)
WHERE gpk.kabupaten = '%s'"""% kab)
kel_res_ = kel.fetchall() kel_res_ = kel.fetchall()
with conn.cursor() as kec: with conn.cursor() as kec:
...@@ -199,7 +793,7 @@ class Dashboard(generic.TemplateView): ...@@ -199,7 +793,7 @@ class Dashboard(generic.TemplateView):
'Feature', 'Feature',
'administrasi', 'administrasi',
( (
A.namobj, A.remark,
A.remark, A.remark,
A.alamat, A.alamat,
A.luas_bangunan, A.luas_bangunan,
...@@ -615,6 +1209,7 @@ class Dashboard(generic.TemplateView): ...@@ -615,6 +1209,7 @@ class Dashboard(generic.TemplateView):
parameter_ui = {'logo':logo, 'title':title} parameter_ui = {'logo':logo, 'title':title}
print(parameter_ui)
context = { context = {
'parameter_ui':parameter_ui, 'parameter_ui':parameter_ui,
'batas':bts_res, 'batas':bts_res,
...@@ -634,7 +1229,6 @@ class Dashboard(generic.TemplateView): ...@@ -634,7 +1229,6 @@ class Dashboard(generic.TemplateView):
'cagar_budaya':cagar_budaya_result, 'cagar_budaya':cagar_budaya_result,
'gardu_listrik':gardu_listrik_result, 'gardu_listrik':gardu_listrik_result,
'global':all[0] 'global':all[0]
# 'kntl':kntl
} }
return render (request, self.template_name, context) return render (request, self.template_name, context)
...@@ -696,7 +1290,7 @@ def perbaikanrenovasi(request): ...@@ -696,7 +1290,7 @@ def perbaikanrenovasi(request):
res_all = [] res_all = []
for j in res_perbaikan: for j in res_perbaikan:
print(j[0])
# if j[0] == 'jalan': # if j[0] == 'jalan':
data_all = { data_all = {
'name_perbaikan':j[0], 'name_perbaikan':j[0],
...@@ -792,6 +1386,29 @@ def inpuperbaikan(request): ...@@ -792,6 +1386,29 @@ def inpuperbaikan(request):
respon = res_data[0] respon = res_data[0]
return Response(respon) return Response(respon)
@api_view(('GET',))
def inputperbaikanbangunan(request):
id = request.GET.get('id_bangunan')
with conn.cursor() as data_per:
data_per.execute("""
SELECT
name,
type_id,
json_build_object ( 'type', 'Feature', 'geometry', ST_AsGeoJSON ( geom :: geometry ) :: json ),
ID,
remark,
address_1,
address_2
FROM
geo_bangunan
WHERE
ID = %s
"""% id)
res_data = data_per.fetchall()
respon = res_data[0]
return Response(respon)
from django.core.files.storage import FileSystemStorage from django.core.files.storage import FileSystemStorage
import random import random
import re import re
...@@ -820,12 +1437,12 @@ def saveperbaikan(request): ...@@ -820,12 +1437,12 @@ def saveperbaikan(request):
proposal = request.FILES.get("proposal") proposal = request.FILES.get("proposal")
bukti_selesai = request.FILES.get("bukti_selesai") bukti_selesai = request.FILES.get("bukti_selesai")
print(coor, proposal)
fss_p = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/proposal/')
fss_p = FileSystemStorage(location='media/proposal/') fss_b = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/bukti_penyelesaian/')
fss_b = FileSystemStorage(location='media/bukti_penyelesaian/')
coord = json.loads(str(coor)) coord = json.loads(str(coor))
...@@ -845,6 +1462,7 @@ def saveperbaikan(request): ...@@ -845,6 +1462,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')
...@@ -856,7 +1474,8 @@ def saveperbaikan(request): ...@@ -856,7 +1474,8 @@ def saveperbaikan(request):
filename_p = fss_p.save(nproposal, proposal) filename_p = fss_p.save(nproposal, proposal)
url_p = fss_p.url(filename_p) url_p = fss_p.url(filename_p)
nbukti = f"{name}_{num}.{format[-1:][0]}" format_ = (bukti_selesai.name).split(".")
nbukti = f"{name}_{num}.{format_[-1:][0]}"
nbukti = nbukti.replace(" ","-") nbukti = nbukti.replace(" ","-")
filename_b = fss_b.save(nbukti, bukti_selesai) filename_b = fss_b.save(nbukti, bukti_selesai)
url_b = fss_b.url(filename_b) url_b = fss_b.url(filename_b)
...@@ -921,7 +1540,145 @@ def saveperbaikan(request): ...@@ -921,7 +1540,145 @@ def saveperbaikan(request):
jenis_perbaikan, jenis_perbaikan,
coordinat)) coordinat))
conn.commit() conn.commit()
data = "Alhamdulilah" 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)
# 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")
print((proposal.name).split("."))
print((bukti_selesai.name).split("."))
fss_p = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/proposal/')
fss_b = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/bukti_penyelesaian/')
try:
format1 = (proposal.name).split(".")
num = random.randrange(1, 10000000000000)
nproposal = f"{name}_{num}.{format1[-1:][0]}"
nproposal = nproposal.replace(" ","-")
filename_p = fss_p.save(nproposal, proposal)
url_p = fss_p.url(filename_p)
format2 = (bukti_selesai.name).split(".")
nbukti = f"{name}_{num}.{format2[-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" info = "Data Telah Berhasil di Perbaharui"
code = 0 code = 0
...@@ -951,7 +1708,7 @@ def loadbyiddetail(request): ...@@ -951,7 +1708,7 @@ def loadbyiddetail(request):
a.id = %s and b.id = %s a.id = %s and b.id = %s
"""% (id, id_jl)) """% (id, id_jl))
detail_ = detail_maps.fetchone() detail_ = detail_maps.fetchone()
print(detail_)
respon=detail_ respon=detail_
return Response(respon) return Response(respon)
...@@ -1032,6 +1789,60 @@ def getdetailperbaikan(request): ...@@ -1032,6 +1789,60 @@ def getdetailperbaikan(request):
respon =res_all respon =res_all
return Response(respon) return Response(respon)
@api_view(('GET',))
def getdetailperbaikanbangunan(request):
id_object = request.GET.get('id')
with conn.cursor() as data_per:
data_per.execute("""
SELECT
gl.NAME,
tp.name,
gj.remark,
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.id_object,
tp.id,
tp.proposal,
tp.bukti_selesai,
tp.jenis_perbaikan
FROM
tbl_perbaikan tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_bangunan gj ON gj.ID = tp.id_object
where tp.id_object = %s
order by tp.tgl_perbaikan desc"""% id_object)
res_perbaikan = data_per.fetchall()
res_all = []
for j in res_perbaikan:
data_all = {
'name':j[1],
'type':j[2],
'tgl_pembuatan':j[3],
'tgl_perbaikan':j[4],
'tgl_selesai':j[5],
'anggaran':j[6],
'pj':j[7],
'pj_lapangan':j[8],
'kontraktor':j[9],
'geometry':j[10],
'id_object':j[11],
'id':j[12],
'proposal':j[13],
'bukti_selesai':j[14],
'jenis_perbaikan':j[15]
}
res_all.append(data_all)
respon = res_all
return Response(respon)
@api_view(('GET',)) @api_view(('GET',))
def editkelurahan(request): def editkelurahan(request):
kode_dagri = request.GET.get('kode_dagri') kode_dagri = request.GET.get('kode_dagri')
...@@ -1057,3 +1868,55 @@ def editkelurahan(request): ...@@ -1057,3 +1868,55 @@ def editkelurahan(request):
prov = res_edit_poly[0][0]['administrasi'][4] prov = res_edit_poly[0][0]['administrasi'][4]
context = {'desa':desa, 'kec':kec, 'kab':kab, 'prov':prov,'result_poly': res_edit_poly[0][0], 'avg_la':avg_la, 'avg_lo':avg_lo} context = {'desa':desa, 'kec':kec, 'kab':kab, 'prov':prov,'result_poly': res_edit_poly[0][0], 'avg_la':avg_la, 'avg_lo':avg_lo}
return Response(context) return Response(context)
from .forms import NewUserForm
from django.contrib import messages
from django.contrib.auth import login
from django.contrib.auth.models import User
from django.contrib.auth.hashers import make_password
def registrasi_new_app(request):
if request.method == 'POST':
form = NewUserForm(request.POST)
username = request.POST.get('username')
password = request.POST.get('password2')
name_app = request.POST.get('app_name')
teritory_name = request.POST.get('teritory_name')
user = User()
user.username = username
user.password = make_password(password)
user.save()
try:
with conn.cursor() as insert_app_name:
insert_app_name.execute("""INSERT INTO ui_params (v1) VALUES ('%s')"""% name_app)
conn.commit()
with conn.cursor() as select_id_app_name:
select_id_app_name.execute("""SELECT id_apps FROM ui_params WHERE v1 = '%s' limit 1"""% name_app)
id_app = select_id_app_name.fetchall()
with conn.cursor() as insert_id_app_name:
insert_id_app_name.execute("""INSERT INTO user_apps_access (id_apps, name, id_user, id_kab, id_pro) (SELECT %s, '%s', %s, id_kabupaten, id_provinsi FROM geo_prov_kab WHERE kabupaten = '%s')"""% (id_app[0][0], name_app, user.id, teritory_name))
conn.commit()
except:
print('eror')
messages.success(request, "Registration successful." )
return redirect("/")
# return render(request, "reg_new_app.html")
# messages.error(request, "Unsuccessful registration. Invalid information.")
with conn.cursor() as ter:
ter.execute("""select kabupaten from geo_prov_kab order by provinsi asc""")
teri = ter.fetchall()
teritor = []
for i in teri:
teritor.append(i[0])
return render (request, "reg_new_app.html", context={'teritor':teritor})
\ No newline at end of file
...@@ -42,7 +42,8 @@ INSTALLED_APPS = [ ...@@ -42,7 +42,8 @@ INSTALLED_APPS = [
'Application', 'Application',
'API', 'API',
'myauth.apps.MyauthConfig', 'myauth.apps.MyauthConfig',
'widget_tweaks' 'widget_tweaks',
'crispy_forms',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -35,5 +35,10 @@ urlpatterns = [ ...@@ -35,5 +35,10 @@ urlpatterns = [
path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"), path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"),
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'),
path('userprofile/', views.Userprofile.as_view(), name='userprofile'),
path('changepassword/', views.changepassword, name="changepassword"),
path('editprofile/', views.editprofile, name='editprofile'),
path('editpp/', views.editpp, name='editpp'),
path('welcome', views.welcom)
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import auth
from django.db.models.expressions import F from django.db.models.expressions import F
from django.http import request, response from django.http import request, response
from django.views import View, generic from django.views import View, generic
...@@ -12,38 +13,13 @@ from django.contrib.auth.hashers import make_password ...@@ -12,38 +13,13 @@ from django.contrib.auth.hashers import make_password
from rest_framework import status from rest_framework import status
from rest_framework.decorators import api_view, renderer_classes from rest_framework.decorators import api_view, renderer_classes
from rest_framework.response import Response from rest_framework.response import Response
import socket
from django.contrib.auth import authenticate
from django.core.files.storage import FileSystemStorage
import random
import string
def get_per_user(req):
us = req
id = us.id
with conn.cursor() as perm:
perm.execute("""SELECT
json_build_object ( 'kab', gpk.kabupaten, 'pro', gpk.provinsi, 'id_apps', uaa.id_apps, 'apps', uaa.NAME )
FROM
user_apps_access uaa
JOIN geo_prov_kab gpk ON uaa.id_kab = gpk.id_kabupaten
WHERE
uaa.id_user = %s"""% id)
per = perm.fetchall()
permm = per[0][0]
return us, permm
def ui_params(id_app):
with conn.cursor() as perm:
perm.execute("""SELECT
json_build_object ( 'title', v1, 'logo', v2)
FROM
ui_params
WHERE
id_apps = %s"""% int(id_app))
per = perm.fetchall()
permm = per[0][0]
return permm
# Create your views here. # Create your views here.
class CustomLoginView(LoginView): class CustomLoginView(LoginView):
...@@ -60,22 +36,32 @@ class CustomLogoutView(LogoutView): ...@@ -60,22 +36,32 @@ class CustomLogoutView(LogoutView):
template_name = 'user/login.html' template_name = 'user/login.html'
next_page = 'login' next_page = 'login'
class Usermanagement(generic.TemplateView): class Userprofile(generic.TemplateView):
template_name = "layout/user_layout.html" template_name = 'user/user_profile.html'
def get(self, request): def get(self, request):
usern, perm = get_per_user(request.user) with conn.cursor() as userprop_:
kab = perm['kab'] userprop_.execute("SELECT * FROM auth_user")
# print(perm) alluser = userprop_.fetchall()
ui_param = ui_params(perm['id_apps'])
title = ui_param['title'] res = []
logo = ui_param['logo'] print("")
print(type(request.user.groups.all())) for roww in alluser:
print(roww[0])
context = {
'data': res
}
return render(request, self.template_name, context)
class Usermanagement(generic.TemplateView):
template_name = "layout/user_layout.html"
# print("disini")
# print(make_password("kontolbadag"))
def get(self, request):
# print(request.user.groups.all())
with conn.cursor() as userlist_: with conn.cursor() as userlist_:
# if request.user.groups.all() == ''
arrayGroups = [] arrayGroups = []
for g in request.user.groups.all(): for g in request.user.groups.all():
print(g) print(g)
userGroup = g.id userGroup = g.id
...@@ -183,14 +169,37 @@ class Usermanagement(generic.TemplateView): ...@@ -183,14 +169,37 @@ class Usermanagement(generic.TemplateView):
"name" : rows[1], "name" : rows[1],
} }
group_res.append(datas) group_res.append(datas)
parameter_ui = {'logo':logo, 'title':title}
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)
print(user_data)
context = { context = {
'title' : 'user management', 'title' : 'user management',
'data' : user_res, 'data' : user_res,
'dataGroup' : group_res, 'dataGroup' : group_res,
'title' : title, 'thisUser' : user_data
'logo' : logo,
'parameter_ui':parameter_ui,
} }
...@@ -624,3 +633,130 @@ def loadGroupByGroupId(request): ...@@ -624,3 +633,130 @@ def loadGroupByGroupId(request):
"data": "group tidak memiliki parent" "data": "group tidak memiliki parent"
} }
return Response(data) return Response(data)
@api_view(('POST',))
def changepassword(request):
if request.method == "POST":
iduser = request.POST.get('id')
currentpassword = request.POST.get('currPass')
newpassword = request.POST.get('newPass')
renewpassword = request.POST.get('renewPass')
username = request.POST.get('username')
user = authenticate(username=username, password=currentpassword)
if user is not None:
if newpassword == renewpassword:
with conn.cursor() as concur:
sql = "UPDATE auth_user SET password = '"+make_password(newpassword)+"' WHERE id ="+iduser
print(sql)
concur.execute(sql)
reschange = concur.rowcount
if reschange > 0:
data = {
"baseurl" : request.META['HTTP_HOST'],
"code" : 0,
"info" : "Sukses",
"data" : "Password berhasil diperbaharui, silahkan login kembali untuk melanjutkan"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password gagal diperbaharui, silahkan coba kembali"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password baru tidak sesuai"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password salah"
}
return Response(data)
@api_view(('POST',))
def editprofile(request):
if request.method == 'POST':
iduser = request.POST.get('id')
firstname = request.POST.get('first_name')
lastname = request.POST.get('last_name')
email = request.POST.get('email')
with conn.cursor() as edtprop:
sql = "UPDATE auth_user SET first_name = '"+firstname+"', last_name ='"+lastname+"', email ='"+email+"' WHERE id = "+iduser
edtprop.execute(sql)
res = edtprop.rowcount
if(res > 0):
data = {
"code" : 0,
"info" : "Sukses",
"data" : "Profile berhasil diubah"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Profile gagal diperbaharui, silahkan coba kembali"
}
return Response(data)
@api_view(('POST',))
def editpp(request):
if request.method == 'POST':
file = request.FILES.get('inifile')
iduser = request.POST.get('id')
fss = FileSystemStorage(location='static/img/')
try:
letters = string.ascii_letters
resrand = ''.join(random.choice(letters) for i in range(100))
format = (file.name).split(".")
namafile = f"{resrand}.{format[-1:][0]}"
filename = fss.save(namafile, file)
url = fss.url(filename)
with conn.cursor() as concur:
sql = "UPDATE auth_user SET file_path = '"+namafile+"' WHERE id = "+iduser
concur.execute(sql)
resupd = concur.rowcount
if resupd > 0:
data = {
"code" : 0,
"info" : "Sukses",
"data" : "Foto profil berhasil diperbaharui"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Foto profil gagal diperbaharui, silahkan coba kembali"
}
except:
data = {
"code" : 3,
"info" : "Gagal",
"data" : "Foto profil gagal diperbaharui, silahkan coba kembali"
}
return Response(data)
def welcom(request):
return render(request, "layout/welcome.html")
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -121,6 +121,129 @@ ...@@ -121,6 +121,129 @@
</div> </div>
<div class="content-wrapper mymodal" id="input_perbaikan_bang" style="display: none;padding: 60px;">
<div class="content" style="padding: 15px;max-height: 550px;">
<!-- Main charts -->
<div class="panel panel-flat" style="display: none;">
<div class="panel-body" style="padding-top: 10px;">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<button type="button" class="close" onclick="destroyWraper()">&times;</button>
<li class="active"><a href="#left-tab-input-coordinat_bang" data-toggle="tab">Koordinat</a></li>
<li><a href="#right-tab-input-informasi_bang" data-toggle="tab">Insert Informasi</a></li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane active" id="left-tab-input-coordinat_bang">
<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="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>
<div class="tab-pane" id="right-tab-input-informasi_bang">
<div class="modal-body" style="max-height: 415px;overflow-y: auto;">
<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>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>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>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 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-link" onclick="destroyWraper()" style="float: right;">Close</button>
</div>
</div>
</div>
<!-- /main charts -->
</div>
<!-- editing kelurahan --> <!-- editing kelurahan -->
<div class="content-wrapper mymodal" id="edit_kelurahan" style="display: none;padding: 60px;"> <div class="content-wrapper mymodal" id="edit_kelurahan" style="display: none;padding: 60px;">
<div class="content" style="padding: 15px;max-height: 550px;"> <div class="content" style="padding: 15px;max-height: 550px;">
......
...@@ -143,9 +143,12 @@ ...@@ -143,9 +143,12 @@
#btn_edit_bangunan { #btn_edit_bangunan {
display: none; display: none;
} }
#btn_delete_bangunan {
display: none;
}
#btn_edit_kelurahan { #btn_edit_kelurahan {
display: block; display: none;
position: relative; position: relative;
top: 0; top: 0;
right: 0; right: 0;
...@@ -188,6 +191,9 @@ ...@@ -188,6 +191,9 @@
#btn_edit_adm { #btn_edit_adm {
display: none; display: none;
} }
#btn_delete_adm {
display: none;
}
#btn_edit_rs { #btn_edit_rs {
display: none; display: none;
...@@ -217,6 +223,18 @@ ...@@ -217,6 +223,18 @@
display: none; display: none;
} }
#btn_detail_per_bang {
display: none;
}
#btn_perbaikan_bangunan {
display: none;
}
#btn_upload_tampak {
display: none;
}
.leaflet-popup{ .leaflet-popup{
display: none; display: none;
} }
......
<script>
//klik kanan begin
map.on('contextmenu', function(e) {
$("#map-create").remove();
$("#map-create-jalan").remove();
$("#map-create-admin").remove();
// document.getElementsByClassName('leaflet-popup-content').style.width = "550px";
var popup = L.popup()
.setLatLng(e.latlng)
.setContent(`
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
<div class="tabbable" style="width: 450px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#bangunan" data-toggle="tab" id="c_bangunan">Bangunan</a></li>
<li onclick="changetabs(this)"><a href=".koordinatjalan" data-toggle="tab" id="c_jalan">Jalan</a></li>
<li onclick="changetabs(this)"><a href=".point-insert" data-toggle="tab" id="point-insert">Point</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="bangunan">
<div class="tabbable" style="overflow:auto;height:450px!important;width: 450px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#right-tab2-feas-upl" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#left-tab1-feas-upl" data-toggle="tab">Informasi Bangunan</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="right-tab2-feas-upl">
<div class="form-group">
<div id="map-create" style="height: 250px;">
<input type="button" id="create" value="Create" style="z-index: 1000;position:relative;">
</div>
</div>
</div>
<div class="tab-pane" id="left-tab1-feas-upl">
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Nama Bangunan</label>
<div class="col-lg-9">
<input id="name_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Jenis Bangunan</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="bangunan">Bangunan Biasa</option>
<option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option>
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardu_listrik">Gardu Listrik</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Tipe Bangunan</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_2_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Tipe Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Nama Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_3_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Informasi Bangunan</label>
<div class="col-lg-9">
<input id="info_create" type="text" class="form-control" value="" placeholder="Rumah/Gedung/Ruko/Pabrik/dsb" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Alamat</label>
<div class="col-lg-9">
<input id="alamat_create" type="text" class="form-control" value="" placeholder="cth : Jl. Contoh Rt 005/01 No.01" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Luas Bangunan</label>
<div class="col-lg-6">
<input id="luas_bangunan_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_bangunan" >
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Luas Tanah</label>
<div class="col-lg-6">
<input id="luas_tanah_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Tinggi Bangunan</label>
<div class="col-lg-6">
<input id="tinggi_bangunan_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">m</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Jumlah Lantai</label>
<div class="col-lg-9">
<input id="lantai" type="text" class="form-control" value="" placeholder="Estimasi Per Lantai = 3m" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Pemilik</label>
<div class="col-lg-9">
<input id="pemilik_create" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="button" class="btn btn-primary" id="create_save_bangunan" value="SAVE" style="margin-right:30px;">
<input type="text" name="poly_create" class="hidden" id="poly_create_bangunan" value="">
</div>
<div class="tab-pane koordinatjalan">
<div class="tabbable" style="overflow:auto;height:450px!important;width: 450px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href=".koordinatjalan" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#informasi_jalan" data-toggle="tab">Informasi Jalan</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane koordinatjalan" id="koordinatjalan">
<div class="form-group">
<div id="map-create-jalan" style="height: 250px;">
<input type="button" id="create-jal" value="Create" style="z-index: 1000;position:relative;">
</div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="img_jalan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>
</div>
<div class="tab-pane" id="informasi_jalan">
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Nama Jalan</label>
<div class="col-lg-8">
<input id="nama_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Panjang Jalan (m)</label>
<div class="col-lg-8">
<input id="panjang_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Lebar Jalan (m)</label>
<div class="col-lg-8">
<input id="lebar_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Tipe Jalan</label>
<div class="col-lg-8">
<input id="tipe_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="button" class="btn btn-primary" id="create_save_jalan" value="SAVE" style="margin-right:30px;">
<input type="text" name="poly_create" class="hidden" id="poly_create_jalan" value="">
</div>
<div class="tab-pane point-insert">
<div class="tabbable" style="overflow:auto;height:450px!important;width: 450px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href=".point-insert" data-toggle="tab">Koordinat</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane point-insert">
<div class="form-group">
<div id="map-create-admin" style="height: 250px;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`)
.openOn(map);
map.openPopup(popup);
$("#tipe_point").change(function() {
var tipe = $(this).val();
$.ajax({
url: "{% url 'api:change-tipe' %}",
data: {
'tipe': tipe
},
dataType: 'json',
success: function(data) {
console.log(data)
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
var data_kab = `<option value="` +
data_k +
`">` +
data_k +
`</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_2').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>` + data_all_kab);
}
});
});
$("#tipe_point_b").change(function() {
var tipe = $(this).val();
$.ajax({
url: "{% url 'api:change-tipe' %}",
data: {
'tipe': tipe
},
dataType: 'json',
success: function(data) {
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
console.log(data_k)
var data_kab = `<option value="` + data_k +`">` + data_k + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_2_b').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>` + data_all_kab);
}
});
});
$("#tipe_point_2_b").change(function() {
var jenis = $(this).val();
var tipx = $("#tipe_point_b").val();
$.ajax({
url: "{% url 'api:change-jenis' %}",
data: {
'tipe': tipx,
'jenis': jenis
},
dataType: 'json',
success: function(data) {
console.log(data)
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0];
var data_po = data['result'][i][1];
var data_kab = `<option value="` +data_id + `">` + data_po + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_3_b').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
}
});
});
var map_create_bangunan = L.map('map-create', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20.5);
map_created = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_bangunan);
map_create_bangunan.invalidateSize();
$('#create').click(function() {
polygonDraweredit.enable();
});
var Marker = {};
var Poly = {};
map_create_bangunan.on(L.Draw.Event.CREATED, function(e) {
var layer = e.layer;
$("#poly_create_bangunan").empty();
var type = e.layerType;
var layer = e.layer;
var shape = layer.toGeoJSON();
let geoShape = shape.geometry.coordinates[0];
let kordinat = "";
for (j in geoShape) {
kordinat += geoShape[j][0] + ' ' + geoShape[j][1];
if (j <= (geoShape.length - 2)) {
kordinat += ', ';
}
}
window.thisBaseDrawPolygonLayer = layer;
$("#poly_create_bangunan").val(JSON.stringify(kordinat));
});
polygon_options = {
showArea: false,
shapeOptions: {
stroke: true,
color: '#6e83f0',
weight: 1.5,
opacity: 2,
fill: false,
fillColor: null, //same as color by default
clickable: true
}
}
var polygonDraweredit = new L.Draw.Polygon(map_create_bangunan, polygon_options);
polygonDraweredit.on("click", function(event) {
shapecoords.innerHTML = event.latlng.toString();
map_create_bangunan.fire("click", event); // Trigger a map click as well.
});
map_create_bangunan.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
var lay = layer.addTo(map_create_bangunan);
Poly = lay;
});
var map_create_jalan = L.map('map-create-jalan', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20.5);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_jalan);
$("#c_jalan").click(function() {
setTimeout(function() {
map_create_jalan.invalidateSize();
}, 500);
})
var lineDraweredit = new L.Draw.Polyline(map_create_jalan, polygon_options);
lineDraweredit.on("click", function(event) {
shapecoords.innerHTML = event.latlng.toString();
map_create_jalan.fire("click", event); // Trigger a map click as well.
});
map_create_jalan.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
layer.options.color = 'yellow';
layer.options.weight = 10;
var koordina = ""
if (type === 'polyline') {
var tempLatLng = null;
var totalDistance = 0.00000;
$.each(e.layer._latlngs, function(i, latlng) {
if (tempLatLng == null) {
tempLatLng = latlng;
return;
}
totalDistance += tempLatLng.distanceTo(latlng);
tempLatLng = latlng;
});
e.layer.bindPopup((totalDistance).toFixed(2) + ' meter');
e.layer.openPopup();
$("#panjang_jalan_create").val((totalDistance).toFixed(2) + ' meter');
}
$("#poly_create_jalan").val(JSON.stringify(layer.toGeoJSON()));
layer.addTo(map_create_jalan);
});
$("#create-jal").click(function() {
lineDraweredit.enable();
})
var map_create_admin = L.map('map-create-admin', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20.5);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_admin);
$("#point-insert").click(function() {
setTimeout(function() {
map_create_admin.invalidateSize();
}, 500);
})
$(".leaflet-draw-draw-marker").html('<span class="fa fa-expand"></span>')
var drawControl = new L.Control.Draw(drawPluginOptions);
map_create_admin.addControl(drawControl);
var editableLayers = new L.FeatureGroup();
map_create_admin.addLayer(editableLayers);
// define custom marker
var MyCustomMarker = L.Icon.extend({
options: {
shadowUrl: null,
iconAnchor: new L.Point(12, 12),
iconSize: new L.Point(24, 24),
}
});
var drawPluginOptions = {
position: 'topright',
draw: {
marker: {
title: "soyel1",
icon: new MyCustomMarker()
},
marker: true
},
edit: {
featureGroup: editableLayers, //REQUIRED!!
remove: true
}
};
var drawControl = new L.Control.Draw(drawPluginOptions);
map_create_admin.addControl(drawControl);
var editableLayers = new L.FeatureGroup();
map_create_admin.addLayer(editableLayers);
map_create_admin.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
editableLayers.addLayer(layer);
$("#poly_create_point").val(JSON.stringify(layer.toGeoJSON()));
$("#modal_point").modal()
map.closePopup();
});
$("#map-create-admin > div.leaflet-control-container > div.leaflet-top.leaflet-left > div:nth-child(2) > div > div > a.leaflet-draw-draw-marker").css("display", "block!important")
});
$(document).on("click", "#create_save_jalan", function(e) {
data = new FormData()
data.append("gambar", $("input[id^='img_jalan']")[0].files[0]);
data.append("polyline", $("#poly_create_jalan").val())
data.append("name_jalan", $("#nama_jalan_create").val())
data.append("panjang_jalan", $("#panjang_jalan_create").val())
data.append("lebar_jalan", $("#lebar_jalan_create").val())
data.append("tipe_jalan", $("#tipe_jalan_create").val())
$.ajax({
url: "{% url 'api:create-jalan' %}",
data: data,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
$(document).on("click", "#create_save_bangunan", function(e) {
var polygin = $('#poly_create_bangunan').val();
var name_poly = $('#name_create').val();
var tdb = $('#tipe_point_b').val();
var remark = $('#tipe_point_2_b').val();
var poin_id = $('#tipe_point_3_b').val();
var napo = $("#tipe_point_3_b option:selected").text();
var info_poly = $('#info_create').val();
var alamat_poly = $('#alamat_create').val();
var lb_poly = $('#luas_bangunan_create').val();
var lt_poly = $('#luas_tanah_create').val();
var tb_poly = $('#tinggi_bangunan_create').val();
var ltbang = $('#lantai').val();
var mpu_poly = $('#pemilik_create').val();
$.ajax({
url: "{% url 'api:c_bangunan' %}",
data: {
'polygon': polygin,
'name': name_poly,
'tipedb': tdb,
'poin_id': poin_id,
'nama_po': napo,
'remark': remark,
'info': info_poly,
'alamat': alamat_poly,
'lb': lb_poly,
'lt': lt_poly,
'tb': tb_poly,
'ltb': ltbang,
'pemilik': mpu_poly
},
dataType: 'json',
// type: 'POST',
// processData: false,
// contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
$(document).on("click", "#btnsavepoint", function(e) {
data = new FormData()
data.append("gambar", $("input[id^='gambar_pitik']")[0].files[0]);
data.append("point", $("#poly_create_point").val())
data.append("name_create_point", $("#name_create_point").val())
data.append("tipe_point", $("#tipe_point").val())
data.append("info_create_point", $("#tipe_point_2").val())
data.append("alamat_create_point", $("#alamat_create_point").val())
data.append("luas_tanah_point", $("#luas_tanah_point").val())
data.append("pemilik_point", $("#pemilik_point").val())
$.ajax({
url: "{% url 'api:create-point' %}",
data: data,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_point").css('display', 'none');
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
//klik kanan end
</script>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{% load static %}
<!-- modal det -->
<div class="modal fade" id="featureModal" tabindex="-1" role="dialog" style="padding-top: 50px;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title text-primary" id="feature-title">Information</h4>
</div>
<div class="modal-body" id="feature-info">
</div>
<div class="modal-footer">
<div class="row">
{% if user.is_superuser %}
<div class="col-sm-6 text-left" id="button-ijo">
</div>
<div class="col-sm-6 ">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
{% else %}
<div class="col-sm-12">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<!-- end modal det -->
<!-- modal kelurahan -->
<div class="modal fade" id="modalkelurahan" tabindex="-1" role="dialog" style="padding-top: 50px;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title text-primary" id="feature-title">Information</h4>
</div>
<div class="modal-body" id="featurekelurahan">
</div>
<div class="modal-footer">
<div class="row">
{% if user.is_superuser %}
<div class="col-sm-6 text-left" id="button-ijo">
</div>
<div class="col-sm-6 ">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
{% else %}
<div class="col-sm-12">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal_delete_1" tabindex="+1" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">DELETE</h4>
</div>
<div class="modal-body">
<h4>Delete ??</h4>
<fieldset id="data-poly">
<table class="table table_input table-striped table-bordered table-condensed hidden">
<tr>
<th>Id</th>
<td><input size="58" name="id_poly_delete" type="text" id="id_poly_delete" value=""></td>
</tr>
</table>
<div id='actionedit' style="padding-top: 20px;">
<div class="navbar-right">
<input id='buttondelete' class="btn btn-danger" type="submit" value="Delete">
<input class="btn btn-default" type="button" value="Close" data-dismiss='modal'>
</div>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<div id="modal_detail" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100%!important;">
<div class="modal-dialog modal-lg" style="width: 100%;height: 100%;margin: 0;bottom: 0;">
<div class="modal-content" style="height: 100%;">
<div class="modal-header bg-info" style="background-color:#28343a">
<button type="button" class="close" data-dismiss="modal"> <i class='fa fa-times'></i> </button>
<h6 class="modal-title">Info Detail</h6>
</div>
<div class="modal-body" style="max-height: 100%;overflow-y: auto;">
<div class="panel-body" id="isi_modal_detail">
<table class="table table-responsive datatable-show-all table-sm" id="isi_detail" style="word-wrap:break-word;">
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" onclick="cetakExcel()">Cetak</button>
</div>
</div>
</div>
</div>
<!-- modal jalan -->
<div id="modal-jalan" class="modal fade">
<div class="modal-dialog">
<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">Edit Line Jalan dan Informasinya</h6>
</div>
<div class="modal-body" style="max-height: 450px;">
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
<input type="text" name="idjalan" id="idjalan" class="form-control hidden" value="">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-uplj" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-uplj" data-toggle="tab">Informasi Umum</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-uplj">
<div id="map-jalan" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="imgjalan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-uplj">
<div class="row" style="height: 337px;">
<input type="text" class="hidden" name="coordinatejalan" id="coordinatejalan" value="">
<input type="text" name="idjalan" id="idjalan" class="form-control hidden" value="" disable>
<table style="margin-left: 50px; width: 160vh;">
<tr>
<th>
Nama Jalan
</th>
<td>
<input type="text" id="namajalan" class="form-control" value="" style="width: 260px;">
</td>
</tr>
<tr>
<th>
Panjang Jalan (m)
</th>
<td>
<input type="text" id="panjangjalan" class="form-control" value="" style="width: 260px;">
</td>
</tr>
<tr>
<th>
Lebar Jalan (m)
</th>
<td>
<input type="text" id="lebarjalan" class="form-control" value="" style="width: 260px;">
</td>
</tr>
<tr>
<th>
Tipe Jalan
</th>
<td>
<input type="text" id="tipejalan" class="form-control" value="" style="width: 260px;">
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<button type="button" id="btnsavejalan" class="btn btn-info">Save changes</button>
</div>
</div>
</div>
</div>
</div>
<div id="modal_theme_info" class="modal fade">
<div class="modal-dialog">
<div class="modal-content" style="width: 400px;margin-left: 100px;">
<div class="modal-header bg-info">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Info header</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<img id="blah" src="#" style="max-width: 275px;max-height: 275px;margin-left: 45px;" alt="your image" />
<table id="valid-edit-kel" style="margin-bottom: 20px;"></table>
<table id="valid-edit-penduduk" style="margin-bottom: 20px;"></table>
<table id="valid-edit-pendidik" style="margin-bottom: 20px;"></table>
<table id="valid-edit-pekerja" style="margin-bottom: 20px;"></table>
<div id="validasi-edit" style="width: 350px; margin-left:10px;">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<button type="button" id="btnsavevalidasi" class="btn btn-info">Save changes</button>
</div>
</div>
</div>
</div>
<!-- modal bangunan -->
<div id="modal_bangunan_edit" class="modal fade">
<div class="modal-dialog">
<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">Edit Polygon Bangunan dan Informasinya</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-uplb" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-uplb" data-toggle="tab">Informasi Umum</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-uplb">
<div id="map-edit" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-uplb">
<div class="row" style="height: 337px;"></div>
<div class="col-md-6">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="">
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="" disable>
<table>
<tr>
<th>Nama Bangunan</th>
<td>
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="">
</td>
</tr>
<tr>
<th>Informasi Bangunan</th>
<td>
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="">
</td>
</tr>
<tr>
<th>Kelurahan</th>
<td>
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="">
</td>
</tr>
<tr>
<th>Kecamatan</th>
<td>
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="">
</td>
</tr>
<tr>
<th>Kab/Kota</th>
<td>
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="">
</td>
</tr>
<tr>
<th>Provinsi</th>
<td>
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="">
</td>
</tr>
</table>
</div>
<div class="col-md-6">
<table>
<tr>
<th>Luas Bangunan</th>
<td>
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value=" ">
</td>
</tr>
<tr>
<th>Luas Tanah</th>
<td>
<input type="text " name="luastanah " id="luastanah" class="form-control " value=" ">
</td>
</tr>
<tr>
<th>Tinggi Bangunan</th>
<td>
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value=" ">
</td>
</tr>
<tr>
<th>Pemilik</th>
<td>
<input type="text " name="pemilik " id="pemilik" class="form-control " value=" ">
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<button type="button" id="btnsavebangunan" class="btn btn-info">Save changes</button>
</div>
</div>
</div>
<div id="modal_bangunan_delete" 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;">
<table>
<tr>
<th>
<h6 class="modal-title">Delete Bangunan dan Informasinya</h6>
</th>
<td><button type="button" class="close" data-dismiss="modal">&times;</button></td>
</tr>
</table>
</div>
<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 class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunanhps" value="">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="btnsavedeletebangunan" class="btn btn-info">Hapus</button>
</div>
</div>
</div>
</div>
<!-- modal tuplah -->
<div id="modal-edit-tuplah" 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">Batas Lahan</h6>
</div>
<input type="text" name="idtuplah" id="idtuplah" class="form-control hidden" value="">
<input type="text" name="coordinatetuplah" id="coordinatetuplah" class="form-control hidden" value="">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div id="map-edit-tuplah" style="width: 400px;height: 300px;position: relative;margin-left: 100px;margin-left: 100px;
margin-right: 100px;">
</div>
<br>
<table>
<tr>
<th>
Image
</th>
<td>
<input type="file" id="imgtuplah" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<button type="button" id="btnsavetuplah" class="btn btn-info">Save changes</button>
</div>
</div>
</div>
</div>
<!-- modal point -->
<div class="modal fade" id="modald_adm">
</div>
<div class="modal fade" id="modal_adm">
</div>
<div class="modal fade" id="modal_tampak">
</div>
<div id="modal_point" class="modal fade">
<div class="modal-dialog">
<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">Insert Point</h6>
</div>
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="gambar_pitik" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Nama Bangunan</label>
<div class="col-lg-9">
<input id="name_create_point" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Jenis Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option>
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardu_listrik">Gardu Listrik</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Tipe Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_2" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Tipe Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Alamat</label>
<div class="col-lg-9">
<input id="alamat_create_point" type="text" class="form-control" value="" placeholder="cth : Jl. Contoh Rt 005/01 No.01" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Tanah</label>
<div class="col-lg-6">
<input id="luas_tanah_point" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah" style="margin-top: 15px;">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pemilik</label>
<div class="col-lg-9">
<input id="pemilik_point" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<button type="button" id="btnsavepoint" class="btn btn-info">Save</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalsearch3d" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xs">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">3D Searching</h4>
</div>
<div class="modal-body">
<fieldset>
<select id="search_desa" placeholder="Pick a state..." style="width: 256px;height: 35px;">
</select>
<br>
</fieldset>
</div>
<div class="modal-footer">
<input class="btn btn-success btn-block" id="search3D" type="submit" value="Search">
</div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -123,38 +123,36 @@ ...@@ -123,38 +123,36 @@
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Edit Line Jalan dan Informasinya</h6> <h6 class="modal-title">Edit Line Jalan dan Informasinya</h6>
</div> </div>
<input type="text" name="idjalan" id="idjalan" class="form-control hidden" value="">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;"> <div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="tab-pane has-padding" id="panel-tab2"> <div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data"> <div class="tab-pane" id="bottom-justified-data">
<input type="text" name="idjalan" id="idjalan" class="form-control hidden" value="">
<div class="tabbable"> <div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <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)" class="active"><a href="#left-tab1-feas-upl-j" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upl" data-toggle="tab">Informasi Umum</a></li> <li onclick="changetabs(this)"><a href="#right-tab2-feas-upl-j" data-toggle="tab">Informasi Umum</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-upl"> <div class="tab-pane active" id="left-tab1-feas-upl-j">
<div id="map-jalan" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div> <div id="map-jalan" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div>
<div class="form-group"> <div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <div class="col-lg-9" style="margin-top:10px">
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif"> <input type="file" id="imgjalan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div> </div>
</div> </div>
</div> </div>
<div class="tab-pane" id="right-tab2-feas-upl"> <div class="tab-pane" id="right-tab2-feas-upl-j">
<div class="row" style="height: 337px;"> <div class="row" style="height: 337px;">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value=""> <input type="text" class="hidden" name="coordinatejalan" id="coordinatejalan" value="">
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="" disable> <input type="text" name="idjalan" id="idjalan" class="form-control hidden" value="" disable>
<table style="margin-left: 50px; <table style="margin-left: 20px;width: 80vh;">
width: 100vh;">
<tr> <tr>
<th> <th>
Nama Jalan Nama Jalan
...@@ -201,11 +199,31 @@ ...@@ -201,11 +199,31 @@
<div class="modal-footer "> <div class="modal-footer ">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button> <button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<button type="button" id="btnsavebangunan" class="btn btn-info">Save changes</button> <button type="button" id="btnsavejalan" class="btn btn-info">Save changes</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="modal-hapus-jalan" class="modal fade">
<div class="modal-dialog">
<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">Delete Line Jalan dan Informasinya</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div id="isi_modal_delete">
</div>
</div>
<div class="modal-footer ">
<input class="hidden" type="text" name="" id="idjlnhps">
<button type="button" class="btn btn-link" onclick="destroyfade()" data-dismiss="modal">Close</button>
<button type="button" id="btnhpsjalan" class="btn btn-info">Hapus Jalan</button>
</div>
</div>
</div>
</div> </div>
<div id="modal_theme_info" class="modal fade"> <div id="modal_theme_info" class="modal fade">
...@@ -224,6 +242,7 @@ ...@@ -224,6 +242,7 @@
<table id="valid-edit-pendidik" style="margin-bottom: 20px;"></table> <table id="valid-edit-pendidik" style="margin-bottom: 20px;"></table>
<table id="valid-edit-pekerja" style="margin-bottom: 20px;"></table> <table id="valid-edit-pekerja" style="margin-bottom: 20px;"></table>
<div id="validasi-edit" style="width: 350px; margin-left:10px;"> <div id="validasi-edit" style="width: 350px; margin-left:10px;">
</div> </div>
</div> </div>
...@@ -358,7 +377,6 @@ ...@@ -358,7 +377,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 +410,127 @@ ...@@ -392,6 +410,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;">
...@@ -441,6 +580,9 @@ ...@@ -441,6 +580,9 @@
<div class="modal fade" id="modal_adm"> <div class="modal fade" id="modal_adm">
</div> </div>
<div class="modal fade" id="modal_tampak">
</div>
<div id="modal_point" class="modal fade"> <div id="modal_point" class="modal fade">
<div class="modal-dialog"> <div class="modal-dialog">
...@@ -463,7 +605,7 @@ ...@@ -463,7 +605,7 @@
</div> </div>
<div class="row" style="margin-top: 15px;"> <div class="row" style="margin-top: 15px;">
<div class="form-group"> <div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Nama Bangunan</label> <label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Nama Point</label>
<div class="col-lg-9"> <div class="col-lg-9">
<input id="name_create_point" type="text" class="form-control" value="" required> <input id="name_create_point" type="text" class="form-control" value="" required>
</div> </div>
...@@ -476,17 +618,17 @@ ...@@ -476,17 +618,17 @@
<div class="col-lg-9"> <div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point" data-placeholder="select point.." class="select-size-md"> <select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point" 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="administrasi">Kantor Administrasi</option> <option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanankesehatan">Layanan Kesehatan</option> <option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option> <option value="puskesmas">Puskesmas</option>
<option value="rumahsakit">Rumah Sakit</option> <option value="rumah_sakit">Rumah Sakit</option>
<option value="saranaibadah">Sarana Ibadah</option> <option value="sarana_ibadah">Sarana Ibadah</option>
<option value="saranapendidikan">Sarana Pendidikan</option> <option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option> <option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option> <option value="stasiun">Stasiun</option>
<option value="terminalbus">Terminal Bus</option> <option value="terminal_bus">Terminal Bus</option>
<option value="cagarbudaya">Cagar Budaya dan Tempat Wisata</option> <option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardulistrik">Gardu Listrik</option> <option value="gardu_listrik">Gardu Listrik</option>
</select> </select>
</div> </div>
...@@ -513,20 +655,6 @@ ...@@ -513,20 +655,6 @@
</div> </div>
</div> </div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Bangunan</label>
<div class="col-lg-6">
<input id="luas_bangunan_point" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_bangunan" style="margin-top: 15px;">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;"> <div class="row" style="margin-top: 15px;">
<div class="form-group"> <div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Tanah</label> <label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Tanah</label>
...@@ -543,26 +671,7 @@ ...@@ -543,26 +671,7 @@
<div class="row" style="margin-top: 15px;"> <div class="row" style="margin-top: 15px;">
<div class="form-group"> <div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Tinggi Bangunan</label> <label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pimpinan</label>
<div class="col-lg-6">
<input id="tinggi_bangunan_point" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3" style="margin-top: 15px;">m</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Jumlah Lantai</label>
<div class="col-lg-9">
<input id="lantai_point" type="text" class="form-control" value="" placeholder="Estimasi Per Lantai = 3m" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pemilik</label>
<div class="col-lg-9"> <div class="col-lg-9">
<input id="pemilik_point" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required> <input id="pemilik_point" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div> </div>
...@@ -579,7 +688,6 @@ ...@@ -579,7 +688,6 @@
</div> </div>
</div> </div>
<div class="modal fade" id="modalsearch3d" tabindex="-1" role="dialog"> <div class="modal fade" id="modalsearch3d" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xs"> <div class="modal-dialog modal-xs">
<div class="modal-content"> <div class="modal-content">
...@@ -603,7 +711,67 @@ ...@@ -603,7 +711,67 @@
</div> </div>
<!-- <script> <div id="modal-detail-kelurahan" class="modal fade">
<div class="modal-dialog" style="width: 850px;">
<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">Detail Kelurahan</h6>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-5" id="detail-kelurahan-umum">
</div>
<div class="col-md-7">
<div class="tabbable tab-content-bordered">
<ul class="nav nav-tabs nav-tabs-highlight nav-justified">
<li class="active"><a href="#bordered-justified-tab1" data-toggle="tab">Informasi Penduduk</a></li>
<li><a href="#bordered-justified-tab5" data-toggle="tab">Informasi Agama</a></li>
<li><a href="#bordered-justified-tab2" data-toggle="tab">Informasi Pendidikan</a></li>
<li><a href="#bordered-justified-tab3" data-toggle="tab">Informasi Umur</a></li>
<li><a href="#bordered-justified-tab4" data-toggle="tab">Informasi Pekerjaan</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane has-padding active" id="bordered-justified-tab1">
<div id="info_penduduk">
</div>
</div>
<div class="tab-pane has-padding" id="bordered-justified-tab5">
<div id="info_agama">
</div>
</div>
<div class="tab-pane has-padding" id="bordered-justified-tab2">
<div id="info_pendidik">
</div>
</div>
<div class="tab-pane has-padding" id="bordered-justified-tab3">
<div id="info_umur">
</div>
</div>
<div class="tab-pane has-padding" id="bordered-justified-tab4">
<div id="info_pekerjaan">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<script>
$("#tipe_point").change(function() { $("#tipe_point").change(function() {
var tipe = $(this).val(); var tipe = $(this).val();
......
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<!-- Main navbar --> <!-- Main navbar -->
<div class="navbar navbar-inverse navbar-fixed-top bg-none"> <div class="navbar navbar-inverse navbar-fixed-top bg-none">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand gradient-text" id="title-logo" href="{% url 'apps:dashboard' %}"> <a class="navbar-brand gradient-text " id="title-id" href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> -->
<i>
<img src="{% static 'img/{{logo}}' %}" alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{{title}}
</b>
</a> </a>
<ul class="nav navbar-nav pull-right visible-xs-block"> <ul class="nav navbar-nav pull-right visible-xs-block">
...@@ -27,14 +17,13 @@ ...@@ -27,14 +17,13 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
<a class="dropdown-toggle" data-toggle="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown">
<img src="{% static 'img/placeholder.jpg' %}" alt="">
<img src="{% static 'img/' %}{{user.filepath}}" alt="">
<span>{{user.username}}</span> <span>{{user.username}}</span>
<i class="caret"></i> <i class="caret"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</a></li>
{% if user.is_superuser or user.is_staff %} {% if user.is_superuser or user.is_staff %}
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li> <li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li> <li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="WorldImagery"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="WorldImagery">
<img src="{% static 'img/maps/esri.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/esri.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
World Imagery</span> World Imagery</span>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="BingSatellite"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="BingSatellite">
<img src="{% static 'img/maps/bing.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/bing.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
Bing Satellite</span> Bing Satellite</span>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="GoogleSatellite"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="GoogleSatellite">
<img src="{% static 'img/maps/esri.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/esri.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
Google Satellite</span> Google Satellite</span>
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
<div class="panel-body"> --> <div class="panel-body"> -->
<div class="row" style="margin: 0;padding: 0;"> <div class="row" style="margin: 0;padding: 0;">
<div class="col-md-6"> <div class="col-md-6">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_tuplah" onclick="geotuplah()" style="margin-top:2px;"> <input type="checkbox" id="geo_tuplah" onclick="geotuplah()" style="margin-top:2px;">
...@@ -97,7 +96,6 @@ ...@@ -97,7 +96,6 @@
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_building" style="margin-top:2px;"> <input type="checkbox" id="geo_building" style="margin-top:2px;">
...@@ -125,12 +123,12 @@ ...@@ -125,12 +123,12 @@
</label> </label>
</div> </div>
<div class="checkbox"> <!-- <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_sungai" onclick="geosungai()" style="margin-top:2px;"> <input type="checkbox" id="geo_sungai" onclick="geosungai()" style="margin-top:2px;">
Sungai Sungai
</label> </label>
</div> </div> -->
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" > <input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" >
......
...@@ -18,5 +18,3 @@ ...@@ -18,5 +18,3 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
<script src="{% static '/js/plugins/arrive.min.js' %}"></script> <script src="{% static '/js/plugins/arrive.min.js' %}"></script>
<script src="{% static '/js/plugins/bootstrap-notify.js' %}"></script> <script src="{% static '/js/plugins/bootstrap-notify.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/tables/datatables/datatables.min.js' %}"></script>
\ No newline at end of file
...@@ -257,7 +257,6 @@ ...@@ -257,7 +257,6 @@
/* height: 100px; */ /* height: 100px; */
max-width: 100%; max-width: 100%;
float: right; float: right;
top: -48px;
/* left: -5px; */ /* left: -5px; */
position: absolute; position: absolute;
z-index: 1000; z-index: 1000;
...@@ -465,7 +464,7 @@ ...@@ -465,7 +464,7 @@
} }
li.fixed-plugin .fa:hover { li.fixed-plugin .fa:hover {
transform: rotate(180deg); transform: rotate(360deg);
transition: all 0.3s linear; transition: all 0.3s linear;
} }
/*.move-btn .caret {*/ /*.move-btn .caret {*/
...@@ -579,25 +578,18 @@ ...@@ -579,25 +578,18 @@
{% include 'includes/navbar.html' %} {% include 'includes/plugin.html' %} {% include 'includes/navbar.html' %} {% include 'includes/plugin.html' %}
<!-- Page container --> <!-- Page container -->
<div class="page-container"> <div class="page-container">
<div id="panel-samping" class="widget-pane widget-pane-visible" style="overflow: scroll !important; height: 95vh !important;">
<!-- Page content -->
<div class="page-content">
<!-- Main sidebar -->
<!-- <div class="sidebar sidebar-main sidebar-default"> -->
<!-- <div class="sidebar-content"> -->
<div id="panel-samping" class="widget-pane widget-pane-visible">
{% block content %} {% block content %}
<div class="sidebar-wrapper"> <div class="sidebar-wrapper">
<div class="panel panel-default" id="features"> <div class="panel panel-default" id="features">
<div class="sidebar-table" id="isi_panel" style="margin-top: 48px;"> <div class="sidebar-table" id="isi_panel">
<table class="table tasks-list"> <table class="table tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
<tr> <tr>
<th class="text-center" style="padding: 0 0 0 0px;"> <th class="text-center" style="padding: 0 0 0 0px;">
<img src="{% static 'img/logo-ok.png' %}" alt="" style="max-height: 368px"> <img src="{% static 'img/' %}{{logo}}" alt="" style="max-height: 368px">
</th> </th>
</tr> </tr>
</thead> </thead>
...@@ -610,16 +602,22 @@ ...@@ -610,16 +602,22 @@
letter-spacing: 0; letter-spacing: 0;
font-weight: 400;"> font-weight: 400;">
<span style="font-size: x-large;"> <span style="font-size: x-large;">
OGAN KOMERING ULU {{title}}
</span> </span>
</h1> </h1>
</div> </div>
</th> </th>
</tr> </tr>
</div> </div>
{% if user.is_authenticated %}
<div class="container"> <div class="container">
<tr> <tr>
<th> <th>
<div class="form-group" style="margin-left: 80px;"> <div class="form-group" style="margin-left: 80px;">
<table> <table>
<tr> <tr>
...@@ -656,9 +654,10 @@ ...@@ -656,9 +654,10 @@
</table> </table>
</div> </div>
</th> </th>
</tr> </tr>
{% endif %}
</div> </div>
</tbody> </tbody>
...@@ -668,6 +667,13 @@ ...@@ -668,6 +667,13 @@
</div> </div>
{% endblock content %} {% endblock content %}
</div> </div>
<!-- Page content -->
<div class="page-content" style="overflow: hidden;">
<!-- Main sidebar -->
<!-- <div class="sidebar sidebar-main sidebar-default"> -->
<!-- <div class="sidebar-content"> -->
<div> <div>
<a href="#" class="btn btn-default" id="button_unhide_panel" data-toggle="tooltip" data-placement="right" title="Tampilkan panel"><span class="caret" style="margin-left: -5px;transform: rotate(270deg)"></span></a> <a href="#" class="btn btn-default" id="button_unhide_panel" data-toggle="tooltip" data-placement="right" title="Tampilkan panel"><span class="caret" style="margin-left: -5px;transform: rotate(270deg)"></span></a>
</div> </div>
...@@ -683,16 +689,14 @@ ...@@ -683,16 +689,14 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="map"> <div id="map">
</div> </div>
<div id="map-cesium" style="z-index: -999; height: 100vh; display:none"> <div id="map-cesium" style="z-index: -999; height: 100vh; display:none">
<div onmouseenter="resse()" onmouseleave="normalse()" id="DataTables_Table_0_filter" class="dataTables_filter" style="margin: 0px 0 0px 0px;padding-top: 55px;position: absolute;z-index: 1;right: 20px;"> <div class="label-bangunan" style="margin: 0px 0 0px 0px;padding-top: 55px;position: absolute;z-index: 1;right: 20px;">
<!-- <label> <label style="background-color: white;">
<input type="search" class="search_desa" id="search_desa" placeholder="Kelurahan ..." aria-controls="DataTables_Table_0"> &nbsp;&nbsp;left click + ctrl to rotate maps&nbsp;&nbsp;
</label> </label>
<ul id="searchResult"></ul> -->
</div> </div>
<div class="page_loader_3d"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -737,6 +741,9 @@ ...@@ -737,6 +741,9 @@
<script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script>
<script type="text/javascript " src="{% static 'js/apexcharts.min.js' %}"></script>
<script type="text/javascript " src="{% static 'js/apexcharts.js' %}"></script>
<!-- /theme JS files --> <!-- /theme JS files -->
...@@ -750,4 +757,35 @@ ...@@ -750,4 +757,35 @@
</html> </html>
{% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %} {% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %} {% if user.is_authenticated %} {% else %}
\ No newline at end of file <script>
$("#po_all").prop("checked", !$("#po_all").prop("checked"));
$("#knt_adm").prop("checked", !$("#knt_adm").prop("checked"));
$("#lyn_kes").prop("checked", !$("#lyn_kes").prop("checked"));
$("#pus").prop("checked", !$("#pus").prop("checked"));
$("#rusak").prop("checked", !$("#rusak").prop("checked"));
$("#ibdh").prop("checked", !$("#ibdh").prop("checked"));
$("#dididik").prop("checked", !$("#dididik").prop("checked"));
$("#pom_bengsin").prop("checked", !$("#pom_bengsin").prop("checked"));
$("#tasiun").prop("checked", !$("#tasiun").prop("checked"));
$("#caheum").prop("checked", !$("#caheum").prop("checked"));
$("#cabud").prop("checked", !$("#cabud").prop("checked"));
$("#gardu").prop("checked", !$("#gardu").prop("checked"));
$("#batas_desa").prop("checked", !$("#batas_desa").prop("checked"));
$("#geo_jalan").prop("checked", !$("#geo_jalan").prop("checked"));
$("#geo_building").prop("checked", !$("#geo_building").prop("checked"));
geo_po_rumah_sakit.addTo(map);
geo_po_spbu.addTo(map);
geo_po_stasiun.addTo(map);
geo_po_terminal.addTo(map);
geo_po_cagar_budaya.addTo(map);
geo_po_gardu_listrik.addTo(map);
geo_bangunan.addTo(map);
geo_batas_kel.addTo(map);
geo_jalan.addTo(map);
map.setView([geo_batas.getBounds().getCenter().lat, geo_batas.getBounds().getCenter().lng], 12)
</script>
{% endif %}
\ No newline at end of file
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
} }
.modal-backdrop { .modal-backdrop {
z-index: -999!important; z-index: -1!important;
} }
.sidebar { .sidebar {
...@@ -102,6 +103,69 @@ ...@@ -102,6 +103,69 @@
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #555; background: #555;
} }
.image_area {
position: relative;
}
#uploaded_image {
display: block;
object-fit: cover;
object-position: center center;
width: 270px;
height: 270px;
}
#placelg{
object-fit: cover;
object-position: center center;
width: 30px;
height: 30px;
}
.preview {
overflow: hidden;
width: 160px;
height: 160px;
margin: 10px;
border: 1px solid red;
}
.modal-lg{
max-width: 1000px !important;
}
.overlay {
position: absolute;
bottom: 10px;
left: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.5);
overflow: hidden;
height: 0;
transition: .5s ease;
width: 100%;
}
.image_area:hover .overlay {
height: 50%;
cursor: pointer;
}
.textover {
color: #333;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
}
</style> </style>
</head> </head>
...@@ -111,19 +175,19 @@ ...@@ -111,19 +175,19 @@
<!-- Main navbar --> <!-- Main navbar -->
<div class="navbar navbar-inverse"> <div class="navbar navbar-inverse">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand gradient-text" id="title-logo" href="{% url 'apps:dashboard' %}"> <a class="navbar-brand gradient-text " href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> --> <!-- <h3>NationalAddress</h3> -->
<i> <i>
<img src="{% static 'img/{{logo}}' %}" alt="" style="position: absolute; <img src="{% static 'img/logo-ok.png' %}" alt="" style="position: absolute;
width: 26px; width: 26px;
top: 7px;"> top: 7px;">
</i> </i>
<!-- <i class="icon-location4 fa-gradient"></i> --> <!-- <i class="icon-location4 fa-gradient"></i> -->
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b style="margin-left: 12px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Teman-KU
{{title}} </b> (Sistem Informasi Pembangunan OKU)
</b>
</a> </a>
<ul class="nav navbar-nav pull-right visible-xs-block"> <ul class="nav navbar-nav pull-right visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li> <li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
</ul> </ul>
...@@ -134,14 +198,25 @@ ...@@ -134,14 +198,25 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li class="dropdown dropdown-user"> <li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown">
<img src="{% static 'img/placeholder.jpg' %}" alt="">
{% for us in thisUser %}
{% if us.filepath %}
<img id="placelg" src="{% static 'img/' %}{{us.filepath}}"/>
{% else %}
<img src="{% static 'img/placeholder.jpg' %}"/>
{% endif %}
{% endfor %}
<span>{{user.username}}</span> <span>{{user.username}}</span>
<i class="caret"></i> <i class="caret"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li> {% if user.is_superuser or user.is_staff %}
<li><a href="#"><i class="icon-cog5"></i> Account settings</a></li> <li><a href="{% url 'usermanagement' %}?page=userprofile"><i class="icon-user-tie"></i>User Profile</a></li>
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
{% endif %}
<li class="divider"></li> <li class="divider"></li>
<li><a href="{% url 'logout' %}"><i class="icon-cog5"></i> Logout</a></li> <li><a href="{% url 'logout' %}"><i class="icon-cog5"></i> Logout</a></li>
</ul> </ul>
...@@ -150,8 +225,7 @@ ...@@ -150,8 +225,7 @@
</div> </div>
</div> </div>
<!-- /main navbar --> <!-- /main navbar -->
{% block content %}
<!-- Page container --> <!-- Page container -->
<div class="page-container"> <div class="page-container">
...@@ -167,7 +241,15 @@ ...@@ -167,7 +241,15 @@
<div class="sidebar-user"> <div class="sidebar-user">
<div class="category-content"> <div class="category-content">
<div class="media"> <div class="media">
{% for us in thisUser %}
{% if us.filepath %}
<a href="#" class="media-left"><img src="{% static 'img/' %}{{us.filepath}}" class="img-circle img-sm" alt=""></a>
{% else %}
<a href="#" class="media-left"><img src="{% static '/img/placeholder.jpg' %}" class="img-circle img-sm" alt=""></a> <a href="#" class="media-left"><img src="{% static '/img/placeholder.jpg' %}" class="img-circle img-sm" alt=""></a>
{% endif %}
{% endfor %}
<div class="media-body"> <div class="media-body">
<span class="media-heading text-semibold">{{user.username}}</span> <span class="media-heading text-semibold">{{user.username}}</span>
<div class="text-size-mini text-muted"> <div class="text-size-mini text-muted">
...@@ -300,6 +382,188 @@ ...@@ -300,6 +382,188 @@
<!-- end user management tab --> <!-- end user management tab -->
<div class="content-wrapper" id="usergroup" style="display: none;">
<div>
<!-- Page header -->
<div class="page-header page-header-default" style="margin-bottom: 0px;">
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li>Group</li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Content area -->
<div class="content" style="padding: 15px;">
<!-- Main charts -->
<!-- Sales stats -->
<div class="panel panel-flat" style="display: none;">
<div class="panel-heading">
<h6 class="panel-title">Table Group</h6>
<button id="modalAddButtong" class="btn btn-primary btn-sm" value="SAVE" style="bottom: 15px; float: right; display:none;" data-toggle="modal" data-target="#modal_group"></button>
</div>
<hr style="margin-top: 0px;">
<div class="panel-body">
<table class="table table-responsive datatable-groups table-sm" id="usergroup">
<thead>
<tr>
<th>No.</th>
<th>Name</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
{% for group in dataGroup %}
<tr>
<td>{{forloop.counter}}</td>
<td>{{group.name}}</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-menu9"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a onclick="deletegroup('{{group.id}}', '{{group.name}}')"><i class="icon-user-block"></i> Delete group</a></li>
<li><a onclick="showmodalgroup('{{group.id}}', '{{group.name}}')"><i class="icon-users"></i> Edit group</a></li>
</ul>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- /form validation -->
</div>
</div>
<!-- /main charts -->
</div>
</div>
<!-- content profile -->
<div class="content-wrapper" id="userprofile" style="display: none;">
<div>
<!-- Page header -->
<div class="page-header page-header-default" style="margin-bottom: 0px;">
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li>User Profile</li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Content area -->
<div class="content" style="padding: 15px;">
<!-- Main charts -->
<!-- Sales stats -->
<div class="panel panel-flat" style="display: block;">
<div class="panel-body">
<div class="row" style="margin-top: 20px">
<div class="col-lg-3 col-md-6">
<div class="image_area">
<form method="post">
<label for="upload_image">
{% for us in thisUser %}
{% if us.filepath %}
<img src="{% static 'img/' %}{{us.filepath}}" id="uploaded_image" class="img-responsive img-circle" width="350px"/>
{% else %}
<img src="{% static 'img/placeholder.jpg' %}" id="uploaded_image" class="img-responsive img-circle" width="350px"/>
{% endif %}
{% endfor %}
<div class="overlay">
<div class="textover">Ubah Foto Profil</div>
</div>
<input type="file" name="image" class="image" id="upload_image" style="display:none" accept="image/png, image/gif, image/jpeg"/>
</label>
</form>
</div>
</div>
<div class="col-lg-9 col-md-6">
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">Informasi Profil</h6>
</div>
<div class="panel-body" id="user-mahasiswa" style="display:block">
{% for us in thisUser %}
<form action="#">
<div class="form-group" id="dosormhs">
<div class="row">
<div class="col-md-6">
<label>Username </label>
<input type="text" id="username" class="form-control" value="{{us.username}}"readonly>
</div>
</div>
</div>
<div class="form-group" id="dosormhs">
<div class="row">
<div class="col-md-6">
<label>Nama Depan </label>
<input type="text" id="namadepan" class="form-control" value="{{us.firstname}}" readonly>
</div>
</div>
</div>
<div class="form-group" id="dosormhs">
<div class="row">
<div class="col-md-6">
<label>Nama Belakang </label>
<input type="text" id="namabelakang" class="form-control" value="{{us.lastname}}" readonly>
</div>
</div>
</div>
<div class="form-group" id="dosormhs">
<div class="row">
<div class="col-md-6">
<label>Email </label>
<input type="text" id="useremail" class="form-control" value="{{us.email}}"readonly>
</div>
</div>
</div>
</form>
{% endfor %}
</div>
<div class="panel-footer" style="margin-top: 20px;">
<div class="pull-right mr-5">
<button type="button" type="button" class="btn btn-primary btn-labeled btn-labeled-right " id='edit-profile-mhs' data-toggle="modal" data-target="#modal-edit-data-mhs">Edit Profile <b><i class="icon-circle-right2"></i></b></button>
<button type="button" type="button" class="btn btn-primary btn-labeled btn-labeled-right " id='edit-profile-mhs' data-toggle="modal" data-target="#modal-edt-password">Edit Password <b><i class="icon-lock"></i></b></button>
</div>
</div>
</div>
</div>
</div>
<!-- /form validation -->
</div>
</div>
<!-- /main charts -->
</div>
</div>
<!-- end content profile -->
<!-- /main content --> <!-- /main content -->
</div> </div>
<!-- /page content --> <!-- /page content -->
...@@ -391,6 +655,285 @@ ...@@ -391,6 +655,285 @@
</div> </div>
</div> </div>
<div id="modal-edit-data-mhs" role="dialog" class="modal fade" tabindex="-9999999" style="margin-top:5%;">
<div class="modal-dialog modal-md" role="dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header bg-primary" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title"> Edit Profile</h6>
</div>
<div class="modal-body">
<div class="alert alert-danger" id="notificationsprop" style="display: none">
</div>
<form class="form-horizontal" id="formmen" method="post" enctype="multipart/form-data">
<div class="panel panel-flat">
<div class="panel-body" style="margin: 20px !important">
<div class="row">
{% for us in thisUser %}
<input type="text" id="iduseredt" value="{{us.id}}" hidden>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Username :</label>
<input type="text" id="usernamepedt" class="form-control" value="{{us.username}}" readonly>
</div>
<!-- <div class="col-md-6">
<label class="control-label"> Password saat ini :</label>
<input type="text" id="nama-mhs-edt" class="form-control" >
</div> -->
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Nama Depan:</label>
<input type="text" id="firstnameedt" class="form-control" value="{{us.firstname}}">
</div>
<!-- <div class="col-md-6">
<label class="control-label"> Password baru :</label>
<input type="text" id="nama-mhs-edt" class="form-control" >
</div> -->
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Nama Belakang:</label>
<input type="text" id="lastnameedt" class="form-control" value="{{us.lastname}}">
</div>
<!-- <div class="col-md-6">
<label class="control-label"> Ulangi password baru :</label>
<input type="text" id="nama-mhs-edt" class="form-control" >
</div> -->
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Email :</label>
<input type="text" id="emailedts" class="form-control" value="{{us.email}}">
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-lg btn-success" id="save-edit-profile">
<i class="icon-checkmark2"></i>
Simpan
</button>
<button class="btn btn-lg" data-dismiss="modal">
<i class="icon-cross3"></i>
Batal
</button>
</div>
</div>
</div>
</div>
<div id="modal-edt-password" role="dialog" class="modal fade" tabindex="-9999999" style="margin-top:5%;">
<div class="modal-dialog modal-md" role="dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header bg-primary" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title"> Edit Password</h6>
</div>
<div class="modal-body">
<div >
<div class="alert alert-danger" id="notifications" style="display: none">
</div>
</div>
<form class="form-horizontal" id="formmen" method="post" enctype="multipart/form-data">
<div class="panel panel-flat">
<div class="panel-body" style="margin: 20px !important">
<div class="row">
{% for us in thisUser %}
<input type="text" id="usernameedt" value="{{us.username}}" hidden>
<input type="text" id="iduseredt" value="{{us.id}}" hidden>
<!-- <input type="text" id="current" value="{{us.password}}"> -->
{% endfor %}
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Password saat ini :</label>
<input type="password" id="currentPass" class="form-control" >
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Password baru :</label>
<input type="password" id="newPass" class="form-control" >
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label class="control-label"> Ulangi password baru :</label>
<input type="password" id="renewPass" class="form-control" >
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-lg btn-success" id="save-edt-password">
<i class="icon-checkmark2"></i>
Simpan
</button>
<button class="btn btn-lg" data-dismiss="modal">
<i class="icon-cross3"></i>
Batal
</button>
</div>
</div>
</div>
</div>
<div id="modal-edit-profil" role="dialog" class="modal fade" tabindex="-9999999" style="margin-top:5%;">
<div class="modal-dialog modal-lg" role="dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header bg-primary" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title"> Edit Picture</h6>
</div>
<div class="modal-body">
<div class="row" id="set-crop-ratio">
<div class="col-md-6 col-md-offset-3">
<div class="image-cropper-container"><img src="{% static 'img/placeholder.jpg' %}" alt="" class="crop-4-3"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-lg btn-success" id="save-picture">
<i class="icon-checkmark2"></i>
Simpan
</button>
<button class="btn btn-lg" data-dismiss="modal">
<i class="icon-cross3"></i>
Batal
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Crop Image Before Upload</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="img-container">
<div class="row">
<div class="col-md-8">
<img src="" id="sample_image" />
</div>
<div class="col-md-4">
<div class="eg-preview">
<div class="preview preview-lg"></div>
<!-- <div class="preview preview-md"></div>
<div class="preview preview-sm"></div>
<div class="preview preview-xs"></div> -->
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="crop" class="btn btn-primary">Crop</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<div id="modal_group" class="modal fade">
<div class="modal-dialog md" style="margin-top: 200px;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title modstitg">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">Nama Group</label>
<div class="col-lg-9">
<input id="inGroupName" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class>
<div class="row" id="container_sparent">
<div class="form-group" style="margin-top: 10px !important;">
<label class="col-lg-3 control-label lbl-top">Group Parent</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="select_group_parent" data-placeholder="select group.." class="select-size-xs">
<option></option>
</select>
</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>
{% endblock %}
<div class="page_loader"></div> <div class="page_loader"></div>
<!-- Core JS files --> <!-- Core JS files -->
...@@ -433,13 +976,15 @@ ...@@ -433,13 +976,15 @@
<!-- <script type="text/javascript" src="{% static 'js/plugins/ui/ripple.min.js' %}"></script> --> <!-- <script type="text/javascript" src="{% static 'js/plugins/ui/ripple.min.js' %}"></script> -->
<!-- /theme JS files --> <!-- /theme JS files -->
{% include 'includes/scripts.html' %} {% include 'includes/scripts.html' %}
{% include 'layout/userprofile.html' %}
<script src="{% static 'js/leaflet-bing-layer.js' %}"></script> <script src="{% static 'js/leaflet-bing-layer.js' %}"></script>
<!-- <script src="https://unpkg.com/sweetalert/dists/sweetalert.min.js"></script> --> <!-- <script src="https://unpkg.com/sweetalert/dists/sweetalert.min.js"></script> -->
<script type="text/javascript" src="{% static 'js/core/libraries/jquery_ui/interactions.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/core/libraries/jquery_ui/interactions.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/selects/select2.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/forms/selects/select2.min.js' %}"></script>
<!-- <script type="text/javascript" src="{% static 'js/plugins/media/cropper.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/pages/extension_image_cropper.js' %}"></script> -->
<script type="text/javascript" src="{% static 'js/pages/form_select2.js' %}"></script> <script type="text/javascript" src="{% static 'js/pages/form_select2.js' %}"></script>
</body> </body>
...@@ -452,24 +997,6 @@ ...@@ -452,24 +997,6 @@
// blah.src = URL.createObjectURL(fil) // blah.src = URL.createObjectURL(fil)
// } // }
// } // }
var parameter_ui = "{{parameter_ui}}".replace(/&#x27;/g, '"');
var param_ui = JSON.parse("" + parameter_ui + "");
var logo = param_ui['logo']
var title = param_ui['title']
var logoo = "../../static/img/" + logo + ""
$("#title-logo").html(`
<i>
<img src=` + logoo + ` alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
` + title + `
</b>
`)
jQuery(document).ajaxSend(function(event, xhr, settings) { jQuery(document).ajaxSend(function(event, xhr, settings) {
...@@ -529,12 +1056,18 @@ ...@@ -529,12 +1056,18 @@
const urlParams = new URLSearchParams(queryString); const urlParams = new URLSearchParams(queryString);
const page = urlParams.get('page') const page = urlParams.get('page')
if (page == "group") { if (page == "group" ) {
$("#usergroup").css("display", "block"); $("#usergroup").css("display", "block");
$("#info-maps").css("display", "none"); $("#info-maps").css("display", "none");
} else { $("#userprofile").css("display", "none");
} else if(page == "user" || page == null){
$("#usergroup").css("display", "none"); $("#usergroup").css("display", "none");
$("#info-maps").css("display", "block"); $("#info-maps").css("display", "block");
$("#userprofile").css("display", "none")
} else{
$("#usergroup").css("display", "none");
$("#info-maps").css("display", "none");
$("#userprofile").css("display", "block");
} }
...@@ -1043,4 +1576,169 @@ ...@@ -1043,4 +1576,169 @@
}); });
} }
//user profile js
$("#save-edt-password").on("click", function(){
changepassword();
})
function changepassword(){
var isObject = {};
isObject.id = $("#iduseredt").val();
isObject.currPass = $('#currentPass').val();
isObject.newPass = $("#newPass").val();
isObject.renewPass = $("#renewPass").val();
isObject.username = $("#usernameedt").val();
if(isObject.currPass == "" || isObject.newPass == "" || isObject.renewPass == ""){
$("#notifications").css("display", "block")
$("#notifications").html("Inputan tidak boleh kosong")
return false;
}
$.ajax({
url: "{% url 'changepassword' %}",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
var datas = response.data
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}).then((isConfirm) => {
window.location = "{% url 'apps:dashboard' %}"
})
} else {
$("#notifications").html(response.data)
$("#notifications").css("display", "block")
}
}
});
}
$("#save-edit-profile").on("click", function(){
editprofile();
})
function editprofile(){
var isObject = {}
isObject.id = $("#iduseredt").val();
isObject.first_name = $("#firstnameedt").val();
isObject.last_name = $("#lastnameedt").val();
isObject.email = $("#emailedts").val()
if(isObject.first_name == "" || isObject.last_name == "" || isObject.email == ""){
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Inputan tidak boleh kosong")
return false
}else{
var mail_format = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/;
if(!isObject.email.match(mail_format)){
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Format email tidak valid, silahkan coba kembali.")
return false
}
}
$.ajax({
url: "{% url 'editprofile' %}",
data: isObject,
dataType: 'json',
type: 'post',
success: function(data) {
let response = data;
if (response.code == 0) {
var datas = response.data
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}).then((isConfirm) => {
window.location.href = "/usermanagement/?page=userprofile"
})
} else {
$("#notifications").html(response.data)
$("#notifications").css("display", "block")
}
}
});
}
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#uploaded_image').attr('src', e.target.result);
$('#uploaded_image').hide();
$('#uploaded_image').fadeIn(650);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#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"
})
}
}
})
});
</script> </script>
\ No newline at end of file
{% load static %}
<script>
// alert("alerts");
</script>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome</title>
</head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/bootstrap.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/core.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/components.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/colors.css' %}" rel="stylesheet" type="text/css">
<style>
.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;
}
</style>
<body>
<div style="height: 100%;">
<div id="map" style="height: 100vh;">
</div>
</div>
<div class="container text-center" style=" padding-top: 55vh;
width: 400px;
text-transform: uppercase;
color: rgb(23, 87, 76);
position: fixed;
z-index: 9999;
left: 115px;
top: 10px;
width: 100%;
height: 100%;">
<!-- <h1>
{% if user.is_authenticated %} {{user.username}} {% endif %}, Welcome
</h1> -->
<h2>
Anda Login Sebagai
</h2>
<h2>
{% if user.is_authenticated %} {{user.username}} {% endif %}
</h2>
</div>
<div class="page_loader"></div>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous"></script>
<script src="{% static 'js/plugins/notifications/sweet_alert.min.js' %}"></script>
</body>
</html>
<script>
var map = L.map('map', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.028349, 104.007235], 10);
$("#sidebar").hide()
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map);
setTimeout(function() {
window.location.href = "{% url 'apps:dashboard' %}";
}, 1000);
</script>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Limitless - Responsive Web Application Kit by Eugene Kopyov</title> <title>Edit Kelurahan</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" /> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script> <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
.leaflet-control-container { .leaflet-control-container {
display: none; display: none;
} }
.modal-backdrop{
display: none;
}
</style> </style>
</head> </head>
...@@ -83,12 +86,19 @@ ...@@ -83,12 +86,19 @@
<!-- Main navbar --> <!-- Main navbar -->
<div class="navbar navbar-inverse"> <div class="navbar navbar-inverse">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand" href="{% url 'apps:dashboard' %}"> <a class="navbar-brand gradient-text " href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> --> <!-- <h3>NationalAddress</h3> -->
<i class=" icon-location4"></i> <i>
<b>&nbsp;&nbsp;OKU-GIS</b> <img src="{% static 'img/logo-ok.png' %}" alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b style="margin-left: 12px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Teman-KU
</b> (Sistem Informasi Pembangunan OKU)
</a> </a>
<ul class="nav navbar-nav pull-right visible-xs-block"> <ul class="nav navbar-nav pull-right visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li> <li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
</ul> </ul>
...@@ -107,7 +117,12 @@ ...@@ -107,7 +117,12 @@
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li> <li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</a></li> <li><a href="#"><i class="icon-cog5"></i> Account settings</a></li>
{% if user.is_superuser or user.is_staff %}
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
{% endif %}
<li class="divider"></li> <li class="divider"></li>
<li><a href="{% url 'logout' %}"><i class="icon-cog5"></i> Logout</a></li>
</ul> </ul>
</li> </li>
...@@ -129,7 +144,7 @@ ...@@ -129,7 +144,7 @@
<div class="sidebar-content" style="height: 100%;"> <div class="sidebar-content" style="height: 100%;">
<!-- User menu --> <!-- User menu -->
<div class="sidebar-user"> <!-- <div class="sidebar-user">
<div class="category-content"> <div class="category-content">
<div class="media"> <div class="media">
<a href="#" class="media-left"><img src="assets/images/placeholder.jpg" class="img-circle img-sm" alt=""></a> <a href="#" class="media-left"><img src="assets/images/placeholder.jpg" class="img-circle img-sm" alt=""></a>
...@@ -149,7 +164,7 @@ ...@@ -149,7 +164,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- /user menu --> <!-- /user menu -->
...@@ -199,8 +214,15 @@ ...@@ -199,8 +214,15 @@
<!-- Sales stats --> <!-- Sales stats -->
<div class="panel panel-flat"> <div class="panel panel-flat">
<div class="panel-heading"> <div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h6 class="panel-title">Informasi Kelurahan</h6> <h6 class="panel-title">Informasi Kelurahan</h6>
</div> </div>
<div class="col-md-6">
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="float: right;" data-toggle="modal" data-target="#modal_theme_DEL">
</div>
</div>
</div>
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
<div class="row"> <div class="row">
...@@ -257,10 +279,6 @@ ...@@ -257,10 +279,6 @@
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class="text-right">
<!-- <button type="reset" class="btn btn-default" id="reset">Reset <i class="icon-reload-alt position-right"></i></button> -->
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="bottom: 15px;" data-toggle="modal" data-target="#modal_theme_info">
</div>
</div> </div>
</div> </div>
<!-- /form validation --> <!-- /form validation -->
...@@ -290,13 +308,17 @@ ...@@ -290,13 +308,17 @@
<!-- Traffic sources --> <!-- Traffic sources -->
<div class="panel panel-flat"> <div class="panel panel-flat">
<div class="panel-heading"> <div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h6 class="panel-title">Informasi Kependudukan Desa {{result_poly.administrasi.f2}}</h6> <h6 class="panel-title">Informasi Kependudukan Desa {{result_poly.administrasi.f2}}</h6>
</div> </div>
<div class="col-md-6">
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="float: right;" data-toggle="modal" data-target="#modal_theme_DEL">
</div>
</div>
</div>
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
<div class="row"> <div class="row">
<div class="col-md-4" style="max-width: 335px;"> <div class="col-md-4" style="max-width: 335px;">
<fieldset> <fieldset>
...@@ -518,11 +540,6 @@ ...@@ -518,11 +540,6 @@
</div> </div>
<div class="text-right">
<input id="savedatakelurahanpenduduk" class="btn btn-primary" value="SAVE" style="bottom: 15px;">
</div>
</div> </div>
</div> </div>
<!-- /traffic sources --> <!-- /traffic sources -->
...@@ -558,9 +575,15 @@ ...@@ -558,9 +575,15 @@
<!-- Traffic sources --> <!-- Traffic sources -->
<div class="panel panel-flat"> <div class="panel panel-flat">
<div class="panel-heading"> <div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h6 class="panel-title">Informasi Kependidikan Penduduk Kelurahan/Desa {{result_poly.administrasi.f2}}</h6> <h6 class="panel-title">Informasi Kependidikan Penduduk Kelurahan/Desa {{result_poly.administrasi.f2}}</h6>
</div> </div>
<div class="col-md-6">
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="float: right;" data-toggle="modal" data-target="#modal_theme_DEL">
</div>
</div>
</div>
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
<div class="row"> <div class="row">
...@@ -638,9 +661,6 @@ ...@@ -638,9 +661,6 @@
</div> </div>
</div> </div>
<div class="text-right">
<input id="savedatakelurahanpendidik" class="btn btn-primary" value="SAVE" style="bottom: 15px;">
</div>
</div> </div>
</div> </div>
<!-- /traffic sources --> <!-- /traffic sources -->
...@@ -676,9 +696,17 @@ ...@@ -676,9 +696,17 @@
<div> <div>
<!-- Traffic sources --> <!-- Traffic sources -->
<div class="panel panel-flat"> <div class="panel panel-flat">
<div class="panel-heading"> <div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h6 class="panel-title">Informasi Pekerjaan Penduduk Kelurahan/Desa {{result_poly.administrasi.f2}}</h6> <h6 class="panel-title">Informasi Pekerjaan Penduduk Kelurahan/Desa {{result_poly.administrasi.f2}}</h6>
</div> </div>
<div class="col-md-6">
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="float: right;" data-toggle="modal" data-target="#modal_theme_DEL">
</div>
</div>
</div>
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
...@@ -908,9 +936,6 @@ ...@@ -908,9 +936,6 @@
</div> </div>
</div> </div>
<div class="text-right">
<input id="savedatakelurahanpekerja" class="btn btn-primary" value="SAVE" style="bottom: 15px;">
</div>
</div> </div>
</div> </div>
<!-- /traffic sources --> <!-- /traffic sources -->
...@@ -948,8 +973,15 @@ ...@@ -948,8 +973,15 @@
<!-- Traffic sources --> <!-- Traffic sources -->
<div class="panel panel-flat"> <div class="panel panel-flat">
<div class="panel-heading"> <div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h6 class="panel-title">Informasi Tempat di Kelurahan/Desa {{result_poly.administrasi.f2}}</h6> <h6 class="panel-title">Informasi Tempat di Kelurahan/Desa {{result_poly.administrasi.f2}}</h6>
</div> </div>
<div class="col-md-6">
<input id="savedatakelurahankel" class="btn btn-primary" value="SAVE" style="float: right;" data-toggle="modal" data-target="#modal_theme_DEL">
</div>
</div>
</div>
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
...@@ -983,9 +1015,6 @@ ...@@ -983,9 +1015,6 @@
</fieldset> </fieldset>
</div> </div>
<div class="text-right">
<input id="savedatakelurahanpoi" class="btn btn-primary" value="SAVE" style="bottom: 15px;">
</div>
</div> </div>
</div> </div>
<!-- /traffic sources --> <!-- /traffic sources -->
...@@ -1008,7 +1037,7 @@ ...@@ -1008,7 +1037,7 @@
</div> </div>
<!-- /page container --> <!-- /page container -->
<div id="modal_theme_info" class="modal fade"> <div id="modal_theme_DEL" class="modal fade">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content" style="width: 400px;margin-left: 100px;"> <div class="modal-content" style="width: 400px;margin-left: 100px;">
<div class="modal-header bg-info"> <div class="modal-header bg-info">
...@@ -1073,6 +1102,7 @@ ...@@ -1073,6 +1102,7 @@
<script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script>
<script src="{% static '/js/plugins/sweetalert2.js' %}"></script>
<!-- /theme JS files --> <!-- /theme JS files -->
...@@ -1168,7 +1198,7 @@ ...@@ -1168,7 +1198,7 @@
data.append('coordinate', hasil) data.append('coordinate', hasil)
$.ajax({ $.ajax({
url: "{% url 'api:kependudukan' %}", url: "{% url 'api:valideditkependudukan' %}",
data: data, data: data,
dataType: 'json', dataType: 'json',
type: 'POST', type: 'POST',
...@@ -1176,6 +1206,7 @@ ...@@ -1176,6 +1206,7 @@
contentType: false, contentType: false,
mimeType: "multipart/form-data", mimeType: "multipart/form-data",
success: function(data) { success: function(data) {
console.log(data)
let response = data let response = data
if (response.code == 0) { if (response.code == 0) {
swal({ swal({
...@@ -1185,7 +1216,7 @@ ...@@ -1185,7 +1216,7 @@
icon: "success", icon: "success",
confirmButtonColor: "#00BCD4" confirmButtonColor: "#00BCD4"
}).then((isok) => { }).then((isok) => {
$("#modal_theme_info").css('display', 'none'); $("#modal_theme_DEL").css('display', 'none');
}) })
} else { } else {
swal({ swal({
......
...@@ -196,12 +196,56 @@ ...@@ -196,12 +196,56 @@
<!-- Main navbar --> <!-- Main navbar -->
<!-- Main navbar --> <!-- Main navbar -->
{% include 'includes/navbar.html' %} <div class="navbar navbar-inverse">
<div class="navbar-header">
<a class="navbar-brand gradient-text " href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> -->
<i>
<img src="{% static 'img/logo-ok.png' %}" alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b style="margin-left: 12px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Teman-KU
</b> (Sistem Informasi Pembangunan OKU)
</a>
<ul class="nav navbar-nav pull-right visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
</ul>
</div>
<div class="navbar-collapse collapse" id="navbar-mobile">
<p class="navbar-text"><span class="label bg-success-400">Online</span></p>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown">
<img src="{% static 'img/placeholder.jpg' %}" alt="">
<span>{{user.username}}</span>
<i class="caret"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</a></li>
{% if user.is_superuser or user.is_staff %}
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
{% endif %}
<li class="divider"></li>
<li><a href="{% url 'logout' %}"><i class="icon-cog5"></i> Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!-- /main navbar --> <!-- /main navbar -->
<!-- Page container --> <!-- Page container -->
<div class="page-container" style="top: 48px;"> <div class="page-container" style="top: 0px;">
<!-- Page content --> <!-- Page content -->
<div class="page-content"> <div class="page-content">
......
{% load crispy_forms_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration new app</title>
</head>
<body>
<div class="container py-5">
<h1>Register New Application</h1>
<form method="POST">
{% csrf_token %}
<div id="div_id_username" class="control-group"> <label for="id_username" class="control-label requiredField">
Username<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="text" name="username" maxlength="150" autofocus="" class="textinput textInput" required="" id="id_username">
<p id="hint_id_username" class="help-block">Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</p>
</div>
</div>
<div id="div_id_password1" class="control-group"> <label for="id_password1" class="control-label requiredField">
Password<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="password" name="password1" autocomplete="new-password" class="textinput textInput" required="" id="id_password1">
<p id="hint_id_password1" class="help-block"></p>
<ul>
<li>Your password can’t be too similar to your other personal information.</li>
<li>Your password must contain at least 8 characters.</li>
<li>Your password can’t be a commonly used password.</li>
<li>Your password can’t be entirely numeric.</li>
</ul>
<p></p>
</div>
</div>
<div id="div_id_password2" class="control-group"> <label for="id_password2" class="control-label requiredField">
Password confirmation<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="password" name="password2" autocomplete="new-password" class="textinput textInput" required="" id="id_password2">
<p id="hint_id_password2" class="help-block">Enter the same password as before, for verification.</p>
</div>
</div>
<div id="app_name" class="control-group"> <label for="app_name" class="control-label requiredField">
App Name<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="text" name="app_name" class="textinput textInput" required="">
<p class="help-block">Enter Application Name.</p>
</div>
</div>
<div id="teritory" class="control-group"> <label for="teritory" class="control-label requiredField">
Teritory<span class="asteriskField">*</span> </label>
<div class="controls">
<select name="teritory_name" id="search_desa" placeholder="Pick a state..." style="width: 256px;height: 35px;">
<option value="">Select Teritory</option>
{% for ter in teritor %}
<option value="{{ter}}">{{ter}}</option>
{% endfor %}
</select>
<p class="help-block"></p>
</div>
</div>
<button class="btn btn-primary" type="submit">Register</button>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -6,12 +6,9 @@ ...@@ -6,12 +6,9 @@
<!------ Include the above in your HEAD tag ----------> <!------ Include the above in your HEAD tag ---------->
<link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css"> <link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<style> <style>
body {
margin-top: 100px;
/* background-image: url('https://3.bp.blogspot.com/-juutvktsA3I/WJsuDK2fYJI/AAAAAAAADJc/BLJqU67PqgMFlqG2E9KgxECwFlpO8_e1wCLcB/s4600/Peta%2BKabupaten%2BOgan%2BKomering%2Bulu%2B%2BOKU.gif'); */
}
/* .logo{ nn /* .logo{ nn
background-image: url("{% static 'img/logomaps.png' %}"); background-image: url("{% static 'img/logomaps.png' %}");
} */ } */
...@@ -24,13 +21,16 @@ ...@@ -24,13 +21,16 @@
</head> </head>
<body> <body>
<div class="container"> <div style="height: 100%;">
<div id="map" style="height: 100vh;">
<div class="container" style="margin-top: 100px;">
<br> <br>
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-6"> <div class="col-md-6">
<div class="card"> <div class="card" style="z-index: 999;">
<header class="card-header"> <header class="card-header">
<center> <center>
<h4 class="card-title mt-2 logo"> Log in </h4> <h4 class="card-title mt-2 logo"> Log in </h4>
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
<form method="post" action="{% url 'login' %}" novalidate> <form method="post" action="{% url 'login' %}" novalidate>
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<label>{{ form.username.label_tag }}</label> {% if form.is_bound %} {% if form.username.errors %} {% render_field form.username class="form-control is-invalid" %} {% else %} {% render_field form.username class="form-control <label for="">Username</label>
is-valid" %} {% endif %} {% else %} {% render_field form.username class="form-control" %} {% endif %} <input type="text" name="username" class="form-control" id="exampleInputEmail1" placeholder="Username" aria-describedby="emailHelp" required>
</div> </div>
<!-- form-group end.// -->
<div class="form-group"> <div class="form-group">
<label>{{ form.password.label_tag }}</label> {% if form.is_bound %} {% if form.password.errors %} {% render_field form.password class="form-control is-invalid" %} {% else %} {% render_field form.password class="form-control <label for="">Password</label>
is-valid" %} {% endif %} {% else %} {% render_field form.password class="form-control" %} {% endif %} <input type="password" name="password" class="form-control" placeholder="Password" id="exampleInputPassword1" required>
</div> </div>
<!-- form-group end.// --> <!-- form-group end.// -->
<hr style="margin-top: 50;"> <hr style="margin-top: 50;">
...@@ -78,9 +78,28 @@ ...@@ -78,9 +78,28 @@
<!-- row.//--> <!-- row.//-->
</div> </div>
</div>
</div>
<!--container end.//--> <!--container end.//-->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script>
var map = L.map('map', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.028349, 104.007235], 10);
$("#sidebar").hide()
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map);
</script>
</body> </body>
</html> </html>
\ No newline at end of file
{% extends 'layout/user_layout.html' %}
{% load static %}
{% block content %}
<div class="page-container">
<!-- Page content -->
<div class="page-content">
<!-- Main sidebar -->
<div class="sidebar sidebar-main" style="height: 95vh;
min-height: 607px;">
<div class="sidebar-content" style="height: 100%;">
<!-- User menu -->
<div class="sidebar-user">
<div class="category-content">
<div class="media">
<a href="#" class="media-left"><img src="{% static '/img/placeholder.jpg' %}" class="img-circle img-sm" alt=""></a>
<div class="media-body">
<span class="media-heading text-semibold">{{user.username}}</span>
<div class="text-size-mini text-muted">
<i class="icon-pin text-size-small"></i>
</div>
</div>
<div class="media-right media-middle">
<ul class="icons-list">
<li>
<a href="#"><i class="icon-cog3"></i></a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- /user menu -->
<!-- Main navigation -->
<div class="sidebar-category sidebar-category-visible">
<div class="category-content no-padding">
<ul class="navigation navigation-main navigation-accordion">
<!-- Main -->
<li class="navigation-header"> <i class="icon-menu" title="Main pages"></i></li>
<li><a href="{{ request.META.HTTP_HOST }}/usermanagement?page=user" class="tablinks" id="defaultOpen"><i class="icon-user"></i><span>User Management</span></a></li>
<li><a href="{{ request.META.HTTP_HOST }}/usermanagement?page=group" class="tablinks" id="defaultOpen"><i class="icon-users4"></i><span>Group</span></a></li>
<!-- <li><a class="tablinks" onclick="openInfo(event, 'info-penduduk')" id="defaultOpen"><span>Kependudukan</span></a></li>
<li><a class="tablinks" onclick="openInfo(event, 'info-pendidikan')" id="defaultOpen"><span>Pendidikan</span></a></li>
<li><a class="tablinks" onclick="openInfo(event, 'info-pekerjaan')" id="defaultOpen"><span>Pekerjaan</span></a></li>
<li><a class="tablinks" onclick="openInfo(event, 'info-poi')" id="defaultOpen"><span>POI</span></a></li> -->
<!-- /page kits -->
</ul>
</div>
</div>
<!-- /main navigation -->
</div>
</div>
<!-- /main sidebar -->
<!-- Main content -->
<!-- User management Tab -->
<div class="content-wrapper" id="info-maps">
<div>
<!-- Page header -->
<div class="page-header page-header-default" style="margin-bottom: 0px;">
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li>User Profile</li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Content area -->
<div class="content" style="padding: 15px;">
<!-- Main charts -->
<!-- Sales stats -->
<div class="panel panel-flat" style="display: none;">
<div class="panel-heading">
<h6 class="panel-title">Table User</h6>
<button id="modalAddButton" class="btn btn-primary btn-sm" value="SAVE" style="bottom: 15px; float: right; display:none;" data-toggle="modal" data-target="#modal_theme_info"></button>
</div>
<hr style="margin-top: 0px;">
<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>Username</th>
<th>Name</th>
<th>Email</th>
<th>Group</th>
<th>Last login</th>
<th>Status</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
{% for user in data %}
<tr>
<td>{{forloop.counter}}</td>
<td>{{user.username}}</td>
<td>{{user.name}}</td>
<td>{{user.email}}</td>
<td>{{user.group}}</td>
<td>{{user.last}}</td>
<td>
{% if user.isactive == True %}
<span class="label label-success">
Active
</span> {% else %}
<span class="label label-danger">
Inactive
</span> {% endif %}
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-menu9"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a onclick="switchuserstatus('{{user.id}}, {{user.isactive}}')"><i class="icon-user-block"></i> Switch user status</a></li>
<li><a onclick="loaduserbyid('{{user.id}}')"><i class="icon-users"></i> Edit user</a></li>
</ul>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- /form validation -->
</div>
</div>
<!-- /main charts -->
</div>
</div>
<!-- end user management tab -->
<div class="content-wrapper" id="usergroup" style="display: none;">
<div>
<!-- Page header -->
<div class="page-header page-header-default" style="margin-bottom: 0px;">
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li>Group</li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Content area -->
<div class="content" style="padding: 15px;">
<!-- Main charts -->
<!-- Sales stats -->
<div class="panel panel-flat" style="display: none;">
<div class="panel-heading">
<h6 class="panel-title">Table Group</h6>
<button id="modalAddButtong" class="btn btn-primary btn-sm" value="SAVE" style="bottom: 15px; float: right; display:none;" data-toggle="modal" data-target="#modal_group"></button>
</div>
<hr style="margin-top: 0px;">
<div class="panel-body">
<table class="table table-responsive datatable-groups table-sm" id="usergroup">
<thead>
<tr>
<th>No.</th>
<th>Name</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
{% for group in dataGroup %}
<tr>
<td>{{forloop.counter}}</td>
<td>{{group.name}}</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-menu9"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a onclick="deletegroup('{{group.id}}', '{{group.name}}')"><i class="icon-user-block"></i> Delete group</a></li>
<li><a onclick="showmodalgroup('{{group.id}}', '{{group.name}}')"><i class="icon-users"></i> Edit group</a></li>
</ul>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- /form validation -->
</div>
</div>
<!-- /main charts -->
</div>
</div>
<!-- /main content -->
</div>
<!-- /page content -->
</div>
<!-- /page container -->
<div id="modal_theme_info" class="modal fade">
<div class="modal-dialog md" style="margin-top: 100px;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title modstit">Modal Tambah User</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<input type="hidden" id="iduser">
<div class="row">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Username</label>
<div class="col-lg-9">
<input id="inUsername" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">First Name</label>
<div class="col-lg-9">
<input id="inNameF" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Last Name</label>
<div class="col-lg-9">
<input id="inNameL" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Email</label>
<div class="col-lg-9">
<input id="inEmail" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 20px;">
<div class="form-group">
<label class="col-lg-3 control-label">Staff</label>
<div class="col-lg-9">
<label class="radio-inline">
<input type="radio" class="styled" value="true" name="isStaff" checked="checked">
Ya
</label>
<label class="radio-inline">
<input type="radio" class="styled" value="false" name="isStaff">
Tidak
</label>
</div>
</div>
</div>
<div class="row">
<div class="form-group" style="margin-top: 10px !important;">
<label class="col-lg-3 control-label lbl-top">Groups</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="select_group" data-placeholder="select group.." class="select-size-xs">
<option></option>
</select>
</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="saveuser">Save changes</button>
</div>
</div>
</div>
</div>
<div id="modal_group" class="modal fade">
<div class="modal-dialog md" style="margin-top: 200px;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color: #1a222f !important;">
<button type="button" class="close" data-dismiss="modal" onclick="destroyfade()">&times;</button>
<h6 class="modal-title modstitg">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">Nama Group</label>
<div class="col-lg-9">
<input id="inGroupName" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class>
<div class="row" id="container_sparent">
<div class="form-group" style="margin-top: 10px !important;">
<label class="col-lg-3 control-label lbl-top">Group Parent</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="select_group_parent" data-placeholder="select group.." class="select-size-xs">
<option></option>
</select>
</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>
{% endblock %}
\ 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