@pisell/private-materials 6.3.55 → 6.3.57
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/appointmentBooking/components/Services/index.js +27 -24
- package/es/components/appointmentBooking/components/Voucher/index.js +14 -0
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +29 -9
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- 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/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -145
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/es/components/pay/toC/index.js +65 -31
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +18 -0
- package/es/components/pay/toC/serve.js +29 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +4 -0
- 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/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +9 -12
- package/es/components/walletList/index.js +173 -39
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +236 -0
- package/es/plus/selectHolder/index.less +117 -0
- package/es/plus/selectHolder/locales.d.ts +21 -0
- package/es/plus/selectHolder/locales.js +20 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.js +12 -3
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/index.js +223 -41
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/lib/components/appointmentBooking/components/Services/index.js +5 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +12 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +29 -6
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- 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/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/lib/components/pay/toC/index.js +52 -19
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +18 -0
- package/lib/components/pay/toC/serve.js +6 -0
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +4 -0
- 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/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -5
- package/lib/components/walletList/index.js +100 -4
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +202 -0
- package/lib/plus/selectHolder/index.less +117 -0
- package/lib/plus/selectHolder/locales.d.ts +21 -0
- package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/index.js +154 -27
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +2 -2
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/pay/toC/locales.d.ts +0 -301
- package/es/components/pay/toC/status.d.ts +0 -13
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/Detail/serve.js +0 -64
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/serve.js +0 -205
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/walletList/locales.d.ts +0 -18
- package/es/components/walletList/types/index.d.ts +0 -194
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
- package/es/plus/walletEditor/locales.d.ts +0 -126
- package/es/plus/walletEditor/types.d.ts +0 -52
- package/es/plus/walletPassGallery/locales.d.ts +0 -270
- package/es/pro/Login2.0/hooks/index.d.ts +0 -2
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
- package/es/pro/Login2.0/locales.d.ts +0 -543
- package/es/pro/Login2.0/shared/Header.d.ts +0 -11
- package/es/pro/Login2.0/shared/registerFlow.d.ts +0 -116
- package/es/pro/Login2.0/shared/types.d.ts +0 -232
- package/es/pro/Login2.0/types.d.ts +0 -167
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/pay/toC/locales.d.ts +0 -301
- package/lib/components/pay/toC/status.d.ts +0 -13
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/components/index.js +0 -45
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/walletList/locales.d.ts +0 -18
- package/lib/components/walletList/types/index.d.ts +0 -194
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
- package/lib/plus/walletEditor/locales.d.ts +0 -126
- package/lib/plus/walletEditor/types.d.ts +0 -52
- package/lib/plus/walletPassGallery/locales.d.ts +0 -270
- package/lib/pro/Login2.0/hooks/index.d.ts +0 -2
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
- package/lib/pro/Login2.0/locales.d.ts +0 -543
- package/lib/pro/Login2.0/shared/Header.d.ts +0 -11
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +0 -116
- package/lib/pro/Login2.0/shared/types.d.ts +0 -232
- package/lib/pro/Login2.0/types.d.ts +0 -167
|
@@ -112,17 +112,20 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
112
112
|
},
|
|
113
113
|
callback: function () {
|
|
114
114
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
115
|
-
var product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
|
|
115
|
+
var _appointmentBooking$o, product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
|
|
116
116
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
117
117
|
while (1) switch (_context.prev = _context.next) {
|
|
118
118
|
case 0:
|
|
119
|
+
if (data !== null && data !== void 0 && data.origin) {
|
|
120
|
+
data.origin.isFormSubject = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSubject) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.type) === 'form';
|
|
121
|
+
}
|
|
119
122
|
if (!data.isCancel) {
|
|
120
|
-
_context.next =
|
|
123
|
+
_context.next = 4;
|
|
121
124
|
break;
|
|
122
125
|
}
|
|
123
126
|
appointmentBooking.closeProductDetail();
|
|
124
127
|
return _context.abrupt("return");
|
|
125
|
-
case
|
|
128
|
+
case 4:
|
|
126
129
|
product = _objectSpread(_objectSpread({}, data), {}, {
|
|
127
130
|
options: (data === null || data === void 0 ? void 0 : data.option) || []
|
|
128
131
|
});
|
|
@@ -130,27 +133,27 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
130
133
|
|
|
131
134
|
// 零售模版,直接加入购物车
|
|
132
135
|
if (!isRetailTemplate) {
|
|
133
|
-
_context.next =
|
|
136
|
+
_context.next = 13;
|
|
134
137
|
break;
|
|
135
138
|
}
|
|
136
139
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
137
|
-
_context.next =
|
|
140
|
+
_context.next = 9;
|
|
138
141
|
break;
|
|
139
142
|
}
|
|
140
143
|
return _context.abrupt("return");
|
|
141
|
-
case
|
|
144
|
+
case 9:
|
|
142
145
|
res = appointmentBooking.storeProduct(product);
|
|
143
146
|
if (!(!res.success && res.errorCode === 'not_enough_stock')) {
|
|
144
|
-
_context.next =
|
|
147
|
+
_context.next = 12;
|
|
145
148
|
break;
|
|
146
149
|
}
|
|
147
150
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
148
|
-
case 11:
|
|
149
|
-
return _context.abrupt("return");
|
|
150
151
|
case 12:
|
|
152
|
+
return _context.abrupt("return");
|
|
153
|
+
case 13:
|
|
151
154
|
session = data === null || data === void 0 ? void 0 : data.session;
|
|
152
155
|
if (!session) {
|
|
153
|
-
_context.next =
|
|
156
|
+
_context.next = 25;
|
|
154
157
|
break;
|
|
155
158
|
}
|
|
156
159
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
@@ -163,45 +166,45 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
163
166
|
}
|
|
164
167
|
});
|
|
165
168
|
if (!(!_res.success && _res.errorCode === 'not_enough_stock')) {
|
|
166
|
-
_context.next =
|
|
169
|
+
_context.next = 20;
|
|
167
170
|
break;
|
|
168
171
|
}
|
|
169
172
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
170
|
-
case
|
|
173
|
+
case 20:
|
|
171
174
|
appointmentBooking.closeProductDetail();
|
|
172
|
-
_context.next =
|
|
175
|
+
_context.next = 23;
|
|
173
176
|
return appointmentBooking.getAvailableDate({
|
|
174
177
|
startDate: startDate,
|
|
175
178
|
endDate: endDate
|
|
176
179
|
});
|
|
177
|
-
case
|
|
178
|
-
_context.next =
|
|
180
|
+
case 23:
|
|
181
|
+
_context.next = 35;
|
|
179
182
|
break;
|
|
180
|
-
case
|
|
183
|
+
case 25:
|
|
181
184
|
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) || [];
|
|
182
185
|
activeStatus = resources.find(function (item) {
|
|
183
186
|
return item.status === 1;
|
|
184
187
|
});
|
|
185
188
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
|
186
|
-
_context.next =
|
|
189
|
+
_context.next = 29;
|
|
187
190
|
break;
|
|
188
191
|
}
|
|
189
192
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
190
|
-
case
|
|
193
|
+
case 29:
|
|
191
194
|
_res2 = appointmentBooking.storeProduct(product);
|
|
192
195
|
if (!(!_res2.success && _res2.errorCode === 'not_enough_stock')) {
|
|
193
|
-
_context.next =
|
|
196
|
+
_context.next = 32;
|
|
194
197
|
break;
|
|
195
198
|
}
|
|
196
199
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
|
197
|
-
case
|
|
200
|
+
case 32:
|
|
198
201
|
if (!(type === 'duration')) {
|
|
199
|
-
_context.next =
|
|
202
|
+
_context.next = 35;
|
|
200
203
|
break;
|
|
201
204
|
}
|
|
202
|
-
_context.next =
|
|
205
|
+
_context.next = 35;
|
|
203
206
|
return appointmentBooking.getAvailableDate();
|
|
204
|
-
case
|
|
207
|
+
case 35:
|
|
205
208
|
appointmentBooking.closeProductDetail();
|
|
206
209
|
|
|
207
210
|
// 先选择日期流程
|
|
@@ -230,7 +233,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
230
233
|
removeStep('select-time');
|
|
231
234
|
}
|
|
232
235
|
}
|
|
233
|
-
case
|
|
236
|
+
case 37:
|
|
234
237
|
case "end":
|
|
235
238
|
return _context.stop();
|
|
236
239
|
}
|
|
@@ -115,6 +115,20 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
115
115
|
var val = shopDiscount.calcDiscount(products);
|
|
116
116
|
batchUpdateCart(val.productList);
|
|
117
117
|
};
|
|
118
|
+
var stringifiedHolders = useMemo(function () {
|
|
119
|
+
var _ret;
|
|
120
|
+
try {
|
|
121
|
+
_ret = JSON.stringify(products.map(function (item) {
|
|
122
|
+
return (item === null || item === void 0 ? void 0 : item.holder_id) || '';
|
|
123
|
+
}));
|
|
124
|
+
} catch (error) {
|
|
125
|
+
_ret = '';
|
|
126
|
+
}
|
|
127
|
+
return _ret;
|
|
128
|
+
}, [products]);
|
|
129
|
+
useEffect(function () {
|
|
130
|
+
onCartChange();
|
|
131
|
+
}, [stringifiedHolders]);
|
|
118
132
|
|
|
119
133
|
// // 监听customer变化
|
|
120
134
|
useEffect(function () {
|
|
@@ -40,7 +40,7 @@ var ShopDiscountHooks = {
|
|
|
40
40
|
};
|
|
41
41
|
var services = {};
|
|
42
42
|
var VoucherCard = function VoucherCard(props) {
|
|
43
|
-
var _context$appHelper, _state$client$value, _state$service2;
|
|
43
|
+
var _context$appHelper, _state$client$value, _state$pet2, _state$service2;
|
|
44
44
|
var context = useEngineContext();
|
|
45
45
|
var state = props.state,
|
|
46
46
|
dispatch = props.dispatch,
|
|
@@ -63,6 +63,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
63
63
|
var addonsValueRef = useRef(state.addons.value);
|
|
64
64
|
var isBooking4Shop = useIsBooking4Shop(state);
|
|
65
65
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
66
|
+
var holderChangedRef = useRef(false);
|
|
66
67
|
services = state.service;
|
|
67
68
|
|
|
68
69
|
// 设置client
|
|
@@ -83,7 +84,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
83
84
|
var serviceMemo = useMemo(function () {
|
|
84
85
|
var _ref;
|
|
85
86
|
var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
|
|
86
|
-
var _value$_extend, _value$_extend2;
|
|
87
|
+
var _value$_extend, _value$_extend2, _value$_extend3;
|
|
87
88
|
return {
|
|
88
89
|
booking_id: value.booking_id,
|
|
89
90
|
id: value.id,
|
|
@@ -92,7 +93,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
92
93
|
discount_list: value.discount_list,
|
|
93
94
|
origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
|
|
94
95
|
quantity: value._extend.quantity,
|
|
95
|
-
startDate: value._extend.startDate
|
|
96
|
+
startDate: value._extend.startDate,
|
|
97
|
+
holder_id: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.holder_id
|
|
96
98
|
};
|
|
97
99
|
});
|
|
98
100
|
return val;
|
|
@@ -105,20 +107,37 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
105
107
|
var addonsMemo = useMemo(function () {
|
|
106
108
|
var _ref2;
|
|
107
109
|
var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
|
|
108
|
-
var _value$
|
|
110
|
+
var _value$_extend4, _value$_extend5;
|
|
109
111
|
return {
|
|
110
112
|
booking_id: value.booking_id,
|
|
111
113
|
id: value.id,
|
|
112
114
|
_id: value._id,
|
|
113
115
|
price: value.price,
|
|
114
|
-
total: value === null || value === void 0 || (_value$
|
|
116
|
+
total: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.total,
|
|
115
117
|
discount_list: value.discount_list,
|
|
116
118
|
_key: value._key,
|
|
117
|
-
num: value === null || value === void 0 || (_value$
|
|
119
|
+
num: value === null || value === void 0 || (_value$_extend5 = value._extend) === null || _value$_extend5 === void 0 ? void 0 : _value$_extend5.quantity
|
|
118
120
|
};
|
|
119
121
|
});
|
|
120
122
|
return val;
|
|
121
123
|
}, [state.addons.value]);
|
|
124
|
+
var holdersMemo = useMemo(function () {
|
|
125
|
+
if (isBooking4Shop) {
|
|
126
|
+
var _state$pet;
|
|
127
|
+
var list = [];
|
|
128
|
+
if ((_state$pet = state.pet) !== null && _state$pet !== void 0 && _state$pet.value) {
|
|
129
|
+
var entries = Object.entries(state.pet.value);
|
|
130
|
+
// 多余 1 个表单类型时,无法计算
|
|
131
|
+
// 同一表单多个 holder 时,os内只取第一个
|
|
132
|
+
if (entries.length === 1) {
|
|
133
|
+
list = entries[0][1];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
shopDiscount.setHolders(list);
|
|
137
|
+
holderChangedRef.current = true;
|
|
138
|
+
return list || [];
|
|
139
|
+
}
|
|
140
|
+
}, [(_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value, isBooking4Shop]);
|
|
122
141
|
var disabled = useMemo(function () {
|
|
123
142
|
var _state$bookingDetail;
|
|
124
143
|
if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
|
|
@@ -130,8 +149,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
130
149
|
}, [state, addonsMemo, serviceMemo]);
|
|
131
150
|
var _useDebounceFn = useDebounceFn(function () {
|
|
132
151
|
var _state$service;
|
|
133
|
-
|
|
134
|
-
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
|
|
152
|
+
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
|
|
135
153
|
return;
|
|
136
154
|
}
|
|
137
155
|
if (isBooking4Shop) {
|
|
@@ -139,6 +157,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
139
157
|
console.log('input: ', state.service.value);
|
|
140
158
|
console.log('output: ', val);
|
|
141
159
|
productListToValue(val.productList);
|
|
160
|
+
// 重置 holder 变化标识,防止重复计算
|
|
161
|
+
holderChangedRef.current = false;
|
|
142
162
|
}
|
|
143
163
|
}, {
|
|
144
164
|
wait: 500
|
|
@@ -148,7 +168,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
148
168
|
// 更新productList
|
|
149
169
|
useEffect(function () {
|
|
150
170
|
run();
|
|
151
|
-
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
|
|
171
|
+
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), JSON.stringify(holdersMemo), isBooking4Shop]);
|
|
152
172
|
var fn = useMemoizedFn(function (result) {
|
|
153
173
|
var _result$productList;
|
|
154
174
|
if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
|
|
@@ -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
|
};
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -15,11 +15,16 @@ export interface WalletPassProps {
|
|
|
15
15
|
walletPass: {
|
|
16
16
|
cards: WalletPassDataType[];
|
|
17
17
|
amount: number;
|
|
18
|
+
recommended?: WalletPassDataType[];
|
|
19
|
+
transformList?: WalletPassDataType[];
|
|
20
|
+
noApplicableVoucher?: WalletPassDataType[];
|
|
18
21
|
};
|
|
19
22
|
walletSetting: {
|
|
20
23
|
name: string;
|
|
21
24
|
popup_status: 0 | 1;
|
|
22
25
|
};
|
|
26
|
+
orderDetail: any;
|
|
27
|
+
total_amount: number;
|
|
23
28
|
}
|
|
24
29
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
|
|
25
30
|
export default _default;
|