Commit graph

137 commits

Author SHA1 Message Date
80cbe6ddb2 Services: editing a saved service no longer fails validation
PocketBase reads an empty number back as 0, so mapItemRecord gave every
service capacity 0 and bufferMinutes 0. The edit form then showed
'Places in a group session: 0', below the field's min of 1, and the
browser refused to submit. 0 now maps to null (not set) for both;
every reader already treats them alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m
2026-11-04 22:47:01 +00:00
e896fd3c99 Shop: item priority, block sort order and an optional "Sort by" menu
- items.priority (migration + pb_schema.json): Recommended order in Shop
  blocks, higher first, then by name. Set under Services & products, which
  now lists items in that order.
- Shop block: choose its order (Recommended, Most popular, price up/down,
  name) and optionally let visitors re-sort with a "Sort by" menu.
  sortItems() in shared/items.ts is the one place items are ordered.
- Most popular: GET /api/shop/popular returns item ids by units sold in
  paid orders over the last 90 days (ids only, no sales figures).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m
2026-11-04 22:36:50 +00:00
97b1da2433 Merge pull request 'PocketBase 0.40.6 + JS SDK 0.28.2; explicit JSON limits; setup steps for the new dashboard' (#28) from session/pocketbase-0.40 into main
Reviewed-on: #28
2026-11-03 11:44:19 +01:00
5e2db31b5e PocketBase 0.40.6, JS SDK 0.28.2; fresh-install steps for the new dashboard
- docker-compose: elestio/pocketbase v0.40.6, digest-pinned (same port,
  user and layout as v0.23.12)
- pocketbase SDK ^0.28.2 in both apps and packages/shared (0.27/0.28
  are additions and pb.filter() fixes, nothing breaking)
- README: setup steps rewritten for the 0.40 dashboard: install link
  from the log, and tick "Merge with the existing collections" on
  schema import (the default deletes `users`); an upgrade section
  (back up first, data upgrade is one-way, what changed)
- AGENTS.md: versions; field settings go at the top level, not `options`

Compared with main (0.23.12 + SDK 0.26) on copies of real data: admin
and public page text, image upload, import of all three backups, the
shop flow via hooks, Stripe webhook signatures, and a fresh install
with pb_schema.json import all behave the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gX7xH4zwYTr5vE7mf8
2026-11-03 09:43:49 +00:00
dc8c58f4c2 Schema: explicit size limits on JSON fields
pb_schema.json had six JSON field limits under `options.maxSize`, which
PocketBase ignores since 0.23, so those fields used PocketBase's default.
That default dropped to 1MB in 0.29: on 0.40 a 1.5MB page that 0.23
saved is refused. Move the limits to the field's top level and add a
migration that sets them on existing installs (pages/email blocks 2MB,
globals 1MB, event categories 200KB, customer details 100KB).

Tested on 0.40.6: existing install (migration applied, 1.5MB page saves,
2.5MB refused at 2MB) and fresh install + pb_schema.json import; both
end with identical schemas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gX7xH4zwYTr5vE7mf8
2026-11-03 09:43:49 +00:00
5b92cae225 Merge pull request 'PocketBase: switch image to elestio/pocketbase v0.23.12' (#27) from session/change-pocketbase-image into main
Reviewed-on: #27
2026-11-03 10:25:42 +01:00
d62799f263 PocketBase: switch image to elestio/pocketbase v0.23.12
spectado/pocketbase has been removed from Docker Hub. elestio publishes
the same PocketBase version (0.23.12), so schema, migrations and hooks
are unchanged. The image differs in packaging:

- listens on 8090 instead of 80 (Caddyfile, POCKETBASE_INTERNAL_URL)
- runs as non-root user `pocketbase` (uid 100), so pb_data written by
  the old root-run image needs a one-off chown; README documents it
- pinned by digest as well as tag

Tested: copy of an existing pb_data volume, README chown command via
podman-compose, then the full stack (public page renders, admin and db
routes via Caddy, shop hooks respond). A fresh volume also works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gX7xH4zwYTr5vE7mf8
2026-11-03 09:10:16 +00:00
8076dd48ed Merge pull request 'Admin dashboard, Site design 2x2 grid, show password on login' (#25) from session/visual-tweaks into main
Reviewed-on: #25
2026-10-27 10:35:56 +01:00
05d8659685 Dashboard: coming up and needs attention first; year total on the chart
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
2026-10-27 09:25:01 +00:00
2dc57fd27c Dashboard: chart, utilisation, sales, customers, codes owed, attention; show password
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
2026-10-27 09:14:27 +00:00
bdc040636a Admin: dashboard at / with income and hours; Site design 2x2 grid
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
2026-10-27 08:54:57 +00:00
312dc5ed3c Merge pull request 'Public site: smoother scrolling' (#24) from smoother-scrolling into main
Reviewed-on: #24
2026-10-27 09:37:31 +01:00
a6f9e6c6e3 Public site: smoother scrolling
Scrolling the home page dropped frames on a desktop-sized window. Measured
in Firefox and Chromium, the cost came from blocks fading in while scrolling
and from the blurred (frosted) header and calendar cards, which are redrawn
on every frame.

- Header and upcoming-calendar cards: nearly solid background, no blur.
- Fade-in animations are shorter (0.4s / 0.5s, a smaller slide).
- They are off for people whose device asks for reduced motion, and on
  devices that can't keep up: very few cores / little memory straight
  away, otherwise when more than 1 in 10 of the first scrolled frames run
  late (scrollReveal.ts adds `plain-motion` to <html>, remembered for
  the visit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-27 08:36:03 +00:00
2c0f54b1f7 Merge pull request 'Slots: Step picker full height on phones' (#22) from slots-step-picker-height into main
Reviewed-on: #22
2026-10-26 21:15:27 +01:00
d4a14f983f Slots: Step picker no longer squashed flat on a phone
In a narrow row the Step label goes above the picker (flex-col), where
the picker's flex-1 sized its height, not its width, and flattened it.
It now grows only in the side-by-side layout (@sm:flex-1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 20:15:08 +00:00
83f3cc1d2d Merge pull request 'Item editor: length reading back under each length row' (#21) from item-lengths-label-under into main
Reviewed-on: #21
2026-10-26 21:13:10 +01:00
4a374ff22a Item editor: length reading back under each length row
The admin preferred "1 h 30 min" under the minutes and price, as before
#20, over beside them. Restores that row's earlier markup; the Active
toggle's wrapping text from #20 stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 20:11:44 +00:00
4a9d596276 Merge pull request 'Admin on phones: item editor, Vouchers & codes, slot Step picker' (#20) from admin-mobile-forms into main
Reviewed-on: #20
2026-10-26 21:08:32 +01:00
42e435fb8a Admin on phones: item editor, Vouchers & codes, slot Step picker
- Services & products editor: each length stays on one line (minutes,
  price, then "1 h 30 min" to the right instead of underneath), and the
  Active toggle's text wraps instead of running off the screen.
- Vouchers & codes: one card per code below lg (the seven-column table
  scrolled sideways); Search sits beside the search field. The Manage
  window lists the parts as rows on a phone; its five-column table is
  kept from sm up, hidden through a wrapper because DaisyUI's "table"
  class also sets display: table and beats "hidden".
- Slots (Add window and Generate slots): the Step picker is laid out like
  the Start times control above it and fills the row; the window's
  services list each name with its lengths underneath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 20:07:42 +00:00
56077f3246 Merge pull request 'Admin Services & products on phones: one card per item' (#19) from admin-mobile-items-list into main
Reviewed-on: #19
2026-10-26 20:47:35 +01:00
f79249938e Admin Services & products on phones: one card per item
The seven-column table didn't fit a phone: Name and Type scrolled off the
left and long bundle/duration text wrapped into very tall rows. Below lg
(where the sidebar becomes a drawer) each item is now a card: picture,
name, type and status badges, price/stock, then the lengths or bundle
contents and any warnings, with Edit on the right. The table stays from
lg up; its cells now share snippets with the cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 19:46:05 +00:00
cbc0f1b44e Merge pull request 'Admin Pages list on phones: one card per page' (#18) from admin-mobile-pages-list into main
Reviewed-on: #18
2026-10-26 20:18:07 +01:00
376f7187d5 Admin Pages list on phones: one card per page
The four-column table didn't fit a phone: the slug scrolled off the left
and each row's buttons stacked into a tall column. Phones now get a list
of cards (title, /slug, status, then the buttons in a row); the table
stays from md up, with its buttons on one line on wide screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 19:15:54 +00:00
f1ef0162d7 Merge pull request 'Site design → Style: fonts, corners, text size, shadows, page width' (#17) from site-design-fonts-corners into main
Reviewed-on: #17
2026-10-26 20:06:59 +01:00
91f6705899 Site design → Style: fonts, corners, text size, shadows, page width
A new Style card in Site design (a `style` global) chooses the heading and
body fonts from 15 bundled ones, corners (sharp/soft/round), text size,
shadow strength and page width, with a live sample. The choices become
--site-* CSS variables that the @theme radius, shadow, container and font
tokens scale, so blocks keep using rounded-xl, shadow-sm, max-w-6xl and
follow the setting. Buttons and chips use rounded-button; the defaults
are the site's current look.

Fonts are @fontsource-variable packages (replacing the static DM Sans and
Playfair ones): still served by the site, and a browser downloads only
the fonts a page uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 19:00:37 +00:00
c35f9a60cc Merge pull request 'Admin on phones: Events page layout; Site design no wider than the screen' (#16) from admin-mobile-events-globals into main
Reviewed-on: #16
2026-10-26 19:31:42 +01:00
382af28262 Admin on phones: Events page layout; Site design no wider than the screen
- Events: on a phone the month grid shows coloured bars (tap to edit)
  instead of names squeezed to one letter; arrows only for previous/next,
  so they share a row with the month; the event list shows the date under
  the name and drops the Date and Categories columns.
- Site design: the ⓘ tooltips open downwards on a phone. Opening to the
  right, their hidden text stuck out past the screen and made the whole
  page scroll sideways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 18:31:04 +00:00
a3dca4ebf5 Merge pull request 'Public site on phones: basket lines, timeline, events calendar' (#15) from public-mobile-layout into main
Reviewed-on: #15
2026-10-26 19:19:33 +01:00
00365165fe Public site on phones: basket lines, timeline, events calendar
- Checkout: a basket line's quantity, price and remove button go on their
  own row under the description on a phone (a bundle's description was
  squeezed into a one-word column and the price ran into the ✕).
- Timeline: cards stack in one column without the desktop overlap.
- Events calendar: on a phone the grid shows thin coloured bars and a list
  of the month's events under it (name, dates, description, link); the
  hover box is desktop-only and opens leftwards on Thu–Sat so it stays on
  screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 17:50:37 +00:00
0b5cddb655 Merge pull request 'Slots: no two slots may overlap, windows and group sessions alike' (#14) from slots-no-overlap into main
Reviewed-on: #14
2026-10-26 18:34:43 +01:00
9c1179ab93 Slots: no two slots may overlap, windows and group sessions alike
A group session could be put on top of a window (and sessions of
different services on top of each other); whichever was booked first
then blocked the other. One practitioner works every slot, so creating,
editing, generating or copying a slot now refuses any overlap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 17:30:08 +00:00
1f6d4806f9 Merge pull request 'Admin on phones: touch dragging, roomier setting rows, fading save banner' (#13) from mobile-editor-fixes into main
Reviewed-on: #13
2026-10-26 18:27:20 +01:00
9500f0c07b Admin on phones: touch dragging, roomier setting rows, fading save banner
- Block list: drag a block by its handle with a finger (phones don't fire
  HTML drag events); the mouse keeps drag-and-drop on the whole row.
- Setting rows (SegmentedControl, ColorField, Anchor) put the label above
  the choices in a narrow row, so e.g. Shop "Item type" fits.
- Background Overlay is a slider instead of ten buttons.
- Page and email editors: "Draft saved." fades out like Site design's
  (new SaveStatus component); errors stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 17:23:45 +00:00
af7f0f261f Merge pull request 'Admin: one image picker everywhere, with paste, drag-and-drop and a library' (#12) from unified-image-picker into main
Reviewed-on: #12
2026-10-26 18:01:17 +01:00
bc62bdf8dd Image picker: Alt text and Image URL labels above their fields again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 14:29:51 +00:00
650c95fb78 Image picker: pick from the uploaded images; labels beside the fields
"Pick from library" opens the images already in `media` (newest first,
searchable by alt text or file name, 24 at a time) so one can be reused
without uploading it again; it lists them through the new admin
GET /api/media. The layout follows the sketch: box on the left, Alt text and
Image URL with their labels beside them, and Pick from library / Paste as a
full-width row underneath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 14:21:22 +00:00
811db3f1ca Image picker: tidier desktop layout
The box and its Choose/Paste buttons form the left column, so it lines up
with the fields beside it; Remove is a ✕ on the image and hovering an image
says how to replace it. Alt text comes first, the Image URL is smaller and
explained. Without fields (Services & products) the hint and the page's own
note sit beside the box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 13:54:26 +00:00
93d4863cfc Admin: one image picker everywhere, with paste and drag-and-drop
ImageUploader becomes ImagePicker and replaces the separate image field on
Services & products, so every image (blocks, card images, block backgrounds,
emails, the logo, services) is picked the same way. Besides choosing a file
it takes an image dragged onto the box or pasted (Ctrl+V while the picker
has focus, or the Paste button where the browser allows reading the
clipboard). Pasted images get a dated file name and no alt text made from
"image.png"; files the media collection won't take are refused with a
message before uploading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 13:32:43 +00:00
4b50067a4a Merge pull request 'Use the Site design logo as the favicon (site and admin)' (#11) from logo-favicon into main
Reviewed-on: #11
2026-10-26 14:20:06 +01:00
d29f101b29 Merge pull request 'Visual text editor; Cards, FAQ and HTML blocks instead of HTML in text' (#10) from visual-editor-blocks into main
Reviewed-on: #10
2026-10-26 14:19:13 +01:00
745cd24562 Admin: the Site design logo is the favicon too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 13:17:44 +00:00
d3d8910c3c Public site: the Site design logo is the favicon
A 300x300 thumbnail of it (PocketBase's existing media thumb size), also
as the phone home-screen icon. Without a logo the bundled icon stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 13:14:04 +00:00
25632d85e2 Backup: evashafik-enhanced uses Cards/FAQ blocks instead of HTML
Same text: cards, steps, Read next and programme prices are Cards
blocks, the FAQs FAQ blocks, pull quotes quotes, references small text.
#prices, #buy and #book are block anchors (#book on /sessions had lost
its target with the price table).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 12:58:16 +00:00
f86c2251dc Visual text editor; Cards, FAQ and HTML blocks; block anchors
The text editor (Tiptap) only produces simple HTML: headings, bold,
italic, strikethrough, links, lists, pull quotes, lines. Layouts that
were hand-written HTML in text blocks get their own blocks (Cards with
pictures or numbered steps, FAQ), one-offs and embeds go in an HTML
block, and every block can have an anchor for #links. Text blocks get
alignment and a small (footnote) size.

Existing text blocks the editor can't represent become HTML blocks that
render exactly as before (migration, and backup import for old files);
text that is only centred becomes centred text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 12:58:15 +00:00
Jakub Dorfman
72f8898925 Updated advanced Backup 2026-10-26 13:12:27 +01:00
95a3c6d6b3 Merge pull request 'Optional basket page; Button blocks follow the site colour; Site design tidy-up' (#9) from booking-basket-pages into main
Reviewed-on: #9
2026-10-26 13:09:24 +01:00
29bbdf267c Site design: fading "Saved.", tooltips, CTA page check, home page first
- "Saved." slides in and collapses away after 2.5 s (no motion with
  prefers-reduced-motion); errors stay until the next save.
- The CTA and basket hints are short tooltips on an info button
  (hover or keyboard focus) instead of paragraphs.
- A CTA address like "/book" is checked like the basket slug: warns
  when no page has that slug or it isn't published.
- Home page moves above Navigation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 12:07:15 +00:00
68c67d7e96 Site design: type the basket page's slug instead of picking it
Like the CTA's address, the basket page is now a text box. Slashes and
spaces around the slug are ignored, and Site design warns when no page
has that slug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:50:53 +00:00
f20d6777ab Site design: the CTA keeps its address, the basket page is optional
Instead of a separate booking page setting, booking links lead to the
header button's own address again, and the basket page falls back to
that address when it isn't set. Site design warns when the basket's
page isn't published or has no Checkout block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:44:03 +00:00
ec1156b1fa Button block: primary buttons take the site colour
The variant class was built as `btn-${variant}`. Tailwind only generates
classes written out in the source, and nothing in the public app spells
out `btn-primary`, so primary Button blocks rendered as plain grey
buttons on the live site (the admin preview, which uses btn-primary
elsewhere, looked right).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:44:03 +00:00