From a23f3a8ffb8d028ba321e3329ba5dac89f49ce3e Mon Sep 17 00:00:00 2001 From: Horilla Date: Tue, 2 Jan 2024 13:49:02 +0530 Subject: [PATCH] [UPDT] PAYROLL: Payroll federal tax CRUD operation by adding htmx --- .../payroll/tax/filing_status_creation.html | 23 ++- .../payroll/tax/filing_status_edit.html | 27 +++- .../payroll/tax/filing_status_view.html | 144 ++++++++++++------ .../payroll/tax/tax_bracket_creation.html | 39 ++--- .../payroll/tax/tax_bracket_edit.html | 23 ++- payroll/views/tax_views.py | 20 +-- 6 files changed, 189 insertions(+), 87 deletions(-) diff --git a/payroll/templates/payroll/tax/filing_status_creation.html b/payroll/templates/payroll/tax/filing_status_creation.html index 2fd6554a6..7dc1d09e5 100644 --- a/payroll/templates/payroll/tax/filing_status_creation.html +++ b/payroll/templates/payroll/tax/filing_status_creation.html @@ -1,4 +1,19 @@ -{% load i18n %} +{% load i18n %} {% if messages %} +
+ {% for message in messages %} +
+
+ {{ message }} +
+
+ {% endfor %} + +
+{% endif %}
{% trans "Filing Status" %}
@@ -9,11 +24,11 @@ data-dismiss="oh-modal" aria-label="Close" data-toggle="oh-modal-toggle" - hx-target="#FilingStatusFormTarget" - onclick="location.reload()" + hx-get="{% url 'filing-status-search' %}" + hx-target="#FilingStatusList" > - +
+ {% for message in messages %} +
+
+ {{ message }} +
+
+ {% endfor %} + +
+{% endif %}
{% trans "Filing Status" %}
@@ -9,7 +24,8 @@ data-dismiss="oh-modal" aria-label="Close" data-toggle="oh-modal-toggle" - hx-target="#FilingStatusFormTarget" + hx-get="{% url 'filing-status-search' %}" + hx-target="#FilingStatusList" > @@ -19,12 +35,9 @@ > {% csrf_token %} {{ form.as_p }} -
\ No newline at end of file + diff --git a/payroll/templates/payroll/tax/filing_status_view.html b/payroll/templates/payroll/tax/filing_status_view.html index 40fa3f8ee..976584e57 100644 --- a/payroll/templates/payroll/tax/filing_status_view.html +++ b/payroll/templates/payroll/tax/filing_status_view.html @@ -1,57 +1,115 @@ -{% extends 'index.html' %} -{% block content %} -{% load i18n %} +{% extends 'index.html' %} {% block content %} {% load static %} {% load i18n %}
-
-

{% trans "Filing Status" %}

- - - -
-
-
- - -
-
- +
+

+ {% trans "Filing Status" %} +

+ + + +
+
+ {% if status %} +
+ + +
+ {% endif %} + +
- - {% include 'payroll/tax/filing_status_list.html' %} + {% if status %} + {% include 'payroll/tax/filing_status_list.html' %} + {% else %} +
+
+ Page not found. 404. +
+ {% trans "No tax filing status has been recorded." %} +
+
+
+ {% endif %}
-