diff --git a/app/modules/employees/templates/employees/portal_dashboard.html b/app/modules/employees/templates/employees/portal_dashboard.html index 01b4b82..a1105ab 100644 --- a/app/modules/employees/templates/employees/portal_dashboard.html +++ b/app/modules/employees/templates/employees/portal_dashboard.html @@ -7,12 +7,12 @@

My Workspace

Employee Portal

-

Use this dashboard for your assigned work, attendance, leave, documents, payslips, profile and alerts.

+

Punch attendance, view priority work, track documents, leave, payslips and alerts from one staff workspace.

{% if employee %} - Open My Work Board - Full Attendance + Punch / Attendance + Open Work Board {% else %} Request Employee Linkage {% endif %} @@ -24,13 +24,18 @@ {% set tabs = [ ('overview','Overview'), ('work','My Work Board'), + ('due-today','Due Today'), + ('overdue','Overdue'), + ('client-pending','Client Pending'), + ('returned','Returned / Blocked'), ('attendance','My Attendance'), ('profile','My Profile'), ('leave','My Leave'), ('documents','My Documents'), ('payslips','My Payslips'), ('offboarding','My Offboarding'), - ('alerts','My Alert') + ('alerts','My Alert'), + ('reports','My Reports') ] %}
@@ -93,10 +98,11 @@ } } - tabs.forEach(function (button) { - button.addEventListener('click', function () { - loadTab(button.dataset.tab || 'overview', true); - }); + document.addEventListener('click', function (event) { + const button = event.target.closest('.employee-portal-tab'); + if (!button || !button.dataset.tab) return; + event.preventDefault(); + loadTab(button.dataset.tab || 'overview', true); }); window.addEventListener('popstate', function (event) { diff --git a/app/modules/employees/templates/employees/portal_partials/client_pending.html b/app/modules/employees/templates/employees/portal_partials/client_pending.html new file mode 100644 index 0000000..0aef2ee --- /dev/null +++ b/app/modules/employees/templates/employees/portal_partials/client_pending.html @@ -0,0 +1,28 @@ +{% if not employee %} +
Your login is not linked to an employee profile yet.
+{% else %} +
+

Client Pending / Blocked Work

Tasks marked blocked usually need client documents, clarification, manager input or correction before continuation.

+ Open Blocked Work +
+
+ {% set ns = namespace(count=0) %} + {% if work_payload %} + {% for column in work_payload.columns if column.code == 'blocked' %} + {% for card in column.cards %} + {% set ns.count = ns.count + 1 %} +
+
Blocked / Waiting
+

{{ card.client_name }}

+

{{ card.service_name }} · FY {{ card.financial_year }}

+
{{ card.blocked_count }} blocked task(s). Latest note: {{ card.latest_comment.comment_text if card.latest_comment and card.latest_comment.comment_text is defined else '-' }}
+ Open / Follow Up +
+ {% endfor %} + {% endfor %} + {% endif %} + {% if ns.count == 0 %} +
No blocked or client-pending work is pending.
+ {% endif %} +
+{% endif %} diff --git a/app/modules/employees/templates/employees/portal_partials/due_today.html b/app/modules/employees/templates/employees/portal_partials/due_today.html new file mode 100644 index 0000000..c22e4ea --- /dev/null +++ b/app/modules/employees/templates/employees/portal_partials/due_today.html @@ -0,0 +1,34 @@ +{% if not employee %} +
Your login is not linked to an employee profile yet.
+{% else %} +
+

Due Today

Assigned work that needs action today.

+ Open Full Board +
+
+ {% set ns = namespace(count=0) %} + {% if work_payload %} + {% for column in work_payload.columns %} + {% for card in column.cards %} + {% if card.due_today_count %} + {% set ns.count = ns.count + 1 %} +
+
Due Today
+

{{ card.client_name }}

+

{{ card.service_name }} · FY {{ card.financial_year }}

+
+
{{ card.open_count }}Open
+
{{ card.due_today_count }}Due today
+
{{ card.completed_count }}Completed
+
+ Open Work Details +
+ {% endif %} + {% endfor %} + {% endfor %} + {% endif %} + {% if ns.count == 0 %} +
No work is due today.
+ {% endif %} +
+{% endif %} diff --git a/app/modules/employees/templates/employees/portal_partials/overdue.html b/app/modules/employees/templates/employees/portal_partials/overdue.html new file mode 100644 index 0000000..f300cc6 --- /dev/null +++ b/app/modules/employees/templates/employees/portal_partials/overdue.html @@ -0,0 +1,34 @@ +{% if not employee %} +
Your login is not linked to an employee profile yet.
+{% else %} +
+

Overdue Work

These assigned engagements have overdue task items. Clear these first.

+ Open Full Board +
+
+ {% set ns = namespace(count=0) %} + {% if work_payload %} + {% for column in work_payload.columns %} + {% for card in column.cards %} + {% if card.overdue_count %} + {% set ns.count = ns.count + 1 %} +
+
Overdue
+

{{ card.client_name }}

+

{{ card.service_name }} · FY {{ card.financial_year }} · Due {{ card.due_date or '-' }}

+
+
{{ card.overdue_count }}Overdue
+
{{ card.open_count }}Open
+
{{ card.blocked_count }}Blocked
+
+ Open Overdue Work +
+ {% endif %} + {% endfor %} + {% endfor %} + {% endif %} + {% if ns.count == 0 %} +
No overdue work is pending.
+ {% endif %} +
+{% endif %} diff --git a/app/modules/employees/templates/employees/portal_partials/overview.html b/app/modules/employees/templates/employees/portal_partials/overview.html index 1aeb72b..f7e8173 100644 --- a/app/modules/employees/templates/employees/portal_partials/overview.html +++ b/app/modules/employees/templates/employees/portal_partials/overview.html @@ -1,80 +1,119 @@ {% if employee %}
- -
Open Work
-
{{ work_payload.summary.open if work_payload else 0 }}
-
Assigned to me
-
- -
In Progress
-
{{ work_payload.summary.in_progress if work_payload else 0 }}
-
Currently active
-
- -
Blocked
-
{{ work_payload.summary.blocked if work_payload else 0 }}
-
Need clarification
-
- -
Overdue
-
{{ work_payload.summary.overdue if work_payload else 0 }}
-
Immediate action
-
- + + + + + +
-
+
-

My Assignment Board Snapshot

-

Your work is grouped by practical status. Open the full board for detailed updates.

+

Today’s Priority Work

+

Overdue and due-today work appears first. Open the engagement to continue, add remarks, upload documents or submit work.

- Open My Work Board + Open Full Work Board
-
+
+ {% set ns = namespace(count=0) %} {% if work_payload %} - {% for column in work_payload.columns %} - -
{{ column.label }}
-
{{ column.cards|length }}
-
assignment card(s)
-
- {% endfor %} - {% else %} -
No work board data available yet.
+ {% for column in work_payload.columns %} + {% for card in column.cards %} + {% if ns.count < 6 and (card.overdue_count or card.due_today_count) %} + {% set ns.count = ns.count + 1 %} +
+
+
+
{{ card.client_code or 'Client' }}
+

{{ card.client_name }} · {{ card.service_name }}

+

FY {{ card.financial_year }} · Due {{ card.due_date or '-' }} · {{ card.open_count }} open · {{ card.overdue_count }} overdue · {{ card.due_today_count }} due today

+
+ Open +
+
+ {% endif %} + {% endfor %} + {% endfor %} + {% endif %} + {% if ns.count == 0 %} +
No overdue or due-today work is pending.
{% endif %}
-
-
-
-

Leave & Availability

-

Balances and recent leave requests for your profile.

+
+
+
+
+

Returned / Blocked Work

+

Items marked blocked require clarification, correction or client/manager input.

+
+ +
+
+ {% set blocked = namespace(count=0) %} + {% if work_payload %} + {% for column in work_payload.columns if column.code == 'blocked' %} + {% for card in column.cards[:4] %} + {% set blocked.count = blocked.count + 1 %} + +
{{ card.client_name }}
+
{{ card.service_name }} · {{ card.blocked_count }} blocked task(s)
+
+ {% endfor %} + {% endfor %} + {% endif %} + {% if blocked.count == 0 %}
No blocked work pending.
{% endif %}
- Open Leave
-
- {% for bal in leave_balances %} -
-
{{ bal.leave_type.name if bal.leave_type else bal.leave_type_id }}
-
{{ bal.balance_days }}
-
days balance
+ +
+
+
+

Leave & Availability

+

Balances and recent leave requests.

+
+ Open Leave +
+
+ {% for bal in leave_balances[:4] %} +
+
{{ bal.leave_type.name if bal.leave_type else bal.leave_type_id }}
+
{{ bal.balance_days }}
+
days balance
+
+ {% else %} +
No leave balance available yet.
+ {% endfor %}
- {% else %} -
No leave balance available yet.
- {% endfor %}
@@ -82,25 +121,25 @@
diff --git a/app/modules/employees/templates/employees/portal_partials/reports.html b/app/modules/employees/templates/employees/portal_partials/reports.html new file mode 100644 index 0000000..fdb9262 --- /dev/null +++ b/app/modules/employees/templates/employees/portal_partials/reports.html @@ -0,0 +1,11 @@ +
+

My Reports

Quick self-service report shortcuts for your own work, attendance, leave, documents and payslips.

+
+ diff --git a/app/modules/employees/templates/employees/portal_partials/returned.html b/app/modules/employees/templates/employees/portal_partials/returned.html new file mode 100644 index 0000000..6da9aa3 --- /dev/null +++ b/app/modules/employees/templates/employees/portal_partials/returned.html @@ -0,0 +1,25 @@ +{% if not employee %} +
Your login is not linked to an employee profile yet.
+{% else %} +
+

Returned / Correction Work

Your current workflow uses blocked status for correction, clarification and returned work. Use this page to clear them.

+ Open Full Board +
+
+ + + + {% set ns = namespace(count=0) %} + {% if work_payload %} + {% for column in work_payload.columns if column.code == 'blocked' %} + {% for card in column.cards %} + {% set ns.count = ns.count + 1 %} + + {% endfor %} + {% endfor %} + {% endif %} + {% if ns.count == 0 %}{% endif %} + +
ClientServiceFYBlockedOverdueAction
{{ card.client_name }}{{ card.service_name }}{{ card.financial_year }}{{ card.blocked_count }}{{ card.overdue_count }}Open
No returned or blocked work is pending.
+
+{% endif %} diff --git a/app/modules/employees/templates/employees/portal_partials/work.html b/app/modules/employees/templates/employees/portal_partials/work.html index b98217f..d5aee9a 100644 --- a/app/modules/employees/templates/employees/portal_partials/work.html +++ b/app/modules/employees/templates/employees/portal_partials/work.html @@ -40,7 +40,7 @@
{{ card.service_name }}
FY {{ card.financial_year }} · Due {{ card.due_date or '-' }}
- Open Work Details + Open Work Details {% else %}
No cards in this column.
diff --git a/app/modules/employees/ui.py b/app/modules/employees/ui.py index bba5288..7864fd8 100644 --- a/app/modules/employees/ui.py +++ b/app/modules/employees/ui.py @@ -2473,9 +2473,14 @@ def employee_status_submit( + EMPLOYEE_PORTAL_TABS = { "overview": "modules/employees/templates/employees/portal_partials/overview.html", "work": "modules/employees/templates/employees/portal_partials/work.html", + "due-today": "modules/employees/templates/employees/portal_partials/due_today.html", + "overdue": "modules/employees/templates/employees/portal_partials/overdue.html", + "client-pending": "modules/employees/templates/employees/portal_partials/client_pending.html", + "returned": "modules/employees/templates/employees/portal_partials/returned.html", "attendance": "modules/employees/templates/employees/portal_partials/attendance.html", "profile": "modules/employees/templates/employees/portal_partials/profile.html", "leave": "modules/employees/templates/employees/portal_partials/leave.html", @@ -2483,6 +2488,7 @@ EMPLOYEE_PORTAL_TABS = { "payslips": "modules/employees/templates/employees/portal_partials/payslips.html", "offboarding": "modules/employees/templates/employees/portal_partials/offboarding.html", "alerts": "modules/employees/templates/employees/portal_partials/alerts.html", + "reports": "modules/employees/templates/employees/portal_partials/reports.html", }