Commit 60eaca51 authored by Muhamad's avatar Muhamad

jalan edit

parent 85e29181
...@@ -101,9 +101,10 @@ def jalan(request): ...@@ -101,9 +101,10 @@ def jalan(request):
kulon = request.GET.get("kulon") kulon = request.GET.get("kulon")
lor = request.GET.get("lor") lor = request.GET.get("lor")
kidul = request.GET.get("kidul") kidul = request.GET.get("kidul")
print(kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor)
with conn.cursor() as jalan: with conn.cursor() as jalan:
jalan.execute("SELECT json_build_object ('type', 'Feature', 'properties', ( id, namrjl, st_length(geom::geography), lebar_jalan, remark, gambar), 'geometry', ST_AsGeoJSON ( st_intersection(geom, 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') :: geometry ) :: json ) FROM geo_jalan WHERE st_intersects(geom,'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))')"% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor)) jalan.execute("SELECT json_build_object ('type', 'Feature', 'properties', ( gj.ID, namrjl, st_length ( gj.geom :: geography ), gj.lebar_jalan, gj.remark, gj.gambar,(SELECT ARRAY_AGG ( '' || id || ',' || tgl_perbaikan || '' order by tgl_perbaikan DESC ) FROM tbl_perbaikan WHERE id_object = gj.ID ) ), 'geometry', ST_AsGeoJSON ( st_intersection(gj.geom, 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') :: geometry ) :: json ) FROM geo_jalan gj WHERE st_intersects(gj.geom,'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') GROUP BY gj.id"% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor))
prov_res = jalan.fetchall() prov_res = jalan.fetchall()
data = {'gen':prov_res} data = {'gen':prov_res}
......
...@@ -8,9 +8,15 @@ app_name = 'apps' ...@@ -8,9 +8,15 @@ app_name = 'apps'
urlpatterns = [ urlpatterns = [
path('', views.Dashboard.as_view(), name='dashboard'), path('', views.Dashboard.as_view(), name='dashboard'),
#Search path('editkelurahan', views.editkelurahan, name='editkelurahan'),
path('editkelurahan/', edit.editkelurahan, name='edit_kel'),
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('save-perbaikan', views.saveperbaikan, name='save-perbaikan'),
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-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'),
] ]
\ No newline at end of file
This diff is collapsed.
...@@ -42,7 +42,7 @@ INSTALLED_APPS = [ ...@@ -42,7 +42,7 @@ INSTALLED_APPS = [
'Application', 'Application',
'API', 'API',
'myauth.apps.MyauthConfig', 'myauth.apps.MyauthConfig',
'widget_tweaks', 'widget_tweaks'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
...@@ -144,4 +144,7 @@ STATICFILES_DIRS = ( ...@@ -144,4 +144,7 @@ STATICFILES_DIRS = (
STATIC_ROOT = '/static/' STATIC_ROOT = '/static/'
LOGIN_REDIRECT_URL = '/' LOGIN_REDIRECT_URL = '/'
\ No newline at end of file
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
\ No newline at end of file
...@@ -36,4 +36,4 @@ urlpatterns = [ ...@@ -36,4 +36,4 @@ urlpatterns = [
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')
] ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
...@@ -80,6 +80,7 @@ $("#button_unhide").click(function() { ...@@ -80,6 +80,7 @@ $("#button_unhide").click(function() {
$("#button_hide_panel").click(function() { $("#button_hide_panel").click(function() {
$("#panel-samping").toggleClass("move"); $("#panel-samping").toggleClass("move");
// $("#panel-samping").css('display', 'none'); // $("#panel-samping").css('display', 'none');
$("#button_unhide_panel").css('display', 'block'); $("#button_unhide_panel").css('display', 'block');
$("#button_hide_panel").css('display', 'none'); $("#button_hide_panel").css('display', 'none');
...@@ -90,8 +91,11 @@ $("#button_hide_panel").click(function() { ...@@ -90,8 +91,11 @@ $("#button_hide_panel").click(function() {
}) })
$("#button_unhide_panel").click(function() { $("#button_unhide_panel").click(function() {
$(".pace-done").toggleClass("sidebar-move")
$("#panel-samping").toggleClass("move"); $("#panel-samping").toggleClass("move");
$(".mymodal").toggleClass("input_perbaikan")
$(this).toggleClass("move-btn"); $(this).toggleClass("move-btn");
// $("#panel-samping").css('display', 'block'); // $("#panel-samping").css('display', 'block');
// $("#button_unhide").css('display', 'none'); // $("#button_unhide").css('display', 'none');
// $("#button_hide_panel").css('display', 'block'); // $("#button_hide_panel").css('display', 'block');
......
This diff is collapsed.
...@@ -21,10 +21,12 @@ ...@@ -21,10 +21,12 @@
<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>
<!-- /theme JS files --> <!-- /theme JS files -->
<script src="{% static 'js/leaflet-bing-layer.js' %}"></script> <script src="{% static 'js/leaflet-bing-layer.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/tables/datatables/datatables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/maps.js' %}"></script> <script type="text/javascript" src="{% static 'js/maps.js' %}"></script>
<script src="{% static 'js/scripts.js' %}"></script> <script src="{% static 'js/scripts.js' %}"></script>
\ No newline at end of file
This diff is collapsed.
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<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 %} {% 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>
{% endif %} {% 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>
...@@ -38,17 +39,16 @@ ...@@ -38,17 +39,16 @@
{% else %} {% else %}
<div class="form-group" style="margin: 6px;"> <div class="form-group" style="margin: 6px;">
<a href="/login"> <a href="/login">
<button type="submit" class="btn btn-xs btn-icon bg-blue btn-block" style="width: 100px;border-radius: 4px;"> <i class="icon-enter"> Login</i></button> <button type="submit" class="btn btn-xs btn-icon bg-blue btn-block btn-login" style="width: 35px;
border-radius: 20px;
height: 35px;
border-color: #40777c;
background-color: #40777c;
color: white;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);"> <i class="icon-enter"></i></button>
</a> </a>
</div> </div>
{% endif %} {% endif %}
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -237,88 +237,54 @@ ...@@ -237,88 +237,54 @@
<div> <div>
<a href="#" class="btn btn-default" id="button_hide"><span class="caret" style="margin-left: -5px;"></span></a> <a href="#" class="btn btn-default" id="button_hide"><span class="caret" style="margin-left: -5px;"></span></a>
</div> </div>
<div class="row" > <div class="row">
<div class="col-md-3"></div> <div class="col-md-3"></div>
<div class="col-md-6 content-footer" > <div class="col-md-6 content-footer">
<div class="row" id="info-footer"> <div class="row" id="info-footer">
<div class="col-md-12"> <div class="col-md-12">
<div class="row"> <div class="row">
<div class="col-md-3" style="min-width: 150px;"> <div class="col-md-4" style="min-width: 150px;">
<div class="form-group"> <div class="form-group">
<label class="text-semibold">Informasi</label>
<div>
<table>
<tr>
<th>Jumlah Kecamatan</th>
<td>: {{ global.5 }}</td>
</tr>
<tr>
<th>Jumlah Kelurahan</th>
<td>: {{ global.6 }}</td>
</tr>
<tr>
<th>Jumlah Penduduk</th>
<td>: {{ global.19 }}</td>
</tr>
<tr>
<th>Jumlah KK</th>
<td>: {{ global.20 }}</td>
</tr>
<tr>
<th>Jumlah Laki-laki</th>
<td>: {{ global.21 }}</td>
</tr>
<tr>
<th>Jumlah Perempuan</th>
<td>: {{ global.22 }}</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-md-3" style="min-width: 150px;">
<div class="form-group" style="margin-top: 30px;">
<table> <table>
<tr> <tr>
<th>Luas Wilayah</th> <th>Luas Wilayah</th>
<td>: {{ global.1 }}</td> <td>: {{ global.1 }}</td>
</tr> </tr>
<tr> <tr>
<th>Luas Pemukiman</th> <th>Jumlah Kecamatan</th>
<td>: {{ global.2 }}</td> <td>: {{ global.5 }}</td>
</tr> </tr>
<tr> <tr>
<th>Luas Ladang & Sawah</th> <th>Jumlah Kelurahan</th>
<td>: {{ global.3 }}</td> <td>: {{ global.6 }}</td>
</tr> </tr>
<tr> <tr>
<th>Luas Hutan Kering</th> <th>Jumlah Penduduk</th>
<td>: {{ global.7 }}</td> <td>: {{ global.19 }}</td>
</tr> </tr>
<tr> <tr>
<th>Luas Semak Belukar</th> <th>Jumlah KK</th>
<td>: {{ global.14 }}</td> <td>: {{ global.20 }}</td>
</tr> </tr>
<tr> <tr>
<th>Panjang Ruas Jalan</th> <th>Jumlah Laki-laki</th>
<td>: {{ global.8 }}</td> <td>: {{ global.21 }}</td>
</tr>
<tr>
<th>Jumlah Perempuan</th>
<td>: {{ global.22 }}</td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
<div class="col-md-4" style="min-width: 150px;">
<div class="col-md-3" style="min-width: 120px;"> <div class="form-group">
<div class="form-group" style="margin-top: 20px;">
<!-- <label class="text-semibold">Last filter check feasibilty </label> -->
<table> <table>
<tr> <tr>
<th>Jumlah Rumah Sakit</th> <th>Jumlah Rumah Sakit</th>
...@@ -351,9 +317,37 @@ ...@@ -351,9 +317,37 @@
</tr> </tr>
</table> </table>
</div> </div>
</div>
<div class="col-md-4" style="min-width: 120px;">
<div class="form-group">
<!-- <label class="text-semibold">Last filter check feasibilty </label> -->
<table>
<tr>
<th>Luas Pemukiman</th>
<td>: {{ global.2 }}</td>
</tr>
<tr>
<th>Luas Ladang & Sawah</th>
<td>: {{ global.3 }}</td>
</tr>
<tr>
<th>Luas Hutan Kering</th>
<td>: {{ global.7 }}</td>
</tr>
<tr>
<th>Luas Semak Belukar</th>
<td>: {{ global.14 }}</td>
</tr>
<tr>
<th>Panjang Ruas Jalan</th>
<td>: {{ global.8 }}</td>
</tr>
</table>
</div>
</div> </div>
<div class="col-md-3" style="min-width: 150px;padding-left:50px;bottom:-140px"> <div style="min-width: 150px;padding-left:50px;bottom:-140px">
<i><b> <i><b>
Sumber : DUKCAPIL, 2019 Sumber : DUKCAPIL, 2019
</b></i> </b></i>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment