@pisell/private-materials 3.0.151-gray → 3.0.151
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.js +3 -3
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +3 -4
- package/es/components/booking/info/index.js +1 -2
- package/es/components/booking/info/index.less +0 -9
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +2 -8
- package/es/components/booking/info/service/addService/index.js +36 -82
- package/es/components/booking/info/service/addService/index.less +1 -27
- package/es/components/booking/info/service/editService/index.js +9 -7
- package/es/components/booking/locales.d.ts +0 -48
- package/es/components/booking/locales.js +3 -51
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/components/eftposPay/index.js +2 -0
- package/es/components/eftposPay/tyro/index.js +11 -8
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +2 -1
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +5 -4
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +2 -1
- package/es/components/pay/toC/utils.d.ts +11 -0
- package/es/components/pay/toC/utils.js +27 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.js +3 -3
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +2 -4
- package/lib/components/booking/info/client/index.js +8 -1
- package/lib/components/booking/info/index.js +1 -4
- package/lib/components/booking/info/index.less +0 -9
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +2 -8
- package/lib/components/booking/info/service/addService/index.js +29 -67
- package/lib/components/booking/info/service/addService/index.less +1 -27
- package/lib/components/booking/info/service/editService/index.js +3 -6
- package/lib/components/booking/locales.d.ts +0 -48
- package/lib/components/booking/locales.js +3 -51
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/components/eftposPay/index.js +2 -0
- package/lib/components/eftposPay/tyro/index.js +7 -6
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +5 -1
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +6 -3
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +5 -1
- package/lib/components/pay/toC/utils.d.ts +11 -0
- package/lib/components/pay/toC/utils.js +26 -2
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +4 -4
- package/es/components/booking/dashboard/index.d.ts +0 -10
- package/es/components/booking/dashboard/index.js +0 -242
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -27
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/es/components/booking/info/addServiceVariant/index.js +0 -33
- package/lib/components/booking/dashboard/index.d.ts +0 -10
- package/lib/components/booking/dashboard/index.js +0 -225
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +0 -33
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -58
- package/lowcode/booking-dashboard/meta.ts +0 -130
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -112,9 +112,7 @@ var sliceDayIntoFiveMinutes = (config, locale) => {
|
|
|
112
112
|
value: durationValue
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
115
|
-
const durationLabel = `${durationValue} ${import_utils.locales.getText(
|
|
116
|
-
"pisell2.text.min"
|
|
117
|
-
)}`;
|
|
115
|
+
const durationLabel = `${durationValue} ${import_utils.locales.getText("pisell2.text.min")}`;
|
|
118
116
|
durationSlicesBasedOnTime.push({
|
|
119
117
|
label: durationLabel,
|
|
120
118
|
value: durationValue
|
|
@@ -137,9 +135,7 @@ var getServeStartTime = (start_time) => {
|
|
|
137
135
|
return start_time;
|
|
138
136
|
};
|
|
139
137
|
var getServiceTime = (item, currentDate) => {
|
|
140
|
-
const startDate = (0, import_dayjs.default)(
|
|
141
|
-
currentDate.format("YYYY-MM-DD") + " " + getServeStartTime(item._extend.start_time)
|
|
142
|
-
);
|
|
138
|
+
const startDate = (0, import_dayjs.default)(currentDate.format("YYYY-MM-DD") + " " + getServeStartTime(item._extend.start_time));
|
|
143
139
|
const startTime = startDate.format("HH:mm");
|
|
144
140
|
const endTime = startDate.add(flexibleObj.getValue(item._extend.duration), "minute").format("HH:mm");
|
|
145
141
|
const duration = getDiscountTime(flexibleObj.getValue(item._extend.duration));
|
|
@@ -187,7 +183,10 @@ var formatProductListByCategory = (list, filterItem) => {
|
|
|
187
183
|
}
|
|
188
184
|
categoryObject[categoryItem.id] = {
|
|
189
185
|
...categoryItem,
|
|
190
|
-
products: [
|
|
186
|
+
products: [
|
|
187
|
+
...categoryObject[categoryItem.id].products,
|
|
188
|
+
productItem
|
|
189
|
+
]
|
|
191
190
|
};
|
|
192
191
|
}
|
|
193
192
|
} else {
|
|
@@ -209,9 +208,7 @@ var formatProductListByCategory = (list, filterItem) => {
|
|
|
209
208
|
return Object.values(categoryObject).sort((a, b) => b.sort - a.sort);
|
|
210
209
|
};
|
|
211
210
|
var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
212
|
-
const startDate = (0, import_dayjs.default)(
|
|
213
|
-
cacheItem._extend.start_date.format("YYYY-MM-DD") + " " + getServeStartTime(cacheItem._extend.start_time)
|
|
214
|
-
);
|
|
211
|
+
const startDate = (0, import_dayjs.default)(cacheItem._extend.start_date.format("YYYY-MM-DD") + " " + getServeStartTime(cacheItem._extend.start_time));
|
|
215
212
|
const isFlexible = flexibleObj.isFlexible(cacheItem._extend.duration);
|
|
216
213
|
let isMaxLimitRange = false;
|
|
217
214
|
let isDateRange = false;
|
|
@@ -221,22 +218,13 @@ var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
|
221
218
|
} else {
|
|
222
219
|
isMaxLimitRange = "unknown";
|
|
223
220
|
}
|
|
224
|
-
const timeStartDate = (0, import_dayjs.default)(time.start_date + " " + time.start_time).subtract(
|
|
225
|
-
|
|
226
|
-
"second"
|
|
227
|
-
);
|
|
228
|
-
const timeEndDate = (0, import_dayjs.default)(time.end_date + " " + time.end_time).add(
|
|
229
|
-
1,
|
|
230
|
-
"second"
|
|
231
|
-
);
|
|
221
|
+
const timeStartDate = (0, import_dayjs.default)(time.start_date + " " + time.start_time).subtract(1, "second");
|
|
222
|
+
const timeEndDate = (0, import_dayjs.default)(time.end_date + " " + time.end_time).add(1, "second");
|
|
232
223
|
let bol;
|
|
233
224
|
if (isFlexible) {
|
|
234
225
|
bol = startDate.isAfter(timeStartDate) && startDate.isBefore(timeEndDate);
|
|
235
226
|
} else {
|
|
236
|
-
let endDate = startDate.add(
|
|
237
|
-
flexibleObj.getValue(cacheItem._extend.duration),
|
|
238
|
-
"minute"
|
|
239
|
-
);
|
|
227
|
+
let endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration), "minute");
|
|
240
228
|
bol = startDate.isAfter(timeStartDate) && endDate.isBefore(timeEndDate);
|
|
241
229
|
}
|
|
242
230
|
if (bol) {
|
|
@@ -341,9 +329,7 @@ var flexibleObj = {
|
|
|
341
329
|
};
|
|
342
330
|
var getEndDate = (startDate, duration, endDate) => {
|
|
343
331
|
if (duration === "flexible") {
|
|
344
|
-
let openingDate = (0, import_dayjs.default)(
|
|
345
|
-
startDate.format("YYYY-MM-DD") + " " + getShopOpeningHours()
|
|
346
|
-
);
|
|
332
|
+
let openingDate = (0, import_dayjs.default)(startDate.format("YYYY-MM-DD") + " " + getShopOpeningHours());
|
|
347
333
|
if ((0, import_dayjs.default)(startDate).isAfter(openingDate)) {
|
|
348
334
|
openingDate = openingDate.add(1, "day");
|
|
349
335
|
}
|
|
@@ -358,13 +344,8 @@ var getEndDate = (startDate, duration, endDate) => {
|
|
|
358
344
|
return startDate.add(duration, "minute");
|
|
359
345
|
};
|
|
360
346
|
var getServiceTimes = (service) => {
|
|
361
|
-
const startDate = (0, import_dayjs.default)(
|
|
362
|
-
|
|
363
|
-
);
|
|
364
|
-
const endDate = startDate.add(
|
|
365
|
-
flexibleObj.getValue(service._extend.duration),
|
|
366
|
-
"minute"
|
|
367
|
-
);
|
|
347
|
+
const startDate = (0, import_dayjs.default)((0, import_dayjs.default)(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time));
|
|
348
|
+
const endDate = startDate.add(flexibleObj.getValue(service._extend.duration), "minute");
|
|
368
349
|
return {
|
|
369
350
|
startDate,
|
|
370
351
|
endDate
|
|
@@ -373,12 +354,10 @@ var getServiceTimes = (service) => {
|
|
|
373
354
|
var getErrorList = (resource, cacheItem) => {
|
|
374
355
|
var _a, _b, _c;
|
|
375
356
|
if (!(cacheItem == null ? void 0 : cacheItem.id)) {
|
|
376
|
-
return [
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
];
|
|
357
|
+
return [{
|
|
358
|
+
label: import_utils.locales.getText("pisell2.text.no-product-added"),
|
|
359
|
+
type: "products"
|
|
360
|
+
}];
|
|
382
361
|
}
|
|
383
362
|
if (!resource || !resource._extend || !cacheItem) {
|
|
384
363
|
return [];
|
|
@@ -387,10 +366,7 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
387
366
|
if (!resource.usable) {
|
|
388
367
|
if (!((_a = resource == null ? void 0 : resource._extend) == null ? void 0 : _a.usableProduct)) {
|
|
389
368
|
list.push({
|
|
390
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-1")(
|
|
391
|
-
resource.labelText,
|
|
392
|
-
cacheItem == null ? void 0 : cacheItem.title
|
|
393
|
-
),
|
|
369
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-1")(resource.labelText, cacheItem == null ? void 0 : cacheItem.title),
|
|
394
370
|
type: "product"
|
|
395
371
|
});
|
|
396
372
|
}
|
|
@@ -402,21 +378,13 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
402
378
|
}
|
|
403
379
|
if (!((_b = resource._extend) == null ? void 0 : _b.usableTime)) {
|
|
404
380
|
list.push({
|
|
405
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-2")(
|
|
406
|
-
resource.labelText,
|
|
407
|
-
startText,
|
|
408
|
-
endText
|
|
409
|
-
),
|
|
381
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-2")(resource.labelText, startText, endText),
|
|
410
382
|
type: "time"
|
|
411
383
|
});
|
|
412
384
|
} else {
|
|
413
385
|
if (!((_c = resource._extend) == null ? void 0 : _c.usableTime._extend.isMaxLimitRange)) {
|
|
414
386
|
list.push({
|
|
415
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-3")(
|
|
416
|
-
resource.labelText,
|
|
417
|
-
startText,
|
|
418
|
-
endText
|
|
419
|
-
),
|
|
387
|
+
label: import_utils.locales.getText("pisell1.text.resource-error-message-3")(resource.labelText, startText, endText),
|
|
420
388
|
type: "limit"
|
|
421
389
|
});
|
|
422
390
|
}
|
|
@@ -486,14 +454,11 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
|
486
454
|
_extend.resource = resourceId;
|
|
487
455
|
}
|
|
488
456
|
}
|
|
457
|
+
console.log("_extend", findNextSliceProps);
|
|
489
458
|
if (findNextSliceProps.date && findNextSliceProps.date !== "00:00") {
|
|
490
459
|
_extend.start_time = findNextSlice(findNextSliceProps);
|
|
491
460
|
} else {
|
|
492
|
-
|
|
493
|
-
_extend.start_time = cacheItem.currentDefaultTime;
|
|
494
|
-
} else {
|
|
495
|
-
_extend.start_time = (0, import_dayjs.default)().format("HH:mm");
|
|
496
|
-
}
|
|
461
|
+
_extend.start_time = (0, import_dayjs.default)().format("HH:mm");
|
|
497
462
|
}
|
|
498
463
|
}
|
|
499
464
|
_extend = {
|
|
@@ -241,6 +241,8 @@ var eftposPay_default = (props) => {
|
|
|
241
241
|
onChangeParams: props.onChangeParams,
|
|
242
242
|
action,
|
|
243
243
|
source: props.source,
|
|
244
|
+
tyroUrl: props.tyroUrl,
|
|
245
|
+
tyroVersion: props.tyroVersion,
|
|
244
246
|
device_number: (_f = props == null ? void 0 : props.params) == null ? void 0 : _f.device_number
|
|
245
247
|
}
|
|
246
248
|
));
|
|
@@ -197,10 +197,8 @@ var tyro_default = ({
|
|
|
197
197
|
const receiptCallbackImpl = ({ signatureRequired, merchantReceipt }) => {
|
|
198
198
|
console.log("商家小票 客户端是否打印小票 = ", signatureRequired);
|
|
199
199
|
console.log("商家小票 小票内容 = \n", merchantReceipt);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
onChange("print", receipt);
|
|
203
|
-
}
|
|
200
|
+
const receipt = [merchantReceipt].filter((item) => typeof item === "string").filter(Boolean);
|
|
201
|
+
onChange("print", receipt);
|
|
204
202
|
merchantReceiptRef.current = { signatureRequired, merchantReceipt };
|
|
205
203
|
};
|
|
206
204
|
const statusMessageCallbackImpl = (message) => {
|
|
@@ -308,7 +306,7 @@ var tyro_default = ({
|
|
|
308
306
|
card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
|
|
309
307
|
card_reader_type: eftpos,
|
|
310
308
|
amount: requestParams.current.amount,
|
|
311
|
-
action: modeRef.current,
|
|
309
|
+
action: modeRef.current === import_const.ModeEnum.FullPay ? import_const.ModeEnum.Pay : modeRef.current,
|
|
312
310
|
status: response.result === "APPROVED" ? "succeed" : "failed",
|
|
313
311
|
request: requestParams.current,
|
|
314
312
|
response: { ...response, merchantReceipt: merchantReceiptRef.current },
|
|
@@ -382,7 +380,8 @@ var tyro_default = ({
|
|
|
382
380
|
failCustom: {
|
|
383
381
|
isPosNetworkError: false,
|
|
384
382
|
status: "fail",
|
|
385
|
-
fail:
|
|
383
|
+
fail: response.result,
|
|
384
|
+
//locales.getText('page.eftpos-pay.text.transaction.fail'),
|
|
386
385
|
warn: null,
|
|
387
386
|
title: import_utils.locales.getText("page.eftpos-pay.text.failed")(
|
|
388
387
|
modeRef.current
|
|
@@ -398,7 +397,9 @@ var tyro_default = ({
|
|
|
398
397
|
if (load && TyroRef.current) {
|
|
399
398
|
const IClient = TyroRef.current.IClient;
|
|
400
399
|
if (IClient) {
|
|
400
|
+
console.log("apiKey = ", apiKey, "posProductData = ", posProductData);
|
|
401
401
|
const iclient = new IClient(apiKey, posProductData);
|
|
402
|
+
console.log(iclient.posProductData);
|
|
402
403
|
iClientRef.current = iclient;
|
|
403
404
|
if (isCancelRef.current) {
|
|
404
405
|
return;
|
|
@@ -40,6 +40,7 @@ var import_utils = require("@pisell/utils");
|
|
|
40
40
|
var import_payGroup = require("../../payGroup");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
|
+
var import_utils2 = require("../../utils");
|
|
43
44
|
var ApplePay = (props, ref) => {
|
|
44
45
|
var _a;
|
|
45
46
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
@@ -63,7 +64,10 @@ var ApplePay = (props, ref) => {
|
|
|
63
64
|
const linkElement = document.createElement("a");
|
|
64
65
|
linkElement.href = currentURL;
|
|
65
66
|
const shop_domain = linkElement.hostname;
|
|
66
|
-
const _href = `${config.pay}
|
|
67
|
+
const _href = `${config.pay}${(0, import_utils2.formatFranchiseeRoute)(
|
|
68
|
+
`/apple-pay?order_id=${(_g = state.payGroup) == null ? void 0 : _g.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
|
|
69
|
+
state.history
|
|
70
|
+
)}`;
|
|
67
71
|
window.location.href = _href;
|
|
68
72
|
} catch (err) {
|
|
69
73
|
setOpen(false);
|
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(BankDeposit_exports);
|
|
|
35
35
|
var import_react = require("react");
|
|
36
36
|
var import_model = require("../../model");
|
|
37
37
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
38
|
+
var import_utils = require("../../utils");
|
|
38
39
|
var import_index = require("./index.less");
|
|
39
40
|
var BankDeposit = (props, ref) => {
|
|
40
41
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
@@ -53,9 +54,11 @@ var BankDeposit = (props, ref) => {
|
|
|
53
54
|
});
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
`/pay/manual-transfer?id=${(payGroup == null ? void 0 : payGroup.order_id) || (payGroup == null ? void 0 : payGroup.order_id)}
|
|
58
|
-
|
|
57
|
+
const _href = `${(0, import_utils.formatFranchiseeRoute)(
|
|
58
|
+
`/pay/manual-transfer?id=${(payGroup == null ? void 0 : payGroup.order_id) || (payGroup == null ? void 0 : payGroup.order_id)}`,
|
|
59
|
+
state.history
|
|
60
|
+
)}`;
|
|
61
|
+
state.history.push(_href);
|
|
59
62
|
};
|
|
60
63
|
(0, import_react.useImperativeHandle)(
|
|
61
64
|
ref,
|
|
@@ -39,6 +39,7 @@ var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoadi
|
|
|
39
39
|
var import_model = require("../../model");
|
|
40
40
|
var import_payGroup = require("../../payGroup");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
42
|
+
var import_utils2 = require("../../utils");
|
|
42
43
|
var GooglePay = (props, ref) => {
|
|
43
44
|
var _a;
|
|
44
45
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
@@ -62,7 +63,10 @@ var GooglePay = (props, ref) => {
|
|
|
62
63
|
const linkElement = document.createElement("a");
|
|
63
64
|
linkElement.href = currentURL;
|
|
64
65
|
const shop_domain = linkElement.hostname;
|
|
65
|
-
const _href = `${config.pay}
|
|
66
|
+
const _href = `${config.pay}${(0, import_utils2.formatFranchiseeRoute)(
|
|
67
|
+
`/google-pay?order_id=${(_g = state.payGroup) == null ? void 0 : _g.order_id}&shop_id=${shopId}&locale=${locale}&shop_domain=${shop_domain}&total_amount=${values.amount}&payment_group_id=${values.payment_group_id}`,
|
|
68
|
+
state.history
|
|
69
|
+
)}`;
|
|
66
70
|
window.location.href = _href;
|
|
67
71
|
} catch (err) {
|
|
68
72
|
setOpen(false);
|
|
@@ -36,3 +36,14 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
|
36
36
|
* @Date: 2024-08-30 10:06:17
|
|
37
37
|
*/
|
|
38
38
|
export declare const getIsWalletPassAndTripartitePayment: (payGroup: PayGroup) => boolean | 0 | undefined;
|
|
39
|
+
export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
40
|
+
/**
|
|
41
|
+
* @title: 获取当前连锁加盟店铺shopid
|
|
42
|
+
* @description:
|
|
43
|
+
* @param {any} param1
|
|
44
|
+
* @return {*}
|
|
45
|
+
* @Author: chensheng.gu
|
|
46
|
+
* @Date: 2024-08-07 10:04
|
|
47
|
+
*/
|
|
48
|
+
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
49
|
+
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
@@ -20,9 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
calcWalletPassListAmount: () => calcWalletPassListAmount,
|
|
23
|
+
formatFranchiseeRoute: () => formatFranchiseeRoute,
|
|
23
24
|
formatWalletPassList2PreparePayments: () => formatWalletPassList2PreparePayments,
|
|
24
25
|
formatWalletPassParams: () => formatWalletPassParams,
|
|
25
|
-
|
|
26
|
+
getFranchiseeShopId: () => getFranchiseeShopId,
|
|
27
|
+
getIsWalletPassAndTripartitePayment: () => getIsWalletPassAndTripartitePayment,
|
|
28
|
+
isFranchiseeShop: () => isFranchiseeShop
|
|
26
29
|
});
|
|
27
30
|
module.exports = __toCommonJS(utils_exports);
|
|
28
31
|
var import_decimal = require("decimal.js");
|
|
@@ -60,10 +63,31 @@ var getIsWalletPassAndTripartitePayment = (payGroup) => {
|
|
|
60
63
|
var _a, _b, _c;
|
|
61
64
|
return ((_b = (_a = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a.cards) == null ? void 0 : _b.length) && (0, import_status.isTripartitePayment)((_c = payGroup == null ? void 0 : payGroup.otherPayment) == null ? void 0 : _c.service);
|
|
62
65
|
};
|
|
66
|
+
var isFranchiseeShop = (path, history) => {
|
|
67
|
+
const { pathname } = history.location;
|
|
68
|
+
const _pathname = path || pathname;
|
|
69
|
+
return _pathname && _pathname.includes("/franchisee");
|
|
70
|
+
};
|
|
71
|
+
var getFranchiseeShopId = (path, history) => {
|
|
72
|
+
const { pathname } = history.location;
|
|
73
|
+
const _pathname = path || pathname;
|
|
74
|
+
const match = _pathname.match(/\/shop_(\d+)\//);
|
|
75
|
+
const shopNumber = match ? match[1] : null;
|
|
76
|
+
return Number(shopNumber);
|
|
77
|
+
};
|
|
78
|
+
var formatFranchiseeRoute = (url, history) => {
|
|
79
|
+
if (isFranchiseeShop(null, history)) {
|
|
80
|
+
return `/franchisee/shop/shop_${getFranchiseeShopId(null, history)}${url}`;
|
|
81
|
+
}
|
|
82
|
+
return url;
|
|
83
|
+
};
|
|
63
84
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
85
|
0 && (module.exports = {
|
|
65
86
|
calcWalletPassListAmount,
|
|
87
|
+
formatFranchiseeRoute,
|
|
66
88
|
formatWalletPassList2PreparePayments,
|
|
67
89
|
formatWalletPassParams,
|
|
68
|
-
|
|
90
|
+
getFranchiseeShopId,
|
|
91
|
+
getIsWalletPassAndTripartitePayment,
|
|
92
|
+
isFranchiseeShop
|
|
69
93
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,7 +68,7 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
73
72
|
state: FormState;
|
|
74
73
|
} & {
|
|
75
74
|
dispatch: (params: {
|
package/lib/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { default as BookingStartTime } from './components/booking/materiels/star
|
|
|
12
12
|
export { default as BookingDuration } from './components/booking/materiels/duration';
|
|
13
13
|
export { default as BookingContacts } from './components/booking/materiels/contacts';
|
|
14
14
|
export { VerticalClient } from './components/booking/info/clientVariant';
|
|
15
|
-
export { default as VerticalAddService } from './components/booking/info/addServiceVariant';
|
|
16
15
|
export { default as ProductExtension } from './components/productExtension';
|
|
17
16
|
export { default as BookingDeposit } from './components/booking/deposit';
|
|
18
17
|
export { default as RuleSetting } from './components/ruleSetting';
|
|
@@ -20,4 +19,3 @@ export { default as TaxSelect } from './components/taxSelect';
|
|
|
20
19
|
export { default as ToCPay } from './components/pay/toC';
|
|
21
20
|
export { default as Eftpos } from './components/eftpos';
|
|
22
21
|
export { default as EftposPay } from './components/eftposPay';
|
|
23
|
-
export { default as BookingDashboard } from './components/booking/dashboard';
|
package/lib/index.js
CHANGED
|
@@ -32,7 +32,6 @@ __export(src_exports, {
|
|
|
32
32
|
Booking: () => import_booking.default,
|
|
33
33
|
BookingAddons: () => import_addons.default,
|
|
34
34
|
BookingContacts: () => import_contacts.default,
|
|
35
|
-
BookingDashboard: () => import_dashboard.default,
|
|
36
35
|
BookingDeposit: () => import_deposit.default,
|
|
37
36
|
BookingDuration: () => import_duration.default,
|
|
38
37
|
BookingForms: () => import_forms.default,
|
|
@@ -49,7 +48,6 @@ __export(src_exports, {
|
|
|
49
48
|
Schedules: () => import_schedules.default,
|
|
50
49
|
TaxSelect: () => import_taxSelect.default,
|
|
51
50
|
ToCPay: () => import_toC.default,
|
|
52
|
-
VerticalAddService: () => import_addServiceVariant.default,
|
|
53
51
|
VerticalClient: () => import_clientVariant.VerticalClient
|
|
54
52
|
});
|
|
55
53
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -69,7 +67,6 @@ var import_startTime = __toESM(require("./components/booking/materiels/startTime
|
|
|
69
67
|
var import_duration = __toESM(require("./components/booking/materiels/duration"));
|
|
70
68
|
var import_contacts = __toESM(require("./components/booking/materiels/contacts"));
|
|
71
69
|
var import_clientVariant = require("./components/booking/info/clientVariant");
|
|
72
|
-
var import_addServiceVariant = __toESM(require("./components/booking/info/addServiceVariant"));
|
|
73
70
|
var import_productExtension = __toESM(require("./components/productExtension"));
|
|
74
71
|
var import_deposit = __toESM(require("./components/booking/deposit"));
|
|
75
72
|
var import_ruleSetting = __toESM(require("./components/ruleSetting"));
|
|
@@ -77,7 +74,6 @@ var import_taxSelect = __toESM(require("./components/taxSelect"));
|
|
|
77
74
|
var import_toC = __toESM(require("./components/pay/toC"));
|
|
78
75
|
var import_eftpos = __toESM(require("./components/eftpos"));
|
|
79
76
|
var import_eftposPay = __toESM(require("./components/eftposPay"));
|
|
80
|
-
var import_dashboard = __toESM(require("./components/booking/dashboard"));
|
|
81
77
|
import_dayjs.default.extend(import_weekday.default);
|
|
82
78
|
import_dayjs.default.extend(import_localeData.default);
|
|
83
79
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -85,7 +81,6 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
85
81
|
Booking,
|
|
86
82
|
BookingAddons,
|
|
87
83
|
BookingContacts,
|
|
88
|
-
BookingDashboard,
|
|
89
84
|
BookingDeposit,
|
|
90
85
|
BookingDuration,
|
|
91
86
|
BookingForms,
|
|
@@ -102,6 +97,5 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
102
97
|
Schedules,
|
|
103
98
|
TaxSelect,
|
|
104
99
|
ToCPay,
|
|
105
|
-
VerticalAddService,
|
|
106
100
|
VerticalClient
|
|
107
101
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.151
|
|
3
|
+
"version": "3.0.151",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
+
"@pisell/materials": "3.0.48",
|
|
62
63
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/
|
|
64
|
-
"@pisell/icon": "0.0.11"
|
|
65
|
-
"@pisell/date-picker": "1.0.100"
|
|
64
|
+
"@pisell/date-picker": "1.0.100",
|
|
65
|
+
"@pisell/icon": "0.0.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface BookingDashboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
backgroundColors?: string[];
|
|
4
|
-
labelColor?: string;
|
|
5
|
-
valueColor?: string;
|
|
6
|
-
otherParams?: Record<string, any>;
|
|
7
|
-
refreshKey?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const BookingDashboard: (props: BookingDashboardProps) => React.JSX.Element;
|
|
10
|
-
export default BookingDashboard;
|