diff --git a/base/static/base/toggleColumn.js b/base/static/base/toggleColumn.js
index 429d96e8d..f812e149a 100644
--- a/base/static/base/toggleColumn.js
+++ b/base/static/base/toggleColumn.js
@@ -32,8 +32,8 @@ function toggleColumns(tableId, fieldContainer) {
}
let selectButtons = $(`
`)
$(`#${fieldContainer}`).parent().prepend(selectButtons)
diff --git a/base/templates/base/mail_templates/leave_request_template.html b/base/templates/base/mail_templates/leave_request_template.html
index 75fe1c9d9..ce44a0db9 100644
--- a/base/templates/base/mail_templates/leave_request_template.html
+++ b/base/templates/base/mail_templates/leave_request_template.html
@@ -77,7 +77,7 @@
diff --git a/base/templates/base/rotating_shift/rotating_shift_assign_view.html b/base/templates/base/rotating_shift/rotating_shift_assign_view.html
index f2a2c3c09..d9d64435f 100644
--- a/base/templates/base/rotating_shift/rotating_shift_assign_view.html
+++ b/base/templates/base/rotating_shift/rotating_shift_assign_view.html
@@ -398,5 +398,4 @@
if (!localStorageroratingShiftCells) {
$("#roratingShiftCells").find("[type=checkbox]").prop("checked", true);
}
- $("[type=checkbox]").change();
diff --git a/base/templates/work_type_request/htmx/requests.html b/base/templates/work_type_request/htmx/requests.html
index 762497161..221b13fcf 100755
--- a/base/templates/work_type_request/htmx/requests.html
+++ b/base/templates/work_type_request/htmx/requests.html
@@ -427,5 +427,4 @@
if (!localStorageWorkTypeReqCells) {
$("#workTypeRequestCells").find("[type=checkbox]").prop("checked", true);
}
- $("[type=checkbox]").change();
diff --git a/base/views.py b/base/views.py
index bb2d94afc..c23b2f318 100644
--- a/base/views.py
+++ b/base/views.py
@@ -239,22 +239,21 @@ def load_demo_database(request):
"base_data.json",
"work_info_data.json",
]
- optional_apps = {
- "attendance": "attendance_data.json",
- "leave": "leave_data.json",
- "asset": "asset_data.json",
- "recruitment": "recruitment_data.json",
- "onboarding": "onboarding_data.json",
- "offboarding": "offboarding_data.json",
- "pms": "pms_data.json",
- "payroll": "payroll_data.json",
- }
+ optional_apps = [
+ ("attendance", "attendance_data.json"),
+ ("leave", "leave_data.json"),
+ ("asset", "asset_data.json"),
+ ("recruitment", "recruitment_data.json"),
+ ("onboarding", "onboarding_data.json"),
+ ("offboarding", "offboarding_data.json"),
+ ("pms", "pms_data.json"),
+ ("payroll", "payroll_data.json"),
+ ("payroll", "payroll_loanaccount_data.json"),
+ ]
# Add data files for installed apps
data_files += [
- file
- for app, file in optional_apps.items()
- if apps.is_installed(app)
+ file for app, file in optional_apps if apps.is_installed(app)
]
# Load all data files
diff --git a/biometric/anviz.py b/biometric/anviz.py
index 8001c4ba1..82159b985 100644
--- a/biometric/anviz.py
+++ b/biometric/anviz.py
@@ -2,7 +2,7 @@
CrossChexCloudAPI module for Anviz Biometric Integration
This module provides a wrapper for interacting with the CrossChex Cloud API to manage
-authentication, attendance data retrieval, and token handling. It allows for secure
+authentication, attendance data retrieval, and token handling. It allows for secure
communication with the API, including fetching and validating tokens, and retrieving
attendance records .
"""
diff --git a/biometric/dahua.py b/biometric/dahua.py
index b336138b1..063a93175 100644
--- a/biometric/dahua.py
+++ b/biometric/dahua.py
@@ -1,21 +1,20 @@
"""
DahuaAPI module for interacting with Dahua biometric and access control devices.
-This module provides a set of methods for managing and configuring Dahua devices,
-including retrieving system information, managing users, setting up network configurations,
-and interacting with attendance logs. It communicates with Dahua devices via HTTP requests
+This module provides a set of methods for managing and configuring Dahua devices,
+including retrieving system information, managing users, setting up network configurations,
+and interacting with attendance logs. It communicates with Dahua devices via HTTP requests
and supports basic operations such as system reboot, setting time, and language configuration.
"""
import re
-from typing import Any, Dict
-from datetime import datetime, timezone
from collections import defaultdict
+from datetime import datetime, timezone
+from typing import Any, Dict
import requests
from requests.auth import HTTPDigestAuth
-
key_map = {
"AttendanceState": "attendance_state",
"CardID": "card_id",
diff --git a/biometric/templates/biometric_users/dahua/add_dahua_user.html b/biometric/templates/biometric_users/dahua/add_dahua_user.html
index 5b0be1fc3..7d741defc 100644
--- a/biometric/templates/biometric_users/dahua/add_dahua_user.html
+++ b/biometric/templates/biometric_users/dahua/add_dahua_user.html
@@ -30,4 +30,4 @@
$(this).closest("select")[0].dispatchEvent(new Event("change"));
});
});
-
\ No newline at end of file
+
diff --git a/biometric/templates/biometric_users/dahua/list_dahua_employees.html b/biometric/templates/biometric_users/dahua/list_dahua_employees.html
index 706cbef5d..47daba0d2 100644
--- a/biometric/templates/biometric_users/dahua/list_dahua_employees.html
+++ b/biometric/templates/biometric_users/dahua/list_dahua_employees.html
@@ -60,4 +60,4 @@
{% endfor %}
-
\ No newline at end of file
+
diff --git a/biometric/templates/biometric_users/dahua/map_dahua_users.html b/biometric/templates/biometric_users/dahua/map_dahua_users.html
index 3bff8865e..eb68055bc 100644
--- a/biometric/templates/biometric_users/dahua/map_dahua_users.html
+++ b/biometric/templates/biometric_users/dahua/map_dahua_users.html
@@ -22,4 +22,4 @@
-
\ No newline at end of file
+
diff --git a/biometric/templates/biometric_users/dahua/nav_dahua_employees.html b/biometric/templates/biometric_users/dahua/nav_dahua_employees.html
index 0eb4e472a..effecb406 100644
--- a/biometric/templates/biometric_users/dahua/nav_dahua_employees.html
+++ b/biometric/templates/biometric_users/dahua/nav_dahua_employees.html
@@ -57,4 +57,4 @@
-
\ No newline at end of file
+
diff --git a/biometric/templates/biometric_users/dahua/view_dahua_employees.html b/biometric/templates/biometric_users/dahua/view_dahua_employees.html
index 6dae111b3..97e6e80a1 100644
--- a/biometric/templates/biometric_users/dahua/view_dahua_employees.html
+++ b/biometric/templates/biometric_users/dahua/view_dahua_employees.html
@@ -20,4 +20,4 @@
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/employee/cbv/allocations.py b/employee/cbv/allocations.py
index db40d8a34..16427083f 100644
--- a/employee/cbv/allocations.py
+++ b/employee/cbv/allocations.py
@@ -4,39 +4,37 @@ employee/cbv/allocations.py
Detailed view to manage all modules employee information
"""
-import logging
import ast
-from django.http import HttpResponse
+import logging
from datetime import datetime
+
from django.contrib import messages
+from django.db.models import Q
+from django.db.models.signals import post_save
+from django.dispatch import receiver
+from django.http import HttpResponse
from django.shortcuts import render
from django.urls import reverse_lazy
-from django.db.models.signals import post_save
from django.utils.decorators import method_decorator
-from django.dispatch import receiver
-from django.db.models import Q
from django.utils.translation import gettext as _
from django.views.generic import View
-from employee.models import (
- Employee,
- EmployeeWorkInformation,
- EmployeeBankDetails,
- models as django_models,
-)
-from employee.methods.methods import get_model_class
-from horilla_views.cbv_methods import render_template, login_required
-from horilla_views.generic.cbv.views import (
- HorillaDetailedView,
- HorillaListView,
- TemplateView,
- HorillaFormView,
-)
-from horilla.horilla_middlewares import _thread_locals
-from horilla.horilla_settings import APPS, NO_PERMISSION_MODALS
+
from base.forms import AddToUserGroupForm, ModelForm, forms
from base.methods import paginator_qry
from base.templatetags.horillafilters import app_installed
from base.views import get_models_in_app
+from employee.methods.methods import get_model_class
+from employee.models import Employee, EmployeeBankDetails, EmployeeWorkInformation
+from employee.models import models as django_models
+from horilla.horilla_middlewares import _thread_locals
+from horilla.horilla_settings import APPS, NO_PERMISSION_MODALS
+from horilla_views.cbv_methods import login_required, render_template
+from horilla_views.generic.cbv.views import (
+ HorillaDetailedView,
+ HorillaFormView,
+ HorillaListView,
+ TemplateView,
+)
if app_installed("asset"):
from asset.cbv.request_and_allocation import Asset
@@ -45,18 +43,17 @@ if app_installed("asset"):
from asset.views import asset_allocate_return
from asset.forms import AssetReturnForm
-
from onboarding.cbv_decorators import (
all_manager_can_enter,
recruitment_manager_can_enter,
)
if app_installed("leave"):
- from leave.cbv.leave_types import LeaveTypeListView, LeaveType, AvailableLeave
+ from leave.cbv.leave_types import AvailableLeave, LeaveType, LeaveTypeListView
if app_installed("payroll"):
- from payroll.cbv.allowances import AllowanceListView, Allowance
- from payroll.cbv.deduction import DeductionListView, Deduction
+ from payroll.cbv.allowances import Allowance, AllowanceListView
+ from payroll.cbv.deduction import Deduction, DeductionListView
logger = logging.getLogger(__name__)
@@ -557,11 +554,14 @@ if app_installed("leave"):
avaiable_instance.available_days = leave_type.total_days
try:
avaiable_instance.save()
- messages.success(self.request, _("Assigned ") + f" {leave_type.name}")
+ messages.success(
+ self.request, _("Assigned ") + f" {leave_type.name}"
+ )
except:
messages.error(
self.request,
- _("Cannot Assign or Already Assigned") + f" `{leave_type.name}`",
+ _("Cannot Assign or Already Assigned")
+ + f" `{leave_type.name}`",
)
if not types:
messages.info(self.request, _("Select Types to Assign"))
@@ -937,7 +937,9 @@ if app_installed("payroll"):
allowance.exclude_employees.add(self.instance)
allowance.specific_employees.remove(self.instance)
- messages.success(self.request, _("Allowance excluded") + f" {allowance}")
+ messages.success(
+ self.request, _("Allowance excluded") + f" {allowance}"
+ )
else:
ids = ast.literal_eval(self.request.POST["ids"])
allowances = Allowance.objects.filter(pk__in=ids)
@@ -1040,7 +1042,9 @@ if app_installed("payroll"):
deduction.exclude_employees.add(self.instance)
deduction.specific_employees.remove(self.instance)
- messages.success(self.request, _("Deduction excluded") + f" {deduction}")
+ messages.success(
+ self.request, _("Deduction excluded") + f" {deduction}"
+ )
else:
ids = ast.literal_eval(self.request.POST["ids"])
deductions = Deduction.objects.filter(pk__in=ids)
diff --git a/employee/templates/cbv/allocations/allocations.html b/employee/templates/cbv/allocations/allocations.html
index 78b2e070b..18a88df72 100644
--- a/employee/templates/cbv/allocations/allocations.html
+++ b/employee/templates/cbv/allocations/allocations.html
@@ -39,7 +39,7 @@
{% endif %}
{% endfor %}
-
+
diff --git a/employee/templates/cbv/allocations/asset/allocation_status.html b/employee/templates/cbv/allocations/asset/allocation_status.html
index d2a932b78..21021d97d 100644
--- a/employee/templates/cbv/allocations/asset/allocation_status.html
+++ b/employee/templates/cbv/allocations/asset/allocation_status.html
@@ -13,4 +13,4 @@
{% endcomment %}
Available
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/employee/templates/cbv/allocations/asset/assets.html b/employee/templates/cbv/allocations/asset/assets.html
index 2e5fad309..82200235f 100644
--- a/employee/templates/cbv/allocations/asset/assets.html
+++ b/employee/templates/cbv/allocations/asset/assets.html
@@ -3,15 +3,15 @@
@@ -31,7 +31,7 @@
\ No newline at end of file
+
+
diff --git a/employee/templates/cbv/allocations/asset/return_form.html b/employee/templates/cbv/allocations/asset/return_form.html
index 9b2dc7f90..87f4c520a 100644
--- a/employee/templates/cbv/allocations/asset/return_form.html
+++ b/employee/templates/cbv/allocations/asset/return_form.html
@@ -63,7 +63,7 @@
>
{% trans "Add Report" %}
- {% if "payroll"|app_installed %}
+ {% if "payroll"|app_installed %}
{% if perms.payroll.add_loanaccount %}
|