Commit Graph
103 Commits
Author SHA1 Message Date
popertots 294d844493 fix: replace {__} workaround with clean range() helper in Svelte templates 2026-07-11 12:50:13 +01:00
popertots d172adf392 fix: enable svelte a11y linting and fix violations 2026-07-11 12:41:10 +01:00
popertots 990c86495c fix: suppress unused nonDepositPaymentType in prod-staticcheck
CI / Docker compose check (push) Successful in 1m6s
CI / Env docs check (push) Successful in 1m6s
CI / Frontend deps check (push) Successful in 1m9s
CI / Frontend major deps (push) Failing after 1m9s
CI / Secrets scan (push) Successful in 1m9s
CI / Go build (push) Successful in 1m10s
CI / Frontend build (push) Successful in 1m10s
CI / Nginx config check (push) Successful in 1m12s
CI / Knip (push) Successful in 25s
CI / Go vet (prod) (push) Successful in 2m1s
CI / Frontend a11y check (push) Successful in 2m13s
CI / Go vet (dev) (push) Successful in 2m20s
CI / go mod tidy (push) Successful in 1m18s
CI / Staticcheck (prod) (push) Successful in 3m23s
CI / Staticcheck (dev) (push) Successful in 3m25s
CI / golangci-lint (push) Successful in 3m51s
CI / Frontend QC (audit) (push) Successful in 2m9s
CI / Security scan (prod) (push) Successful in 4m5s
CI / Security scan (dev) (push) Successful in 4m31s
CI / Go vulnerabilities (push) Successful in 2m22s
CI / Frontend QC (lint) (push) Failing after 1m11s
CI / Frontend QC (typecheck) (push) Successful in 1m21s
CI / Svelte strict check (push) Has been skipped
CI / Tests (prod) (push) Successful in 1m52s
CI / Tests (dev) (push) Failing after 2m12s
CI / Race (prod) (push) Successful in 3m31s
CI / Race (dev) (push) Successful in 5m0s
2026-07-10 13:00:33 +01:00
popertots 19d1d8dd47 fix: correct prop names in Svelte templates after a11y cleanup 2026-07-10 12:27:08 +01:00
popertots eed8814021 fix: remove unused variables from Svelte components 2026-07-10 11:58:42 +01:00
popertotsandSisyphus 92124158bf feat(frontend): add apiFetch wrapper for automatic auth token injection
Centralizes auth token management into a reusable apiFetch() helper and getAuthHeaders() utility, eliminating inline Bearer token logic across all frontend files.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-06 19:21:34 +01:00
popertots e831953e5b fix(ui): improve reservation lifecycle in BookingFlow
- Release reservation on service change, date change, and step-back navigation
- Add synchronous double-click payment guard (isProcessingPaymentSync)
- Immutable update for confirmedBooking to prevent race-condition overcharge
- Generate fresh idempotency key per submission attempt (was reused across
  component lifetime, causing stale-booking illusion on re-submit)
- Release reservation after successful booking submission
- Extract releaseReservation() helper for DRY reservation cleanup
- Race-condition guard in selectTimeWithValidation: pass clicked time
  explicitly so stale validation can't clobber a newer selection
