# Manager Home Dashboard Design

**Date:** 2026-08-11  
**Status:** Approved for implementation

## Problem

Managers (and department heads with System Role Unit Lead) land on the static Unit Lead dashboard because routing keys only off JWT `role`, and `/dashboard/lead` uses hardcoded KPIs.

## Eligibility (A + B)

Show Manager bird’s-eye Dashboard when:

1. System Role is `MANAGER`, **or**
2. User is `Department.managerId` for ≥1 department (even if role is `UNIT_LEAD`)

Labels/badges always reflect **System Role** (`Manager` / `Unit Lead`), not the URL.

## Approach

Reuse `GET /api/analytics/manager-dashboard` + `buildManagerAnalyticsDashboard` (same scope/KPI math as Analytics). Extend scope loader and API auth so eligible Unit Leads are included.

## Dashboard content

High-level only (YTD date range, adjustable):

- KPI strip: workforce, avg overall, attendance, hours utilization, depts, leads, needs attention
- Department performance + attendance charts
- Performance health bands
- Team lead comparison
- Top performers / needs attention lists
- CTA → Analytics for drill-down

## Routing

- Eligible → `/dashboard` Manager home (no `/dashboard/lead`)
- Non-eligible Unit Lead → cleaned Unit Lead page (live data, no dummy KPIs)

## Constraints

- No static/dummy metrics
- Do not change KPI weights/formulas
- One primary API call for the home view
- Light + dark via design tokens
