Merged in fix/SW-3198-prices-select-rate (pull request #2763)
fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate * fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate * fix(SW-3198): remove additonalcost if calculating cost per room * fix(SW-3198): include bookingcode in specialrate * fix(SW-3198): remove console log * fix(SW-3198): add or operator * fix(SW-3198): capture total return value * fix(SW-3198): rename and move function Approved-by: Joakim Jäderberg Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -20,12 +20,12 @@ import styles from "./bottomSheet.module.css"
|
||||
|
||||
interface SummaryBottomSheetProps
|
||||
extends PropsWithChildren<{
|
||||
isMember: boolean
|
||||
isUserLoggedIn: boolean
|
||||
}> {}
|
||||
|
||||
export default function SummaryBottomSheet({
|
||||
children,
|
||||
isMember,
|
||||
isUserLoggedIn,
|
||||
}: SummaryBottomSheetProps) {
|
||||
const intl = useIntl()
|
||||
const scrollY = useRef(0)
|
||||
@@ -68,7 +68,7 @@ export default function SummaryBottomSheet({
|
||||
const containsBookingCodeRate = rooms.find(
|
||||
(r) => r && isBookingCodeRate(r.room.roomRate)
|
||||
)
|
||||
const showDiscounted = containsBookingCodeRate || isMember
|
||||
const showDiscounted = containsBookingCodeRate || isUserLoggedIn
|
||||
|
||||
return (
|
||||
<div className={styles.wrapper} data-open={isSummaryOpen}>
|
||||
@@ -103,13 +103,15 @@ export default function SummaryBottomSheet({
|
||||
</Typography>
|
||||
{showDiscounted && totalPrice.local.regularPrice ? (
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<s className={styles.strikeThroughRate}>
|
||||
{formatPrice(
|
||||
intl,
|
||||
totalPrice.local.regularPrice,
|
||||
totalPrice.local.currency
|
||||
)}
|
||||
</s>
|
||||
<p>
|
||||
<s className={styles.strikeThroughRate}>
|
||||
{formatPrice(
|
||||
intl,
|
||||
totalPrice.local.regularPrice,
|
||||
totalPrice.local.currency
|
||||
)}
|
||||
</s>
|
||||
</p>
|
||||
</Typography>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import styles from "./mobile.module.css"
|
||||
|
||||
import type { SummaryProps } from "@/types/components/hotelReservation/summary"
|
||||
|
||||
export default function MobileSummary({ isMember }: SummaryProps) {
|
||||
export default function MobileSummary({ isUserLoggedIn }: SummaryProps) {
|
||||
const { isSummaryOpen, toggleSummaryOpen } = useEnterDetailsStore(
|
||||
(state) => ({
|
||||
isSummaryOpen: state.isSummaryOpen,
|
||||
@@ -29,7 +29,7 @@ export default function MobileSummary({ isMember }: SummaryProps) {
|
||||
}))
|
||||
|
||||
const showPromo =
|
||||
!isMember &&
|
||||
!isUserLoggedIn &&
|
||||
rooms.length === 1 &&
|
||||
!rooms[0].room.guest.join &&
|
||||
!rooms[0].room.guest.membershipNo
|
||||
@@ -51,12 +51,12 @@ export default function MobileSummary({ isMember }: SummaryProps) {
|
||||
/>
|
||||
)}
|
||||
|
||||
<SummaryBottomSheet isMember={isMember}>
|
||||
<SummaryBottomSheet isUserLoggedIn={isUserLoggedIn}>
|
||||
<div className={styles.wrapper}>
|
||||
<SummaryUI
|
||||
booking={booking}
|
||||
rooms={rooms}
|
||||
isMember={isMember}
|
||||
isUserLoggedIn={isUserLoggedIn}
|
||||
totalPrice={totalPrice}
|
||||
vat={vat}
|
||||
toggleSummaryOpen={toggleSummaryOpen}
|
||||
|
||||
Reference in New Issue
Block a user