Merged in fix/SW-2764-remove-ancillaries-breakfast-selection (pull request #2122)

fix(SW-2764): Tracking - remove ancillaries array if no breakfast selected

* fix(SW-2764): remove ancillaries array if no breakfast selected


Approved-by: Tobias Johansson
Approved-by: Joakim Jäderberg
This commit is contained in:
Bianca Widstam
2025-05-16 11:42:56 +00:00
committed by Joakim Jäderberg
parent f40a666170
commit 24e7ab4b71

View File

@@ -47,18 +47,20 @@ export function trackBreakfastSelection({
selection: { selection: {
name: "breakfast options selection click", name: "breakfast options selection click",
}, },
ancillaries: [ ...(units > 0 && {
{ ancillaries: [
hotelId: hotelId, {
productCategory: "", hotelId,
productId: breakfastPackage.code, productCategory: "",
productUnits: units, productId: breakfastPackage.code,
productPrice: units > 0 ? breakfastPackage.localPrice.price * units : 0, productUnits: units,
productPoints: 0, productPrice: breakfastPackage.localPrice.price * units,
productType: "food", productPoints: 0,
productName: breakfastPackage.packageType, productType: "food",
}, productName: breakfastPackage.packageType,
], },
],
}),
pageInfo: { pageInfo: {
pageName: "hotelreservation|breakfast", pageName: "hotelreservation|breakfast",
pageType: "bookingbreakfastpage", pageType: "bookingbreakfastpage",