Admin dashboard, Site design 2x2 grid, show password on login #25

Merged
reudy merged 3 commits from session/visual-tweaks into main 2026-10-27 10:35:56 +01:00
Member

Why

The admin opened on the Pages list and had no overview of how the studio is doing. This adds a dashboard at / (login and the sidebar title land there), plus two small visual requests.

Dashboard (/)

  • Income: this month vs. last month, this year, and the average order. An order counts in the month it was paid, so a voucher is income when it's sold, not when it's used.
  • Hours: worked so far this month and still booked. Overlapping bookings are merged, so a group session counts once, not once per person.
  • Opened time booked: booked hours against the hours opened in Slots this month.
  • Next 7 days: a list with day, time, length, service and customer.
  • Customers this month (new vs. returning, where "new" means first paid order ever) and regulars (more than one order in the last 12 months).
  • Vouchers & codes owed: the unbooked share of each usable code's value.
  • What sells / popular lengths over the last 12 months (bundle contents at price 0 are left out, since the bundle line holds the money).
  • Needs attention: failed booking emails, group sessions ¾ full or one place from full, and codes expiring within 30 days.
  • Income per month bar chart (hover/tap a month for the figures) with the year's total in its header, and the month-by-month table under "Show as table".

Order on the page: Coming up (grouped by day) and Needs attention first (side by side on xl, stacked on a phone), then the income/hours tiles (two per row on a phone), the income chart, then customers/regulars, what sells and popular lengths.

Slot places and code credits come from the shop hooks (/api/shop/slots?detail=1, /api/shop/passes), so there's no second copy of those rules. The figures are in app-admin/src/lib/server/dashboard.ts.

Other changes

  • Site design: Style used to sit alone under Header. It's now 2×2 on xl screens and four side by side from 2xl. Four columns at xl would leave the navigation inputs about 65px wide.
  • Login: a Show/Hide button on the password field.

Testing

  • npm run check (app-admin): 0 errors; the 16 warnings were already there in files this PR doesn't touch.
  • I ran the full stack on a fresh volume, imported pb_schema.json and seeded orders (including refunded, voucher-paid and overlapping group bookings), windows, a group session, a code expiring soon and a failed email. I checked every figure by hand against the seed. Screenshots at 1600/1280/820/390px, with no sideways scrolling at any of them: dashboard, chart tooltip, attention list on a phone, Site design, and the login with the password shown.
  • Not tested: real Stripe payments, and large data sets. Everything loads in one go, and /api/shop/passes returns at most the 200 newest codes, so "codes owed" would undercount beyond that.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt

## Why The admin opened on the Pages list and had no overview of how the studio is doing. This adds a dashboard at `/` (login and the sidebar title land there), plus two small visual requests. ## Dashboard (`/`) - **Income**: this month vs. last month, this year, and the average order. An order counts in the month it was paid, so a voucher is income when it's sold, not when it's used. - **Hours**: worked so far this month and still booked. Overlapping bookings are merged, so a group session counts once, not once per person. - **Opened time booked**: booked hours against the hours opened in Slots this month. - **Next 7 days**: a list with day, time, length, service and customer. - **Customers this month** (new vs. returning, where "new" means first paid order ever) and **regulars** (more than one order in the last 12 months). - **Vouchers & codes owed**: the unbooked share of each usable code's value. - **What sells / popular lengths** over the last 12 months (bundle contents at price 0 are left out, since the bundle line holds the money). - **Needs attention**: failed booking emails, group sessions ¾ full or one place from full, and codes expiring within 30 days. - **Income per month** bar chart (hover/tap a month for the figures) with the year's total in its header, and the month-by-month table under "Show as table". Order on the page: Coming up (grouped by day) and Needs attention first (side by side on xl, stacked on a phone), then the income/hours tiles (two per row on a phone), the income chart, then customers/regulars, what sells and popular lengths. Slot places and code credits come from the shop hooks (`/api/shop/slots?detail=1`, `/api/shop/passes`), so there's no second copy of those rules. The figures are in `app-admin/src/lib/server/dashboard.ts`. ## Other changes - **Site design**: Style used to sit alone under Header. It's now 2×2 on xl screens and four side by side from 2xl. Four columns at xl would leave the navigation inputs about 65px wide. - **Login**: a Show/Hide button on the password field. ## Testing - `npm run check` (app-admin): 0 errors; the 16 warnings were already there in files this PR doesn't touch. - I ran the full stack on a fresh volume, imported `pb_schema.json` and seeded orders (including refunded, voucher-paid and overlapping group bookings), windows, a group session, a code expiring soon and a failed email. I checked every figure by hand against the seed. Screenshots at 1600/1280/820/390px, with no sideways scrolling at any of them: dashboard, chart tooltip, attention list on a phone, Site design, and the login with the password shown. - Not tested: real Stripe payments, and large data sets. Everything loads in one go, and `/api/shop/passes` returns at most the 200 newest codes, so "codes owed" would undercount beyond that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
agent added 2 commits 2026-10-27 10:14:42 +01:00
The dashboard shows income (paid orders, by the month they were paid),
hours worked and still booked this month, the next 7 days' bookings and
a 12-month table. Booked time is counted with overlaps merged, so a
group session is one hour of work however many people booked it.
Login and the sidebar title now land on the dashboard.

Site design: four cards in a three-column grid left Style alone under
Header. Two columns on xl (Header|Footer, Colors|Style) and all four
side by side from 2xl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
Adds to the dashboard: an income-per-month bar chart (hover for the
figures; the month table is its table view), opened-time utilisation
(booked hours against hours opened in Slots), what sells and popular
lengths, new vs. returning customers and regulars, what usable codes are
still worth, and a "Needs attention" list (failed booking emails, group
sessions nearly full and codes expiring in the next 30 days). Slot places
and code credits come from the shop hooks, as everywhere else.

Login: a Show/Hide button on the password field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
agent added 1 commit 2026-10-27 10:25:04 +01:00
New order: Coming up (grouped by day) and Needs attention side by side
(stacked on a phone, with an all-clear message when empty), then the
income/hours tiles (two per row on a phone), then the income chart with
the year's total in its header and the month table folded under "Show as
table", then customers/regulars, what sells and popular lengths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
reudy merged commit 8076dd48ed into main 2026-10-27 10:35:56 +01:00
agent changed title from Admin dashboard, Site design 2x2 grid, show password on login to Admin dashboard, Site design grid, show password, footer privacy link on phones 2026-10-27 11:28:36 +01:00
agent changed title from Admin dashboard, Site design grid, show password, footer privacy link on phones to Admin dashboard, Site design 2x2 grid, show password on login 2026-10-27 11:28:50 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/domaino#25
No description provided.