Merged in feat/SW-1676-modify-contact-details-my-stay-anonymous (pull request #1468)
Feat/SW-1676 modify contact details my stay anonymous * feat(SW-1676): Modify guest details step 1 * feat(SW-1676) Integration to api to update guest details * feat(SW-1676) Reuse of old modal * feat(SW-1676) updated modify guest * feat(SW-1676) cleanup * feat(SW-1676) updated myStayReturnRoute to sessionStorage Approved-by: Niclas Edenvin
This commit is contained in:
@@ -3,18 +3,7 @@ import { create } from "zustand"
|
||||
interface RoomDetails {
|
||||
id: string
|
||||
roomName: string
|
||||
roomTypeCode: string
|
||||
rateDefinition: {
|
||||
breakfastIncluded: boolean
|
||||
cancellationRule: string | null
|
||||
cancellationText: string | null
|
||||
generalTerms: string[]
|
||||
isMemberRate: boolean
|
||||
mustBeGuaranteed: boolean
|
||||
rateCode: string | null
|
||||
title: string | null
|
||||
}
|
||||
isMainBooking?: boolean
|
||||
isCancelable: boolean
|
||||
}
|
||||
|
||||
interface MyStayRoomDetailsState {
|
||||
@@ -22,13 +11,10 @@ interface MyStayRoomDetailsState {
|
||||
|
||||
// Add a single room's details
|
||||
addRoomDetails: (room: RoomDetails) => void
|
||||
|
||||
// Get room details by confirmationNumber
|
||||
getRoomDetails: (confirmationNumber: string) => RoomDetails | undefined
|
||||
}
|
||||
|
||||
export const useMyStayRoomDetailsStore = create<MyStayRoomDetailsState>(
|
||||
(set, get) => ({
|
||||
(set) => ({
|
||||
rooms: [],
|
||||
|
||||
addRoomDetails: (room) => {
|
||||
@@ -50,9 +36,5 @@ export const useMyStayRoomDetailsStore = create<MyStayRoomDetailsState>(
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getRoomDetails: (confirmationNumber) => {
|
||||
return get().rooms.find((room) => room.id === confirmationNumber)
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user