feat: dashboard badge filters + Elite Standing 0–4 pts #43

Merged
jason merged 1 commits from feature/dashboard-badge-filters into master 2026-03-11 00:13:28 -05:00
Owner

Summary

Two related changes to Dashboard.jsx:

1. Stat card badges act as filters

  • Each summary card (Total, Elite Standing, With Active Points, At Risk) is now clickable and filters the employee table to show only the matching subset.
  • Clicking an already-active filter deactivates it (toggle behavior), returning to the full list.
  • Active filter card gets a gold highlight ring (box-shadow: 0 0 0 2px #d4af37) so the user knows which view is active.
  • A small ▼ Filtered indicator appears below the card label when active.
  • The subtitle bar shows the active filter name with an ✕ clear button.
  • Filters compose with the existing search box — badge filter + text search work together.
  • Highest Active Score is intentionally display-only (no filter applied, cursor: default).

2. Elite Standing: 0–4 pts (was 0 pts only)

  • eliteCount now counts employees with active_points >= 0 && active_points <= 4 (Tier 0-1 band).
  • Stat card label updated from Elite Standing (0 pts)Elite Standing (0–4 pts).
  • Badge filter for Elite uses the same 0–4 range.

Files changed

  • client/src/components/Dashboard.jsx

CpasBadge.jsx already defines Elite Standing as min: 0, max: 4 — no changes needed there.

## Summary Two related changes to `Dashboard.jsx`: ### 1. Stat card badges act as filters - Each summary card (Total, Elite Standing, With Active Points, At Risk) is now **clickable** and filters the employee table to show only the matching subset. - Clicking an already-active filter **deactivates** it (toggle behavior), returning to the full list. - Active filter card gets a **gold highlight ring** (`box-shadow: 0 0 0 2px #d4af37`) so the user knows which view is active. - A small **▼ Filtered** indicator appears below the card label when active. - The subtitle bar shows the **active filter name** with an **✕ clear button**. - Filters compose with the existing **search box** — badge filter + text search work together. - **Highest Active Score** is intentionally display-only (no filter applied, cursor: default). ### 2. Elite Standing: 0–4 pts (was 0 pts only) - `eliteCount` now counts employees with `active_points >= 0 && active_points <= 4` (Tier 0-1 band). - Stat card label updated from `Elite Standing (0 pts)` → `Elite Standing (0–4 pts)`. - Badge filter for Elite uses the same `0–4` range. ### Files changed - `client/src/components/Dashboard.jsx` > CpasBadge.jsx already defines Elite Standing as `min: 0, max: 4` — no changes needed there.
jason added 1 commit 2026-03-11 00:12:35 -05:00
jason merged commit eccb105340 into master 2026-03-11 00:13:28 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jason/cpas#43