You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Guillermo Pages 9c802ea2aa
continuous-integration/drone/push Build is passing Details
feat: migrate admin API clients to send locale/timezone headers
Migrated all admin API clients to automatically send X-Locale and X-Timezone headers
with every request for proper internationalization and timezone-aware operations.

Changes:
- Migrated slot-definitions.ts, materialisation.ts, courts.ts, booking-admin.ts to use apiFetch utility
- Added getLocaleHeaders() helper to admin-clubs.ts for SSR compatibility
- Added getSlotDefinitionPresets() endpoint to fetch localized preset metadata
- Updated slot-definitions types to support API-based preset loading
- Refactored GenerateSlotDefinitionsModal to fetch presets from API with localized titles/descriptions

Benefits:
- All API requests now include user's locale (e.g., en-US, fr-CH) for i18n
- Timezone-aware operations use browser's Intl.DateTimeFormat timezone
- Preset titles and descriptions are localized per user language
- Consistent header management across all admin endpoints

Technical Details:
- apiFetch extracts locale from URL pathname via getPathnameLocale()
- apiFetch automatically adds credentials: 'include' for session auth
- admin-clubs.ts uses manual headers for SSR cookie forwarding compatibility
- GenerateSlotDefinitionsModal shows loading state while fetching presets
1 month ago
..
app feat: migrate admin API clients to send locale/timezone headers 1 month ago
assets feat(phase-0): integrate admin clubs API with staging backend 1 month ago
components feat(bookings): add dry_run slot picker with live validation 1 month ago
config feat(phase-0): integrate admin clubs API with staging backend 1 month ago
constants feat(phase-0): integrate admin clubs API with staging backend 1 month ago
contexts feat(phase-0): integrate admin clubs API with staging backend 1 month ago
hooks feat(phase-0): integrate admin clubs API with staging backend 1 month ago
lib feat: migrate admin API clients to send locale/timezone headers 1 month ago
services feat(phase-0): integrate admin clubs API with staging backend 1 month ago
styles feat(phase-0): integrate admin clubs API with staging backend 1 month ago
types feat: migrate admin API clients to send locale/timezone headers 1 month ago
utils feat(phase-0): integrate admin clubs API with staging backend 1 month ago
index.css feat(phase-0): integrate admin clubs API with staging backend 1 month ago
middleware.ts fix(middleware): handle invalid locale values in Accept-Language header 1 month ago