tripstorekrabi-shared 1.16.4 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils.js +10 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/utils.js CHANGED
@@ -359,15 +359,7 @@ export function getBookingSummary(booking, options = {}) {
359
359
  ', ' +
360
360
  booking.leadTraveller;
361
361
 
362
- if (booking.startingPointDescription) {
363
- summary +=
364
- ', ' +
365
- (isHotelPickup(booking.startingPointDescription) && booking.noHotelYet
366
- ? 'NO HOTEL YET'
367
- : booking.startingPointDescription);
368
- } else if (booking.noHotelYet) {
369
- summary += ', NO HOTEL YET';
370
- }
362
+ summary += ', ' + booking.startingPointDescription;
371
363
 
372
364
  let hasHotelPickup = isHotelPickup(booking.startingPointDescription);
373
365
  if (hasHotelPickup && booking.roomNumber?.length > 0) {
@@ -432,13 +424,17 @@ export function getItemSummary(item, product) {
432
424
  item.startingPointId
433
425
  ).value;
434
426
  if (isHotelPickup(startingPointDescription)) {
435
- if (item.noHotelYet === true) {
427
+ if (item.startingPointDescription === NO_PICKUP_HOTEL_YET) {
436
428
  summary += 'Hotel pickup (hotel not known yet)';
437
429
  } else {
438
- summary += 'Hotel pickup from ' + item.pickupHotel;
439
-
440
- if (item.roomNumber) {
441
- summary += ` (${item.roomNumber})`;
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
+ }
442
438
  }
443
439
  }
444
440
  } else {