2026-07-06 17:58:14 +01:00
popertotsandSisyphus 878624e6f2 fix: resolve eslint warnings and error
CI / Go vulnerabilities (push) Successful in 59s
CI / Tests (push) Has been cancelled
CI / Race detector (push) Has been cancelled
CI / Frontend lint & types (push) Has been cancelled
Remove unused eslint-disable directives in BookingCreateModal and GDPR page. Rename isMobile to _isMobile to match allowed unused vars pattern.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:39:55 +01:00
popertotsandSisyphus 9c0b189b73 style: fix prettier formatting in 3 admin files
CI / Go vulnerabilities (push) Successful in 34s
CI / Tests (push) Successful in 1m34s
CI / Frontend lint & types (push) Failing after 1m52s
CI / Race detector (push) Successful in 3m33s
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:30:42 +01:00
popertotsandSisyphus 5f1f6c4b44 style: standardise select styling in DiscountsManagement, HolidayHours, TodayCalendar
CI / Go vulnerabilities (push) Successful in 34s
CI / Frontend lint & types (push) Failing after 1m7s
CI / Tests (push) Successful in 1m29s
CI / Race detector (push) Successful in 3m25s
Update select element classes to consistent h-9, shadow-xs, bg-background, focus-visible ring styling.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:26:38 +01:00
popertotsandSisyphus 5616357269 style: standardise input styling in booking create, business settings, custom services, patch test, walk-in create
Update input element classes to consistent h-9, py-1, shadow-xs, focus-visible border-ring with ring-[3px] and ring-ring/50 for visual consistency across admin components.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:26:28 +01:00
popertotsandSisyphus b7fa22b018 refactor: accept defaultHours prop in WeeklySchedule and TimeBlockers
Add optional defaultHours prop to accept pre-fetched data from parent page. Standardise select element styling with shadow-xs, focus-visible ring, and consistent padding.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:26:18 +01:00
popertotsandSisyphus 56eda0ead5 refactor: accept services prop in PatchTestsManagement and ServicesManagement
Add optional services prop so the page can pass pre-fetched data, avoiding duplicate API calls. Fall back to self-fetching when prop is not provided.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-05 22:26:08 +01:00
popertots ac24d3f990 fix: reposition eslint-disable comments for goto() calls and any types
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 23s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 31s
2026-06-25 17:54:34 +01:00
popertots a5812018d8 style: fix prettier formatting in 3 files
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 23s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 1m6s
2026-06-25 17:28:42 +01:00
popertots 74a24c3ef1 fix: resolve remaining eslint errors — svelte-check, prettier, eslint all pass
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 23s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 38s
2026-06-25 17:24:07 +01:00
popertots bc7558cd39 style: run prettier format on 9 files
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 22s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 1m11s
2026-06-25 17:17:01 +01:00
popertots eb15a399ef fix: resolve all agent-induced errors — svelte-check, eslint, prettier pass
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 24s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 40s
- Fix <!-- svelte-ignore HTML comments in script sections (invalid JS)
- Fix catch err -> _err references across all files after renames
- Fix .writable (not in Svelte 5 stable) back to +
- Fix NavBar dynamic href links with proper eslint-disable in template
- Fix SvelteMap type params missing after Map->SvelteMap conversion
- Fix required->_required and onclose->_onclose prop mismatches
- Fix HolidayHours inline type mismatch, BookingCreateModal suppression
- Fix remaining pre-existing no-unused-vars with eslint-disable-next-line
- Revert fonts commit, run prettier format

