tripstorekrabi-shared 1.24.8 → 1.25.0
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 +22 -4
- package/package.json +1 -1
package/booking.js
CHANGED
|
@@ -57,7 +57,7 @@ export function addBookingFromInvoice(
|
|
|
57
57
|
description: comment.trim(),
|
|
58
58
|
visibility: [],
|
|
59
59
|
lastModified: dayjs().toDate(),
|
|
60
|
-
lastModifiedBy: '
|
|
60
|
+
lastModifiedBy: 'System Auto-generated'
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -66,7 +66,26 @@ export function addBookingFromInvoice(
|
|
|
66
66
|
description: invoice.comment.trim(),
|
|
67
67
|
visibility: [],
|
|
68
68
|
lastModified: dayjs().toDate(),
|
|
69
|
-
lastModifiedBy: '
|
|
69
|
+
lastModifiedBy: 'System Auto-generated'
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (invoice.message) {
|
|
74
|
+
notes[nanoid()] = {
|
|
75
|
+
description: invoice.message.trim(),
|
|
76
|
+
visibility: ['Customer'],
|
|
77
|
+
lastModified: dayjs().toDate(),
|
|
78
|
+
lastModifiedBy: 'System Auto-generated'
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (item.comment) {
|
|
83
|
+
notes[nanoid()] = {
|
|
84
|
+
description: item.comment.trim(),
|
|
85
|
+
visibility: [],
|
|
86
|
+
important: true,
|
|
87
|
+
lastModified: dayjs().toDate(),
|
|
88
|
+
lastModifiedBy: 'System Auto-generated'
|
|
70
89
|
};
|
|
71
90
|
}
|
|
72
91
|
|
|
@@ -161,8 +180,7 @@ export function addBookingFromInvoice(
|
|
|
161
180
|
export function getOperatorSignature(agent, operatorName, contact) {
|
|
162
181
|
let signature =
|
|
163
182
|
'<br><br>Warm regards,<br><br>' +
|
|
164
|
-
(agent ? agent + ' - ' : '') +
|
|
165
|
-
(operatorName === "Siam Adventure World" ? "Trip Store Krabi" : operatorName);
|
|
183
|
+
(agent ? agent + ' - ' : '') + operatorName;
|
|
166
184
|
signature += `<br>WhatsApp chat: <a href='https://wa.me/${contact.respondNumber.replace(
|
|
167
185
|
/\D/g,
|
|
168
186
|
''
|