tripstorekrabi-shared 1.18.7 → 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.
- package/package.json +2 -2
- package/utils.js +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripstorekrabi-shared",
|
|
3
|
-
"version": "1.18.
|
|
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.
|
|
20
|
+
"nanoid": "^5.0.9"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"deploy": "npm publish"
|
package/utils.js
CHANGED
|
@@ -18,8 +18,10 @@ export const PROD_URL = 'https://www.tripstorekrabi.com';
|
|
|
18
18
|
export const MAX_AGE_SEC = 60 * 60 * 24;
|
|
19
19
|
export const NO_ROOM = 'NO ROOM';
|
|
20
20
|
export const IN_HOUSE = 'IN HOUSE';
|
|
21
|
+
export const STAY_NEARBY = 'STAY NEARBY';
|
|
21
22
|
export const CHECK_IN_LATE = 'CHECK-IN LATE';
|
|
22
|
-
export const
|
|
23
|
+
export const KEEP_PRIVATE = 'KEEP PRIVATE';
|
|
24
|
+
export const ROOM_NUMBER_LIST = [NO_ROOM, IN_HOUSE, STAY_NEARBY, CHECK_IN_LATE, KEEP_PRIVATE];
|
|
23
25
|
export const NO_PICKUP_HOTEL_YET = "NO PICKUP HOTEL YET";
|
|
24
26
|
|
|
25
27
|
export const TELL_HOTEL_LATER_STARTING_POINT = { id: "ThDUqeSiUvvdjfHgQQq5a", description: "I will tell the hotel name later" };
|
|
@@ -444,8 +446,16 @@ export function getBookingSummary(booking, options = {}) {
|
|
|
444
446
|
summary += ')';
|
|
445
447
|
}
|
|
446
448
|
}
|
|
449
|
+
|
|
450
|
+
if (options.showPhoneNumber && booking.phoneNumber?.length > 0) {
|
|
451
|
+
summary += ` - ${booking.phoneNumber}`;
|
|
452
|
+
}
|
|
447
453
|
} else {
|
|
448
454
|
summary += '«THE BOOKING IS INCOMPLETE»';
|
|
455
|
+
|
|
456
|
+
if (options.showPhoneNumber && booking.phoneNumber?.length > 0) {
|
|
457
|
+
summary += ` - ${booking.phoneNumber}`;
|
|
458
|
+
}
|
|
449
459
|
}
|
|
450
460
|
|
|
451
461
|
return summary;
|