diff --git a/announcement/views.py b/announcement/views.py index afa39b98..f7cf948c 100644 --- a/announcement/views.py +++ b/announcement/views.py @@ -3,9 +3,7 @@ from django.contrib import messages from django.core.files.storage import default_storage from django.http import HttpResponse, HttpResponseRedirect -from django.template.defaultfilters import safe -from django.template.defaultfilters import striptags -from django.template.defaultfilters import truncatewords +from django.template.defaultfilters import safe, striptags, truncatewords from django.urls import reverse_lazy from django.views.generic import FormView, TemplateView from firebase_admin import firestore diff --git a/api/views.py b/api/views.py index f163e99f..77fe2a66 100644 --- a/api/views.py +++ b/api/views.py @@ -71,7 +71,9 @@ def get(self, request): df = pd.DataFrame(data["rows"]) # ### Convert Dates to Datetime - df["birth_date"] = pd.to_datetime(df["date_of_birth"], errors="coerce", format="%B %d, %Y") + df["birth_date"] = pd.to_datetime( + df["date_of_birth"], errors="coerce", format="%B %d, %Y" + ) df["date_accomplished"] = pd.to_datetime( df["date_accomplished"], errors="coerce", format="%Y-%m-%d", utc=True ) diff --git a/appointment/static/appointment/assets/css/view_appointment.css b/appointment/static/appointment/assets/css/view_appointment.css index 19d56ee9..1fb5c3fc 100644 --- a/appointment/static/appointment/assets/css/view_appointment.css +++ b/appointment/static/appointment/assets/css/view_appointment.css @@ -623,4 +623,4 @@ background: #fff; border-top: 1px solid #f3f3f7; padding: 15px; -} \ No newline at end of file +} diff --git a/appointment/templates/appointment/appointment_query_list.html b/appointment/templates/appointment/appointment_query_list.html index e15d8086..860f4450 100644 --- a/appointment/templates/appointment/appointment_query_list.html +++ b/appointment/templates/appointment/appointment_query_list.html @@ -37,38 +37,38 @@

My Appointments

{% block table_content %} - - APPOINTMENT I.D - START APPOINTMENT - END APPOINTMENT - STATUS - FIRST NAME - MIDDLE NAME - LAST NAME - DOCUMENT - PURPOSE - CONTACT NUMBER - ADDRESS - CREATED ON - - - - {% for appointment in appointments_data %} - {{ appointment.appointment_id }} - {{ appointment.start_appointment }} - {{ appointment.end_appointment }} - {{ appointment.status }} - {{ appointment.first_name }} - {{ appointment.middle_name }} - {{ appointment.last_name }} - {{ appointment.document|unordered_list }} - {{ appointment.appointment_purpose }} - {{ appointment.contact_number }} - {{ appointment.address }} - {{ appointment.created_on }} + APPOINTMENT I.D + START APPOINTMENT + END APPOINTMENT + STATUS + FIRST NAME + MIDDLE NAME + LAST NAME + DOCUMENT + PURPOSE + CONTACT NUMBER + ADDRESS + CREATED ON - {% endfor %} + + + {% for appointment in appointments_data %} + + {{ appointment.appointment_id }} + {{ appointment.start_appointment }} + {{ appointment.end_appointment }} + {{ appointment.status }} + {{ appointment.first_name }} + {{ appointment.middle_name }} + {{ appointment.last_name }} + {{ appointment.document|unordered_list }} + {{ appointment.appointment_purpose }} + {{ appointment.contact_number }} + {{ appointment.address }} + {{ appointment.created_on }} + + {% endfor %} {% endblock table_content %} @@ -86,8 +86,8 @@

%FIRSTNAME% %MIDDLENAME% %LASTNAME%

+ onclick="redirectToUrl('{% url "appointment:view_appointment" appointment_id=0 %}', '%APPOINTMENT_ID%')" + data-toggle="tooltip" data-placement="top" title="View">
@@ -132,20 +132,20 @@

%FIRSTNAME% %MIDDLENAME% %LASTNAME%

