feat: add desktop ui to calendar

This commit is contained in:
Simon Emanuelsson
2024-08-23 16:17:35 +02:00
parent a5dff7b97d
commit 99b14304d4
17 changed files with 405 additions and 177 deletions

View File

@@ -30,6 +30,7 @@
height: 24px;
outline: none;
position: relative;
width: 100%;
z-index: 2;
}

View File

@@ -33,10 +33,10 @@ export default function FormContent({
</div>
<div className={styles.when}>
<Caption color="red" textTransform="bold">
{nights}{" "}
{nights > 1
? intl.formatMessage({ id: "nights" })
: intl.formatMessage({ id: "night" })}
{intl.formatMessage(
{ id: "booking.nights" },
{ totalNights: nights }
)}
</Caption>
<DatePicker />
</div>

View File

@@ -3,8 +3,9 @@ import { z } from "zod"
import type { Location } from "@/types/trpc/routers/hotel/locations"
export const bookingWidgetSchema = z.object({
search: z.string({ coerce: true }).min(1, "Required"),
bookingCode: z.string(), // Update this as required when working with booking codes component
date: z.object({
// Update this as required once started working with Date picker in Nights component
from: z.string(),
to: z.string(),
}),
@@ -23,9 +24,7 @@ export const bookingWidgetSchema = z.object({
},
{ message: "Required" }
),
bookingCode: z.string(), // Update this as required when working with booking codes component
redemption: z.boolean().default(false),
voucher: z.boolean().default(false),
rooms: z.array(
// This will be updated when working in guests component
z.object({
@@ -38,4 +37,6 @@ export const bookingWidgetSchema = z.object({
),
})
),
search: z.string({ coerce: true }).min(1, "Required"),
voucher: z.boolean().default(false),
})