admin: dashboard instead of the invoice list
/admin redirected to the invoice list, which stopped making sense once the admin also ran the bingo. Make it a dashboard with one tile per area: invoice totals, outstanding amount per currency, overdue count and the five latest invoices; the bingo score, reserve size, latest incident and card cells still missing a photo. A shared nav links the sections. Tiles are per area so they can follow user permissions later. Assisted-by: Claude:opus-5
This commit is contained in:
parent
e5bd1c1ac7
commit
c2020bf903
8 changed files with 134 additions and 5 deletions
|
|
@ -78,7 +78,7 @@ If a form is ever reinstated, note that Traefik's access log (`/opt/traefik/logs
|
|||
|
||||
Admin (HTTP Basic via `ADMIN_USER`/`ADMIN_PASSWORD`):
|
||||
|
||||
- `GET /admin` → redirects to `/admin/invoices`.
|
||||
- `GET /admin` → dashboard (`views/admin/dashboard.erb`): invoice counts/outstanding/overdue + recent five, bingo score/reserve/latest incident/missing photos. Shared admin nav in `views/admin/_nav.erb`.
|
||||
- `GET /admin/invoices` — list, newest first.
|
||||
- `GET /admin/invoices/new` — create form. Dynamic line items via `public/admin-invoice-form.js`.
|
||||
- `POST /admin/invoices` — validate → allocate number → render PDF → upload to MinIO → persist row.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue