feat(SW-453): Fixed new filter buttons and updated price in summary
This commit is contained in:
16
types/components/form/filterChip.ts
Normal file
16
types/components/form/filterChip.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
type FilterChipType = "checkbox" | "radio"
|
||||
|
||||
export interface FilterChipProps {
|
||||
Icon?: React.ElementType
|
||||
iconHeight?: number
|
||||
iconWidth?: number
|
||||
id?: string
|
||||
label: string
|
||||
name: string
|
||||
type: FilterChipType
|
||||
value?: string
|
||||
selected?: boolean
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
export type FilterChipCheckboxProps = Omit<FilterChipProps, "type">
|
||||
@@ -18,6 +18,7 @@ export type FlexibilityOptionProps = {
|
||||
priceInformation?: Array<string>
|
||||
roomType: RoomConfiguration["roomType"]
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
features: RoomConfiguration["features"]
|
||||
handleSelectRate: (rate: Rate) => void
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { RoomPackageData } from "./roomFilter"
|
||||
import { Rate } from "./selectRate"
|
||||
|
||||
export interface RateSummaryProps {
|
||||
rateSummary: Rate
|
||||
isUserLoggedIn: boolean
|
||||
packages: RoomPackageData
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import { RoomPackageData } from "./roomFilter"
|
||||
import { RoomSelectionProps } from "./roomSelection"
|
||||
|
||||
export interface RoomProps extends RoomSelectionProps {
|
||||
packages: RoomPackageData
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
RoomConfiguration,
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomPackageCodes } from "./roomFilter"
|
||||
import { Rate } from "./selectRate"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
|
||||
@@ -2,6 +2,11 @@ import { z } from "zod"
|
||||
|
||||
import { getRoomPackagesSchema } from "@/server/routers/hotels/schemas/packages"
|
||||
|
||||
export enum RoomPackageCodeEnum {
|
||||
PETR = "PETR",
|
||||
ALLG = "ALLG",
|
||||
ACCE = "ACCE",
|
||||
}
|
||||
export interface RoomFilterProps {
|
||||
numberOfRooms: number
|
||||
onFilter: (filter: Record<string, boolean | undefined>) => void
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomPackageData } from "./roomFilter"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
import { SafeUser } from "@/types/user"
|
||||
|
||||
@@ -7,4 +9,5 @@ export interface RoomSelectionProps {
|
||||
roomsAvailability: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
user: SafeUser
|
||||
packages: RoomPackageData
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ export interface Rate {
|
||||
priceName: string
|
||||
public: Product["productType"]["public"]
|
||||
member: Product["productType"]["member"]
|
||||
features: RoomConfiguration["features"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user