tripstorekrabi-shared 1.17.2 → 1.17.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.
- package/package.json +1 -1
- package/price.js +14 -7
- package/utils.js +19 -0
package/package.json
CHANGED
package/price.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getBookingType } from "./utils.js";
|
|
1
|
+
import { CUSTOM_MEETING_POINT, TELL_HOTEL_LATER_STARTING_POINT, getBookingType } from "./utils.js";
|
|
2
2
|
|
|
3
3
|
export const MAX_PAX = 100;
|
|
4
4
|
export const PAY_ON_TOUR = 'Pay on tour';
|
|
@@ -18,11 +18,6 @@ export const EXTRA_PAYMENT_CATEGORIES = [STARTING_POINT_EXTRA_PAYMENT,
|
|
|
18
18
|
ADD_ON_EXTRA_PAYMENT,
|
|
19
19
|
PRODUCT_CHANGE_EXTRA_PAYMENT,
|
|
20
20
|
OTHER_EXTRA_PAYMENT];
|
|
21
|
-
export const CUSTOM_MEETING_POINT = {
|
|
22
|
-
id: 0,
|
|
23
|
-
name: 'Custom meeting point',
|
|
24
|
-
value: '',
|
|
25
|
-
};
|
|
26
21
|
|
|
27
22
|
const SELLING_MODE = 0;
|
|
28
23
|
const PARTNER_MODE = 1;
|
|
@@ -386,7 +381,19 @@ function calculateStartEndPointPrice(people, startEndPoint, options = { mode: SE
|
|
|
386
381
|
}
|
|
387
382
|
|
|
388
383
|
export function findStartingPoint(product, startingPointId, useDefault = true) {
|
|
389
|
-
return [
|
|
384
|
+
return [
|
|
385
|
+
...product.startingPoints,
|
|
386
|
+
{
|
|
387
|
+
id: TELL_HOTEL_LATER_STARTING_POINT.id,
|
|
388
|
+
name: TELL_HOTEL_LATER_STARTING_POINT.description,
|
|
389
|
+
value: '',
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: CUSTOM_MEETING_POINT.id,
|
|
393
|
+
name: CUSTOM_MEETING_POINT.description,
|
|
394
|
+
value: '',
|
|
395
|
+
},
|
|
396
|
+
].find((item) => item.id === startingPointId) ?? (useDefault ? product.startingPoints[0] : null);
|
|
390
397
|
}
|
|
391
398
|
|
|
392
399
|
export function findEndPoint(product, endPointId, useDefault = true) {
|
package/utils.js
CHANGED
|
@@ -35,6 +35,25 @@ export const MUS_AGENCYID_IN_PHAYUN = '6VBWnnTPn2wlfhGIxG5L';
|
|
|
35
35
|
export const EXP_AGENCYID_IN_PHAYUN = 'ECf1LkUkd67Avjb8CoAB';
|
|
36
36
|
export const TIQ_AGENCYID_IN_PHAYUN = 'HPiO2Z6OdD8A3O5Zbi96';
|
|
37
37
|
|
|
38
|
+
export const DIETARIES = [
|
|
39
|
+
'None',
|
|
40
|
+
'Gluten-free',
|
|
41
|
+
'Halal',
|
|
42
|
+
'Kosher',
|
|
43
|
+
'Lactose-free',
|
|
44
|
+
'No dairy',
|
|
45
|
+
'No fish',
|
|
46
|
+
'No meat',
|
|
47
|
+
'No nuts',
|
|
48
|
+
'No peanuts',
|
|
49
|
+
'No seafood',
|
|
50
|
+
'No shellfish',
|
|
51
|
+
'No treenuts',
|
|
52
|
+
'Pescatarian',
|
|
53
|
+
'Vegan',
|
|
54
|
+
'Vegetarian'
|
|
55
|
+
];
|
|
56
|
+
|
|
38
57
|
const EMAIL_PATTERN = new RegExp(
|
|
39
58
|
/^[a-zA-Z0-9.!#$%&' * +/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
|
|
40
59
|
);
|