svelte-check: 0 errors, eslint: 0 errors, prettier: clean
2026-06-25 17:10:49 +01:00
popertots e0f22e5c5c fix: revert agent damage — fix svelte-ignore comments, catch var refs, prop mismatches
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 23s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 30s
- Convert HTML comments in script sections to eslint-disable-next-line
- Fix err->_err references in catch blocks across 8 files
- Fix required→_required and onclose→_onclose prop mismatches
- Revert BookingCreateModal.svelte from no-unused-vars agent damage
- Fix broken regex in account page
- Fix .writable (not in Svelte 5 stable) back to +
- Fix NavBar dynamic href links with proper eslint-disable
2026-06-25 16:50:23 +01:00
popertots a099f84d1b style: fix no-unused-vars -- prefix unused catch bindings, remove dead code, suppress template-use false positives 2026-06-25 15:10:07 +01:00
popertots f3436ac37a style: fix no-navigation-without-resolve — add resolve() for SPA links, rel=external for target=_blank, suppress in event handlers and effects 2026-06-25 14:59:38 +01:00
popertots a8d04b77e2 style: fix no-explicit-any — replace with proper TypeScript types 2026-06-25 14:46:51 +01:00
popertots 6291d04b47 style: fix no-unused-props -- remove genuinely unused prop type fields from component interfaces 2026-06-25 14:44:10 +01:00
popertots 111baa27f9 style: fix require-each-key — add missing keys to all {#each} blocks 2026-06-25 14:42:19 +01:00
popertots 334b911e16 style: fix prefer-svelte-reactivity — replace with Svelte reactive equivalents 2026-06-25 14:40:22 +01:00
popertots 8a339b7810 style: fix no-unnecessary-state-wrap — SvelteDate is already reactive, remove redundant $state() 2026-06-25 14:34:25 +01:00
popertots 0dff41a4ee style: fix svelte/no-useless-mustaches — unwrap string literals from mustache expressions 2026-06-25 14:31:49 +01:00
popertots 4af2b8dfb4 style: fix prefer-const and prettier formatting issues
Backend CI / Tests (push) Failing after 1m41s
Backend CI / Lint & vulns (push) Failing after 2m26s
Backend CI / Race detector (push) Failing after 3m45s
2026-06-25 13:48:03 +01:00
popertots ad0ad253ad style: apply prettier formatting to frontend
Backend CI / Lint & vulns (push) Failing after 1m59s
Backend CI / Tests (push) Successful in 2m1s
Backend CI / Race detector (push) Failing after 4m0s
2026-06-25 13:26:26 +01:00
popertotsandSisyphus 4ac7768070 refactor(frontend): timezone-safe date handling with London-aware utilities
Introduce getLondonTodayCalendarDate(), parseWallClockDate(), and formatLocalDateTime() for reliable Europe/London timezone handling. Replace ad-hoc SvelteDate/new Date() usage with these utilities across all components and stores.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-24 23:43:58 +01:00
popertotsandSisyphus d71373c7f2 feat(frontend): add VAT breakdown, print receipt, and VAT indicators
Add print receipt feature to UserBookingModal with full VAT breakdown. Fix VAT rate display (remove double *100). Show VAT breakdown (net + VAT) on booking confirmed page. Add VAT info to EditBookingModal. Show incl. VAT label on BookingFlow total, schedule, and today dashboard. Add VAT note to prices page. Show booking total amount on account page. Improve VAT enable toast in BusinessSettings.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-22 17:06:38 +01:00
popertotsandSisyphus c4f1535ad4 feat(frontend): add BusinessSettings component to admin page
Add BusinessSettings component with edit modal for managing VAT, gift card, voucher and contact settings. Add BusinessSettings and UpdateBusinessSettingsRequest types.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-22 12:55:48 +01:00
popertotsandSisyphus 5523672b6a feat(frontend): add out-of-hours booking UI components
Add out_of_hours toggle, slot detection and badge to BookingCreateModal. Show out-of-hours badge on BookingModal detail view. Display warning banner on SelectedTimeSummary for out-of-hours slots. Highlight out-of-hours slots with red styling in TimeSlotList.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-22 12:55:40 +01:00
popertotsandSisyphus 1a3829b4d9 feat(frontend): add former name display, referral discount type, and refunds to bookings
Update frontend types, stores, and components to support name history display and new API fields.

- Add previousFirstName/previousLastName to User type and BookingUser type
- Add referral discount_source type and refunds array to Booking type
- Create nameDisplay.ts utility for rendering '(formerly ...)' labels
- Create booking.ts utility for booking-related helpers
- Update 25+ admin, payments, today, and account components to display
  former names on booking cards, modals, appointment views, and user lists

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-20 16:59:31 +01:00
popertotsandSisyphus b23a8b89c4 feat(frontend): update admin components
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-18 16:26:58 +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 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 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
popertots 6756723c60 saved cards store 2026-06-07 12:38:22 +01:00
popertots 9c6eeeb426 Fixes 2026-06-06 15:18:37 +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 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
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 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
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