feat(bookings): implement booking system and confirmation flow

Add database tables and repository for managing bookings
Create API endpoints for booking submission and capacity management
Update landing page to persist bookings before WhatsApp redirection
This commit is contained in:
2026-04-12 21:43:30 +08:00
parent 07e5d42005
commit 8541c4a2d1
17 changed files with 1585 additions and 92 deletions

18
server/utils/app-url.ts Normal file
View File

@@ -0,0 +1,18 @@
import type { H3Event } from 'h3'
import { getRequestURL } from 'h3'
export function getAppOrigin(event: H3Event) {
const config = useRuntimeConfig()
if (config.public.appUrl) {
return new URL(config.public.appUrl).origin
}
const url = getRequestURL(event)
return `${url.protocol}//${url.host}`
}
export function buildAppUrl(event: H3Event, path: string) {
return new URL(path, getAppOrigin(event)).toString()
}