tripstorekrabi-shared 1.13.69 → 1.13.70
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/booking.js +10 -3
- package/package.json +1 -1
package/booking.js
CHANGED
|
@@ -8,6 +8,11 @@ dayjs.extend(advancedFormat);
|
|
|
8
8
|
dayjs.extend(utc);
|
|
9
9
|
dayjs.extend(timezone);
|
|
10
10
|
|
|
11
|
+
export let OPERATOR_NOTE = 'Operator';
|
|
12
|
+
export let CUSTOMER_NOTE = 'Customer';
|
|
13
|
+
export const NOTES = [OPERATOR_NOTE, CUSTOMER_NOTE];
|
|
14
|
+
export const MAX_NOTES = 10;
|
|
15
|
+
|
|
11
16
|
const PHONE_REGEXP = /[^\d+]/g;
|
|
12
17
|
|
|
13
18
|
export function addBookingFromInvoice(
|
|
@@ -252,9 +257,11 @@ export function getStartingPointMessage(booking, product) {
|
|
|
252
257
|
text += '\n\nWHAT TO BRING: ' + product.whatToBring;
|
|
253
258
|
}
|
|
254
259
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
260
|
+
let notes = Object.values(booking.notes ?? {})
|
|
261
|
+
.filter((item) => item.visibility.includes(CUSTOMER_NOTE))
|
|
262
|
+
.map((item) => item.description);
|
|
263
|
+
if (notes.length > 0) {
|
|
264
|
+
text += '\n\nSPECIAL CUSTOMER NEEDS: ' + notes.join(', ');
|
|
258
265
|
}
|
|
259
266
|
|
|
260
267
|
if (product?.customerInformation?.length > 0) {
|