@pisell/private-materials 6.3.177 → 6.3.178
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +91 -24
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
- package/es/components/appointmentBooking/components/Header/index.js +4 -24
- package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -17
- package/es/components/appointmentBooking/hooks.js +54 -128
- package/es/components/appointmentBooking/utils.d.ts +1 -0
- package/es/components/appointmentBooking/utils.js +54 -33
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/device.js +4 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/es/components/eventBooking/components/progressBar/index.js +10 -30
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellCashCounting/hooks.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/scanOrder/components/Check/index.js +46 -187
- package/es/components/scanOrder/components/Check/index.less +0 -39
- package/es/components/scanOrder/components/Content/index.js +72 -189
- package/es/components/scanOrder/components/Menu/index.js +5 -11
- package/es/components/scanOrder/hooks.js +0 -7
- package/es/components/scanOrder/locales.d.ts +0 -75
- package/es/components/scanOrder/locales.js +0 -75
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/venueBooking/components/Cart/index.js +159 -46
- package/es/components/venueBooking/components/Voucher/index.js +1 -6
- package/es/components/venueBooking/context.js +15 -2
- package/es/components/venueBooking/locales.d.ts +5 -0
- package/es/components/venueBooking/locales.js +10 -5
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/pro/Login2.0/locales.js +1 -1
- package/es/utils/buildCartHolderParams.d.ts +92 -0
- package/es/utils/buildCartHolderParams.js +191 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +71 -9
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
- package/lib/components/appointmentBooking/components/Header/index.js +1 -13
- package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -17
- package/lib/components/appointmentBooking/hooks.js +16 -91
- package/lib/components/appointmentBooking/utils.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.js +24 -13
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/device.js +4 -6
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/lib/components/eventBooking/components/progressBar/index.js +9 -29
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellCashCounting/hooks.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Check/index.js +3 -116
- package/lib/components/scanOrder/components/Check/index.less +0 -39
- package/lib/components/scanOrder/components/Content/index.js +25 -106
- package/lib/components/scanOrder/components/Menu/index.js +0 -2
- package/lib/components/scanOrder/hooks.js +0 -7
- package/lib/components/scanOrder/locales.d.ts +0 -75
- package/lib/components/scanOrder/locales.js +0 -75
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/venueBooking/components/Cart/index.js +92 -14
- package/lib/components/venueBooking/components/Voucher/index.js +1 -5
- package/lib/components/venueBooking/context.js +12 -2
- package/lib/components/venueBooking/locales.d.ts +5 -0
- package/lib/components/venueBooking/locales.js +10 -5
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/pro/Login2.0/locales.js +1 -1
- package/lib/utils/buildCartHolderParams.d.ts +92 -0
- package/lib/utils/buildCartHolderParams.js +167 -0
- package/package.json +1 -1
|
@@ -38,7 +38,6 @@ __export(hooks_exports, {
|
|
|
38
38
|
useAppointmentBookingResource: () => useAppointmentBookingResource,
|
|
39
39
|
useAppointmentBookingSetting: () => useAppointmentBookingSetting,
|
|
40
40
|
useAppointmentBookingStep: () => useAppointmentBookingStep,
|
|
41
|
-
useInterceptBrowserBack: () => useInterceptBrowserBack,
|
|
42
41
|
useIsSkipResourceStep: () => useIsSkipResourceStep,
|
|
43
42
|
useShopDiscount: () => useShopDiscount
|
|
44
43
|
});
|
|
@@ -290,7 +289,7 @@ var useAppointmentBookingStep = () => {
|
|
|
290
289
|
{ key: "错误信息", value: msg }
|
|
291
290
|
]);
|
|
292
291
|
};
|
|
293
|
-
const checkHolder = async () => {
|
|
292
|
+
const checkHolder = async (isLoginTrigger = false) => {
|
|
294
293
|
try {
|
|
295
294
|
setLoading(false);
|
|
296
295
|
if (isRetailTemplate || (appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
|
|
@@ -306,7 +305,7 @@ var useAppointmentBookingStep = () => {
|
|
|
306
305
|
const appoimentCarts = cartLists.filter(
|
|
307
306
|
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
308
307
|
);
|
|
309
|
-
const { hasError } = (0, import_utils2.checkAndGoNext)(
|
|
308
|
+
const { hasError, isEnableSkuHolderRule } = (0, import_utils2.checkAndGoNext)(
|
|
310
309
|
isFormSubject,
|
|
311
310
|
checkAccount,
|
|
312
311
|
appoimentCarts
|
|
@@ -321,6 +320,9 @@ var useAppointmentBookingStep = () => {
|
|
|
321
320
|
if (hasError) {
|
|
322
321
|
return;
|
|
323
322
|
}
|
|
323
|
+
if (isLoginTrigger && isEnableSkuHolderRule) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
324
326
|
if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
|
|
325
327
|
openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
|
|
326
328
|
return appointmentBooking.next();
|
|
@@ -352,7 +354,13 @@ var useAppointmentBookingStep = () => {
|
|
|
352
354
|
]);
|
|
353
355
|
}
|
|
354
356
|
if (res === "success") {
|
|
355
|
-
|
|
357
|
+
if (isFormSubject && !isRetailTemplate && !(appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
|
|
358
|
+
const customer = (0, import_utils2.getCustomer)(utils);
|
|
359
|
+
appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
|
|
360
|
+
customer_id: customer == null ? void 0 : customer.id
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
checkHolder(true);
|
|
356
364
|
}
|
|
357
365
|
if (res === "close") {
|
|
358
366
|
setLoading(false);
|
|
@@ -434,13 +442,13 @@ var useAppointmentBookingCart = () => {
|
|
|
434
442
|
var _a3;
|
|
435
443
|
return {
|
|
436
444
|
...item,
|
|
437
|
-
addHolderButtonText: utils
|
|
445
|
+
// addHolderButtonText: utils?.translation(formMap?.[formId]?.form?.form?.setting?.title),
|
|
438
446
|
format: ["HH:mm", "HH:mm"],
|
|
439
447
|
show_time: true,
|
|
440
448
|
duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
|
|
441
449
|
locale,
|
|
442
450
|
symbol,
|
|
443
|
-
holders:
|
|
451
|
+
// holders: formatHolder(accountLists),
|
|
444
452
|
allowClearHolder: true,
|
|
445
453
|
allowClearResource: true,
|
|
446
454
|
isMultipleResource: true
|
|
@@ -465,10 +473,11 @@ var useAppointmentBookingLogin = () => {
|
|
|
465
473
|
const utils = contextUtils();
|
|
466
474
|
const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
|
|
467
475
|
const openLoginModal = (params) => {
|
|
468
|
-
const { callback } = params || {};
|
|
476
|
+
const { callback, data = {} } = params || {};
|
|
469
477
|
utils.action({
|
|
470
478
|
type: "pisell1.login",
|
|
471
479
|
data: {
|
|
480
|
+
...data
|
|
472
481
|
// type: 'plugin'
|
|
473
482
|
},
|
|
474
483
|
callback
|
|
@@ -632,89 +641,6 @@ var useAppointmentBookingSetting = () => {
|
|
|
632
641
|
bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
|
|
633
642
|
};
|
|
634
643
|
};
|
|
635
|
-
var APPOINTMENT_BOOKING_BACK_TRAP_KEY = "__pisellAppointmentBookingBackTrap";
|
|
636
|
-
var pushAppointmentBookingBackTrap = () => {
|
|
637
|
-
window.history.pushState(
|
|
638
|
-
{ [APPOINTMENT_BOOKING_BACK_TRAP_KEY]: true },
|
|
639
|
-
"",
|
|
640
|
-
window.location.href
|
|
641
|
-
);
|
|
642
|
-
};
|
|
643
|
-
var useInterceptBrowserBack = ({
|
|
644
|
-
enabled = true,
|
|
645
|
-
stepIndex,
|
|
646
|
-
canGoBack,
|
|
647
|
-
onBack,
|
|
648
|
-
onExit
|
|
649
|
-
}) => {
|
|
650
|
-
const optionsRef = (0, import_react.useRef)({ stepIndex, canGoBack, onBack, onExit });
|
|
651
|
-
optionsRef.current = { stepIndex, canGoBack, onBack, onExit };
|
|
652
|
-
const syncedStepIndexRef = (0, import_react.useRef)(null);
|
|
653
|
-
const trapCountRef = (0, import_react.useRef)(0);
|
|
654
|
-
const restoreBackTrap = (0, import_react.useCallback)(() => {
|
|
655
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
656
|
-
pushAppointmentBookingBackTrap();
|
|
657
|
-
trapCountRef.current += 1;
|
|
658
|
-
}, [enabled]);
|
|
659
|
-
(0, import_react.useEffect)(() => {
|
|
660
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
661
|
-
const targetTrapCount = Math.max(0, stepIndex) + 1;
|
|
662
|
-
if (syncedStepIndexRef.current === null) {
|
|
663
|
-
syncedStepIndexRef.current = stepIndex;
|
|
664
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
665
|
-
pushAppointmentBookingBackTrap();
|
|
666
|
-
trapCountRef.current += 1;
|
|
667
|
-
}
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
if (stepIndex > syncedStepIndexRef.current) {
|
|
671
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
672
|
-
pushAppointmentBookingBackTrap();
|
|
673
|
-
trapCountRef.current += 1;
|
|
674
|
-
}
|
|
675
|
-
} else if (stepIndex < syncedStepIndexRef.current) {
|
|
676
|
-
trapCountRef.current = targetTrapCount;
|
|
677
|
-
}
|
|
678
|
-
syncedStepIndexRef.current = stepIndex;
|
|
679
|
-
}, [enabled, stepIndex]);
|
|
680
|
-
(0, import_react.useEffect)(() => {
|
|
681
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
682
|
-
let isActive = true;
|
|
683
|
-
const handlePopState = () => {
|
|
684
|
-
if (!isActive) return;
|
|
685
|
-
trapCountRef.current = Math.max(0, trapCountRef.current - 1);
|
|
686
|
-
const {
|
|
687
|
-
canGoBack: canGoBackFn,
|
|
688
|
-
onBack: onBackFn,
|
|
689
|
-
onExit: onExitFn
|
|
690
|
-
} = optionsRef.current;
|
|
691
|
-
if (canGoBackFn()) {
|
|
692
|
-
void Promise.resolve(onBackFn());
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
onExitFn == null ? void 0 : onExitFn();
|
|
696
|
-
};
|
|
697
|
-
const handlePageShow = (event) => {
|
|
698
|
-
if (!isActive || !event.persisted) return;
|
|
699
|
-
const { stepIndex: currentStepIndex } = optionsRef.current;
|
|
700
|
-
const targetTrapCount = Math.max(0, currentStepIndex) + 1;
|
|
701
|
-
syncedStepIndexRef.current = currentStepIndex;
|
|
702
|
-
trapCountRef.current = 0;
|
|
703
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
704
|
-
pushAppointmentBookingBackTrap();
|
|
705
|
-
trapCountRef.current += 1;
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
window.addEventListener("popstate", handlePopState, true);
|
|
709
|
-
window.addEventListener("pageshow", handlePageShow);
|
|
710
|
-
return () => {
|
|
711
|
-
isActive = false;
|
|
712
|
-
window.removeEventListener("popstate", handlePopState, true);
|
|
713
|
-
window.removeEventListener("pageshow", handlePageShow);
|
|
714
|
-
};
|
|
715
|
-
}, [enabled]);
|
|
716
|
-
return { restoreBackTrap };
|
|
717
|
-
};
|
|
718
644
|
// Annotate the CommonJS export names for ESM import in node:
|
|
719
645
|
0 && (module.exports = {
|
|
720
646
|
contextUtils,
|
|
@@ -726,7 +652,6 @@ var useInterceptBrowserBack = ({
|
|
|
726
652
|
useAppointmentBookingResource,
|
|
727
653
|
useAppointmentBookingSetting,
|
|
728
654
|
useAppointmentBookingStep,
|
|
729
|
-
useInterceptBrowserBack,
|
|
730
655
|
useIsSkipResourceStep,
|
|
731
656
|
useShopDiscount
|
|
732
657
|
});
|
|
@@ -182,6 +182,7 @@ export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[
|
|
|
182
182
|
*/
|
|
183
183
|
export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
|
|
184
184
|
hasError: boolean;
|
|
185
|
+
isEnableSkuHolderRule: boolean;
|
|
185
186
|
updatedCartList: any[];
|
|
186
187
|
};
|
|
187
188
|
export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
|
|
@@ -436,23 +436,34 @@ var getFormInsertBeforeKey = (currentKey, stepList) => {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
|
|
439
|
+
if (!isFormSubject) return {
|
|
440
|
+
hasError: false,
|
|
441
|
+
isEnableSkuHolderRule: false,
|
|
442
|
+
updatedCartList: carts
|
|
443
|
+
};
|
|
439
444
|
let hasError = false;
|
|
445
|
+
let isEnableSkuHolderRule = false;
|
|
440
446
|
let updatedCartList = [...carts];
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return
|
|
451
|
-
|
|
452
|
-
|
|
447
|
+
updatedCartList = carts == null ? void 0 : carts.map((item) => {
|
|
448
|
+
var _a;
|
|
449
|
+
const holderConfig = ((_a = item == null ? void 0 : item._productInit) == null ? void 0 : _a.holder_config) || {};
|
|
450
|
+
const { status, required, resource_id } = holderConfig || {};
|
|
451
|
+
if (!(item == null ? void 0 : item.holder_id) && status === "enable" && !required && resource_id) {
|
|
452
|
+
isEnableSkuHolderRule = true;
|
|
453
|
+
}
|
|
454
|
+
if (!(item == null ? void 0 : item.holder_id) && required) {
|
|
455
|
+
hasError = true;
|
|
456
|
+
return {
|
|
457
|
+
...item,
|
|
458
|
+
isErrorHolder: true
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
return item;
|
|
462
|
+
});
|
|
453
463
|
return {
|
|
454
464
|
hasError,
|
|
455
|
-
updatedCartList
|
|
465
|
+
updatedCartList,
|
|
466
|
+
isEnableSkuHolderRule
|
|
456
467
|
};
|
|
457
468
|
};
|
|
458
469
|
var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -110,11 +109,4 @@ export declare const walkInData: {
|
|
|
110
109
|
id: number;
|
|
111
110
|
nickname: string;
|
|
112
111
|
};
|
|
113
|
-
export declare const Provider:
|
|
114
|
-
state: FormState;
|
|
115
|
-
} & {
|
|
116
|
-
dispatch: (params: {
|
|
117
|
-
type: string;
|
|
118
|
-
payload: any;
|
|
119
|
-
}) => void;
|
|
120
|
-
}>;
|
|
112
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
166
166
|
export declare const getDuration: (duration: number | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}) => number |
|
|
169
|
+
}) => number | {
|
|
170
170
|
type: string;
|
|
171
171
|
value: number;
|
|
172
|
-
};
|
|
172
|
+
} | "flexible";
|
|
173
173
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
174
174
|
export declare const getIsEdit: (state: any) => boolean;
|
|
175
175
|
export declare type DiscountFilterRejectKey = 'total_credits' | 'per_user_limit' | 'max_per_day' | 'max_per_week' | 'max_per_month';
|
|
@@ -176,7 +176,6 @@ var PaymentMethod = class {
|
|
|
176
176
|
this.isFinished = markAsFinished;
|
|
177
177
|
this.currentQueryApi = null;
|
|
178
178
|
this.currentActionType = null;
|
|
179
|
-
this.currentQueryId = "";
|
|
180
179
|
}
|
|
181
180
|
/**
|
|
182
181
|
* 开始新的操作流程(统一的流程初始化)
|
|
@@ -408,7 +407,7 @@ var PaymentMethod = class {
|
|
|
408
407
|
if (this.isFinished || !this.shouldContinue()) {
|
|
409
408
|
return;
|
|
410
409
|
}
|
|
411
|
-
if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.
|
|
410
|
+
if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.message) === "REQUEST_TIMEOUT") {
|
|
412
411
|
paymentLog.addLog({
|
|
413
412
|
title: "查询轮询结果:error-请求被取消或超时,继续轮询"
|
|
414
413
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PosProps, RouteType } from './const';
|
|
2
3
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
|
3
4
|
action: RouteType;
|
|
@@ -117,18 +117,16 @@ var device_default = ({
|
|
|
117
117
|
clearTimer();
|
|
118
118
|
setLoading(false);
|
|
119
119
|
if (res && Array.isArray(res.list) && res.list.length > 0) {
|
|
120
|
-
import_payLog.default.log("设备列表加载成功", { count: res.list.length, device_number });
|
|
120
|
+
import_payLog.default.log("设备列表加载成功", { count: res.list.length, hasDeviceNumber: !!device_number });
|
|
121
121
|
if (device_number) {
|
|
122
122
|
const hostDeviceList = res.list.filter(
|
|
123
123
|
(item) => {
|
|
124
124
|
var _a, _b;
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
].some((i) => String(i.number) === String(device_number));
|
|
125
|
+
return (_b = (_a = item == null ? void 0 : item.setting) == null ? void 0 : _a.devices) == null ? void 0 : _b.some(
|
|
126
|
+
(i) => i.number === device_number
|
|
127
|
+
);
|
|
129
128
|
}
|
|
130
129
|
);
|
|
131
|
-
import_payLog.default.log("匹配到设备", { count: hostDeviceList == null ? void 0 : hostDeviceList.length });
|
|
132
130
|
if (hostDeviceList.length >= 1) {
|
|
133
131
|
setDataStaus(true);
|
|
134
132
|
setList(setDeviceList(hostDeviceList));
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "stripe" | "payo" | "windcave" | "linkly" | "mx51">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -299,7 +299,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
299
299
|
amount?: string | number | undefined;
|
|
300
300
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
|
-
eftpos?: "
|
|
302
|
+
eftpos?: "tyro" | "stripe" | "payo" | "windcave" | "linkly" | "mx51" | undefined;
|
|
303
303
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
/** 暴露给父组件调用的方法 */
|
|
4
|
-
export interface ProgressBarHandle {
|
|
5
|
-
/** 等价于点击右上角关闭按钮,会走二次确认逻辑 */
|
|
6
|
-
triggerClose: () => void;
|
|
7
|
-
}
|
|
8
3
|
export interface ProgressBarProps {
|
|
9
4
|
title?: string | number;
|
|
10
5
|
description?: string;
|
|
@@ -16,8 +11,6 @@ export interface ProgressBarProps {
|
|
|
16
11
|
style?: React.CSSProperties;
|
|
17
12
|
onBack?: () => void;
|
|
18
13
|
onClose?: () => void;
|
|
19
|
-
/** 外部 triggerClose 打开确认弹窗后,用户点「继续」时的回调 */
|
|
20
|
-
onConfirmCancel?: () => void;
|
|
21
14
|
}
|
|
22
|
-
declare const ProgressBar: React.
|
|
15
|
+
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
23
16
|
export default ProgressBar;
|