@pisell/private-materials 3.0.92 → 3.0.94

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 (52) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/render/default/view.js +4 -4
  7. package/build/lowcode/view.js +7 -7
  8. package/es/components/booking/addons/index.d.ts +1 -1
  9. package/es/components/booking/addons/model.d.ts +2 -1
  10. package/es/components/booking/forms/forms.d.ts +1 -1
  11. package/es/components/booking/forms/index.d.ts +1 -1
  12. package/es/components/booking/forms/index.js +1 -1
  13. package/es/components/booking/forms/model.d.ts +2 -1
  14. package/es/components/booking/index.d.ts +1 -1
  15. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +2 -1
  16. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +6 -6
  17. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -6
  18. package/es/components/booking/info/clientVariant/vertical/index.js +29 -18
  19. package/es/components/booking/info/index.d.ts +1 -1
  20. package/es/components/booking/info/model.d.ts +2 -1
  21. package/es/components/booking/locales.d.ts +3 -0
  22. package/es/components/booking/locales.js +6 -3
  23. package/es/components/booking/model.d.ts +2 -1
  24. package/es/components/booking/notes/index.d.ts +1 -1
  25. package/es/components/booking/notes/model.d.ts +2 -1
  26. package/es/components/booking/payments/index.d.ts +1 -1
  27. package/es/components/booking/payments/model.d.ts +2 -1
  28. package/es/components/schedules/index.d.ts +1 -1
  29. package/es/components/schedules/model.d.ts +2 -1
  30. package/lib/components/booking/addons/index.d.ts +1 -1
  31. package/lib/components/booking/addons/model.d.ts +2 -1
  32. package/lib/components/booking/forms/forms.d.ts +1 -1
  33. package/lib/components/booking/forms/index.d.ts +1 -1
  34. package/lib/components/booking/forms/index.js +1 -1
  35. package/lib/components/booking/forms/model.d.ts +2 -1
  36. package/lib/components/booking/index.d.ts +1 -1
  37. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +2 -1
  38. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +5 -4
  39. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +4 -0
  40. package/lib/components/booking/info/clientVariant/vertical/index.js +30 -15
  41. package/lib/components/booking/info/index.d.ts +1 -1
  42. package/lib/components/booking/info/model.d.ts +2 -1
  43. package/lib/components/booking/locales.d.ts +3 -0
  44. package/lib/components/booking/locales.js +6 -3
  45. package/lib/components/booking/model.d.ts +2 -1
  46. package/lib/components/booking/notes/index.d.ts +1 -1
  47. package/lib/components/booking/notes/model.d.ts +2 -1
  48. package/lib/components/booking/payments/index.d.ts +1 -1
  49. package/lib/components/booking/payments/model.d.ts +2 -1
  50. package/lib/components/schedules/index.d.ts +1 -1
  51. package/lib/components/schedules/model.d.ts +2 -1
  52. package/package.json +3 -3
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => JSX.Element;
16
+ declare const Addons: (props: any) => any;
17
17
  export default Addons;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => JSX.Element;
8
+ declare const Forms: (props: any) => any;
9
9
  export default Forms;
