tripstorekrabi-shared 1.18.8 → 1.18.9

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 +2 -2
  2. package/utils.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.18.8",
3
+ "version": "1.18.9",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "dayjs": "^1.11.13",
19
19
  "libphonenumber-js": "^1.11.15",
20
- "nanoid": "^5.0.8"
20
+ "nanoid": "^5.0.9"
21
21
  },
22
22
  "scripts": {
23
23
  "deploy": "npm publish"
package/utils.js CHANGED
@@ -446,8 +446,16 @@ export function getBookingSummary(booking, options = {}) {
446
446
  summary += ')';
447
447
  }
448
448
  }
449
+
450
+ if (options.showPhoneNumber && booking.phoneNumber?.length > 0) {
451
+ summary += ` - ${booking.phoneNumber}`;
452
+ }
449
453
  } else {
450
454
  summary += '«THE BOOKING IS INCOMPLETE»';
455
+
456
+ if (options.showPhoneNumber && booking.phoneNumber?.length > 0) {
457
+ summary += ` - ${booking.phoneNumber}`;
458
+ }
451
459
  }
452
460
 
453
461
  return summary;