Commit Graph
160 Commits
Author SHA1 Message Date
popertotsandSisyphus 4cacb3461b feat(frontend): apply Playfair Display heading to login page
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 22:07:01 +01:00
popertotsandSisyphus a72a806248 feat(frontend): refine prices page layout and card styling
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 21:45:16 +01:00
popertotsandSisyphus 799510c934 feat(frontend): apply Playfair Display heading to admin, schedule, and today pages
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 21:45:12 +01:00
popertotsandSisyphus 7e1a2bdf9b feat(frontend): redesign schedule page with grouped card layout
Replace Card component with custom card design: group bookings by month, add color-coded status bars/badges/dots, fly transitions, loading skeletons, empty state with calendar icon, and improved time/date formatting. Remove dependency on shadcn Card component.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 21:27:39 +01:00
popertotsandSisyphus af73afe401 feat(frontend): add Playfair Display heading font to layout and pages
Load Playfair Display from Google Fonts via preconnect and stylesheet in root layout, then apply to h1 headings on BookingFlow, Account, and Contact pages for a consistent brand typography.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 21:27:34 +01:00
popertotsandSisyphus bf90b0fa42 feat(frontend): add done-for-day summary card to CurrentAppointment, fix schedule z-index
Replace current/next card with done-for-day summary state when all appointments are finished. Shows daily stats (payments, tips, duration, customers) and week summary when tomorrow is closed. Fix schedule grid z-index to remove stacking context that caused overlay issues.

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 20:27:47 +01:00
popertotsandSisyphus 867f86978b feat(frontend): integrate custom services across booking flow and routes
Update BookingFlow to support custom service selection, add custom_services to booking types, and link CustomServicesManagement into admin pages. Minor updates to schedules, prices, and today routes.

