@pisell/private-materials 6.3.34 → 6.3.36

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 (61) 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/ConfirmInformation/index.js +15 -9
  8. package/es/components/booking/addons/model.d.ts +10 -1
  9. package/es/components/booking/components/customSelect/index.js +19 -4
  10. package/es/components/booking/forms/footer.js +24 -10
  11. package/es/components/booking/forms/model.d.ts +10 -1
  12. package/es/components/booking/info/client/index.js +28 -13
  13. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +14 -8
  14. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  15. package/es/components/booking/info/model.d.ts +10 -1
  16. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/locales.d.ts +3 -0
  19. package/es/components/booking/locales.js +6 -3
  20. package/es/components/booking/model.d.ts +9 -1
  21. package/es/components/booking/notes/model.d.ts +10 -1
  22. package/es/components/booking/payments/model.d.ts +10 -1
  23. package/es/components/pay/toC/model.d.ts +9 -1
  24. package/es/components/schedules/model.d.ts +9 -1
  25. package/es/components/wallet/Detail/model.d.ts +13 -1
  26. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  27. package/es/components/wallet/PointCard/model.d.ts +13 -1
  28. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  29. package/es/components/wallet/Voucher/model.d.ts +13 -1
  30. package/es/components/wallet/model.d.ts +9 -1
  31. package/es/plus/contactInfoModal/index.d.ts +1 -0
  32. package/es/plus/contactInfoModal/index.js +1 -0
  33. package/es/pro/Login2.0/Login2.js +7 -4
  34. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +5 -0
  35. package/lib/components/booking/addons/model.d.ts +10 -1
  36. package/lib/components/booking/components/customSelect/index.js +23 -4
  37. package/lib/components/booking/forms/footer.js +29 -11
  38. package/lib/components/booking/forms/model.d.ts +10 -1
  39. package/lib/components/booking/info/client/index.js +14 -1
  40. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +6 -1
  41. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  42. package/lib/components/booking/info/model.d.ts +10 -1
  43. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  44. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  45. package/lib/components/booking/locales.d.ts +3 -0
  46. package/lib/components/booking/locales.js +6 -3
  47. package/lib/components/booking/model.d.ts +9 -1
  48. package/lib/components/booking/notes/model.d.ts +10 -1
  49. package/lib/components/booking/payments/model.d.ts +10 -1
  50. package/lib/components/pay/toC/model.d.ts +9 -1
  51. package/lib/components/schedules/model.d.ts +9 -1
  52. package/lib/components/wallet/Detail/model.d.ts +13 -1
  53. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  54. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  55. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  56. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  57. package/lib/components/wallet/model.d.ts +9 -1
  58. package/lib/plus/contactInfoModal/index.d.ts +1 -0
  59. package/lib/plus/contactInfoModal/index.js +1 -0
  60. package/lib/pro/Login2.0/Login2.js +6 -3
  61. package/package.json +4 -4
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
@@ -10,6 +10,7 @@ interface ContactInfoModalProps {
10
10
  dataSource?: {
11
11
  first_name?: string;
12
12
  last_name?: string;
13
+ display_name?: string;
13
14
  email?: string;
14
15
  phone?: {
15
16
  phone: string;
@@ -97,6 +97,7 @@ var ContactInfoModalContent = function ContactInfoModalContent(props) {
97
97
  onSave({
98
98
  first_name: (_values === null || _values === void 0 ? void 0 : _values.first_name) || '',
99
99
  last_name: (_values === null || _values === void 0 ? void 0 : _values.last_name) || '',
100
+ display_name: _values !== null && _values !== void 0 && _values.first_name || _values !== null && _values !== void 0 && _values.last_name ? "".concat((_values === null || _values === void 0 ? void 0 : _values.first_name) || '', " ").concat((_values === null || _values === void 0 ? void 0 : _values.last_name) || '') : '',
100
101
  phone: {
101
102
  phone: (_values === null || _values === void 0 || (_values$phone = _values.phone) === null || _values$phone === void 0 ? void 0 : _values$phone.phone) || '',
102
103
  country_calling_code: (_values === null || _values === void 0 || (_values$phone2 = _values.phone) === null || _values$phone2 === void 0 ? void 0 : _values$phone2.countryCallingCode) || '',
@@ -13,7 +13,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
13
13
  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; }
14
14
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
- import React, { useState, useEffect, useCallback, useMemo } from 'react';
16
+ import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
17
17
  import { Form, message } from 'antd';
18
18
  import { Input, Button, Checkbox } from '@pisell/materials';
19
19
  import classNames from 'classnames';
@@ -112,6 +112,7 @@ var Login2 = function Login2(_ref) {
112
112
  _useState10 = _slicedToArray(_useState9, 2),
113
113
  currentVerificationMethod = _useState10[0],
114
114
  setCurrentVerificationMethod = _useState10[1];
115
+ var hasTriggeredGuestLoginRef = useRef(false);
115
116
 
116
117
  // 初始化 currentLoginMethod(当 loginMethods 变化时)
117
118
  useEffect(function () {
@@ -130,9 +131,11 @@ var Login2 = function Login2(_ref) {
130
131
  }
131
132
  }
132
133
  // 如果只有 guest 登录,则默认直接使用 guest 登录
133
- if (loginMethods.length === 1 && loginMethods[0].type === 'guest') {
134
- handleGuestLogin();
135
- }
134
+ if (hasTriggeredGuestLoginRef.current) return;
135
+ var hasOnlyGuest = loginMethods.length === 1 && loginMethods[0].type === 'guest';
136
+ if (!hasOnlyGuest) return;
137
+ hasTriggeredGuestLoginRef.current = true;
138
+ handleGuestLogin();
136
139
  }, [loginMethods, currentLoginMethod]);
137
140
 
138
141
  // 检测浏览器记忆的凭据和 Remember me 状态
@@ -228,6 +228,11 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
228
228
  country_code: ((_g = contacts_info == null ? void 0 : contacts_info.phone) == null ? void 0 : _g.countryCode) || ""
229
229
  };
230
230
  contacts_info.phone = newPhone;
231
+ if ((contacts_info == null ? void 0 : contacts_info.first_name) || (contacts_info == null ? void 0 : contacts_info.last_name)) {
232
+ contacts_info.display_name = `${(contacts_info == null ? void 0 : contacts_info.first_name) || ""} ${(contacts_info == null ? void 0 : contacts_info.last_name) || ""}`;
233
+ } else {
234
+ contacts_info.display_name = "";
235
+ }
231
236
  console.log("contacts_info", contacts_info);
232
237
  }
233
238
  } catch (error) {
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -165,14 +165,33 @@ var CustomSelect = (props, ref) => {
165
165
  const renderList = (0, import_react.useMemo)(() => {
166
166
  let _list = [...options];
167
167
  if (search) {
168
- const isIncludes = (str) => {
169
- return str.toLowerCase().indexOf(search.toLowerCase()) !== -1;
168
+ const isIncludes = (item) => {
169
+ try {
170
+ const q = search.toLowerCase();
171
+ const numericKeys = Object.keys(item).filter((k) => /^\d+$/.test(k));
172
+ const customerKeys = [
173
+ "customer_nickname",
174
+ "customer_first_name",
175
+ "customer_last_name",
176
+ "customer_phone",
177
+ "customer_email"
178
+ ];
179
+ const allKeys = [...numericKeys, ...customerKeys];
180
+ return allKeys.some((k) => {
181
+ const val = item[k];
182
+ if (val === null || val === void 0) return false;
183
+ const str = String(val).toLowerCase();
184
+ return str.includes(q);
185
+ });
186
+ } catch (e) {
187
+ return false;
188
+ }
170
189
  };
171
190
  _list = _list.filter((d) => {
172
191
  if (filterItem) {
173
192
  return filterItem(d, search);
174
193
  }
175
- return isIncludes(d.main_field || "");
194
+ return isIncludes(d);
176
195
  });
177
196
  }
178
197
  return _list;
@@ -274,7 +293,7 @@ var CustomSelect = (props, ref) => {
274
293
  ref: searchRef,
275
294
  prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
276
295
  style: { marginTop: 16, height: 44 },
277
- placeholder: import_utils2.locales.getText("pisell2.text.search"),
296
+ placeholder: import_utils2.locales.getText("pisell2.booking.text.search-placeholder"),
278
297
  value: search,
279
298
  allowClear: true,
280
299
  onChange: (e) => {
@@ -39,31 +39,49 @@ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
39
39
  var import_sendModal = __toESM(require("./sendModal"));
40
40
  var import_utils = require("@pisell/utils");
41
41
  var Footer = ({ state, reload }) => {
42
- var _a, _b, _c, _d;
42
+ var _a, _b, _c, _d, _e;
43
43
  const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
44
44
  const handleReload = async () => {
45
45
  await reload();
46
46
  import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
47
47
  };
48
48
  const defaultValues = (0, import_react.useMemo)(() => {
49
- var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j;
49
+ var _a2, _b2;
50
+ const { email: contactsEmail, phone: contactsPhone } = ((_a2 = state.contacts_info) == null ? void 0 : _a2.value) || {};
51
+ const {
52
+ email: clientEmail,
53
+ phone: clientPhone,
54
+ country_calling_code: clientCode
55
+ } = ((_b2 = state.client) == null ? void 0 : _b2.value) || {};
56
+ let email = contactsEmail || clientEmail;
57
+ let phone = (contactsPhone == null ? void 0 : contactsPhone.phone) || clientPhone;
58
+ let code = (contactsPhone == null ? void 0 : contactsPhone.country_calling_code) || clientCode || "+61";
59
+ if (!code.startsWith("+")) {
60
+ code = `+${code}`;
61
+ }
50
62
  return {
51
- sendSms: !!((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.phone),
52
- sendEmail: !!((_d2 = (_c2 = state.client) == null ? void 0 : _c2.value) == null ? void 0 : _d2.email),
53
- email: (_f = (_e = state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.email,
63
+ sendSms: !!phone,
64
+ sendEmail: !!email,
65
+ email,
54
66
  phone: {
55
- code: (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.country_calling_code,
56
- phone: (_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.phone
67
+ code,
68
+ phone
57
69
  }
58
70
  };
59
- }, [(_a = state.client) == null ? void 0 : _a.value]);
60
- if (!state.bookingId || !((_b = state == null ? void 0 : state.form) == null ? void 0 : _b.forms.length)) {
71
+ }, [(_a = state.client) == null ? void 0 : _a.value, (_b = state.contacts_info) == null ? void 0 : _b.value]);
72
+ if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
61
73
  return null;
62
74
  }
63
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Tooltip, { title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip") }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), /* @__PURE__ */ import_react.default.createElement(
75
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
76
+ import_materials.Tooltip,
77
+ {
78
+ title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip")
79
+ },
80
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })
81
+ ), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), open && /* @__PURE__ */ import_react.default.createElement(
64
82
  import_sendModal.default,
65
83
  {
66
- refreshKey: (_d = (_c = state.client) == null ? void 0 : _c.value) == null ? void 0 : _d.id,
84
+ refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
67
85
  open,
68
86
  onCancel: () => setOpen(false),
69
87
  onOk: handleOk,
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -91,8 +91,13 @@ var Client = () => {
91
91
  }
92
92
  _setLoading(true);
93
93
  const api = state.isFranchisee ? import_serve.getFranchiseeCustomerList : state.apis.getClientsEs;
94
+ const withKey = [...(resetParams == null ? void 0 : resetParams.with) || []];
95
+ if (!withKey.includes("contactsInfo")) {
96
+ withKey.push("contactsInfo");
97
+ }
94
98
  const data = await api({
95
99
  ...resetParams,
100
+ with: withKey,
96
101
  ...!state.isFranchisee ? { _config: { abort: true } } : {}
97
102
  });
98
103
  const list = ((data == null ? void 0 : data.list) || []).map((d) => {
@@ -322,6 +327,14 @@ var Client = () => {
322
327
  closeCallback: () => {
323
328
  },
324
329
  optionRender: (item) => {
330
+ var _a2, _b2, _c2, _d2, _e2;
331
+ console.log("render_optionRender", item);
332
+ let displayEmail = item == null ? void 0 : item.email;
333
+ let displayPhone = item == null ? void 0 : item.phone;
334
+ if (!displayEmail && !displayPhone) {
335
+ displayEmail = (_b2 = (_a2 = item == null ? void 0 : item.contacts_info) == null ? void 0 : _a2.value) == null ? void 0 : _b2.email;
336
+ displayPhone = (_e2 = (_d2 = (_c2 = item == null ? void 0 : item.contacts_info) == null ? void 0 : _c2.value) == null ? void 0 : _d2.phone) == null ? void 0 : _e2.phone;
337
+ }
325
338
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
326
339
  import_antd.Avatar,
327
340
  {
@@ -329,7 +342,7 @@ var Client = () => {
329
342
  src: import_utils.image.ali(item.cover, 100) || void 0,
330
343
  icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
331
344
  }
332
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-name" }, getNickname(item)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-desc" }, item.email ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, item.email) : null, item.phone ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, item.phone) : null), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-waiver", title: (0, import_utils3.getWaiverTitle)(item.waiver_form) }, (item.waiver_form || []).map((item2) => {
345
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-name" }, getNickname(item)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-desc" }, displayEmail ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, displayEmail) : null, displayPhone ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, displayPhone) : null), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-waiver", title: (0, import_utils3.getWaiverTitle)(item.waiver_form) }, (item.waiver_form || []).map((item2) => {
333
346
  return /* @__PURE__ */ import_react.default.createElement("span", null, item2.form_title, ":", item2.is_filled ? /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-client-list-item-waiver-filled" }, import_utils.locales.getText("pisell2.text.filled")) : /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-client-list-item-waiver-not-filled" }, import_utils.locales.getText("pisell2.text.not-filled")), "; ");
334
347
  }))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-loading" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: franchiseeLoading === item.id })));
335
348
  },
@@ -91,11 +91,16 @@ var useClientFn = (_params) => {
91
91
  }
92
92
  _setLoading(true);
93
93
  const api = state.isFranchisee ? import_serve.getFranchiseeCustomerList : state.apis.getClients;
94
+ const withKey = [...(resetParams == null ? void 0 : resetParams.with) || []];
95
+ if (!withKey.includes("contactsInfo")) {
96
+ withKey.push("contactsInfo");
97
+ }
94
98
  const data = await api({
95
99
  ...resetParams,
96
100
  ...resetParams.search ? { num: 10 } : {},
97
101
  ...state.isFranchisee ? { franchisee_customer_ids: customer_ids } : { customer_ids },
98
- ...!state.isFranchisee && !returnResult ? { _config: { abort: true } } : {}
102
+ ...!state.isFranchisee && !returnResult ? { _config: { abort: true } } : {},
103
+ with: withKey
99
104
  });
100
105
  const list = ((data == null ? void 0 : data.list) || []).map((d) => {
101
106
  var _a3;
@@ -279,6 +279,7 @@ var SelectDrawer = (props, ref) => {
279
279
  }
280
280
  closeDrawer();
281
281
  };
282
+ console.log("options7777", options);
282
283
  return /* @__PURE__ */ import_react.default.createElement(
283
284
  import_drawer.default,
284
285
  {
@@ -292,7 +293,7 @@ var SelectDrawer = (props, ref) => {
292
293
  ref: searchRef,
293
294
  prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
294
295
  style: { margin: "16px 0", height: 44 },
295
- placeholder: import_utils.locales.getText("pisell2.text.search"),
296
+ placeholder: import_utils.locales.getText("pisell2.booking.text.search-placeholder"),
296
297
  value: search,
297
298
  allowClear: true,
298
299
  onChange: (e) => {
@@ -335,7 +336,13 @@ var SelectDrawer = (props, ref) => {
335
336
  }
336
337
  }
337
338
  ) : null), /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: !!loading, delay: 500 }, !!options.length ? options.map((item) => {
338
- var _a;
339
+ var _a, _b, _c, _d, _e, _f;
340
+ let displayEmail = item == null ? void 0 : item.email;
341
+ let displayPhone = item == null ? void 0 : item.phone;
342
+ if (!displayEmail && !displayPhone) {
343
+ displayEmail = (_b = (_a = item == null ? void 0 : item.contacts_info) == null ? void 0 : _a.value) == null ? void 0 : _b.email;
344
+ displayPhone = (_e = (_d = (_c = item == null ? void 0 : item.contacts_info) == null ? void 0 : _c.value) == null ? void 0 : _d.phone) == null ? void 0 : _e.phone;
345
+ }
339
346
  return /* @__PURE__ */ import_react.default.createElement(
340
347
  "div",
341
348
  {
@@ -348,7 +355,7 @@ var SelectDrawer = (props, ref) => {
348
355
  onClick: () => handleClientClick(item),
349
356
  cover: item.cover,
350
357
  title: getNickname(item),
351
- desc: [item.email, item.phone],
358
+ desc: [displayEmail, displayPhone],
352
359
  checked: item.id === client.id,
353
360
  style: showPet ? { marginBottom: 6 } : {},
354
361
  loading: franchiseeLoading === item.id,
@@ -396,7 +403,7 @@ var SelectDrawer = (props, ref) => {
396
403
  },
397
404
  style: { padding: 16 }
398
405
  },
399
- /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__custom-select-create-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__custom-select-create-txt" }, `${import_utils.locales.getText("pisell2.text.create-new")} ${((_a = holder.form) == null ? void 0 : _a.title) || "-"}`))
406
+ /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__custom-select-create-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__custom-select-create-txt" }, `${import_utils.locales.getText("pisell2.text.create-new")} ${((_f = holder.form) == null ? void 0 : _f.title) || "-"}`))
400
407
  ), /* @__PURE__ */ import_react.default.createElement("div", null))
401
408
  );
402
409
  }) : /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE }), /* @__PURE__ */ import_react.default.createElement("div", null, loadMore)))
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -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;
@@ -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;
@@ -277,6 +277,7 @@ declare const _default: {
277
277
  'pisell2.text.quotation.product.change.describe': string;
278
278
  'pisell2.text.form.link.to.another.record.more': string;
279
279
  'pisell2.booking.text.contact-info.title': string;
280
+ 'pisell2.booking.text.search-placeholder': string;
280
281
  };
281
282
  'zh-CN': {
282
283
  'pisell2.text.refunded-amount': string;
@@ -556,6 +557,7 @@ declare const _default: {
556
557
  'pisell2.text.quotation.product.change.describe': string;
557
558
  'pisell2.text.form.link.to.another.record.more': string;
558
559
  'pisell2.booking.text.contact-info.title': string;
560
+ 'pisell2.booking.text.search-placeholder': string;
559
561
  };
560
562
  'zh-HK': {
561
563
  'pisell2.text.refunded-amount': string;
@@ -835,6 +837,7 @@ declare const _default: {
835
837
  'pisell2.text.quotation.product.change.describe': string;
836
838
  'pisell2.text.form.link.to.another.record.more': string;
837
839
  'pisell2.booking.text.contact-info.title': string;
840
+ 'pisell2.booking.text.search-placeholder': string;
838
841
  };
839
842
  };
840
843
  export default _default;
@@ -339,7 +339,8 @@ var locales_default = {
339
339
  "pisell2.text.quotation.product.change.describe": "Product updates available: Please refresh the following items to load the latest data.",
340
340
  "pisell2.text.form.link.to.another.record.more": "View More",
341
341
  // 联系信息
342
- "pisell2.booking.text.contact-info.title": "Contact info"
342
+ "pisell2.booking.text.contact-info.title": "Contact info",
343
+ "pisell2.booking.text.search-placeholder": "Search Customers / Contacts"
343
344
  },
344
345
  "zh-CN": {
345
346
  "pisell2.text.refunded-amount": "已退金额",
@@ -651,7 +652,8 @@ var locales_default = {
651
652
  "pisell2.text.quotation.product.change.describe": "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
652
653
  "pisell2.text.form.link.to.another.record.more": "查看更多",
653
654
  // 联系信息
654
- "pisell2.booking.text.contact-info.title": "联系信息"
655
+ "pisell2.booking.text.contact-info.title": "联系信息",
656
+ "pisell2.booking.text.search-placeholder": "搜索客户/联系信息"
655
657
  },
656
658
  "zh-HK": {
657
659
  "pisell2.text.refunded-amount": "已退金額",
@@ -963,6 +965,7 @@ var locales_default = {
963
965
  "pisell2.text.quotation.product.change.describe": "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
964
966
  "pisell2.text.form.link.to.another.record.more": "查看更多",
965
967
  // 联系信息
966
- "pisell2.booking.text.contact-info.title": "聯繫信息"
968
+ "pisell2.booking.text.contact-info.title": "聯繫信息",
969
+ "pisell2.booking.text.search-placeholder": "搜索客戶/聯系信息"
967
970
  }
968
971
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -109,4 +110,11 @@ export declare const walkInData: {
109
110
  id: number;
110
111
  nickname: string;
111
112
  };
112
- export declare const Provider: any, Context: any;
113
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
+ state: FormState;
115
+ } & {
116
+ dispatch: (params: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -29,4 +30,11 @@ export interface PayGroup {
29
30
  _order: any;
30
31
  front_order_uuid?: string;
31
32
  }
32
- export declare const Provider: any, Context: any;
33
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
34
+ state: FormState;
35
+ } & {
36
+ dispatch: (params: {
37
+ type: string;
38
+ payload: any;
39
+ }) => void;
40
+ }>;
@@ -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,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};