@@ -100,7 +100,7 @@ var Forms = Provider(function (props) {
100
100
  }
101
101
  arr = [];
102
102
  res.forEach(function (item, index) {
103
- arr = arr.concat(item.map(function (d) {
103
+ arr = arr.concat((item || []).map(function (d) {
104
104
  return _objectSpread(_objectSpread({}, d), {}, {
105
105
  is_franchisor: index === 1 ? 1 : 0
106
106
  });
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => JSX.Element;
1
+ declare const Booking: (props: any) => any;
2
2
  export default Booking;
@@ -4,6 +4,7 @@ interface useClientFnParams {
4
4
  state: any;
5
5
  setGlobalState: (val: any) => void;
6
6
  modalRef: any;
7
+ onRemoveClient?: () => void;
7
8
  }
8
9
  declare const useClientFn: (_params: useClientFnParams) => {
9
10
  setClient: (client: Partial<FormState["client"]>) => void;
@@ -34,7 +35,7 @@ declare const useClientFn: (_params: useClientFnParams) => {
34
35
  searchChange: (search: string) => void;
35
36
  loading: boolean;
36
37
  loadMore: React.JSX.Element | null;
37
- handleOpenClientModal: () => void;
38
+ handleOpenClientModal: (val?: string) => void;
38
39
  getNickname: (item: any) => any;
39
40
  franchiseeLoading: number;
40
41
  };
@@ -30,7 +30,8 @@ var useClientFn = function useClientFn(_params) {
30
30
  var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8, _state$client$value2;
31
31
  var state = _params.state,
32
32
  setGlobalState = _params.setGlobalState,
33
- modalRef = _params.modalRef;
33
+ modalRef = _params.modalRef,
34
+ onRemoveClient = _params.onRemoveClient;
34
35
  var _useState = useState(false),
35
36
  _useState2 = _slicedToArray(_useState, 2),
36
37
  loadLoading = _useState2[0],
@@ -137,7 +138,7 @@ var useClientFn = function useClientFn(_params) {
137
138
  return _ref2.apply(this, arguments);
138
139
  };
139
140
  }();
140
- var handleOpenClientModal = function handleOpenClientModal() {
141
+ var handleOpenClientModal = function handleOpenClientModal(val) {
141
142
  var _modalRef$current;
142
143
  if (state.disabledEdit) {
143
144
  return;
@@ -146,7 +147,7 @@ var useClientFn = function useClientFn(_params) {
146
147
  showModal: true
147
148
  });
148
149
  getClients(_objectSpread(_objectSpread({}, paramsRef.current), {}, {
149
- search: "",
150
+ search: val || "",
150
151
  skip: 1
151
152
  }));
152
153
  (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.open();
@@ -175,10 +176,8 @@ var useClientFn = function useClientFn(_params) {
175
176
  var menus = useMemo(function () {
176
177
  var list = [
177
178
  // { key: "view", label: locales.getText("pisell2.text.view-profile") },
179
+ // { key: "change", label: locales.getText("pisell2.text.change-customer") },
178
180
  {
179
- key: "change",
180
- label: locales.getText("pisell2.text.change-customer")
181
- }, {
182
181
  key: "remove",
183
182
  label: locales.getText("pisell2.text.remove-customer")
184
183
  }];
@@ -194,6 +193,7 @@ var useClientFn = function useClientFn(_params) {
194
193
  return;
195
194
  }
196
195
  handleSelectClient([walkInData]);
196
+ onRemoveClient === null || onRemoveClient === void 0 ? void 0 : onRemoveClient();
197
197
  };
198
198
  var menuChange = function menuChange(e) {
199
199
  e.domEvent.stopPropagation();
@@ -123,7 +123,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
123
123
  var _useState5 = useState(""),
124
124
  _useState6 = _slicedToArray(_useState5, 2),
125
125
  search = _useState6[0],
126
- setSearch = _useState6[1];
126
+ _setSearch = _useState6[1];
127
127
  useEffect(function () {
128
128
  if (!modalOpen) {
129
129
  setOpen(false);
@@ -133,7 +133,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
133
133
  // 关闭
134
134
  setOpen(false);
135
135
  // 清空搜索
136
- setSearch("");
136
+ _setSearch("");
137
137
  onClose === null || onClose === void 0 ? void 0 : onClose();
138
138
  };
139
139
  var handleOpenModal = function handleOpenModal() {
@@ -150,6 +150,9 @@ var SelectDrawer = function SelectDrawer(props, ref) {
150
150
  open: handleOpenModal,
151
151
  close: function close() {
152
152
  setOpen(false);
153
+ },
154
+ setSearch: function setSearch(val) {
155
+ _setSearch(val);
153
156
  }
154
157
  // setValue: set_value,
155
158
  };
@@ -317,15 +320,14 @@ var SelectDrawer = function SelectDrawer(props, ref) {
317
320
  value: search,
318
321
  allowClear: true,
319
322
  onChange: function onChange(e) {
320
- setSearch(e.target.value);
323
+ _setSearch(e.target.value);
321
324
  if (searchChange) {
322
325
  searchChange(e.target.value);
323
326
  }
324
327
  }
325
328
  })),
326
- width: 300
327
- // titleNoWrap={true}
328
- ,
329
+ width: 300,
330
+ titleNoWrap: true,
329
331
  getContainer: false,
330
332
  destroyOnClose: true,
331
333
  push: {
@@ -1,27 +1,26 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
6
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
8
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
9
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
13
  import React, { useEffect, useMemo, useRef } from 'react';
14
14
  import User01 from '@pisell/icon/es/User01';
15
- import { Avatar, Button, Dropdown, Skeleton, Space } from 'antd';
15
+ import { Avatar, Button, Dropdown, Skeleton } from 'antd';
16
16
  import { image, locales } from '@pisell/utils';
17
- import { DownOutlined, PlusOutlined } from '@ant-design/icons';
18
17
  import useClientFn from "../hooks/useClientFn";
19
18
  import SelectDrawer from "./SelectDrawer";
20
19
  import Pet from "../../pet";
21
20
  import "./index.less";
22
21
  import useEngineContext from "../../../../../hooks/useEngineContext";
23
22
  var VerticalClient = function VerticalClient(props) {
24
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$client$value, _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$pet5, _state$pet5$value, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig12, _state$client;
23
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$pet5, _state$client$value, _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig12, _state$client;
25
24
  var globalState = props.globalState,
26
25
  setGlobalState = props.setGlobalState;
27
26
  var modalRef = useRef();
@@ -29,13 +28,18 @@ var VerticalClient = function VerticalClient(props) {
29
28
  var stateRef = useRef(state);
30
29
  var prevCustomerId = useRef(null);
31
30
  var context = useEngineContext();
32
- var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
31
+ var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, 'franchisee');
33
32
  state.isFranchisee = isFranchisee;
34
33
  stateRef.current = state;
35
34
  var _useClientFn = useClientFn({
36
35
  state: state,
37
36
  setGlobalState: setGlobalState,
38
- modalRef: modalRef
37
+ modalRef: modalRef,
38
+ onRemoveClient: function onRemoveClient() {
39
+ setTimeout(function () {
40
+ handleSelectPet(_defineProperty({}, boardConfig.form_id, []));
41
+ });
42
+ }
39
43
  }),
40
44
  isWalkIn = _useClientFn.isWalkIn,
41
45
  setClient = _useClientFn.setClient,
@@ -155,6 +159,7 @@ var VerticalClient = function VerticalClient(props) {
155
159
  }
156
160
  return false;
157
161
  }, [isWalkIn, state === null || state === void 0 ? void 0 : state.disabledEdit, (_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : _state$pet3.value, (_state$pet4 = state.pet) === null || _state$pet4 === void 0 ? void 0 : _state$pet4.formData, boardConfig.type]);
162
+ console.log((_state$pet5 = state.pet) === null || _state$pet5 === void 0 ? void 0 : _state$pet5.value, 'state.pet?.value');
158
163
  return /*#__PURE__*/React.createElement("div", {
159
164
  className: "pisell-lowcode__booking-vertical-client-wrap"
160
165
  }, /*#__PURE__*/React.createElement("div", {
@@ -190,17 +195,16 @@ var VerticalClient = function VerticalClient(props) {
190
195
  className: "pisell-lowcode__booking-client-desc-item"
191
196
  }, (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.phone) : null), !isWalkIn && /*#__PURE__*/React.createElement("div", {
192
197
  className: "pisell-lowcode__booking-client-action-wrap"
193
- }, !state.disabledEdit && /*#__PURE__*/React.createElement(Dropdown, {
198
+ }, !state.disabledEdit && /*#__PURE__*/React.createElement(Dropdown.Button, {
194
199
  menu: {
195
200
  items: menus,
196
201
  onClick: menuChange
197
202
  },
198
- placement: "bottomRight"
199
- }, /*#__PURE__*/React.createElement(Button, {
200
- onClick: function onClick(e) {
201
- return e.stopPropagation();
203
+ placement: "bottomRight",
204
+ onClick: function onClick() {
205
+ return handleOpenClientModal();
202
206
  }
203
- }, /*#__PURE__*/React.createElement(Space, null, locales.getText('pisell2.text.actions'), /*#__PURE__*/React.createElement(DownOutlined, null)))), /*#__PURE__*/React.createElement(Button, {
207
+ }, locales.getText('pisell2.text.variant-client-change')), /*#__PURE__*/React.createElement(Button, {
204
208
  onClick: function onClick(e) {
205
209
  e.stopPropagation();
206
210
  handleViewClient();
@@ -211,7 +215,7 @@ var VerticalClient = function VerticalClient(props) {
211
215
  clientChangeNotSetPet: true,
212
216
  state: state,
213
217
  dispatch: petDispatch,
214
- hideTitle: !((_state$pet5 = state.pet) !== null && _state$pet5 !== void 0 && (_state$pet5$value = _state$pet5.value) !== null && _state$pet5$value !== void 0 && _state$pet5$value.length),
218
+ hideTitle: true,
215
219
  handleOpenModal: handleOpenModal,
216
220
  addButtonProps: {
217
221
  onClick: handleOpenClientModal,
@@ -223,11 +227,18 @@ var VerticalClient = function VerticalClient(props) {
223
227
  }) : null) : null), isShowAddBtn && /*#__PURE__*/React.createElement("div", {
224
228
  className: "pisell-lowcode__booking-vertical-footer"
225
229
  }, /*#__PURE__*/React.createElement(Button, {
226
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
227
- onClick: handleOpenClientModal,
230
+ onClick: function onClick() {
231
+ var _state$client$value6, _state$client$value7;
232
+ var searchVal = getNickname(state.client.value) || ((_state$client$value6 = state.client.value) === null || _state$client$value6 === void 0 ? void 0 : _state$client$value6.email) || ((_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.phone) || '';
233
+ if (isWalkIn) {
234
+ searchVal = "";
235
+ }
236
+ modalRef.current.setSearch(searchVal);
237
+ handleOpenClientModal(searchVal);
238
+ },
228
239
  block: true,
229
240
  size: "large"
230
- }, locales.getText('pisell2.text.add'))), /*#__PURE__*/React.createElement(SelectDrawer, {
241
+ }, locales.getText('pisell2.text.select'))), /*#__PURE__*/React.createElement(SelectDrawer, {
231
242
  modalOpen: state.modalOpen,
232
243
  loading: loading,
233
244
  autoFocus: !(context !== null && context !== void 0 && (_context$appHelper2 = context.appHelper) !== null && _context$appHelper2 !== void 0 && (_context$appHelper2$u = _context$appHelper2.utils) !== null && _context$appHelper2$u !== void 0 && (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) !== null && _context$appHelper2$u2 !== void 0 && _context$appHelper2$u2.call(_context$appHelper2$u)),
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => JSX.Element;
11
+ declare const Info: (props: any) => any;
12
12
  export default Info;
@@ -1,9 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
3
  export declare const walkInData: {
3
4
  id: number;
4
5
  nickname: string;
5
6
  };
6
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
7
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
7
8
  state: FormState;
8
9
  } & {
9
10
  dispatch: (params: {
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell2.text.terminal-edit-message': string;
160
160
  "pisell2.text.actions": string;
161
161
  "pisell2.text.add-client": string;
162
+ 'pisell2.text.variant-client-change': string;
162
163
  };
163
164
  'zh-CN': {
164
165
  'pisell2.text.refunded-amount': string;
@@ -320,6 +321,7 @@ declare const _default: {
320
321
  'page.booking.text.unlimited': string;
321
322
  "pisell2.text.actions": string;
322
323
  "pisell2.text.add-client": string;
324
+ 'pisell2.text.variant-client-change': string;
323
325
  };
324
326
  'zh-HK': {
325
327
  'pisell2.text.refunded-amount': string;
@@ -481,6 +483,7 @@ declare const _default: {
481
483
  'page.booking.text.unlimited': string;
482
484
  "pisell2.text.actions": string;
483
485
  "pisell2.text.add-client": string;
486
+ 'pisell2.text.variant-client-change': string;
484
487
  };
485
488
  };
486
489
  export default _default;
@@ -173,7 +173,8 @@ export default {
173
173
  'page.booking.text.unlimited': 'Unlimited',
174
174
  'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
175
175
  "pisell2.text.actions": "Actions",
176
- "pisell2.text.add-client": "Add customer"
176
+ "pisell2.text.add-client": "Add customer",
177
+ 'pisell2.text.variant-client-change': 'Change'
177
178
  },
178
179
  'zh-CN': {
179
180
  'pisell2.text.refunded-amount': '已退金额',
@@ -354,7 +355,8 @@ export default {
354
355
  'page.booking.text.fully-booked': '已约满',
355
356
  'page.booking.text.unlimited': '无限制',
356
357
  "pisell2.text.actions": "操作选项",
357
- "pisell2.text.add-client": "添加客户"
358
+ "pisell2.text.add-client": "添加客户",
359
+ 'pisell2.text.variant-client-change': '更改客户'
358
360
  },
359
361
  'zh-HK': {
360
362
  'pisell2.text.refunded-amount': '已退金額',
@@ -535,6 +537,7 @@ export default {
535
537
  'page.booking.text.fully-booked': '已約滿',
536
538
  'page.booking.text.unlimited': '無限制',
537
539
  "pisell2.text.actions": "操作選項",
538
- "pisell2.text.add-client": "添加客戶"
540
+ "pisell2.text.add-client": "添加客戶",
541
+ 'pisell2.text.variant-client-change': '更改客戶'
539
542
  }
540
543
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -95,7 +96,7 @@ export declare const walkInData: {
95
96
  id: number;
96
97
  nickname: string;
97
98
  };
98
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
99
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
99
100
  state: FormState;
100
101
  } & {
101
102
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => JSX.Element;
7
+ declare const Notes: (props: any) => any;
8
8
  export default Notes;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => JSX.Element;
8
+ declare const Payments: (props: any) => any;
9
9
  export default Payments;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => JSX.Element;
2
+ declare const Schedules: (props: any) => any;
3
3
  export default Schedules;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,7 +69,7 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
72
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
72
73
  state: FormState;
73
74
  } & {
74
75
  dispatch: (params: {
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => JSX.Element;
16
+ declare const Addons: (props: any) => any;
17
17
  export default Addons;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => JSX.Element;
8
+ declare const Forms: (props: any) => any;
9
9
  export default Forms;
@@ -78,7 +78,7 @@ var Forms = (0, import_model.Provider)((props) => {
78
78
  let arr = [];
79
79
  res.forEach((item, index) => {
80
80
  arr = arr.concat(
81
- item.map((d) => {
81
+ (item || []).map((d) => {
82
82
  return {
83
83
  ...d,
84
84
  is_franchisor: index === 1 ? 1 : 0
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => JSX.Element;
1
+ declare const Booking: (props: any) => any;
2
2
  export default Booking;
@@ -4,6 +4,7 @@ interface useClientFnParams {
4
4
  state: any;
5
5
  setGlobalState: (val: any) => void;
6
6
  modalRef: any;
7
+ onRemoveClient?: () => void;
7
8
  }
8
9
  declare const useClientFn: (_params: useClientFnParams) => {
9
10
  setClient: (client: Partial<FormState["client"]>) => void;
@@ -34,7 +35,7 @@ declare const useClientFn: (_params: useClientFnParams) => {
34
35
  searchChange: (search: string) => void;
35
36
  loading: boolean;
36
37
  loadMore: React.JSX.Element | null;
37
- handleOpenClientModal: () => void;
38
+ handleOpenClientModal: (val?: string) => void;
38
39
  getNickname: (item: any) => any;
39
40
  franchiseeLoading: number;
40
41
  };
@@ -40,7 +40,7 @@ var import_utils2 = require("@pisell/utils");
40
40
  var import_antd = require("antd");
41
41
  var useClientFn = (_params) => {
42
42
  var _a, _b, _c, _d, _e, _f, _g, _h;
43
- const { state, setGlobalState, modalRef } = _params;
43
+ const { state, setGlobalState, modalRef, onRemoveClient } = _params;
44
44
  const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
45
45
  const [loading, setLoading] = (0, import_react.useState)(false);
46
46
  const [franchiseeLoading, setFranchiseeLoading] = (0, import_react.useState)(0);
@@ -124,7 +124,7 @@ var useClientFn = (_params) => {
124
124
  _setLoading(false);
125
125
  return {};
126
126
  };
127
- const handleOpenClientModal = () => {
127
+ const handleOpenClientModal = (val) => {
128
128
  var _a2;
129
129
  if (state.disabledEdit) {
130
130
  return;
@@ -132,7 +132,7 @@ var useClientFn = (_params) => {
132
132
  setClient({
133
133
  showModal: true
134
134
  });
135
- getClients({ ...paramsRef.current, search: "", skip: 1 });
135
+ getClients({ ...paramsRef.current, search: val || "", skip: 1 });
136
136
  (_a2 = modalRef.current) == null ? void 0 : _a2.open();
137
137
  };
138
138
  const handleViewClient = () => {
@@ -158,7 +158,7 @@ var useClientFn = (_params) => {
158
158
  const menus = (0, import_react.useMemo)(() => {
159
159
  let list = [
160
160
  // { key: "view", label: locales.getText("pisell2.text.view-profile") },
161
- { key: "change", label: import_utils2.locales.getText("pisell2.text.change-customer") },
161
+ // { key: "change", label: locales.getText("pisell2.text.change-customer") },
162
162
  { key: "remove", label: import_utils2.locales.getText("pisell2.text.remove-customer") }
163
163
  ];
164
164
  if (state.disabledEdit) {
@@ -171,6 +171,7 @@ var useClientFn = (_params) => {
171
171
  return;
172
172
  }
173
173
  handleSelectClient([import_model.walkInData]);
174
+ onRemoveClient == null ? void 0 : onRemoveClient();
174
175
  };
175
176
  const menuChange = (e) => {
176
177
  e.domEvent.stopPropagation();
@@ -143,6 +143,9 @@ var SelectDrawer = (props, ref) => {
143
143
  open: handleOpenModal,
144
144
  close: () => {
145
145
  setOpen(false);
146
+ },
147
+ setSearch: (val) => {
148
+ setSearch(val);
146
149
  }
147
150
  // setValue: set_value,
148
151
  };
@@ -280,6 +283,7 @@ var SelectDrawer = (props, ref) => {
280
283
  }
281
284
  )),
282
285
  width: 300,
286
+ titleNoWrap: true,
283
287
  getContainer: false,
284
288
  destroyOnClose: true,
285
289
  push: { distance: 180 },