tripstorekrabi-shared 1.18.2 → 1.18.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/package.json +3 -3
  2. package/utils.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.18.2",
3
+ "version": "1.18.4",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "dayjs": "^1.11.13",
19
- "libphonenumber-js": "^1.11.8",
20
- "nanoid": "^5.0.7"
19
+ "libphonenumber-js": "^1.11.14",
20
+ "nanoid": "^5.0.8"
21
21
  },
22
22
  "scripts": {
23
23
  "deploy": "npm publish"
package/utils.js CHANGED
@@ -361,7 +361,12 @@ export function isNumeric(n) {
361
361
  export function getBookingSummary(booking, options = {}) {
362
362
  let summary = '';
363
363
  if (!options.excludeReferenceNumber) {
364
- summary += booking.referenceNumber;
364
+ if (options.html) {
365
+ summary += `<a href="https://hero.tripstorekrabi.com/Bookings/${booking.id}">${booking.referenceNumber}</a>`;
366
+ } else {
367
+ summary += booking.referenceNumber;
368
+ }
369
+
365
370
  if (booking.code) {
366
371
  summary += ', Code: ' + booking.code;
367
372
  }