Merged in feat/SW-1169-map-bedtype-icons (pull request #1113)

Feat/SW-1169 map bedtype icons

* feat(SW-1169): Added bed icons

* fix(SW-1169): update fill rule property

* fix(SW-1169): update clip rule prop

* feat(SW-1169): Added way of rendering bed type icons with extra beds

* feat(SW-1169): update room schema to map mainBed to enum

* feat(SW-1169): update bedtype icon color

* feat(SW-1169): transform unknown bed types to BedTypeEnum.Other

* test: update mock data with new schema


Approved-by: Christel Westerberg
This commit is contained in:
Tobias Johansson
2025-01-08 13:26:56 +00:00
parent 6fabfe2367
commit 1018b3ebcd
22 changed files with 454 additions and 50 deletions

View File

@@ -1,3 +1,16 @@
import {
ExtraBunkBedIcon,
ExtraPullOutBedIcon,
ExtraSofaBedIcon,
ExtraWallBedIcon,
KingBedIcon,
QueenBedIcon,
SingleBedIcon,
TwinBedsIcon,
} from "@/components/Icons"
import type { IconProps } from "@/types/components/icon"
export enum BookingStatusEnum {
BookingCompleted = "BookingCompleted",
Cancelled = "Cancelled",
@@ -101,3 +114,35 @@ export const PAYMENT_METHOD_ICONS: Record<
chinaUnionPay: "/_static/icons/payment/china-union-pay.svg",
discover: "/_static/icons/payment/discover.svg",
}
export enum BedTypeEnum {
King = "King",
Queen = "Queen",
Single = "Single",
Twin = "Twin",
Other = "Other",
}
export enum ExtraBedTypeEnum {
SofaBed = "SofaBed",
WallBed = "WallBed",
PullOutBed = "PullOutBed",
BunkBed = "BunkBed",
}
type BedTypes = keyof typeof BedTypeEnum | keyof typeof ExtraBedTypeEnum
export const BED_TYPE_ICONS: Record<
BedTypes,
(props: IconProps) => JSX.Element
> = {
King: KingBedIcon,
Queen: QueenBedIcon,
Single: SingleBedIcon,
Twin: TwinBedsIcon,
SofaBed: ExtraSofaBedIcon,
WallBed: ExtraWallBedIcon,
BunkBed: ExtraBunkBedIcon,
PullOutBed: ExtraPullOutBedIcon,
Other: SingleBedIcon,
}