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 %}
+
+
+ {% 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 %}
-
+
-
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.
+
+
View
+
+
-
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 @@
{% include "modules/employees/templates/employees/portal_partials/attendance_punch_card.html" %}
+
+
Today’s Attendance Summary
+
+
Status {% if today_attendance %}{{ today_attendance.status.replace('_',' ').title() }}{% else %}Not Marked{% endif %}
+
Punch In {{ today_attendance.punch_in_local_at.strftime('%H:%M') if today_attendance and today_attendance.punch_in_local_at else (today_attendance.punch_in_utc.strftime('%H:%M UTC') if today_attendance and today_attendance.punch_in_utc else '-') }}
+
Punch Out {{ today_attendance.punch_out_local_at.strftime('%H:%M') if today_attendance and today_attendance.punch_out_local_at else (today_attendance.punch_out_utc.strftime('%H:%M UTC') if today_attendance and today_attendance.punch_out_utc else '-') }}
+
Duration {{ (today_attendance.work_duration_minutes ~ ' min') if today_attendance and today_attendance.work_duration_minutes else '-' }}
+
+
View Attendance Details
+
+
Profile Summary
Name {{ employee.full_name }}
Code / Status {{ employee.employee_code }} · {{ employee.status.replace('_',' ').title() }}
Designation {{ employee.designation or '-' }}
-
Email {{ employee.email or current_user.email }}
-
Mobile {{ employee.mobile or current_user.mobile or '-' }}
-
Update My Profile
-
-
-
-
Quick Links
-
+
Update My Profile
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
+
+
+
+ Client Service FY Blocked Overdue Action
+
+ {% 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 %}
+ {{ card.client_name }} {{ card.service_name }} {{ card.financial_year }} {{ card.blocked_count }} {{ card.overdue_count }} Open
+ {% endfor %}
+ {% endfor %}
+ {% endif %}
+ {% if ns.count == 0 %}No returned or blocked work is pending. {% endif %}
+
+
+
+{% 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",
}