tripstorekrabi-shared 1.13.63 → 1.13.64
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 +25 -27
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -353,41 +353,39 @@ export function getBookingSummary(booking, options = {}) {
|
|
|
353
353
|
export function getItemSummary(item, product) {
|
|
354
354
|
let summary = item.description;
|
|
355
355
|
|
|
356
|
-
if (
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
356
|
+
if (item.departureDate) {
|
|
357
|
+
summary += ", " + dayjs(item.departureDate).tz("Asia/Bangkok").format("DD.MM.YYYY");
|
|
358
|
+
}
|
|
360
359
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
360
|
+
if (item.schedule) {
|
|
361
|
+
summary += ", " + item.schedule;
|
|
362
|
+
}
|
|
364
363
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
if (item.adults || item.children || item.infants) {
|
|
365
|
+
summary += ", " + formatPeople(item) + ", ";
|
|
366
|
+
}
|
|
368
367
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
368
|
+
if (item.startingPointId) {
|
|
369
|
+
let startingPointDescription = findStartingPoint(product, item.startingPointId).value;
|
|
370
|
+
if (isHotelPickup(startingPointDescription)) {
|
|
371
|
+
if (item.noHotelYet === true) {
|
|
372
|
+
summary += "Hotel pickup (hotel not known yet)";
|
|
373
|
+
} else {
|
|
374
|
+
summary += "Hotel pickup from " + item.pickupHotel;
|
|
376
375
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
376
|
+
if (item.roomNumber) {
|
|
377
|
+
summary += ` (${item.roomNumber})`;
|
|
380
378
|
}
|
|
381
|
-
} else {
|
|
382
|
-
summary += startingPointDescription;
|
|
383
379
|
}
|
|
380
|
+
} else {
|
|
381
|
+
summary += startingPointDescription;
|
|
384
382
|
}
|
|
383
|
+
}
|
|
385
384
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
385
|
+
if (item.endPointId) {
|
|
386
|
+
let endPointDescription = findEndPoint(product, item.endPointId).value;
|
|
387
|
+
if (isHotelDropOff(endPointDescription) && item.dropoffHotel) {
|
|
388
|
+
summary += ", Hotel drop-off at " + item.dropoffHotel;
|
|
391
389
|
}
|
|
392
390
|
}
|
|
393
391
|
|