Ultraworked with Sisyphus (https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 16:58:37 +01:00
popertotsandSisyphus 8f8bf83b64 feat(frontend): add custom services management UI components
Add CustomServicesManagement component for CRUD operations on custom services. Update BookingCreateModal, WalkInCreateModal, and BookingsCard to support custom service selection. Minor improvements to ServicesManagement and ImageUpload.

Ultraworked with Sisyphus (https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-15 16:58:28 +01:00
popertots d77f330bda chore: commit pending changes before custom services implementation 2026-06-13 11:27:47 +01:00
popertotsandSisyphus 45814a4040 feat: implement portfolio carousel with swipe/nav, FLIP close button, 250ms slide
Adds a 3-slide flex-track carousel to the full-size image dialog with:\n- Swipe & button navigation\n- Dynamic close button positioning (FLIP animation, 150ms)\n- 250ms slide animation (buttons + swipe unified)\n- Preloading of adjacent images\n- Mobile button fix (touch start ignores buttons)\n- Fixed-height slides (95vh) prevent height cropping

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-13 10:41:00 +01:00
popertotsandSisyphus 18eaa00479 refactor(frontend): migrate email fields to EmailInput component
Replace raw <Input type="email"> with <EmailInput> in login (register + login), account (gift card recipient), BookingFlow (guest email), and GiftCardsManagement (admin gift card email).

Removes 30-line validateEmail() function from login page (now handled by EmailInput internally).

Removes validateEmailFormat() from BookingFlow (EmailInput handles format validation; debounced backend email check preserved via onvaluechange/onblur).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-12 10:51:07 +01:00
popertotsandSisyphus 1cadbbe968 feat(frontend): add EmailInput component with validation
EmailInput wraps shadcn Input with built-in validation (regex + browser checkValidity), normalization (trim + lowercase on blur), and inline error display. Follows PhoneInput.svelte pattern with  value/error and onvaluechange/onerrorchange/onblur callbacks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-12 10:51:01 +01:00
popertotsandSisyphus e7634ba187 feat(frontend): add email check and gift card support to booking flow
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-11 22:08:28 +01:00
popertotsandSisyphus 7a459a3986 feat(frontend): add gift card management UI and payment modal updates
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-11 22:08:27 +01:00
popertotsandSisyphus 1be82986a5 feat(frontend): add PhoneInput component with UK validation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-11 22:08:26 +01:00
popertots 6756723c60 saved cards store 2026-06-07 12:38:22 +01:00
popertots 75cca8b158 fixes 2026-06-06 15:25:58 +01:00
popertots 59e7dd9fdc fixes 2026-06-06 15:23:10 +01:00
popertots 9c6eeeb426 Fixes 2026-06-06 15:18:37 +01:00
popertots b274d2c47b fixes for giftcards and phone input 2026-06-06 15:11:01 +01:00
popertots 4e174a6123 Fixes for giftcards and phone input 2026-06-06 15:10:48 +01:00
popertots 5258f90b06 Add giftcard management 2026-06-06 14:26:42 +01:00
popertots 310e6aaa80 Add giftcard management 2026-06-06 14:26:33 +01:00
popertots 44c9d423ec fix: restore cardNum definition in addCard
- Re-added 'const cardNum = newCardNumber.replace(/\s/g, '');' inside addCard
- Log actual error to console in catch block of addCard
2026-06-05 21:15:05 +01:00
popertots d2dea38b01 fix: replace crypto.randomUUID with generateIdempotencyKey
- Changed purchase flow to use generateIdempotencyKey() which uses secure
  window.crypto.getRandomValues with a math fallback, avoiding secure-context blocks on HTTP
- Log actual error to console in both Buy and Redeem catch blocks
2026-06-05 21:11:47 +01:00
popertots 883fd3076a fix: disable pay button unless full valid card is entered
- Added isBuyExpiryValid and isBuyCardValid reactive derivations
- Disabled Buy Gift Card button unless card is fully valid (Luhn checked number, future expiry, complete CVC)
- Verified clean compilation with zero warnings
2026-06-05 21:07:13 +01:00
popertots 0d4a74bd4a feat: caret preservation and Luhn validation in card inputs
- Added generic formatAndPreserveCursor() helper on frontend to track
  and restore selection caret position during dynamic input sanitization
- Applied to all card inputs, gift card code inputs, and expiry inputs
- Added Luhn validation (isValidLuhn) for saved cards and gift cards
- Rebuilt payments test DB and got 100% green tests
2026-06-05 21:05:36 +01:00
popertotsandSisyphus 69420298bd feat(frontend): add booking stats summary section to GDPR page
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-05 15:40:46 +01:00
popertotsandSisyphus 36ad38f670 feat(frontend): add /gdpr page with PDF export and JSON download
New /gdpr route: skeleton loading state, 2s polling for async export, styled report cards/tables matching /schedule and /account styling. 16 data sections with conditional rendering (empty sections hidden). VAT breakdowns hidden until any payment has non-zero VAT. Deposits Required hidden when 0. PDF export via window.print() with print CSS hiding navbar and verification banner. Raw JSON download button. Export My Data button added to Account page under Change Password. Vite worker format set to 'es' for WASM encoder compatibility.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-05 12:13:07 +01:00
popertots 6d4bc4d637 feat(loyalty-discount): implement loyalty and discount system
- Add discount campaign management and validation logic
- Update booking handlers with discount application flow
- Add customer relationship endpoints for loyalty tracking
- Update frontend modals (booking, approval, payment, reschedule)
- Add DiscountsManagement and loyalty reference documentation
- Update dev scripts and database init for discount tables
- Clean up completed plan files
2026-06-04 23:13:02 +01:00
popertotsandSisyphus f379e5c09a refactor(routes): move notifications to /admin/notifications, remove /manage
Moved /notifications to /admin/notifications to match admin-only access pattern. Updated NavBar bell icon and mobile menu links. Removed /manage route (leftover prototyping). Pre-hydration redirect already in place for admin-only guard.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 20:08:34 +01:00
popertotsandSisyphus 24b1823a5d fix(routes): add pre-hydration auth redirects to all protected pages
Replaced slow $effect-based auth checks with synchronous IIFE scripts in <svelte:head> that run during HTML parsing, before Svelte hydration. Covers: /today, /admin, /admin/schedule, /manage, /notifications (admin-only), and /account (auth-required). All redirect via window.location.replace() with no page flash.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 20:04:54 +01:00
popertotsandSisyphus 413b28b759 fix(login): redirect authenticated users before hydration
Uses a raw IIFE script in <svelte:head> that runs synchronously during HTML parsing, before Svelte hydration. Checks localStorage JWT and calls window.location.replace() for an instant redirect with no page flash.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 19:50:53 +01:00
popertotsandSisyphus ae1bc0f91a fix(login): redirect authenticated users before page render
Replaced -based redirect with +page.ts load function. Checks localStorage token directly and throws redirect(302) before the component mounts, preventing any flash of the login page.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 19:48:08 +01:00
popertotsandSisyphus f083da6345 fix(login): redirect authenticated users away from login page
Authenticated users visiting /login are immediately redirected: admins to /today, all others to /.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 19:46:36 +01:00
popertotsandSisyphus 6c16d65476 fix(frontend): Svelte 5 reactivity, each block keys, and path resolution
Add proper keys to #each blocks across 15+ components to fix reordering bugs. Replace new Date() with SvelteDate in reactive contexts. Use $derived for computed values (totalPages). Use resolve() from $app/paths for all internal navigation hrefs. Add ARIA labels and keyboard accessibility to NavBar mobile menu. Remove unused handleRetry from UserPaymentModal.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 01:08:36 +01:00
popertotsandSisyphus c76c3f52f7 feat(ui): loyalty stamp redesign and admin account restrictions
Redesigned fuchsia-themed loyalty stamp card with procedural SVG flower-petal stamps (unique shape per slot via sine-wave perturbation), star cutout mask, hover animations, and gradient background. Admin accounts now see simplified account page with History, Referral, Danger Zone tabs and loyalty stamp card hidden.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 01:07:43 +01:00
popertotsandSisyphus 4c26db81db feat(frontend): add MapLibre GL map components
Reusable Svelte map component library wrapping MapLibre GL JS: Map, MapMarker, MapControls, MapPopup, MapRoute, MapClusterLayer, MapArc, and supporting components. Features theme auto-detection, controlled/uncontrolled viewport, drag support, and context API. useMap hook provides reactive access. Integrated on contact page for salon location display.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 01:07:25 +01:00
popertotsandSisyphus 584c02ac6c feat(frontend): ImageVariant component and WASM encoder workers
Add client-side multi-format image encoding via Web Workers using @jsquash and @discourse/jxl libraries. ImageVariant Svelte component renders <picture> elements with format-aware fallback. Vite configured for WASM asset inclusion and encoder dependency exclusion. Portfolio page updated to use multi-format URLs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-04 01:07:00 +01:00
popertots bffb984ebb feat(auth,security,scheduling): JWT revocation, S3 fix, notes validation, docs, tests
- JWT revocation with JTI (UUID v4): in-memory tracking, POST /api/logout,
  refresh handler revokes old JTI, RequireAuth rejects revoked tokens
- Fix extractKey for S3 portfolio deletion: extracts full key path from URLs
  instead of just filename, preventing orphaned storage files
- Notes validation: max=1000000 on all 13 Notes fields across 4 booking structs
- CharCounter: grapheme-aware counter (Intl.Segmenter), threshold 750K,
  color-coded, integrated into 6 booking/admin components
- loginInProgress: timestamp-based tracking, 30s staleness, 20-entry cap (429),
  ticker cleanup for stuck entries
- Profile picture 15MB client-side limit, portfolio 20MB backend limit
- Exceptional scheduling: expand query start to Monday of week
- TodayCalendar: week-range fetching, closing time indicator, short-day lunch skip
- NavBar: link reorder, mobile burger badge, slide transition, backdrop
- ImageUpload: 20MB limit with visual feedback
- formatDateISO: shared YYYY-MM-DD utility, shouldApplyLunchProtection helper
- Update README.md and all Obsidian docs (Overview, Technical, Admin, Future Work)
- Add 28 new tests: JWT (11), auth handlers (7), portfolio extractKey (5),
  notes validation (5). go build + go vet clean with test,dev tags
2026-06-03 11:17:41 +01:00
popertots 169d7dc6e3 feat(scheduling,admin,today): week-range queries, file size limits, mobile nav UX
- Expand exceptional application query to Monday of start week
- Add 20MB file size limit with visual feedback in ImageUpload
- Reorder admin nav links, add burger badge, slide transition + backdrop
- Fetch week-range working/available hours, add closing time indicator
- Skip lunch protection for days <= 5h via shouldApplyLunchProtection
- Extract formatDateISO to shared utils
2026-06-03 10:22:16 +01:00
popertots 0de5128201 fix copy 2026-05-31 00:57:33 +01:00
popertotsandSisyphus 6e901690fd chore: apply project-wide formatting and UI library updates
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-29 20:23:14 +01:00
popertots ef650e013a feat: implement patch test management and validation improvements 2026-05-29 20:21:26 +01:00
popertots ddaa468a3e fix: correctly validate number inputs against null/NaN bypass in admin modals 2026-05-29 18:35:11 +01:00
popertots cf81916278 fix: safely enforce validation onblur for HolidayHours modal without dropping code 2026-05-29 18:28:13 +01:00
popertots 6625a3a699 fix: enforce derived validation onblur in patch tests modal to block invalid submissions 2026-05-29 18:24:03 +01:00
popertots 20bd3e3310 fix: add inputmode to number inputs across admin modals to enforce numeric keyboard on mobile 2026-05-29 18:20:30 +01:00
popertots c21a59d61d fix: validate Patch Test modal inputs 2026-05-29 18:12:39 +01:00
popertots 0750c7ac0e fix: deduplicate service list in PatchTestsManagement to prevent each_key_duplicate 2026-05-29 18:10:40 +01:00