tripstorekrabi-shared 1.25.1 → 1.25.2
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 +9 -10
- package/package.json +1 -1
package/booking.js
CHANGED
|
@@ -177,34 +177,33 @@ export function addBookingFromInvoice(
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export function getOperatorSignature(
|
|
181
|
-
|
|
182
|
-
let signature = `<br><br>Warm regards,<br><br>${namePrefix}${operatorName}`;
|
|
180
|
+
export function getOperatorSignature(operatorName, contact) {
|
|
181
|
+
let signature = `<br><br>Warm regards,<br><br><strong>${operatorName}</strong><br>`;
|
|
183
182
|
|
|
184
183
|
if (contact && contact.phoneNumber) {
|
|
185
184
|
const cleanPhone = contact.phoneNumber.replace(/[^\d+]/g, '');
|
|
186
|
-
signature += `<br
|
|
185
|
+
signature += `<br>📞 Phone: <a href="tel:${cleanPhone}">Call our office</a>`;
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
if (contact && contact.email) {
|
|
190
|
-
signature += `<br
|
|
189
|
+
signature += `<br>✉️ Email: <a href="mailto:${contact.email}">Send email</a>`;
|
|
191
190
|
}
|
|
192
191
|
|
|
193
192
|
if (contact && contact.respondNumber) {
|
|
194
193
|
const cleanRespond = contact.respondNumber.replace(/\D/g, '');
|
|
195
|
-
signature += `<br
|
|
194
|
+
signature += `<br>💬 WhatsApp: <a href="https://wa.me/${cleanRespond}">Chat on WhatsApp</a>`;
|
|
196
195
|
}
|
|
197
196
|
|
|
198
197
|
if (contact && contact.whatsappNumber) {
|
|
199
198
|
const cleanWhatsapp = contact.whatsappNumber.replace(/\D/g, '');
|
|
200
|
-
signature += `<br
|
|
199
|
+
signature += `<br>💬 WhatsApp: <a href="https://wa.me/${cleanWhatsapp}">Call on WhatsApp</a>`;
|
|
201
200
|
}
|
|
202
201
|
|
|
203
|
-
signature += `<br
|
|
202
|
+
signature += `<br>✈️ Telegram: <a href="https://t.me/tripstorekrabi_bot">Chat in Telegram</a>`;
|
|
204
203
|
|
|
205
|
-
signature += `<br
|
|
204
|
+
signature += `<br>🟢 LINE: <a href="line://ti/p/@cjs7975w">Chat on LINE</a>`;
|
|
206
205
|
|
|
207
|
-
signature += `<br
|
|
206
|
+
signature += `<br>📘 Facebook: <a href="https://m.me/tripstorekrabi">Message on Facebook</a>`;
|
|
208
207
|
|
|
209
208
|
return signature;
|
|
210
209
|
}
|