Prioritize active work and paginate completed engagements

This commit is contained in:
A R R R Associates
2026-08-10 12:17:51 +05:30
parent f79862203b
commit d8cb564dfc
3 changed files with 74 additions and 4 deletions
+10 -2
View File
@@ -2027,7 +2027,7 @@ def employee_my_work_task_status(
@portal_router.get("/work")
def employee_my_work(request: Request, q: str = "", status: str = "open"):
def employee_my_work(request: Request, q: str = "", status: str = "open", completed_page: int = 1):
db = CommonSessionLocal()
try:
current_user = get_current_user(request, db=db)
@@ -2042,7 +2042,15 @@ def employee_my_work(request: Request, q: str = "", status: str = "open"):
scope = build_employee_scope(db, current_user, tenant_id=tenant_id, branch_id=branch_id)
employee = get_employee_for_user(db, current_user)
financial_year = _active_financial_year(request)
work_payload = list_employee_work_kanban(db, scope, q=q, status=status, financial_year=financial_year)
work_payload = list_employee_work_kanban(
db,
scope,
q=q,
status=status,
financial_year=financial_year,
completed_page=completed_page,
completed_page_size=25,
)
return _render(
request,
"modules/employees/templates/employees/self_work.html",