Merged in fix/SW-1879-aa-bed-breakfastpayment- (pull request #1888)
fix: SW-1879 Updated breakfast price to 0 and removed paymentSectionOpen tracking * fix: SW-1879 Updated breakfast price to 0 and removed paymentSectionOpen tracking Approved-by: Michael Zetterberg
This commit is contained in:
@@ -15,7 +15,6 @@ import PaymentOption from "@/components/HotelReservation/PaymentOption"
|
|||||||
import Modal from "@/components/Modal"
|
import Modal from "@/components/Modal"
|
||||||
import Divider from "@/components/TempDesignSystem/Divider"
|
import Divider from "@/components/TempDesignSystem/Divider"
|
||||||
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
||||||
import { trackPaymentSectionOpen } from "@/utils/tracking/booking"
|
|
||||||
|
|
||||||
import PaymentOptionsGroup from "../Payment/PaymentOptionsGroup"
|
import PaymentOptionsGroup from "../Payment/PaymentOptionsGroup"
|
||||||
import TermsAndConditions from "../Payment/TermsAndConditions"
|
import TermsAndConditions from "../Payment/TermsAndConditions"
|
||||||
@@ -42,16 +41,7 @@ export default function ConfirmBooking({
|
|||||||
<div className={styles.guaranteeContainer}>
|
<div className={styles.guaranteeContainer}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<div className={styles.checkbox}>
|
<div className={styles.checkbox}>
|
||||||
<Checkbox
|
<Checkbox name="guarantee" />
|
||||||
name="guarantee"
|
|
||||||
registerOptions={{
|
|
||||||
onChange: (e) => {
|
|
||||||
if (e.target.value) {
|
|
||||||
trackPaymentSectionOpen()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
<Typography variant="Body/Paragraph/mdBold">
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ import Input from "@/components/TempDesignSystem/Form/Input"
|
|||||||
import Phone from "@/components/TempDesignSystem/Form/Phone"
|
import Phone from "@/components/TempDesignSystem/Form/Phone"
|
||||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||||
import { useRoomContext } from "@/contexts/Details/Room"
|
import { useRoomContext } from "@/contexts/Details/Room"
|
||||||
import { trackPaymentSectionOpen } from "@/utils/tracking/booking"
|
|
||||||
|
|
||||||
import { hasPrepaidRate } from "../../Payment/helpers"
|
|
||||||
import JoinScandicFriendsCard from "./JoinScandicFriendsCard"
|
import JoinScandicFriendsCard from "./JoinScandicFriendsCard"
|
||||||
import { getMultiroomDetailsSchema } from "./schema"
|
import { getMultiroomDetailsSchema } from "./schema"
|
||||||
|
|
||||||
@@ -99,8 +97,6 @@ export default function Details() {
|
|||||||
const guestIsGoingToJoin = methods.watch("join")
|
const guestIsGoingToJoin = methods.watch("join")
|
||||||
const guestIsMember = methods.watch("membershipNo")
|
const guestIsMember = methods.watch("membershipNo")
|
||||||
|
|
||||||
const hasPrepaidRates = rooms.some(hasPrepaidRate)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormProvider {...methods}>
|
<FormProvider {...methods}>
|
||||||
<form
|
<form
|
||||||
@@ -190,11 +186,6 @@ export default function Details() {
|
|||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
size="Medium"
|
size="Medium"
|
||||||
type="submit"
|
type="submit"
|
||||||
onPress={
|
|
||||||
isPaymentNext && canProceedToPayment && hasPrepaidRates
|
|
||||||
? trackPaymentSectionOpen
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{isPaymentNext
|
{isPaymentNext
|
||||||
? intl.formatMessage({
|
? intl.formatMessage({
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import Input from "@/components/TempDesignSystem/Form/Input"
|
|||||||
import Phone from "@/components/TempDesignSystem/Form/Phone"
|
import Phone from "@/components/TempDesignSystem/Form/Phone"
|
||||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||||
import { useRoomContext } from "@/contexts/Details/Room"
|
import { useRoomContext } from "@/contexts/Details/Room"
|
||||||
import { trackPaymentSectionOpen } from "@/utils/tracking/booking"
|
|
||||||
|
|
||||||
import JoinScandicFriendsCard from "./JoinScandicFriendsCard"
|
import JoinScandicFriendsCard from "./JoinScandicFriendsCard"
|
||||||
import { guestDetailsSchema, signedInDetailsSchema } from "./schema"
|
import { guestDetailsSchema, signedInDetailsSchema } from "./schema"
|
||||||
@@ -163,11 +162,6 @@ export default function Details({ user }: DetailsProps) {
|
|||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
size="Medium"
|
size="Medium"
|
||||||
type="submit"
|
type="submit"
|
||||||
onPress={
|
|
||||||
isPaymentNext && canProceedToPayment && !room.isFlexRate
|
|
||||||
? trackPaymentSectionOpen
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{isPaymentNext
|
{isPaymentNext
|
||||||
? intl.formatMessage({
|
? intl.formatMessage({
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export function trackBreakfastSelection({
|
|||||||
productCategory: "",
|
productCategory: "",
|
||||||
productId: breakfastPackage.code,
|
productId: breakfastPackage.code,
|
||||||
productUnits: units,
|
productUnits: units,
|
||||||
productPrice: breakfastPackage.localPrice.price,
|
productPrice: units > 0 ? breakfastPackage.localPrice.price : 0,
|
||||||
productPoints: 0,
|
productPoints: 0,
|
||||||
productType: "food",
|
productType: "food",
|
||||||
productName: breakfastPackage.packageType,
|
productName: breakfastPackage.packageType,
|
||||||
@@ -65,16 +65,3 @@ export function trackBreakfastSelection({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function trackPaymentSectionOpen() {
|
|
||||||
trackEvent({
|
|
||||||
event: "paymentSectionOpen",
|
|
||||||
selection: {
|
|
||||||
name: "payment section open",
|
|
||||||
},
|
|
||||||
pageInfo: {
|
|
||||||
pageName: "hotelreservation|payment",
|
|
||||||
pageType: "bookingpaymentpage",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user