Sep 16 - Optimize code, part 1

This commit is contained in:
2026-09-16 10:52:59 -04:00
parent 4212726611
commit 7626287344
22 changed files with 587 additions and 96 deletions
+6
View File
@@ -24,6 +24,8 @@ from sqlalchemy import text, or_
from werkzeug.utils import secure_filename
from logger_handler import log_user_activity, log_database_operations
from utils.helpers import (
PAYROLL_AREA_ROLES,
restrict_blueprint_to_roles,
admin_required,
employee_id_regex_condition,
expand_employee_id_filter,
@@ -41,6 +43,10 @@ import openpyxl.cell.cell
bp = Blueprint('time_attendance', __name__)
# Time Attendance is a payroll area (sidebar: admin, payroll, accounting).
# Checked for EVERY route here — imports and exports feed payroll.
restrict_blueprint_to_roles(bp, PAYROLL_AREA_ROLES)
def build_time_attendance_employee_filter(employee_ids):
"""