docs(fusion_clock): correct dashboard spec data contract (leaves auto-approved; add on_leave_count; drop very_late)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ The dashboard renders **bands**, gated by role. The hard rule: **a regular emplo
|
|||||||
| **— employee view ends here —** | | | |
|
| **— employee view ends here —** | | | |
|
||||||
| Team KPIs — Present / Absent / Late / Pending | ❌ | ✅ direct reports | ✅ org-wide |
|
| Team KPIs — Present / Absent / Late / Pending | ❌ | ✅ direct reports | ✅ org-wide |
|
||||||
| Currently Clocked In roster | ❌ | ✅ direct reports | ✅ everyone |
|
| Currently Clocked In roster | ❌ | ✅ direct reports | ✅ everyone |
|
||||||
| Needs Attention (absences, pending reasons, requests, very-late) | ❌ | ✅ their team | ✅ org-wide |
|
| Needs Attention (genuine absences, pending reasons, pending corrections) | ❌ | ✅ their team | ✅ org-wide |
|
||||||
| Quick Actions | own (clock/leave/correction/timesheets) | + team views | + Reports / Settings |
|
| Quick Actions | own (clock/leave/correction/timesheets) | + team views | + Reports / Settings |
|
||||||
|
|
||||||
**Scoping rule (server-side, never client-trusted):**
|
**Scoping rule (server-side, never client-trusted):**
|
||||||
@@ -97,12 +97,13 @@ Single endpoint, reworked: **`POST /fusion_clock/dashboard_data`** (`type='jsonr
|
|||||||
"team": null | { # present ONLY for team_lead / manager
|
"team": null | { # present ONLY for team_lead / manager
|
||||||
"scope": "team" | "org",
|
"scope": "team" | "org",
|
||||||
"total_employees": int,
|
"total_employees": int,
|
||||||
"present_count": int,
|
"present_count": int, # distinct employees with an attendance today
|
||||||
"absent_count": int,
|
"on_leave_count": int, # approved leave covering today (leave_date <= today <= date_to)
|
||||||
|
"absent_count": int, # genuine no-shows = total - present - on_leave (matches absence cron)
|
||||||
"late_count": int, # late_clock_in logs today, scoped
|
"late_count": int, # late_clock_in logs today, scoped
|
||||||
"pending_reasons": int, # scoped
|
"pending_reasons": int, # scoped (owe an auto-clock-out explanation)
|
||||||
"pending_approvals": int, # scoped: pending corrections + pending leaves
|
"pending_approvals": int, # scoped: fusion.clock.correction state='pending'
|
||||||
"very_late_count": int, # scoped, today
|
# (leaves are auto-approved — nothing to approve)
|
||||||
"clocked_in": [
|
"clocked_in": [
|
||||||
{"employee": str, "check_in": str, "location": str, "late": bool}
|
{"employee": str, "check_in": str, "location": str, "late": bool}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user