Commit 6d5c957d authored by Muhamad's avatar Muhamad

help&support

parent 48cf2759
...@@ -135,7 +135,7 @@ def building(request): ...@@ -135,7 +135,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 = []
......
...@@ -21,6 +21,8 @@ urlpatterns = [ ...@@ -21,6 +21,8 @@ urlpatterns = [
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('get-detail-perbaikan-bang', views.getdetailperbaikanbangunan, name='get-detail-perbaikan-bang'),
path('loadPointbyId', views.loadPointbyId) path('loadPointbyId', views.loadPointbyId),
path('sendmail', views.sendmail),
] ]
\ No newline at end of file
...@@ -7,6 +7,8 @@ from django.views import View, generic ...@@ -7,6 +7,8 @@ from django.views import View, generic
from django.contrib.auth.decorators import login_required, user_passes_test from django.contrib.auth.decorators import login_required, user_passes_test
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
from django.db import connection as conn from django.db import connection as conn
from django.core.mail import send_mail
from django.conf import settings
# from edit import * # from edit import *
class Dashboard(generic.TemplateView): class Dashboard(generic.TemplateView):
...@@ -1270,3 +1272,33 @@ def loadPointbyId(request): ...@@ -1270,3 +1272,33 @@ def loadPointbyId(request):
context = {'result':'result'} context = {'result':'result'}
return Response(context) return Response(context)
@api_view(('POST',))
def sendmail(request):
pengirimh = request.POST.get('pengirimh')
emailh = request.POST.get('emailh')
isih = request.POST.get('pesanh')
pengirim = request.POST.get('pengirim')
email = request.POST.get('email')
isi = request.POST.get('pesan')
if isi != '':
mess = f"nama pengirim : {pengirim} \nemail pengirim : {email} \nisi pesan : \n\n{isi}"
elif isih != '':
mess = f"nama pengirim : {pengirimh} \nemail pengirim : {emailh} \nisi pesan : \n\n{isih}"
try:
send_mail(subject='help & support', message=mess, from_email=settings.EMAIL_HOST_USER, recipient_list=[settings.RECIPIENT_ADDRESS])
data = {
"info" : "success",
"code" : 0,
"data" : "Pesan anda telah terkirim"
}
except:
data = {
"code" : 4,
"data" : "Gagal mengirim pesan, silahkan coba beberapa saat lagi",
"info" : "failed"
}
context = data
return Response(context)
\ No newline at end of file
...@@ -153,3 +153,13 @@ LOGIN_REDIRECT_URL = '/' ...@@ -153,3 +153,13 @@ LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/var/www/django/oku.khansia.co.id/media/' MEDIA_URL = '/var/www/django/oku.khansia.co.id/media/'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'khansiakhansia5@gmail.com'
EMAIL_HOST_PASSWORD = 'khansia1234'
RECIPIENT_ADDRESS = 'muhamadnahrowi17@gmail.com'
\ No newline at end of file
...@@ -1027,5 +1027,53 @@ $("#btnsaveuser").click(function() { ...@@ -1027,5 +1027,53 @@ $("#btnsaveuser").click(function() {
// } // }
// } // }
$(".send_pesan").click(function() {
var pengirimh = $("#nama_pengirimh").val();
var emailh = $("#email_pengirimh").val();
var pesan_pengirimh = $("#pesan_pengirimh").val();
var pengirim = $("#nama_pengirim").val();
var email = $("#email_pengirim").val();
var pesan_pengirim = $("#pesan_pengirim").val();
$.ajax({
url: "sendmail",
data: { 'pengirimh': pengirimh, 'emailh': emailh, 'pesanh': pesan_pengirimh, 'pengirim': pengirim, 'email': email, 'pesan': pesan_pengirim },
dataType: 'json',
type: 'post',
success: function(data) {
let response = data
if (response.code == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#nama_pengirimh").values('');
$("#email_pengirimh").values('');
$("#pesan_pengirimh").values('');
$("#nama_pengirim").values('');
$("#email_pengirim").values('');
$("#pesan_pengirim").values('');
})
}
}
});
})
document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`) document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").css("right", "50px") document.querySelector("#map-create-all > div.leaflet-control-container > div.leaflet-bottom.leaflet-right > div").css("right", "50px")
\ No newline at end of file
...@@ -1144,7 +1144,7 @@ ...@@ -1144,7 +1144,7 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Nama :</label> <label class="control-label"> Nama :</label>
<input type="text" id="nama_pengirim" class="form-control"> <input type="text" id="nama_pengirim" class="form-control nama_pengirim">
</div> </div>
</div> </div>
</div> </div>
...@@ -1152,7 +1152,7 @@ ...@@ -1152,7 +1152,7 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Email:</label> <label class="control-label"> Email:</label>
<input type="text" id="email_pengirim" class="form-control"> <input type="text" id="email_pengirim" class="form-control email_pengirim">
</div> </div>
</div> </div>
</div> </div>
...@@ -1160,11 +1160,11 @@ ...@@ -1160,11 +1160,11 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Pesan :</label> <label class="control-label"> Pesan :</label>
<textarea rows="5" cols="5" class="form-control" id="pesan_pengirim" placeholder="Tuliskan Pesan disini" style="height: 240px;"></textarea> <textarea rows="5" cols="5" class="form-control pesan_pengirim" id="pesan_pengirim" placeholder="Tuliskan Pesan disini" style="height: 240px;"></textarea>
</div> </div>
</div> </div>
</div> </div>
<button type="button" class="btn btn-info" id="send_pesan" style=" margin: 10px;float: right;border: none;">Send Messages</button> <button type="button" class="btn btn-info send_pesan" id="send_pesan" style=" margin: 10px;float: right;border: none;">Send Messages</button>
</div> </div>
</div> </div>
...@@ -2150,7 +2150,7 @@ ...@@ -2150,7 +2150,7 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Nama :</label> <label class="control-label"> Nama :</label>
<input type="text" id="nama_pengirim" class="form-control"> <input type="text" id="nama_pengirimh" class="form-control nama_pengirim">
</div> </div>
</div> </div>
</div> </div>
...@@ -2158,7 +2158,7 @@ ...@@ -2158,7 +2158,7 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Email:</label> <label class="control-label"> Email:</label>
<input type="text" id="email_pengirim" class="form-control"> <input type="text" id="email_pengirimh" class="form-control email_pengirim">
</div> </div>
</div> </div>
</div> </div>
...@@ -2166,11 +2166,11 @@ ...@@ -2166,11 +2166,11 @@
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<label class="control-label"> Pesan :</label> <label class="control-label"> Pesan :</label>
<textarea rows="5" cols="5" class="form-control" id="pesan_pengirim" placeholder="Tuliskan Pesan disini" style="height: 240px;"></textarea> <textarea rows="5" cols="5" class="form-control pesan_pengirim" id="pesan_pengirimh" placeholder="Tuliskan Pesan disini" style="height: 240px;"></textarea>
</div> </div>
</div> </div>
</div> </div>
<button type="button" class="btn btn-info" id="send_pesan" style=" margin: 10px;float: right;border: none;">Send Messages</button> <button type="button" class="btn btn-info send_pesan" id="send_pesan" style=" margin: 10px;float: right;border: none;">Send Messages</button>
</div> </div>
</div> </div>
...@@ -2201,24 +2201,48 @@ ...@@ -2201,24 +2201,48 @@
<td>1.</td> <td>1.</td>
<td>Pada halaman dashboard, klik tombol “SIGN IN” untuk melakukan login</td> <td>Pada halaman dashboard, klik tombol “SIGN IN” untuk melakukan login</td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-16.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>2.</td> <td>2.</td>
<td> <td>
Masukkan <i>username</i> dan <i>password</i> Masukkan <i>username</i> dan <i>password</i>
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-21.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>3.</td> <td>3.</td>
<td> <td>
Kemudian klik tombol “Log In” Kemudian klik tombol “Log In”
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-27.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>4.</td> <td>4.</td>
<td> <td>
Akan muncul Welcome Page seperti di bawah Akan muncul Welcome Page seperti di bawah
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-34.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>
...@@ -2240,24 +2264,48 @@ ...@@ -2240,24 +2264,48 @@
<td>1.</td> <td>1.</td>
<td>Pada halaman utama aplikasi, klik icon</td> <td>Pada halaman utama aplikasi, klik icon</td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-40.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>2.</td> <td>2.</td>
<td> <td>
Setelah itu akan muncul form 3D Searching, lalu pilih desa, Setelah itu akan muncul form 3D Searching, lalu pilih desa,
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-46.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>3.</td> <td>3.</td>
<td> <td>
Lalu klik tombol “Search” Lalu klik tombol “Search”
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-50.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>4.</td> <td>4.</td>
<td> <td>
Maka akan muncul desa yang dicari Maka akan muncul desa yang dicari
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-46-56.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>
...@@ -2279,29 +2327,59 @@ ...@@ -2279,29 +2327,59 @@
<td>1.</td> <td>1.</td>
<td>Pada halaman utama aplikasi, klik icon</td> <td>Pada halaman utama aplikasi, klik icon</td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-47-03.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>2.</td> <td>2.</td>
<td> <td>
Setelah itu akan muncul halaman sidebar filters Setelah itu akan muncul halaman sidebar filters
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-47-07.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>3.</td> <td>3.</td>
<td> <td>
Kemudian checklist pada bagian bagunan Kemudian checklist pada bagian bagunan
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-47-11.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>4.</td> <td>4.</td>
<td> <td>
Maka akan muncul tampilan bangunan (polygon bangunan akan muncul ketika zoom > 17) Maka akan muncul tampilan bangunan (polygon bangunan akan muncul ketika zoom > 17)
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-47-18.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
<tr> <tr>
<td>5.</td> <td>5.</td>
<td>Untuk melihat informasi bangunan, klik bagian bangunan yang akan di lihat informasinya. <td>Untuk melihat informasi bangunan, klik bagian bangunan yang akan di lihat informasinya.
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>
<img src="{% static 'img/icon-1/photo_2021-10-22_16-47-23.jpg' %}" alt="" style="width: 500px;margin-bottom: 15px;">
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>
......
...@@ -185,9 +185,14 @@ ...@@ -185,9 +185,14 @@
{% if user.is_authenticated %} {% else %} {% if user.is_authenticated %} {% else %}
<div class="col-md-6 col-md-offset-3 modal-login input-group content-group foot centered" style="z-index: 999;"> <!-- <div class="col-md-6 col-md-offset-3 modal-login input-group content-group foot centered" style="z-index: 999;">
<div class="row row-full-height" style="width: 100%;margin-left: 10px;">
<div class="row row-full-height" style="width: 100%;margin-left: 10px;"> -->
<div class="col-md-6 col-md-offset-3 modal-login input-group content-group foot centered">
<div class="row row-full-height">
<div class="col-md-1"> <div class="col-md-1">
<!-- <img src="/static/img/logo-ok.png" alt="" class="img-centered" style="max-height: 28px;max-width: 21.999998092651367px;/* left: 27px; *//* top: 14px; */border-radius: 0px;"> -->
<img src="/static/img/logo-ok.png" alt="" class="img-centered" style="max-height: 28px;max-width: 21.999998092651367px;/* left: 27px; *//* top: 14px; */border-radius: 0px;"> <img src="/static/img/logo-ok.png" alt="" class="img-centered" style="max-height: 28px;max-width: 21.999998092651367px;/* left: 27px; *//* top: 14px; */border-radius: 0px;">
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
......
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