@pisell/private-materials 6.3.18 → 6.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.js +36 -18
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.js +6 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.d.ts +7 -0
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/locales.d.ts +837 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/model.d.ts +116 -0
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/group/index.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/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.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/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/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/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +22 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.js +13 -3
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.js +6 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/locales.d.ts +837 -0
- package/lib/components/booking/locales.js +6 -0
- package/lib/components/booking/model.d.ts +116 -0
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.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/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.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/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/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/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +22 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
@@ -99,7 +99,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
99
99
|
},
|
100
100
|
callback: function () {
|
101
101
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
102
|
-
var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, stepList, hasResourceStep, description;
|
102
|
+
var product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
|
103
103
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
104
104
|
while (1) switch (_context.prev = _context.next) {
|
105
105
|
case 0:
|
@@ -117,7 +117,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
117
117
|
|
118
118
|
// 零售模版,直接加入购物车
|
119
119
|
if (!isRetailTemplate) {
|
120
|
-
_context.next =
|
120
|
+
_context.next = 12;
|
121
121
|
break;
|
122
122
|
}
|
123
123
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
@@ -126,51 +126,69 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
126
126
|
}
|
127
127
|
return _context.abrupt("return");
|
128
128
|
case 8:
|
129
|
-
appointmentBooking.storeProduct(product);
|
129
|
+
res = appointmentBooking.storeProduct(product);
|
130
|
+
if (!(!res.success && res.errorCode === 'not_enough_stock')) {
|
131
|
+
_context.next = 11;
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
135
|
+
case 11:
|
130
136
|
return _context.abrupt("return");
|
131
|
-
case
|
137
|
+
case 12:
|
132
138
|
session = data === null || data === void 0 ? void 0 : data.session;
|
133
139
|
if (!session) {
|
134
|
-
_context.next =
|
140
|
+
_context.next = 24;
|
135
141
|
break;
|
136
142
|
}
|
137
143
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
138
144
|
endDate = dayjs(session === null || session === void 0 ? void 0 : session.end_at).format('YYYY-MM-DD');
|
139
|
-
appointmentBooking.addProductToCart({
|
145
|
+
_res = appointmentBooking.addProductToCart({
|
140
146
|
product: _objectSpread({}, product),
|
141
147
|
date: {
|
142
148
|
startTime: "".concat(startDate, " ").concat(session === null || session === void 0 ? void 0 : session.start_time),
|
143
149
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
144
150
|
}
|
145
151
|
});
|
146
|
-
|
152
|
+
if (!(!_res.success && _res.errorCode === 'not_enough_stock')) {
|
153
|
+
_context.next = 19;
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
157
|
+
case 19:
|
158
|
+
appointmentBooking.closeProductDetail();
|
159
|
+
_context.next = 22;
|
147
160
|
return appointmentBooking.getAvailableDate({
|
148
161
|
startDate: startDate,
|
149
162
|
endDate: endDate
|
150
163
|
});
|
151
|
-
case
|
152
|
-
_context.next =
|
164
|
+
case 22:
|
165
|
+
_context.next = 34;
|
153
166
|
break;
|
154
|
-
case
|
167
|
+
case 24:
|
155
168
|
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) || [];
|
156
169
|
activeStatus = resources.find(function (item) {
|
157
170
|
return item.status === 1;
|
158
171
|
});
|
159
172
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
160
|
-
_context.next =
|
173
|
+
_context.next = 28;
|
161
174
|
break;
|
162
175
|
}
|
163
176
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
164
|
-
case
|
165
|
-
appointmentBooking.storeProduct(product);
|
166
|
-
|
177
|
+
case 28:
|
178
|
+
_res2 = appointmentBooking.storeProduct(product);
|
179
|
+
if (!(!_res2.success && _res2.errorCode === 'not_enough_stock')) {
|
180
|
+
_context.next = 31;
|
181
|
+
break;
|
182
|
+
}
|
183
|
+
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
|
184
|
+
case 31:
|
167
185
|
if (!(type === 'duration')) {
|
168
|
-
_context.next =
|
186
|
+
_context.next = 34;
|
169
187
|
break;
|
170
188
|
}
|
171
|
-
_context.next =
|
189
|
+
_context.next = 34;
|
172
190
|
return appointmentBooking.getAvailableDate();
|
173
|
-
case
|
191
|
+
case 34:
|
174
192
|
appointmentBooking.closeProductDetail();
|
175
193
|
|
176
194
|
// 先选择日期流程
|
@@ -199,7 +217,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
199
217
|
removeStep('select-time');
|
200
218
|
}
|
201
219
|
}
|
202
|
-
case
|
220
|
+
case 36:
|
203
221
|
case "end":
|
204
222
|
return _context.stop();
|
205
223
|
}
|
@@ -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;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.less';
|
3
|
+
export interface EditServiceRef {
|
4
|
+
init: (cacheItem?: any, open?: boolean, openEditProduct?: boolean) => void;
|
5
|
+
}
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
7
|
+
export default _default;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { PisellDrawerProps } from '../../../components/drawer';
|
2
|
+
import '../../../info/service/addService/index.less';
|
3
|
+
interface AddServiceProps {
|
4
|
+
onEdit: any;
|
5
|
+
dispatch?: any;
|
6
|
+
state?: any;
|
7
|
+
drawerProps?: PisellDrawerProps;
|
8
|
+
renderMode?: 'current' | 'drawer';
|
9
|
+
}
|
10
|
+
declare const Info: (props: AddServiceProps) => JSX.Element;
|
11
|
+
export default Info;
|