Commit graph

106 commits

Author SHA1 Message Date
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
c3c10229b0 Site design: separate booking page and basket page
The header button, the basket indicator, the shop's "view basket" links,
hero buttons and the payment return page all pointed at a hard-coded
/book. Site design now has a Booking page (where the CTA leads) and a
Basket page (where the basket leads; empty = the booking page), and
warns when the page picked is unpublished or lacks its Shop / Checkout
block. On a basket page of its own, an empty basket links to the
booking page instead of saying "pick a service above".

Sites saved before this keep their links: the booking page falls back
to the CTA's old address, then /book.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:19:54 +00:00
76b297153e Merge pull request 'Bundles: protect their parts from deletion, show the saving' (#8) from bundle-parts-sale-price into main
Reviewed-on: #8
2026-10-26 12:02:42 +01:00
23c5b70a93 Shop: show the bundle's separate price as a saving; hide unsellable bundles
Bundle cards show what the parts cost one by one, crossed out when it's
more than the bundle price. Bundles with a part that isn't on sale are
left out of the shop data, so their parts always have names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 09:04:35 +00:00
338aef9e01 Bundles: keep parts from being deleted out from under them
Bundle parts are JSON, so deleting a service left bundles pointing at
nothing (shown as "Item" in the shop). An onRecordDelete hook on items
now refuses while a bundle contains it or a usable code still has
sessions of it to book. A bundle with an inactive part is no longer sold
or issued; the admin items list marks it "Not on sale" and shows how many
codes are waiting on an inactive service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 09:04:35 +00:00
dc2b9e4e43 Merge pull request 'Bundles and gift vouchers: codes booked later, confirm without paying' (#7) from bundles-vouchers into main
Reviewed-on: #7
2026-10-26 09:30:41 +01:00
c7e019131a Docs: bundles and codes, trackStock, personal data in passes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:39:51 +00:00
df840b7fd7 Admin: bundles under Services & products, Vouchers & codes page
Bundles are edited with their parts (service at a length, or product,
× count), price and validity. /passes lists codes with used/held/left and
each part's share of the price; codes can be voided, reactivated, given a
new expiry, or issued without a purchase. Orders show codes bought and
bookings paid with a code; the customer page lists codes and erasure
covers them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:39:51 +00:00
e824f16e31 Shop and checkout: bundles, gift details, codes, confirm without paying
Bundle cards list what they contain and how long the code is valid. In
the basket a bundle can be marked as a gift (for / message). Checkout
takes a code: covered bookings show "Paid with your code" and cost 0,
with what the code has left; when nothing is left to pay the button is
Confirm booking and no Stripe step happens. The result page and the
confirmation email show bought codes and code-paid bookings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:39:51 +00:00
32984ac01d Stock: items.trackStock, so an empty stock really means unlimited
PocketBase 0.23 can't store an empty number (it reads back as 0), so a
product saved with "Unlimited when empty" stock was sold out — on main
too. trackStock says whether stock counts; existing products get it on,
so nothing that sells today changes. The shop maps untracked stock to
null (unlimited), as the UI always assumed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:39:51 +00:00
e30e1d3beb Shop hooks: bundles, codes (passes) and orders paid with codes
A bundle (items.type `bundle`) has its own price, parts (a service at a
length × count, or a product × count) and a validity in months. Buying one
creates a pass with an 8-character code; its parts are snapshotted with
their share of the price. Applying a code to a basket covers matching
bookings (same service and length) while places are left — counted from
order lines and live holds, never stored. A fully covered basket is
confirmed without Stripe.

Admin routes list, void/extend and issue codes; GDPR export, correction,
erasure and retention cover passes (erasure keeps the code working).

orders.total, orders.stripePaymentIntentId and order_lines.price are no
longer required: PocketBase treats 0 / '' as blank, and a code-paid order
has neither a payment nor a price.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:25:04 +00:00
650de78bac Merge pull request 'Services with several lengths; slots become time windows' (#6) from session/change-slots-behavior into main
Reviewed-on: #6
2026-10-25 22:16:34 +01:00
ce3866550a Windows: choose the start-time step (10–60 min, default 30)
A window on fixed steps now has gridMinutes; the admin picks it when
creating or generating windows, and copies keep it. Added to the
(unmerged, undeployed) time-windows migration and pb_schema.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:03:40 +00:00
6ab0b75ec3 Shop: pick the length after pressing Book
The card shows "from" the lowest price and the range of lengths; the
slider moves into the booking panel, above the date picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:56:05 +00:00
e1a8a54458 Docs: windows, durations and the new slot availability rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:12:46 +00:00
636b59c706 Admin: lengths and prices per service; windows and group sessions on /slots
Services get rows of length + price. /slots creates windows (date, hours,
services, start-times mode) and group sessions (service, length, start,
places); the day view shows free time and bookings. Generate/copy/clear
handle both kinds; windows may not overlap and can't shrink past a booking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:12:46 +00:00
eac99b2abe Shop: duration slider on services, times fetched per service and length
Service cards step through their lengths with a slider and the price
follows. The time picker loads bookable times for the chosen length and
the months on screen from GET /api/slots (a proxy to the shop hook in each
app), and reloads when the basket's bookings change. Checkout, emails and
the basket show each booking's own length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:12:46 +00:00
23df2ceced Shop hooks: a slot lookup by id returns all of that slot's bookings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:12:46 +00:00
b3ecc1722b Shop hooks: several durations per service, slots become time windows
A service now has `durations` ([{ minutes, price }]) instead of one
duration and price. A slot is either a `window` (a stretch of time with the
services that can be booked in it, start times every 30 min or only at the
edges of the free time) or a `session` (one service, fixed time, places —
the old group slot). Basket and order lines carry their own start and
minutes, so availability is computed from bookings alone.

The migration keeps paid bookings blocking their time (order lines get
minutes from their slot), then deletes the old slots — agreed: start fresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 19:59:00 +00:00
19b8bb121f Merge pull request 'evashafik.com backups (copy + enhanced), prices in the shop currency' (#5) from evashafik-backups-currency into main
Reviewed-on: #5
Reviewed-by: reudy <jakubadorfman@proton.me>
2026-10-25 16:40:57 +01:00
4191a189c4 Backups: evashafik.com copied over, plus an enhanced version
evashafik-copy.json is the current Tilda site page for page (same URLs,
verbatim text, original photos). evashafik-enhanced.json is the same
content with the events calendar, online booking/payment and a
conversion-focused structure. backups/README.md explains both and lists
the services to create after importing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6FzyGitv5gDZEcCHDGoo
2026-10-25 14:48:12 +00:00
e29eaaa8e8 Show prices in the shop currency (STRIPE_CURRENCY), not hard-coded EUR
formatPrice always formatted EUR, so the public shop, checkout, basket
and order confirmation showed € even when Stripe charged another
currency. It now takes a currency; both apps pass STRIPE_CURRENCY to the
blocks as layout data `currency` (like `timezone`), so one setting drives
what Stripe charges and every price shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6FzyGitv5gDZEcCHDGoo
2026-10-25 14:48:12 +00:00
de8d29beb4 Merge pull request 'GDPR: privacy policy link, customer data export/correct/erase, retention, no third parties on load' (#4) from privacy-gdpr into main
Reviewed-on: #4
2026-10-24 13:22:03 +02:00
0b3f8eabab Docs: personal data (GDPR) — what is stored, the customer tools, retention
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 10:44:45 +00:00
971efebcdb Customers page: export, correct and erase personal data; automatic retention
Admin /customers finds a customer by name, email, phone or notes (orders and unpaid checkouts), exports everything stored as JSON, corrects details on every record, and erases them — anonymising orders (amounts, services and dates stay for the accounts) and deleting unpaid checkouts. A daily cron (and PocketBase start) deletes unpaid checkouts after N days and, when set, anonymises orders after M months, skipping orders with a booking ahead. A paid basket's copy of the details is cleared when its order is created. All writes are in pocketbase/pb_hooks/privacy (orders and baskets are superuser-only); migration 1793000000 makes orders.email optional and adds orders.anonymisedAt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 10:44:45 +00:00
5828d65a00 Privacy policy link in the footer and checkout, notes hint, and a policy draft
Site design → Footer picks the privacy policy page; it is linked from the footer and from a short notice above Pay. The notes field asks customers not to write health details (special-category data). 'Create a privacy policy draft' makes an unpublished page describing what this software does with customer data, with gaps for the studio to fill in. No consent checkbox: booking data is processed to perform the contract. Also adds the PrivacyGlobal type used by the retention settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 10:44:45 +00:00
73e8c5dc5d No third-party requests on page load: bundle the fonts, load Stripe.js at Pay
Google Fonts and Stripe.js (imported from @stripe/stripe-js, which injects the script on import) sent every visitor's IP address to Google and Stripe on every page. Fonts now come from @fontsource packages bundled into each app; Stripe.js loads from the 'pure' entry point, only when the customer presses Pay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 10:44:45 +00:00
148b07253e Merge pull request 'Slots: bulk tools, get-ready time, group places, and bookings block overlapping slots' (#3) from session/redo-slots-and-add-get-ready-tim into main
Reviewed-on: #3
2026-10-24 12:15:35 +02:00
62025263c9 Shop picker: month arrows, jump to the first available date, +/- for group places
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 09:32:56 +00:00
021d06d3e4 Checkout: reservation countdown, 'keep it 10 more minutes', and a message when a hold runs out
Basket changes that free or take places reload the page data, so places
removed from the basket show up in the shop again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 09:32:56 +00:00
28773f2599 Admin slots: a slot held in a basket reads 'In a basket', not 'Full'
'Full' is now only for a group session filled by paid bookings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 09:32:56 +00:00
214db95186 Show dates, times and prices in a European format and the studio's timezone
Formatting with the default locale rendered US dates (MM/DD/YYYY, 12-hour)
on the server. Everything shown to people now uses DISPLAY_LOCALE (en-GB)
and booking times use SITE_TIMEZONE. The public layout reloads on every
navigation so places left are never stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 09:32:56 +00:00