tripstorekrabi-shared 1.15.5 → 1.15.7

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/booking.js +5 -8
  2. package/package.json +2 -2
package/booking.js CHANGED
@@ -51,14 +51,6 @@ export function addBookingFromInvoice(
51
51
  }
52
52
 
53
53
  let notes = {};
54
- if (item.dietary) {
55
- notes[nanoid()] = {
56
- description: item.dietary.trim(),
57
- visibility: [CUSTOMER_NOTE, OPERATOR_NOTE],
58
- lastModified: dayjs().toDate(),
59
- lastModifiedBy: 'Trip Store Krabi Next',
60
- };
61
- }
62
54
 
63
55
  if (comment) {
64
56
  notes[nanoid()] = {
@@ -104,6 +96,7 @@ export function addBookingFromInvoice(
104
96
  startingPointDescription: '',
105
97
  pickupHotel: item.pickupHotel ?? null,
106
98
  roomNumber: item.roomNumber ?? '',
99
+ dietary: item.dietary ?? "",
107
100
  flight: item.flight ?? null,
108
101
  train: item.train ?? null,
109
102
  customerPaymentStatus: 'Paid',
@@ -310,6 +303,10 @@ export function getStartingPointMessage(booking, product) {
310
303
  text += '\n\nIMPORTANT INFORMATION: ' + product.customerInformation;
311
304
  }
312
305
 
306
+ if (booking.dietary?.length > 0) {
307
+ text += '\n\DIETARY NEEDS: ' + booking.dietary;
308
+ }
309
+
313
310
  let payOnTour = [];
314
311
  if (booking.nationalParkFee == PAY_ON_TOUR) {
315
312
  let item = 'As stated on the website, there is an entrance fee';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.15.5",
3
+ "version": "1.15.7",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "dayjs": "^1.11.10",
19
- "nanoid": "^5.0.6"
19
+ "nanoid": "^5.0.7"
20
20
  },
21
21
  "scripts": {
22
22
  "deploy": "npm publish"