Sep 16 - Optimize code, part 1
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user