{% if user_sess_data.role in 'admin, head_admin, secretary, worker ' %}
+ onclick="redirectToUrl('{% url "appointment:appointment_cancel" appointment_id=0 %}', '%APPOINTMENT_ID%')" + data-toggle="tooltip" data-placement="top" title="Cancel"> Cancel + onclick="redirectToUrl('{% url "appointment:reschedule_appointment" appointment_id=0 %}', '%APPOINTMENT_ID%')" + data-toggle="tooltip" data-placement="top" title="Reschedule"> Reschedule + onclick="redirectToUrl('{% url "appointment:appointment_complete" appointment_id=0 %}', '%APPOINTMENT_ID%')" + data-toggle="tooltip" data-placement="top" title="Complete"> Complete diff --git a/appointment/templates/appointment/apt_edit_docu.html b/appointment/templates/appointment/apt_edit_docu.html index d3b0cee0..f842d700 100644 --- a/appointment/templates/appointment/apt_edit_docu.html +++ b/appointment/templates/appointment/apt_edit_docu.html @@ -25,11 +25,11 @@

Document Info.

{% load crispy_forms_tags %}
+ method="POST"> {% csrf_token %} {{ form|crispy }} Cancel + href="{% url "appointment:view_appointment" appointment_data.appointment_id %}">Cancel {% if info_status %} @@ -42,16 +42,16 @@

Document Info.

{% block scripts %} + integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" + crossorigin="anonymous"> + integrity="sha512-g16L6hyoieygYYZrtuzScNFXrrbJo/lj9+1AYsw+0CYYYZ6lx5J3x9Yyzsm+D37/7jMIGh0fDqdvyYkNWbuYuA==" + crossorigin="anonymous" referrerpolicy="no-referrer"> + integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" + crossorigin="anonymous" referrerpolicy="no-referrer"> + + + + + View Document + + +
+ - + - + - - - \ No newline at end of file + PDFObject.embed(doc.output("datauristring"), "#example1"); + }); + }); + + + diff --git a/authentication/views.py b/authentication/views.py index 76a008a3..73c8246c 100644 --- a/authentication/views.py +++ b/authentication/views.py @@ -6,8 +6,12 @@ from django.contrib import messages from django.contrib.auth import authenticate from django.core.mail import send_mail -from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseRedirect -from django.http import JsonResponse +from django.http import ( + HttpResponse, + HttpResponsePermanentRedirect, + HttpResponseRedirect, + JsonResponse, +) from django.shortcuts import redirect from django.templatetags.static import static from django.urls import reverse_lazy @@ -18,11 +22,9 @@ from one_barangay import settings from one_barangay.local_settings import logger from one_barangay.mixins import FormInvalidMixin -from one_barangay.settings import firebase_app -from one_barangay.settings import firestore_db -from .forms import AccountSetupForm +from one_barangay.settings import firebase_app, firestore_db -from .forms import AuthenticationForm, ForgotPasswordForm, LockAccountForm +from .forms import AccountSetupForm, AuthenticationForm, ForgotPasswordForm, LockAccountForm # TODO: Fix client-side validation diff --git a/bulksched/urls.py b/bulksched/urls.py index 26111ae2..faf6f220 100644 --- a/bulksched/urls.py +++ b/bulksched/urls.py @@ -1,5 +1,6 @@ """Bulk Schedule urls.""" from django.urls import path + from . import views app_name = "bulksched" diff --git a/bulksched/views.py b/bulksched/views.py index f73e2034..1efeefc8 100644 --- a/bulksched/views.py +++ b/bulksched/views.py @@ -1,14 +1,12 @@ """Bulk Schedule views.""" -from django.shortcuts import render from django.http import HttpResponse - +from django.shortcuts import render # Create your views here. def index(request): - """ - Sample display for Bulk schedule views. + """Sample display for Bulk schedule views. Args: request: diff --git a/complaint/views.py b/complaint/views.py index 0c1f8a45..0c228031 100644 --- a/complaint/views.py +++ b/complaint/views.py @@ -290,7 +290,7 @@ def form_valid(self, form): notification.send_notification( "Your complaint has been processed.", f"Your complaint has changed status to {changed_fields['complaint_status']}", - form.cleaned_data["user_id"] + form.cleaned_data["user_id"], ) db = firestore.client(app=firebase_app) # Update complaints collection. diff --git a/ocr/templates/ocr/home.html b/ocr/templates/ocr/home.html index 7a0b35f8..a69c5f20 100644 --- a/ocr/templates/ocr/home.html +++ b/ocr/templates/ocr/home.html @@ -107,7 +107,7 @@

%FAMILY_NAME%

%ADDRESS%

-