feat(SW-2084) logic to disable Manage stay options * feat(SW-2084) logic to disable Manage stay options * feat(SW-2084) cleanup logic for checks * feat(SW-2084) check if date has passed * feat(SW-2084) change to datetimeIsInThePast Approved-by: Niclas Edenvin
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
"use client"
|
|
|
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons"
|
|
|
|
import useSidePeekStore from "@/stores/sidepeek"
|
|
|
|
import Button from "@/components/TempDesignSystem/Button"
|
|
|
|
import styles from "./toggleSidePeek.module.css"
|
|
|
|
import { SidePeekEnum } from "@/types/components/hotelReservation/sidePeek"
|
|
import type { ToggleSidePeekProps } from "@/types/components/hotelReservation/toggleSidePeekProps"
|
|
|
|
export default function ToggleSidePeek({
|
|
hotelId,
|
|
roomTypeCode,
|
|
user,
|
|
confirmationNumber,
|
|
}: ToggleSidePeekProps) {
|
|
const openSidePeek = useSidePeekStore((state) => state.openSidePeek)
|
|
|
|
return (
|
|
<Button
|
|
onClick={() =>
|
|
openSidePeek({
|
|
key: SidePeekEnum.bookedRoomDetails,
|
|
hotelId,
|
|
roomTypeCode,
|
|
user,
|
|
confirmationNumber,
|
|
})
|
|
}
|
|
size="small"
|
|
variant="icon"
|
|
intent="text"
|
|
wrapping
|
|
>
|
|
<div className={styles.iconContainer}>
|
|
<MaterialIcon icon="pan_zoom" color="CurrentColor" />
|
|
</div>
|
|
</Button>
|
|
)
|
|
}
|