Merged in fix/STAY-23-room-price (pull request #3529)
fix(STAY-23): don't strikethrough price if only one room is cancelled (multiroom) * fix(STAY-23): don't strikethrough price if only room is cancelled (multiroom) Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -4,16 +4,18 @@ import { useMyStayStore } from "@/stores/my-stay"
|
||||
|
||||
import Price from "../PriceType/Price"
|
||||
|
||||
import type { PriceType as _PriceType } from "@/types/components/hotelReservation/myStay/myStay"
|
||||
|
||||
export default function TotalPrice() {
|
||||
const { bookedRoom, totalPrice } = useMyStayStore((state) => ({
|
||||
bookedRoom: state.bookedRoom,
|
||||
totalPrice: state.totalPrice,
|
||||
}))
|
||||
const { bookedRoom, totalPrice, allRoomsAreCancelled } = useMyStayStore(
|
||||
(state) => ({
|
||||
bookedRoom: state.bookedRoom,
|
||||
totalPrice: state.totalPrice,
|
||||
allRoomsAreCancelled: state.allRoomsAreCancelled,
|
||||
})
|
||||
)
|
||||
|
||||
return (
|
||||
<Price
|
||||
isCancelled={bookedRoom.isCancelled}
|
||||
isCancelled={allRoomsAreCancelled}
|
||||
isMember={bookedRoom.rateDefinition.isMemberRate}
|
||||
price={totalPrice}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user