tripstorekrabi-shared 1.12.2 → 1.12.4
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 +5 -4
- package/package.json +1 -1
package/booking.js
CHANGED
|
@@ -69,7 +69,8 @@ export function addBookingFromInvoice(firestore, admin, invoice, paymentData, co
|
|
|
69
69
|
omiseChargeId: "", invoiceNumber: "",
|
|
70
70
|
date: admin.firestore.FieldValue.serverTimestamp(),
|
|
71
71
|
createdBy: "Trip Store Krabi Next",
|
|
72
|
-
lastModified:
|
|
72
|
+
lastModified: dayjs().toDate(),
|
|
73
|
+
lastModifiedBy: "Trip Store Krabi Next"
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
if (item.startingPointId) {
|
|
@@ -126,13 +127,13 @@ export function addBookingFromInvoice(firestore, admin, invoice, paymentData, co
|
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
export function getOperatorSignature(agent, operatorName) {
|
|
130
|
+
export function getOperatorSignature(agent, operatorName, contact) {
|
|
130
131
|
let signature =
|
|
131
132
|
'<br><br>Warm regards,<br><br>' + (agent ? agent + ' - ' : "") + operatorName;
|
|
132
133
|
signature +=
|
|
133
|
-
|
|
134
|
+
`<br>WhatsApp chat: <a href='https://wa.me/${contact.respondNumber.replace(/\D/g, '')}'>${contact.respondNumber}</a>`;
|
|
134
135
|
signature +=
|
|
135
|
-
|
|
136
|
+
`<br>WhatsApp call: <a href='https://wa.me/${contact.whatsappNumber.replace(/\D/g, '')}'>${contact.whatsappNumber}</a>`;
|
|
136
137
|
signature +=
|
|
137
138
|
"<br>Telegram chat: <a href='https://t.me/tripstorekrabi_bot'>@tripstorekrabi_bot</a>";
|
|
138
139
|
return signature;
|