tripstorekrabi-shared 1.16.3 → 1.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils.js +11 -14
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -19,6 +19,7 @@ export const NO_ROOM = 'NO ROOM';
|
|
|
19
19
|
export const IN_HOUSE = 'IN HOUSE';
|
|
20
20
|
export const CHECK_IN_LATE = 'CHECK-IN LATE';
|
|
21
21
|
export const ROOM_NUMBER_LIST = [NO_ROOM, IN_HOUSE, CHECK_IN_LATE];
|
|
22
|
+
export const NO_PICKUP_HOTEL_YET = "NO PICKUP HOTEL YET";
|
|
22
23
|
|
|
23
24
|
export const TRIPSTORE_AGENCYID_IN_PHAYUN = '2Z5NPZTmd62tm22q0RNB';
|
|
24
25
|
export const VIATOR_AGENCYID_IN_PHAYUN = 'eVxVUldoJhEiNUZyfcyt';
|
|
@@ -358,15 +359,7 @@ export function getBookingSummary(booking, options = {}) {
|
|
|
358
359
|
', ' +
|
|
359
360
|
booking.leadTraveller;
|
|
360
361
|
|
|
361
|
-
|
|
362
|
-
summary +=
|
|
363
|
-
', ' +
|
|
364
|
-
(isHotelPickup(booking.startingPointDescription) && booking.noHotelYet
|
|
365
|
-
? 'NO HOTEL YET'
|
|
366
|
-
: booking.startingPointDescription);
|
|
367
|
-
} else if (booking.noHotelYet) {
|
|
368
|
-
summary += ', NO HOTEL YET';
|
|
369
|
-
}
|
|
362
|
+
summary += ', ' + booking.startingPointDescription;
|
|
370
363
|
|
|
371
364
|
let hasHotelPickup = isHotelPickup(booking.startingPointDescription);
|
|
372
365
|
if (hasHotelPickup && booking.roomNumber?.length > 0) {
|
|
@@ -431,13 +424,17 @@ export function getItemSummary(item, product) {
|
|
|
431
424
|
item.startingPointId
|
|
432
425
|
).value;
|
|
433
426
|
if (isHotelPickup(startingPointDescription)) {
|
|
434
|
-
if (item.
|
|
427
|
+
if (item.startingPointDescription === NO_PICKUP_HOTEL_YET) {
|
|
435
428
|
summary += 'Hotel pickup (hotel not known yet)';
|
|
436
429
|
} else {
|
|
437
|
-
summary += 'Hotel pickup from ' + item.pickupHotel;
|
|
438
|
-
|
|
439
|
-
if (item.roomNumber) {
|
|
440
|
-
|
|
430
|
+
summary += 'Hotel pickup from the lobby of ' + item.pickupHotel;
|
|
431
|
+
|
|
432
|
+
if (item.roomNumber?.length > 0) {
|
|
433
|
+
if (ROOM_NUMBER_LIST.includes(item.roomNumber)) {
|
|
434
|
+
summary += ` (${item.roomNumber})`;
|
|
435
|
+
} else {
|
|
436
|
+
summary += ` (room ${item.roomNumber})`;
|
|
437
|
+
}
|
|
441
438
|
}
|
|
442
439
|
}
|
|
443
440
|
} else {
|