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.
Files changed (2) hide show
  1. package/booking.js +5 -4
  2. 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: `${dayjs().format("DD.MM.YYYY HH:mm.ss")} by Trip Store Krabi Next`,
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
- "<br>WhatsApp chat: <a href='https://wa.me/66840679979'>+66 (0) 840 679 979</a>";
134
+ `<br>WhatsApp chat: <a href='https://wa.me/${contact.respondNumber.replace(/\D/g, '')}'>${contact.respondNumber}</a>`;
134
135
  signature +=
135
- "<br>WhatsApp call: <a href='https://wa.me/66967215940'>+66 (0) 967 215 940</a>";
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.12.2",
3
+ "version": "1.12.4",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {