@pisell/private-materials 6.2.46 → 6.2.48
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 +148 -164
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- 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/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +18 -4
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +49 -17
- package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- 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/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/pay.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.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/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/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/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/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -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/ticketBooking/components/ticketBooking/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.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/VerifyingLink.d.ts +0 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- 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/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +15 -3
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +15 -3
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- 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/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/pay.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.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/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/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/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/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -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/ticketBooking/components/ticketBooking/index.js +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.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/VerifyingLink.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
@@ -102,6 +102,18 @@ var VoucherCard = function VoucherCard(props) {
|
|
102
102
|
});
|
103
103
|
return val;
|
104
104
|
}, [state.service.value]);
|
105
|
+
var onScanWallPassCode = useMemoizedFn(function (e) {
|
106
|
+
if (!e.detail.code) {
|
107
|
+
return;
|
108
|
+
}
|
109
|
+
onScanCode(e.detail.code);
|
110
|
+
});
|
111
|
+
useEffect(function () {
|
112
|
+
window.addEventListener('onScanWallPassCode', onScanWallPassCode);
|
113
|
+
return function () {
|
114
|
+
window.removeEventListener('onScanWallPassCode', onScanWallPassCode);
|
115
|
+
};
|
116
|
+
}, []);
|
105
117
|
var addonsMemo = useMemo(function () {
|
106
118
|
var _ref2;
|
107
119
|
var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
|
@@ -210,13 +222,13 @@ var VoucherCard = function VoucherCard(props) {
|
|
210
222
|
|
211
223
|
// apply code
|
212
224
|
var onScanCode = /*#__PURE__*/function () {
|
213
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
225
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(codeParam) {
|
214
226
|
var val;
|
215
227
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
216
228
|
while (1) switch (_context.prev = _context.next) {
|
217
229
|
case 0:
|
218
230
|
_context.next = 2;
|
219
|
-
return shopDiscount.scanCode(code);
|
231
|
+
return shopDiscount.scanCode(codeParam || code);
|
220
232
|
case 2:
|
221
233
|
val = _context.sent;
|
222
234
|
console.log(val);
|
@@ -234,7 +246,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
234
246
|
}
|
235
247
|
}, _callee);
|
236
248
|
}));
|
237
|
-
return function onScanCode() {
|
249
|
+
return function onScanCode(_x) {
|
238
250
|
return _ref3.apply(this, arguments);
|
239
251
|
};
|
240
252
|
}();
|
@@ -318,7 +330,9 @@ var VoucherCard = function VoucherCard(props) {
|
|
318
330
|
// }
|
319
331
|
})), /*#__PURE__*/React.createElement(Button, {
|
320
332
|
size: "small",
|
321
|
-
onClick:
|
333
|
+
onClick: function onClick() {
|
334
|
+
return onScanCode();
|
335
|
+
},
|
322
336
|
disabled: !code
|
323
337
|
}, locales.getText('pisell2.text.apply')))));
|
324
338
|
};
|
@@ -215,23 +215,53 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
215
215
|
}, [pagination, loading]);
|
216
216
|
|
217
217
|
// 切换客户
|
218
|
-
var handleSetClient = useMemoizedFn(function (
|
219
|
-
|
220
|
-
|
221
|
-
var _Toast$success;
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
218
|
+
var handleSetClient = useMemoizedFn( /*#__PURE__*/function () {
|
219
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(record, options) {
|
220
|
+
var _options$fullData, _options$fullData2;
|
221
|
+
var _options$fullData3, _Toast$success;
|
222
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
223
|
+
while (1) switch (_context3.prev = _context3.next) {
|
224
|
+
case 0:
|
225
|
+
if (!(isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) && (options === null || options === void 0 || (_options$fullData = options.fullData) === null || _options$fullData === void 0 ? void 0 : _options$fullData.searchType) === 'walletPass' && options !== null && options !== void 0 && (_options$fullData2 = options.fullData) !== null && _options$fullData2 !== void 0 && _options$fullData2.scanCode)) {
|
226
|
+
_context3.next = 3;
|
227
|
+
break;
|
228
|
+
}
|
229
|
+
window.dispatchEvent(new CustomEvent('onScanWallPassCode', {
|
230
|
+
detail: {
|
231
|
+
code: options === null || options === void 0 || (_options$fullData3 = options.fullData) === null || _options$fullData3 === void 0 ? void 0 : _options$fullData3.scanCode
|
232
|
+
}
|
233
|
+
}));
|
234
|
+
return _context3.abrupt("return");
|
235
|
+
case 3:
|
236
|
+
if (!isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id)) {
|
237
|
+
_context3.next = 8;
|
238
|
+
break;
|
239
|
+
}
|
240
|
+
selectCustomer(record);
|
241
|
+
setSearchModalVisible(false);
|
242
|
+
Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, locales.getText('pisell2.text.add-client-success'));
|
243
|
+
return _context3.abrupt("return");
|
244
|
+
case 8:
|
245
|
+
if (!((selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) === (record === null || record === void 0 ? void 0 : record.id))) {
|
246
|
+
_context3.next = 11;
|
247
|
+
break;
|
248
|
+
}
|
249
|
+
setSearchModalVisible(false);
|
250
|
+
return _context3.abrupt("return");
|
251
|
+
case 11:
|
252
|
+
// 有客户 打开切换客户弹窗
|
253
|
+
setPendingCustomer(record);
|
254
|
+
setSwitchModalVisible(true);
|
255
|
+
case 13:
|
256
|
+
case "end":
|
257
|
+
return _context3.stop();
|
258
|
+
}
|
259
|
+
}, _callee3);
|
260
|
+
}));
|
261
|
+
return function (_x3, _x4) {
|
262
|
+
return _ref4.apply(this, arguments);
|
263
|
+
};
|
264
|
+
}());
|
235
265
|
|
236
266
|
// 确认切换客户
|
237
267
|
var handleConfirmSwitch = function handleConfirmSwitch() {
|
@@ -250,6 +280,8 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
250
280
|
};
|
251
281
|
useMemo(function () {
|
252
282
|
setHandleSetClient(handleSetClient);
|
283
|
+
}, []);
|
284
|
+
useEffect(function () {
|
253
285
|
return function () {
|
254
286
|
setHandleSetClient(null);
|
255
287
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { ClientData } from "./types";
|
2
|
-
export declare const setHandleSetClient: (fn: ((customer: ClientData | null) => void) | null) => void;
|
3
|
-
export declare const getHandleSetClient: () => ((customer: ClientData | null) => void) | null;
|
2
|
+
export declare const setHandleSetClient: (fn: ((customer: ClientData | null, options?: any) => void) | null) => void;
|
3
|
+
export declare const getHandleSetClient: () => ((customer: ClientData | null, options?: any) => void) | null;
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
19
19
|
destroy: () => void;
|
20
|
-
update: (configUpdate: import("antd
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
21
21
|
}>;
|
22
22
|
export { modal };
|
@@ -21,7 +21,9 @@ var useScanGlobalHandle = function useScanGlobalHandle() {
|
|
21
21
|
return;
|
22
22
|
}
|
23
23
|
if (handleSetClient && data.data) {
|
24
|
-
handleSetClient(data.data
|
24
|
+
handleSetClient(data.data, {
|
25
|
+
fullData: data
|
26
|
+
});
|
25
27
|
}
|
26
28
|
};
|
27
29
|
var productHandle = function productHandle(data) {
|
package/es/utils/index.d.ts
CHANGED
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
20
20
|
destroy: () => void;
|
21
|
-
update: (configUpdate: import("antd
|
21
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
22
22
|
}>;
|
23
23
|
export { modal };
|
@@ -107,6 +107,18 @@ var VoucherCard = (props) => {
|
|
107
107
|
});
|
108
108
|
return val;
|
109
109
|
}, [state.service.value]);
|
110
|
+
const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
|
111
|
+
if (!e.detail.code) {
|
112
|
+
return;
|
113
|
+
}
|
114
|
+
onScanCode(e.detail.code);
|
115
|
+
});
|
116
|
+
(0, import_react.useEffect)(() => {
|
117
|
+
window.addEventListener("onScanWallPassCode", onScanWallPassCode);
|
118
|
+
return () => {
|
119
|
+
window.removeEventListener("onScanWallPassCode", onScanWallPassCode);
|
120
|
+
};
|
121
|
+
}, []);
|
110
122
|
const addonsMemo = (0, import_react.useMemo)(() => {
|
111
123
|
var _a2;
|
112
124
|
const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
|
@@ -220,8 +232,8 @@ var VoucherCard = (props) => {
|
|
220
232
|
}
|
221
233
|
});
|
222
234
|
});
|
223
|
-
const onScanCode = async () => {
|
224
|
-
const val = await shopDiscount.scanCode(code);
|
235
|
+
const onScanCode = async (codeParam) => {
|
236
|
+
const val = await shopDiscount.scanCode(codeParam || code);
|
225
237
|
console.log(val);
|
226
238
|
if (val == null ? void 0 : val.isAvailable) {
|
227
239
|
productListToValue(val.productList, true);
|
@@ -305,7 +317,7 @@ var VoucherCard = (props) => {
|
|
305
317
|
allowClear: true,
|
306
318
|
placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
|
307
319
|
}
|
308
|
-
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
320
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: () => onScanCode(), disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
309
321
|
));
|
310
322
|
};
|
311
323
|
var voucher_default = VoucherCard;
|