feat: event dashboard metric cards with stats endpoint (UX-02)
Add GET /events/{event}/stats endpoint returning aggregate counts for
persons (by status, approved without shift), pending identity matches,
and shift fill rates. Frontend metric cards component shows four
actionable KPIs on the event overview tab.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,29 @@ Returns 422 with `errors`, `current_status`, `requested_status`, and `allowed_tr
|
||||
|
||||
**EventResource** includes `allowed_transitions` (array of valid next statuses) so the frontend knows which buttons to show.
|
||||
|
||||
## Event Stats
|
||||
|
||||
- `GET /events/{event}/stats` — aggregate dashboard counts for the event
|
||||
|
||||
### Response
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"persons_total": 142,
|
||||
"persons_approved": 98,
|
||||
"persons_pending": 31,
|
||||
"persons_rejected": 8,
|
||||
"persons_other": 5,
|
||||
"persons_approved_without_shift": 23,
|
||||
"pending_identity_matches": 3,
|
||||
"shifts_total": 45,
|
||||
"shifts_filled": 38,
|
||||
"shifts_understaffed": 7
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Crowd Types
|
||||
|
||||
- `GET /organisations/{org}/crowd-types`
|
||||
|
||||
Reference in New Issue
Block a user