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 Price from "../PriceType/Price"
|
||||||
|
|
||||||
import type { PriceType as _PriceType } from "@/types/components/hotelReservation/myStay/myStay"
|
|
||||||
|
|
||||||
export default function TotalPrice() {
|
export default function TotalPrice() {
|
||||||
const { bookedRoom, totalPrice } = useMyStayStore((state) => ({
|
const { bookedRoom, totalPrice, allRoomsAreCancelled } = useMyStayStore(
|
||||||
bookedRoom: state.bookedRoom,
|
(state) => ({
|
||||||
totalPrice: state.totalPrice,
|
bookedRoom: state.bookedRoom,
|
||||||
}))
|
totalPrice: state.totalPrice,
|
||||||
|
allRoomsAreCancelled: state.allRoomsAreCancelled,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Price
|
<Price
|
||||||
isCancelled={bookedRoom.isCancelled}
|
isCancelled={allRoomsAreCancelled}
|
||||||
isMember={bookedRoom.rateDefinition.isMemberRate}
|
isMember={bookedRoom.rateDefinition.isMemberRate}
|
||||||
price={totalPrice}
|
price={totalPrice}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user