Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OKU-GIS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhamad
OKU-GIS
Commits
6298bfae
Commit
6298bfae
authored
Oct 01, 2021
by
Muhamad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
downloader user list, downloader point list
parent
19264452
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1146 additions
and
1101 deletions
+1146
-1101
API/urls.py
API/urls.py
+1
-3
API/views.py
API/views.py
+47
-3
static/css/layout-style.css
static/css/layout-style.css
+504
-2
static/js/action.js
static/js/action.js
+452
-0
static/js/scripts.js
static/js/scripts.js
+0
-73
templates/includes/js-m.html
templates/includes/js-m.html
+1
-2
templates/includes/modal.html
templates/includes/modal.html
+4
-117
templates/includes/sidebar.html
templates/includes/sidebar.html
+1
-6
templates/layout/layout.html
templates/layout/layout.html
+136
-895
No files found.
API/urls.py
View file @
6298bfae
...
...
@@ -72,7 +72,5 @@ urlpatterns = [
path
(
'user-data'
,
views
.
user_data
,
name
=
'user-data'
),
path
(
'deletejalan'
,
views
.
deletejalan
,
name
=
'hapus-jalan'
),
path
(
'search_spes'
,
views
.
search_spes
,
name
=
'search_spes'
),
path
(
'search_lanjut'
,
views
.
search_lanjut
,
name
=
'search_lanjut'
)
path
(
'search_lanjut'
,
views
.
search_lanjut
,
name
=
'search_lanjut'
),
]
\ No newline at end of file
API/views.py
View file @
6298bfae
...
...
@@ -2913,7 +2913,8 @@ def user_data(request):
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id AND
ag.id IN("""
+
ars
+
")"
ORDER BY
au.username ASC"""
else
:
print
(
'not staff'
)
userlist_
.
execute
(
sql
)
...
...
@@ -2959,7 +2960,51 @@ def user_data(request):
with
conn
.
cursor
()
as
po
:
po
.
execute
(
"select id, namobj, alamat, luas_bangunan, perangkat from geo_kantor_administrasi"
)
po
.
execute
(
"""
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_kantor_administrasi
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_layanan_kesehatan
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_puskesmas
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_rumah_sakit
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_sarana_ibadah
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_sarana_pendidikan
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_spbu
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_stasiun
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_terminal_bus
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_cagar_budaya
UNION
SELECT id, namobj, alamat, luas_bangunan, perangkat
FROM
geo_gardu_listrik
"""
)
poi
=
po
.
fetchall
()
point
=
[]
...
...
@@ -2980,7 +3025,6 @@ def user_data(request):
'point'
:
point
}
return
Response
(
respon
)
return
Response
(
respon
)
@
api_view
((
'GET'
,))
def
search_spes
(
request
):
...
...
static/css/layout-style.css
View file @
6298bfae
This diff is collapsed.
Click to expand it.
static/js/action.js
0 → 100644
View file @
6298bfae
This diff is collapsed.
Click to expand it.
static/js/scripts.js
View file @
6298bfae
...
...
@@ -115,79 +115,6 @@ $("#manage_perbaikan").click(function() {
$
(
"
#perbaikan-dashboard
"
).
toggleClass
(
"
perbaikan-dashboard
"
);
// var content_perbaikan = `
// <div id="panel-samping-child" class="sidebar-2" style="background: #1B1F2D;position: absolute;z-index: 9;width: 23%;height:100vh;left: -30%;transition: all 0.5s ease;">
// <div style="margin-left: 50px;background: #1B1F2D;">
// <div class="header" style="margin-top: 25px;background: #2F3445;">
// <h6 class="panel-title" style="color: #ffff;margin-left: 20px;font-size: 12pt;">Laporan Perbaikan<a class="heading-elements-toggle"><i class="icon-more"></i></a></h6>
// </div>
// <div class="bod" style="margin-top: 10px;margin-left:6px;">
// <div style="color: white;">
// <span>Filter:</span>
// </div>
// <div class="form-group" style="margin-top: 15px;width: 250px;">
// <select name="select" id="sel-kec" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
// <option value="opt1">Pilih Kecamatan</option>
// <option value="opt1">Pilih Kecamatan</option>
// <option value="opt1">Pilih Kecamatan</option>
// {% for nama_kecamatan in kec_res %}
// {% endfor %}
// </select>
// </div>
// <div class="form-group" style="margin-top: 15px;width: 250px;">
// <select name="select" id="sel-desa" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
// <option value="opt1">Pilih Desa</option>
// </select>
// </div>
// </div>
// </div>
// </div>
// <div class="panel panel-flat" id="perbaikan-dashboard" style="background: #181B27;position: absolute;z-index: 9;width: 77%;height:100vh;left: 23%;transition: all 0.5s ease;color: white; border: none;">
// <div class="panel-heading" style="background-color:#181B27;border-bottom: 0.5pt solid #313649;">
// <h6 class="panel-title">Table Data Perbaikan</h6>
// </div>
// <div class="panel-body">
// <table class="table table-responsive datatable-show-all table-sm" id="userList" style="word-wrap:break-word;">
// <thead>
// <tr>
// <th>No.</th>
// <th>Sarana Perbaiakn</th>
// <th>Nama</th>
// <th>Type</th>
// <th>Tanggal Mulai</th>
// <th>Tanggal Selesai</th>
// <th>Anggaran</th>
// <th>Keterangan</th>
// </tr>
// </thead>
// <tbody id="loop-perbaikan">
// {% for all in res_all %}
// <tr>
// <td>{{forloop.counter}}</td>
// <td>{{all.name_perbaikan}}</td>
// <td>{{all.name}}</td>
// <td>{{all.type}}</td>
// <td>{{all.tgl_perbaikan}}</td>
// <td>{{all.tgl_selesai}}</td>
// <td>{{all.anggaran}}</td>
// <td class="text-center">
// <a class="mdlFire" onclick="loadjlbyid('{{all.id_object}}')" data-toggle="modal" data-target="#modal_detail">Detail</a>
// </td>
// </tr>
// {% endfor %}
// </tbody>
// </table>
// </div>
// </div>`;
// $("#panel-samping").html(content_perbaikan)
})
...
...
templates/includes/js-m.html
View file @
6298bfae
...
...
@@ -92,7 +92,6 @@
<script>
var
kantor_administrasi
=
"
{{ kantor_administrasi }}
"
.
replace
(
/'/g
,
'
"
'
);
console
.
log
(
kantor_administrasi
)
var
result_kan_adm
=
JSON
.
parse
(
""
+
kantor_administrasi
+
""
)
...
...
@@ -7165,7 +7164,7 @@
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>`
;
var
data_kab
=
`<option value="`
+
data_id
+
`">`
+
data_po
+
`</option>`
;
console
.
log
(
data_id
)
console
.
log
(
data_po
)
var
data_kab
=
`<option value="`
+
data_id
+
`">`
+
data_po
+
`</option>`
;
...
...
templates/includes/modal.html
View file @
6298bfae
...
...
@@ -342,47 +342,6 @@
</div>
</div>
<style>
#modal_detail_kelurahan
>
div
>
div
>
div
>
fieldset
>
div
>
div
:nth-child
(
1
)>
div
:nth-child
(
2
)>
div
.row
>
div
>
div
>
div
:nth-child
(
1
)
{
margin-bottom
:
5px
;
}
#modal_detail_kelurahan
>
div
>
div
>
div
>
fieldset
>
div
>
div
:nth-child
(
1
)>
div
:nth-child
(
2
)>
div
.row
>
div
>
div
>
div
:nth-child
(
2
)
{
margin-bottom
:
10px
;
font-family
:
'gilroysemibold'
;
}
#modal_detail_non_kelurahan
>
div
>
div
>
div
.modal-body
>
fieldset
>
div
>
div
:nth-child
(
2
)>
div
>
div
>
div
>
div
:nth-child
(
2
)
{
margin-bottom
:
10px
;
font-family
:
'gilroysemibold'
;
}
li
.active
>
a
:after
{
border-bottom
:
2pt
solid
#60B2FD
;
}
.apexcharts-menu-icon
{
width
:
150px
;
color
:
white
;
left
:
-16px
;
}
.apexcharts-toolbar
{
right
:
-50px
!important
;
top
:
104%
!important
;
background-color
:
#5A9AFB
;
border-top-left-radius
:
10px
;
width
:
150px
;
height
:
45px
;
border-bottom-right-radius
:
10px
;
}
.apexcharts-menu
{
top
:
-98px
!important
;
right
:
0px
!important
;
}
</style>
<div
class=
"modal fade"
id=
"modal_detail_kelurahan"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-md"
style=
"width: 820px;max-height: 500px;min-height: 500px;"
>
<div
class=
"modal-content"
style=
"border-radius:10px;max-height: 500px;min-height: 500px;"
>
...
...
@@ -750,7 +709,7 @@
<div
style=
"margin-bottom: 10px;"
>
<a
href=
"#personalinformation"
data-toggle=
"tab"
class=
"tab-user btn btn-default"
style=
"
<a
href=
"#personalinformation"
data-toggle=
"tab"
class=
"tab-user btn btn-default
"
style=
"
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
...
...
@@ -1027,7 +986,7 @@
<div
class=
"tab-pane"
id=
"monitoringdatauser"
>
<table
class=
"table table-responsive datatable-show-all table-sm list_point"
id=
"list_point"
style=
"font-size : 8pt;padding:0px;border-top:0.5pt solid #EFEFEF;border-bottom:0.5pt solid #EFEFEF;margin-bottom: 10px;"
>
<div
style=
"position: absolute;right: 30px;font-size: 10pt;"
>
<a
class=
"btn side-bar-but"
id=
"download_perbaikan"
onclick=
"download_
user
_list('xlsx')"
style=
"z-index:9;"
>
<a
class=
"btn side-bar-but"
id=
"download_perbaikan"
onclick=
"download_
point
_list('xlsx')"
style=
"z-index:9;"
>
<div>
<i
class=
"icon-download4"
></i><span>
Download
</span>
</div>
...
...
@@ -1365,77 +1324,5 @@
</div>
<script>
function
btnuserclick
(
evt
)
{
var
i
,
tabcontent
,
tablinks
;
tablinks
=
document
.
getElementsByClassName
(
"
tab-user
"
);
for
(
i
=
0
;
i
<
tablinks
.
length
;
i
++
)
{
tablinks
[
i
].
className
=
tablinks
[
i
].
className
.
replace
(
"
active
"
,
""
);
}
evt
.
currentTarget
.
className
+=
"
active
"
;
//$(".tab-user").style.border = "#4C97DC";
}
// $('.datatable-show-all.list_user').DataTable({
// autoWidth: false,
// columnDefs: [{
// orderable: false,
// width: '20px',
// targets: [0],
//
// }, {
// orderable: false,
// width: '20px',
// targets: [5],
//
// }, {
// orderable: false,
// width: '20px',
// targets: [6],
//
// }, ],
// dom: '
<
"
float-left
"
B
>
frtip
'
,
// language: {
// search:
'
_INPUT_
'
,
// searchPlaceholder:
'
Data
Perbaikan
...
'
,
// lengthMenu:
'
<
span
>
Show
:
<
/span><hr> _MENU_'
,
// paginate: {
// 'first': 'First',
// 'last': 'Last',
// 'next': '→',
// 'previous': '←'
// }
// },
// drawCallback: function() {
// $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').addClass('dropup');
// },
// preDrawCallback: function() {
// $(this).find('tbody tr').slice(-3).find('.dropdown, .btn-group').removeClass('dropup');
// }
// });
function
download_user_list
(
type
,
fn
,
dl
)
{
var
elt
=
document
.
getElementById
(
'
list_user
'
);
var
wb
=
XLSX
.
utils
.
table_to_book
(
elt
,
{
sheet
:
"
sheet1
"
});
return
dl
?
XLSX
.
write
(
wb
,
{
bookType
:
type
,
bookSST
:
true
,
type
:
'
base64
'
})
:
XLSX
.
writeFile
(
wb
,
fn
||
(
'
data_user.
'
+
(
type
||
'
xlsx
'
)));
}
</script>
<style>
.tab-user.active
{
border
:
1pt
solid
#4C97DC
!important
;
color
:
#4C97DC
!important
;
}
.tab-user.active
{}
</style>
\ No newline at end of file
<table
id=
"table_downloader"
style=
"display: none;"
>
</table>
\ No newline at end of file
templates/includes/sidebar.html
View file @
6298bfae
...
...
@@ -48,12 +48,6 @@
</a>
</li>
<hr>
<li>
<a
href=
"#"
id=
"btn-hide-all"
class=
"side-bar-but"
style=
"position: absolute;margin-top: 1px;"
>
<i
class=
"icon-arrow-right13"
></i>
</a>
</li>
</ul>
</div>
</div>
...
...
@@ -429,6 +423,7 @@
</div>
</div>
</div>
<div
class=
"panel panel-flat "
id=
"perbaikan-dashboard "
style=
"background: #181B27;position: absolute;z-index: 9;width: 77%;height:100vh;left: 23%;transition: all 0.5s ease;color: white; border: none; "
>
<div
class=
"panel-body "
style=
"padding:14px 0px;"
>
...
...
templates/layout/layout.html
View file @
6298bfae
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment