@pisell/private-materials 3.4.34 → 3.4.36
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.js +7 -7
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +37 -20
- package/es/components/appointmentBooking/hooks.js +6 -0
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +35 -13
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/payo/config.js +10 -10
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +52 -6
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +58 -8
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +74 -12
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +73 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +93 -11
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +46 -7
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +64 -13
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -8
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +68 -17
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +86 -14
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +89 -15
- package/es/components/pay/toC/index.js +278 -118
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +22 -0
- package/es/hooks/usePaymentLogger.js +78 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +12 -3
- package/lib/components/appointmentBooking/hooks.js +6 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +6 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +43 -11
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.js +9 -9
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +42 -3
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +52 -15
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +66 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +29 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +50 -6
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +72 -10
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +47 -5
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +61 -3
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +63 -3
- package/lib/components/pay/toC/index.js +183 -48
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +22 -0
- package/lib/hooks/usePaymentLogger.js +69 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/package.json +3 -3
|
@@ -101,7 +101,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
101
101
|
},
|
|
102
102
|
callback: function () {
|
|
103
103
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
104
|
-
var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, stepList, hasResourceStep, description;
|
|
104
|
+
var product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
|
|
105
105
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
106
106
|
while (1) switch (_context.prev = _context.next) {
|
|
107
107
|
case 0:
|
|
@@ -112,7 +112,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
112
112
|
|
|
113
113
|
// 零售模版,直接加入购物车
|
|
114
114
|
if (!isRetailTemplate) {
|
|
115
|
-
_context.next =
|
|
115
|
+
_context.next = 9;
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
@@ -121,11 +121,17 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
121
121
|
}
|
|
122
122
|
return _context.abrupt("return");
|
|
123
123
|
case 5:
|
|
124
|
-
appointmentBooking.storeProduct(product);
|
|
124
|
+
res = appointmentBooking.storeProduct(product);
|
|
125
|
+
if (!(!res.success && res.errorCode === 'not_enough_stock')) {
|
|
126
|
+
_context.next = 8;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
130
|
+
case 8:
|
|
125
131
|
return _context.abrupt("return");
|
|
126
|
-
case
|
|
132
|
+
case 9:
|
|
127
133
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
128
|
-
_context.next =
|
|
134
|
+
_context.next = 12;
|
|
129
135
|
break;
|
|
130
136
|
}
|
|
131
137
|
if (type === 'session') {
|
|
@@ -133,50 +139,61 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
133
139
|
appointmentBooking.getAvailableDate();
|
|
134
140
|
}
|
|
135
141
|
return _context.abrupt("return");
|
|
136
|
-
case
|
|
142
|
+
case 12:
|
|
137
143
|
session = data === null || data === void 0 ? void 0 : data.session;
|
|
138
144
|
if (!session) {
|
|
139
|
-
_context.next =
|
|
145
|
+
_context.next = 24;
|
|
140
146
|
break;
|
|
141
147
|
}
|
|
142
148
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
143
149
|
endDate = dayjs(session === null || session === void 0 ? void 0 : session.end_at).format('YYYY-MM-DD');
|
|
144
|
-
appointmentBooking.addProductToCart({
|
|
150
|
+
_res = appointmentBooking.addProductToCart({
|
|
145
151
|
product: _objectSpread({}, product),
|
|
146
152
|
date: {
|
|
147
153
|
startTime: "".concat(startDate, " ").concat(session === null || session === void 0 ? void 0 : session.start_time),
|
|
148
154
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
|
149
155
|
}
|
|
150
156
|
});
|
|
157
|
+
if (!(!_res.success && _res.errorCode === 'not_enough_stock')) {
|
|
158
|
+
_context.next = 19;
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
162
|
+
case 19:
|
|
151
163
|
appointmentBooking.closeProductDetail();
|
|
152
|
-
_context.next =
|
|
164
|
+
_context.next = 22;
|
|
153
165
|
return appointmentBooking.getAvailableDate({
|
|
154
166
|
startDate: startDate,
|
|
155
167
|
endDate: endDate
|
|
156
168
|
});
|
|
157
|
-
case
|
|
158
|
-
_context.next =
|
|
169
|
+
case 22:
|
|
170
|
+
_context.next = 34;
|
|
159
171
|
break;
|
|
160
|
-
case
|
|
172
|
+
case 24:
|
|
161
173
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
|
162
174
|
activeStatus = resources.find(function (item) {
|
|
163
175
|
return item.status === 1;
|
|
164
176
|
});
|
|
165
177
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
|
166
|
-
_context.next =
|
|
178
|
+
_context.next = 28;
|
|
167
179
|
break;
|
|
168
180
|
}
|
|
169
181
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
170
|
-
case
|
|
171
|
-
appointmentBooking.storeProduct(product);
|
|
172
|
-
|
|
182
|
+
case 28:
|
|
183
|
+
_res2 = appointmentBooking.storeProduct(product);
|
|
184
|
+
if (!(!_res2.success && _res2.errorCode === 'not_enough_stock')) {
|
|
185
|
+
_context.next = 31;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
189
|
+
case 31:
|
|
173
190
|
if (!(type === 'duration')) {
|
|
174
|
-
_context.next =
|
|
191
|
+
_context.next = 34;
|
|
175
192
|
break;
|
|
176
193
|
}
|
|
177
|
-
_context.next =
|
|
194
|
+
_context.next = 34;
|
|
178
195
|
return appointmentBooking.getAvailableDate();
|
|
179
|
-
case
|
|
196
|
+
case 34:
|
|
180
197
|
// 先选择日期流程
|
|
181
198
|
if (isDateSelectedFirst) {
|
|
182
199
|
index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
|
|
@@ -203,7 +220,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
203
220
|
removeStep('select-time');
|
|
204
221
|
}
|
|
205
222
|
}
|
|
206
|
-
case
|
|
223
|
+
case 35:
|
|
207
224
|
case "end":
|
|
208
225
|
return _context.stop();
|
|
209
226
|
}
|
|
@@ -206,6 +206,12 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
206
206
|
if (!result) {
|
|
207
207
|
return Toast(locales.getText('pisell2.appointment.unuse.date'));
|
|
208
208
|
}
|
|
209
|
+
var capacityResult = appointmentBooking.checkMaxDurationCapacity();
|
|
210
|
+
if (!capacityResult.success) {
|
|
211
|
+
var getMessage = locales.getText('pisell2.appointment.unuse.capacity');
|
|
212
|
+
var message = typeof getMessage === 'function' ? getMessage(capacityResult.minAvailableCount) : getMessage;
|
|
213
|
+
return Toast(message);
|
|
214
|
+
}
|
|
209
215
|
}
|
|
210
216
|
if (!isRetailTemplate && currentKey !== null && currentKey !== void 0 && currentKey.startsWith('select-resource')) {
|
|
211
217
|
var _currentSelectedResou;
|
|
@@ -156,6 +156,8 @@ declare const _default: {
|
|
|
156
156
|
'pisell2.text.deposit-delete-message': string;
|
|
157
157
|
'pisell2.text.deposit-paid': string;
|
|
158
158
|
"pisell2.text.stock": string;
|
|
159
|
+
'pisell2.appointment.unuse.stock': string;
|
|
160
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
|
159
161
|
'pisell2.text.payment-link': string;
|
|
160
162
|
'pisell2.text.send-mail': string;
|
|
161
163
|
'pisell2.text.copy-to-clipboard': string;
|
|
@@ -429,6 +431,8 @@ declare const _default: {
|
|
|
429
431
|
'pisell2.text.deposit-delete-message': string;
|
|
430
432
|
'pisell2.text.deposit-paid': string;
|
|
431
433
|
"pisell2.text.stock": string;
|
|
434
|
+
'pisell2.appointment.unuse.stock': string;
|
|
435
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
|
432
436
|
'pisell2.text.payment-link': string;
|
|
433
437
|
'pisell2.text.send-mail': string;
|
|
434
438
|
'pisell2.text.copy-to-clipboard': string;
|
|
@@ -702,6 +706,8 @@ declare const _default: {
|
|
|
702
706
|
'pisell2.text.deposit-delete-message': string;
|
|
703
707
|
'pisell2.text.deposit-paid': string;
|
|
704
708
|
"pisell2.text.stock": string;
|
|
709
|
+
'pisell2.appointment.unuse.stock': string;
|
|
710
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
|
705
711
|
'pisell2.text.payment-link': string;
|
|
706
712
|
'pisell2.text.send-mail': string;
|
|
707
713
|
'pisell2.text.copy-to-clipboard': string;
|
|
@@ -174,6 +174,10 @@ export default {
|
|
|
174
174
|
'pisell2.text.deposit-delete-message': "It cannot be restored after deletion. Please confirm the operation.",
|
|
175
175
|
'pisell2.text.deposit-paid': "Deposit paid",
|
|
176
176
|
"pisell2.text.stock": "Stock",
|
|
177
|
+
'pisell2.appointment.unuse.stock': "Not enough stock",
|
|
178
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
|
179
|
+
return "Only ".concat(count, " spots available. Please reduce quantity.");
|
|
180
|
+
},
|
|
177
181
|
'pisell2.text.payment-link': "Payment link",
|
|
178
182
|
'pisell2.text.send-mail': "Send email",
|
|
179
183
|
'pisell2.text.copy-to-clipboard': "Copy to clipboard",
|
|
@@ -494,6 +498,10 @@ export default {
|
|
|
494
498
|
'pisell2.text.deposit-delete-message': "删除后不可恢复,请确认操作",
|
|
495
499
|
'pisell2.text.deposit-paid': "已付定金",
|
|
496
500
|
"pisell2.text.stock": "库存",
|
|
501
|
+
'pisell2.appointment.unuse.stock': "库存不足",
|
|
502
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
|
503
|
+
return "\u4EC5\u53EF\u9884\u7EA6 ".concat(count, " \u4E2A\uFF0C\u8BF7\u51CF\u5C11\u6570\u91CF");
|
|
504
|
+
},
|
|
497
505
|
'pisell2.text.payment-link': "付款链接",
|
|
498
506
|
'pisell2.text.send-mail': "发送邮件",
|
|
499
507
|
'pisell2.text.copy-to-clipboard': "复制到剪切板",
|
|
@@ -814,6 +822,10 @@ export default {
|
|
|
814
822
|
'pisell2.text.deposit-delete-message': "刪除後不可恢復,請確認操作",
|
|
815
823
|
'pisell2.text.deposit-paid': "已付定金",
|
|
816
824
|
"pisell2.text.stock": "庫存",
|
|
825
|
+
'pisell2.appointment.unuse.stock': "庫存不足",
|
|
826
|
+
'pisell2.appointment.unuse.capacity': function pisell2AppointmentUnuseCapacity(count) {
|
|
827
|
+
return "\u50C5\u53EF\u9810\u7D04 ".concat(count, " \u500B\uFF0C\u8ACB\u6E1B\u5C11\u6578\u91CF");
|
|
828
|
+
},
|
|
817
829
|
'pisell2.text.payment-link': "付款鏈接",
|
|
818
830
|
'pisell2.text.send-mail': "發送郵件",
|
|
819
831
|
'pisell2.text.copy-to-clipboard': "複製到剪切板",
|
|
@@ -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<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -4,13 +4,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
7
8
|
import { useDispatch, updateCustom, updateStatus, updateState } from "../../store";
|
|
8
9
|
import { useFail, useStoreRef } from "../../hooks";
|
|
9
10
|
import { ModeEnum, PayStatus, StatusEnum } from "../../const";
|
|
10
11
|
import { LinklyActionStatus } from "../const";
|
|
11
12
|
|
|
12
13
|
// 全局超时时间
|
|
13
|
-
var GlobalTimeout = 1000 * 60;
|
|
14
|
+
var GlobalTimeout = 1000 * 60 * 2;
|
|
14
15
|
// 单次请求超时时间
|
|
15
16
|
var RequestTimeout = 1000 * 5;
|
|
16
17
|
export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, handleLinklySuccess) {
|
|
@@ -18,7 +19,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
18
19
|
var _useStoreRef = useStoreRef(),
|
|
19
20
|
numRef = _useStoreRef.numRef,
|
|
20
21
|
modeRef = _useStoreRef.modeRef,
|
|
21
|
-
deviceRef = _useStoreRef.deviceRef
|
|
22
|
+
deviceRef = _useStoreRef.deviceRef,
|
|
23
|
+
orderIdRef = _useStoreRef.orderIdRef;
|
|
22
24
|
var fail = useFail(0);
|
|
23
25
|
var failRef = useRef(fail);
|
|
24
26
|
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
@@ -82,7 +84,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
82
84
|
console.log('Success: 全局超时或不需要处理结果,终止查询');
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
|
-
_log("Success", result);
|
|
86
87
|
isQueryFinishedRef.current = true;
|
|
87
88
|
var data = (result === null || result === void 0 ? void 0 : result.data) || {};
|
|
88
89
|
// 交易成功,终止查询
|
|
@@ -103,8 +104,11 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
103
104
|
// 交易状态为0,且不需要签名,则继续查询
|
|
104
105
|
if ((data === null || data === void 0 ? void 0 : data.status) == 0 && (data === null || data === void 0 ? void 0 : data.signature_flag) != 1) {
|
|
105
106
|
console.log('交易状态为0需要继续查询');
|
|
107
|
+
_log("Querying", result);
|
|
106
108
|
isQueryFinishedRef.current = false;
|
|
107
|
-
|
|
109
|
+
setTimeout(function () {
|
|
110
|
+
_resultQuery();
|
|
111
|
+
}, 1500);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
110
114
|
|
|
@@ -153,7 +157,20 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
153
157
|
_log("AbortError");
|
|
154
158
|
console.log('Error: 请求被取消,将继续查询');
|
|
155
159
|
isQueryFinishedRef.current = false;
|
|
156
|
-
|
|
160
|
+
setTimeout(function () {
|
|
161
|
+
_resultQuery();
|
|
162
|
+
}, 1500);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 网关类报错,继续查询
|
|
167
|
+
if (!(error !== null && error !== void 0 && error.code) || "".concat(error.code) === PayStatus.Timeout) {
|
|
168
|
+
_log("NetworkError");
|
|
169
|
+
console.log('Error: 网关类报错,将继续查询');
|
|
170
|
+
isQueryFinishedRef.current = false;
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
_resultQuery();
|
|
173
|
+
}, 1500);
|
|
157
174
|
return;
|
|
158
175
|
}
|
|
159
176
|
_log("Error", error);
|
|
@@ -243,20 +260,25 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
243
260
|
session_id: numRef.current
|
|
244
261
|
};
|
|
245
262
|
var content = [{
|
|
246
|
-
key: '
|
|
247
|
-
value: JSON.stringify(
|
|
263
|
+
key: 'description',
|
|
264
|
+
value: JSON.stringify({
|
|
265
|
+
queryId: queryIdRef.current,
|
|
266
|
+
orderId: orderIdRef.current,
|
|
267
|
+
type: type,
|
|
268
|
+
date: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
269
|
+
})
|
|
248
270
|
}, {
|
|
249
271
|
key: 'params',
|
|
250
272
|
value: JSON.stringify(params)
|
|
251
273
|
}];
|
|
252
|
-
if (type === "
|
|
274
|
+
if (type === "Error") {
|
|
253
275
|
content.push({
|
|
254
|
-
key: '
|
|
276
|
+
key: 'error',
|
|
255
277
|
value: JSON.stringify(res)
|
|
256
278
|
});
|
|
257
|
-
} else
|
|
279
|
+
} else {
|
|
258
280
|
content.push({
|
|
259
|
-
key: '
|
|
281
|
+
key: 'response',
|
|
260
282
|
value: JSON.stringify(res)
|
|
261
283
|
});
|
|
262
284
|
}
|
|
@@ -268,8 +290,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
268
290
|
var run = function run() {
|
|
269
291
|
// 重置状态
|
|
270
292
|
reset();
|
|
271
|
-
console.log('开始查询linkly结果---->>>>>>>');
|
|
272
|
-
_log("Start");
|
|
273
293
|
|
|
274
294
|
// 设置全局超时定时器
|
|
275
295
|
globalTimeoutIdRef.current = setTimeout(function () {
|
|
@@ -285,6 +305,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
285
305
|
startTimeRef.current = Date.now();
|
|
286
306
|
isQueryFinishedRef.current = false;
|
|
287
307
|
queryIdRef.current = getUniqueId();
|
|
308
|
+
console.log('开始查询linkly结果---->>>>>>>');
|
|
309
|
+
_log("Start");
|
|
288
310
|
return _resultQuery();
|
|
289
311
|
};
|
|
290
312
|
return {
|