Merged in chore/move-enter-details (pull request #2778)

Chore/move enter details

Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-09-11 07:16:24 +00:00
parent 15711cb3a4
commit 7dee6d5083
238 changed files with 1656 additions and 1602 deletions

View File

@@ -1,8 +1,8 @@
"use client"
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
import type { LowestRoomPriceEvent } from "@scandic-hotels/common/tracking/types"
import type { LowestRoomPriceEvent } from "@scandic-hotels/tracking/types"
import type { BreakfastPackages } from "@scandic-hotels/trpc/routers/hotels/output"
export function trackLowestRoomPrice(event: LowestRoomPriceEvent) {

View File

@@ -1,5 +1,5 @@
"use client"
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
export function trackAccordionClick(option: string) {
trackEvent({

View File

@@ -1,4 +1,4 @@
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
export function trackSortingChangeEvent(sortOption: string) {
trackEvent({

View File

@@ -1,4 +1,4 @@
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
export function trackHotelMapClick() {
trackEvent({

View File

@@ -12,9 +12,9 @@ export {
trackSocialMediaClick,
} from "./navigation"
export { trackPaymentEvent, trackUpdatePaymentMethod } from "./payment"
export { trackClick } from "@scandic-hotels/common/tracking/base"
export { trackClick } from "@scandic-hotels/tracking/base"
export {
createSDKPageObject,
trackPageView,
trackPageViewStart,
} from "@scandic-hotels/common/tracking/pageview"
} from "@scandic-hotels/tracking/pageview"

View File

@@ -1,5 +1,5 @@
import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast"
import type { PackageSchema } from "@scandic-hotels/trpc/types/bookingConfirmation"
@@ -35,13 +35,17 @@ export function trackMyStayPageLink(ctaName: string) {
})
}
type LateArrivalGuarantee = "mandatory" | "yes" | "no" | "na"
export function trackGlaSaveCardAttempt(
hotelId: string,
savedCreditCard: CreditCard | undefined,
lateArrivalGuarantee: LateArrivalGuarantee
) {
export function trackGlaSaveCardAttempt({
hotelId,
hasSavedCreditCard,
creditCardType,
lateArrivalGuarantee,
}: {
hotelId: string
hasSavedCreditCard: boolean
creditCardType?: string
lateArrivalGuarantee: "mandatory" | "yes" | "no" | "na"
}) {
trackEvent({
event: "glaCardSaveAttempt",
hotelInfo: {
@@ -51,8 +55,8 @@ export function trackGlaSaveCardAttempt(
},
paymentInfo: {
status: "glacardsaveattempt",
isSavedCreditCard: !!savedCreditCard,
type: savedCreditCard?.cardType,
isSavedCreditCard: hasSavedCreditCard,
type: creditCardType,
},
})
}

View File

@@ -1,6 +1,6 @@
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
import type { TrackingPosition } from "@scandic-hotels/common/tracking/types"
import type { TrackingPosition } from "@scandic-hotels/tracking/types"
export function trackFooterClick(group: string, name: string) {
trackEvent({

View File

@@ -1,9 +1,9 @@
import { trackEvent } from "@scandic-hotels/common/tracking/base"
import { trackEvent } from "@scandic-hotels/tracking/base"
import type {
PaymentEvent,
PaymentFailEvent,
} from "@scandic-hotels/common/tracking/types"
} from "@scandic-hotels/tracking/types"
function isPaymentFailEvent(event: PaymentEvent): event is PaymentFailEvent {
return "errorMessage" in event