feat: add city/state/country to complex, new settings page with sidebar, and Biome linting
- Added city, state, and country optional fields to Complex model - Updated onboarding to include optional location fields - Created new settings page with sidebar navigation (Datos del Complejo, Canchas) - Replaced ESLint with Biome for frontend and backend linting - Added parallel dev script with concurrently - Migrated register-routes to use direct app.route() pattern
This commit is contained in:
@@ -1,38 +1,35 @@
|
||||
import { zValidator } from '@hono/zod-validator'
|
||||
import {
|
||||
createPublicBookingSchema,
|
||||
publicAvailabilityQuerySchema,
|
||||
} from '@repo/api-contract'
|
||||
import { Hono } from 'hono'
|
||||
import { z } from 'zod'
|
||||
import { createPublicBookingHandler } from '@/modules/public-booking/handlers/create-public-booking.handler'
|
||||
import { getPublicBookingConfirmationHandler } from '@/modules/public-booking/handlers/get-public-booking-confirmation.handler'
|
||||
import { listPublicAvailabilityHandler } from '@/modules/public-booking/handlers/list-public-availability.handler'
|
||||
import type { AppEnv } from '@/types/hono'
|
||||
import { createPublicBookingHandler } from '@/modules/public-booking/handlers/create-public-booking.handler';
|
||||
import { getPublicBookingConfirmationHandler } from '@/modules/public-booking/handlers/get-public-booking-confirmation.handler';
|
||||
import { listPublicAvailabilityHandler } from '@/modules/public-booking/handlers/list-public-availability.handler';
|
||||
import type { AppEnv } from '@/types/hono';
|
||||
import { zValidator } from '@hono/zod-validator';
|
||||
import { createPublicBookingSchema, publicAvailabilityQuerySchema } from '@repo/api-contract';
|
||||
import { Hono } from 'hono';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const publicBookingRoutes = new Hono<AppEnv>()
|
||||
const complexSlugParamsSchema = z.object({ complexSlug: z.string().trim().min(1) })
|
||||
export const publicBookingRoutes = new Hono<AppEnv>();
|
||||
const complexSlugParamsSchema = z.object({ complexSlug: z.string().trim().min(1) });
|
||||
const confirmationParamsSchema = z.object({
|
||||
complexSlug: z.string().trim().min(1),
|
||||
bookingCode: z.string().trim().min(6).max(8),
|
||||
})
|
||||
});
|
||||
|
||||
publicBookingRoutes.get(
|
||||
'/complex/:complexSlug/availability',
|
||||
zValidator('param', complexSlugParamsSchema),
|
||||
zValidator('query', publicAvailabilityQuerySchema),
|
||||
listPublicAvailabilityHandler,
|
||||
)
|
||||
listPublicAvailabilityHandler
|
||||
);
|
||||
|
||||
publicBookingRoutes.post(
|
||||
'/complex/:complexSlug',
|
||||
zValidator('param', complexSlugParamsSchema),
|
||||
zValidator('json', createPublicBookingSchema),
|
||||
createPublicBookingHandler,
|
||||
)
|
||||
createPublicBookingHandler
|
||||
);
|
||||
|
||||
publicBookingRoutes.get(
|
||||
'/complex/:complexSlug/confirmation/:bookingCode',
|
||||
zValidator('param', confirmationParamsSchema),
|
||||
getPublicBookingConfirmationHandler,
|
||||
)
|
||||
getPublicBookingConfirmationHandler
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user