@pisell/private-materials 6.2.46 → 6.2.47

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.
Files changed (183) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  8. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  9. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  10. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  11. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  12. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  13. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  14. package/es/components/booking/components/voucher/index.js +18 -4
  15. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  16. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  17. package/es/components/booking/info/date/index.d.ts +1 -0
  18. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  19. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  20. package/es/components/booking/info/notes/index.d.ts +0 -1
  21. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  22. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  23. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  24. package/es/components/booking/info2/cartClientCard/index.js +49 -17
  25. package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
  26. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  27. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  28. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  29. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  30. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  31. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  32. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  33. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  34. package/es/components/eftpos/group/index.d.ts +1 -0
  35. package/es/components/eftpos/hooks.d.ts +0 -1
  36. package/es/components/eftpos/receipt/index.d.ts +1 -0
  37. package/es/components/eftposPay/hooks.d.ts +1 -1
  38. package/es/components/eftposPay/pay.d.ts +0 -1
  39. package/es/components/eftposPay/payo/config.d.ts +1 -0
  40. package/es/components/eftposPay/store/index.d.ts +1 -1
  41. package/es/components/eftposPay/tip.d.ts +1 -0
  42. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  43. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  44. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  45. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  46. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  47. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  48. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  50. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  51. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  52. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  53. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  54. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  55. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  56. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  57. package/es/components/login/index.d.ts +1 -0
  58. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  59. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  60. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  61. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  62. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  63. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  64. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  65. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  66. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  67. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  68. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  69. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  70. package/es/components/schedules/calendar/index.d.ts +1 -0
  71. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  72. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  73. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  74. package/es/components/schedules/products/index.d.ts +0 -1
  75. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  76. package/es/components/schedules/products/list/index.d.ts +1 -0
  77. package/es/components/schedules/resources/list/index.d.ts +1 -0
  78. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  79. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  80. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  81. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  82. package/es/components/shoppingCart/index.d.ts +0 -1
  83. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
  84. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  85. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
  86. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  87. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  88. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  89. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  90. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  91. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  92. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  93. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  94. package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  95. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  96. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  97. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  98. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  99. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  100. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  101. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  102. package/lib/components/booking/components/voucher/index.js +15 -3
  103. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  104. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  105. package/lib/components/booking/info/date/index.d.ts +1 -0
  106. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  107. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  108. package/lib/components/booking/info/notes/index.d.ts +0 -1
  109. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  110. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  111. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  112. package/lib/components/booking/info2/cartClientCard/index.js +15 -3
  113. package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
  114. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  115. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  116. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  117. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  118. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  119. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  120. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  121. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  122. package/lib/components/eftpos/group/index.d.ts +1 -0
  123. package/lib/components/eftpos/hooks.d.ts +0 -1
  124. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  125. package/lib/components/eftposPay/hooks.d.ts +1 -1
  126. package/lib/components/eftposPay/pay.d.ts +0 -1
  127. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  128. package/lib/components/eftposPay/store/index.d.ts +1 -1
  129. package/lib/components/eftposPay/tip.d.ts +1 -0
  130. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  131. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  132. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  133. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  134. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  135. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  136. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  137. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  138. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  139. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  140. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  141. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  142. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  143. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  144. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  145. package/lib/components/login/index.d.ts +1 -0
  146. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  147. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  148. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  149. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  150. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  151. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  152. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  153. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  154. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  155. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  156. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  157. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  158. package/lib/components/schedules/calendar/index.d.ts +1 -0
  159. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  160. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  161. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  162. package/lib/components/schedules/products/index.d.ts +0 -1
  163. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  164. package/lib/components/schedules/products/list/index.d.ts +1 -0
  165. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  166. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  167. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  168. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  169. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  170. package/lib/components/shoppingCart/index.d.ts +0 -1
  171. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -0
  172. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  173. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +3 -1
  174. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  175. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  176. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  177. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  178. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  179. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  180. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  181. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  182. package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  183. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const CartItem: ({ onNext }: any) => JSX.Element;
4
3
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DepositModal: (props: any) => JSX.Element;
3
4
  export default DepositModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 空状态
3
4
  * @description:
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IProps {
3
4
  modal: any;
@@ -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: onScanCode,
333
+ onClick: function onClick() {
334
+ return onScanCode();
335
+ },
322
336
  disabled: !code
323
337
  }, locales.getText('pisell2.text.apply')))));
324
338
  };
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -215,23 +215,53 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (props, ref) {
215
215
  }, [pagination, loading]);
216
216
 
217
217
  // 切换客户
218
- var handleSetClient = useMemoizedFn(function (record) {
219
- // 没有客户 设置客户
220
- if (isWalkIn(selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id)) {
221
- var _Toast$success;
222
- selectCustomer(record);
223
- setSearchModalVisible(false);
224
- 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'));
225
- return;
226
- }
227
- if ((selectedCustomer === null || selectedCustomer === void 0 ? void 0 : selectedCustomer.id) === (record === null || record === void 0 ? void 0 : record.id)) {
228
- setSearchModalVisible(false);
229
- return;
230
- }
231
- // 有客户 打开切换客户弹窗
232
- setPendingCustomer(record);
233
- setSwitchModalVisible(true);
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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/actions/index.less';
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface DurationProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from "antd";
2
3
  interface StartTimeProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  isEdit: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RadioGroupProps } from 'antd';
2
3
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
3
4
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos } from './const';
3
2
  /**
4
3
  * @title: tyro 设备连接
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 自定义组件设置
3
4
  * @description: 自定义组件设置
@@ -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" | "payo" | "tyro" | "windcave" | "linkly">;
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
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps } from './const';
3
2
  import './index.less';
4
3
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusEnum } from '../const';
2
3
  export declare const POS: ({ api, onChange, }: {
3
4
  api: {
@@ -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" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './tip.less';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 按钮操作区
3
4
  * @description: 仅包含签名
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => JSX.Element;
3
4
  export default ErrorTip;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: () => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const InformationOptionsModal: (props: any) => JSX.Element;
3
4
  export default InformationOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectHolderModal: (props: any) => JSX.Element;
3
2
  export default SelectHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const WeekItem: (props: any) => JSX.Element;
3
4
  export default WeekItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CalenDateWeekProps = {
3
4
  currentDate: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Resource: (props: any) => JSX.Element;
3
2
  export default Resource;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Schedule: () => JSX.Element;
3
2
  export default Schedule;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ScheduleTimeItem: ({ timeList }: any) => JSX.Element;
3
4
  export default ScheduleTimeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface LoginProps {
3
4
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
3
4
  export default SetupForm;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
2
3
  import './index.less';
3
4
  interface WalletUseListProps {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DateSectionCom: ({ value, onChange, showTime, className, style, useSpace, format, itemStyle, }: any) => JSX.Element;
2
3
  export default DateSectionCom;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const GenderField: (props: any) => JSX.Element;
2
3
  export default GenderField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface CustomerListProps {
3
4
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface valueType {
4
3
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SelectResourcesTable: ({ value, onChange }: any) => JSX.Element;
3
4
  export default SelectResourcesTable;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface RuleSettingProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem } from "../type";
2
3
  declare type CalendarItemProps = {
3
4
  month: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Calendar: () => JSX.Element;
3
4
  export default Calendar;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type CurrentDayProps = {
3
4
  onClose: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ScheduleItem } from "../../type";
2
3
  import "./index.less";
3
4
  declare type ScheduleDetailListPropsType = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
4
3
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Products: () => JSX.Element;
4
3
  export default Products;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type Item = any;
3
4
  interface ProductItemProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface ProductListProps {
3
4
  loading: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ResourcesListProps = {
3
4
  list: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const RelationProduct: ({ value, onChange, }: {
4
3
  value?: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Content: () => JSX.Element;
4
3
  export default Content;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
2
3
  export default useAddService;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (key?: number | undefined) => JSX.Element | null;
2
3
  export default useClearCart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { shoppingCartProps } from './type';
3
2
  declare const shoppingCart: ({ onCard, onAction, onChange, onAddProduct, onActiveKey, ...props }: shoppingCartProps) => JSX.Element;
4
3
  export default shoppingCart;
@@ -260,6 +260,8 @@ var TicketBooking = function TicketBooking() {
260
260
  openScan(function (data) {
261
261
  handleScan(data);
262
262
  });
263
+ }, []);
264
+ useEffect(function () {
263
265
  return function () {
264
266
  closeScan();
265
267
  };