@pisell/private-materials 6.3.35 → 6.3.37

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 (45) 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/preview.js +146 -151
  7. package/build/lowcode/render/default/view.js +1 -1
  8. package/build/lowcode/view.js +10 -10
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +15 -9
  11. package/es/components/booking/components/customSelect/index.js +1 -1
  12. package/es/components/booking/forms/footer.js +24 -10
  13. package/es/components/booking/info/client/index.js +28 -13
  14. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +14 -8
  15. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  16. package/es/components/booking/info/service2/utils.d.ts +1 -1
  17. package/es/components/booking/locales.d.ts +3 -0
  18. package/es/components/booking/locales.js +6 -3
  19. package/es/components/booking/utils.d.ts +2 -2
  20. package/es/components/eftposPay/amount.d.ts +1 -1
  21. package/es/components/eftposPay/device.d.ts +1 -1
  22. package/es/components/eftposPay/hooks.d.ts +2 -2
  23. package/es/components/eftposPay/store/index.d.ts +6 -6
  24. package/es/plus/contactInfoModal/index.d.ts +1 -0
  25. package/es/plus/contactInfoModal/index.js +1 -0
  26. package/es/pro/Login2.0/Login2.js +78 -27
  27. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  28. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +5 -0
  29. package/lib/components/booking/components/customSelect/index.js +1 -1
  30. package/lib/components/booking/forms/footer.js +29 -11
  31. package/lib/components/booking/info/client/index.js +14 -1
  32. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +6 -1
  33. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  34. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  35. package/lib/components/booking/locales.d.ts +3 -0
  36. package/lib/components/booking/locales.js +6 -3
  37. package/lib/components/booking/utils.d.ts +2 -2
  38. package/lib/components/eftposPay/amount.d.ts +1 -1
  39. package/lib/components/eftposPay/device.d.ts +1 -1
  40. package/lib/components/eftposPay/hooks.d.ts +2 -2
  41. package/lib/components/eftposPay/store/index.d.ts +6 -6
  42. package/lib/plus/contactInfoModal/index.d.ts +1 -0
  43. package/lib/plus/contactInfoModal/index.js +1 -0
  44. package/lib/pro/Login2.0/Login2.js +86 -23
  45. package/package.json +2 -2
@@ -117,17 +117,11 @@ var Login2 = function Login2(_ref) {
117
117
  // 初始化 currentLoginMethod(当 loginMethods 变化时)
118
118
  useEffect(function () {
119
119
  if (loginMethods.length > 0 && !currentLoginMethod) {
120
- // 优先选择非OAuth类型的登录方式作为当前激活方式
121
- var nonOAuthMethod = loginMethods.find(function (method) {
122
- return method.type === 'email' || method.type === 'phone';
123
- });
124
- var first = nonOAuthMethod || loginMethods[0];
125
- setCurrentLoginMethod(first);
126
-
127
- // 设置默认验证方式
128
- if (first.type === 'email' || first.type === 'phone') {
129
- var _first$verificationMe;
130
- setCurrentVerificationMethod(((_first$verificationMe = first.verificationMethods) === null || _first$verificationMe === void 0 ? void 0 : _first$verificationMe[0]) || 'password');
120
+ var initialMethod = loginMethods[0];
121
+ setCurrentLoginMethod(initialMethod);
122
+ if ((initialMethod === null || initialMethod === void 0 ? void 0 : initialMethod.type) === 'email' || (initialMethod === null || initialMethod === void 0 ? void 0 : initialMethod.type) === 'phone') {
123
+ var _initialMethod$verifi;
124
+ setCurrentVerificationMethod(((_initialMethod$verifi = initialMethod.verificationMethods) === null || _initialMethod$verifi === void 0 ? void 0 : _initialMethod$verifi[0]) || 'password');
131
125
  }
132
126
  }
133
127
  // 如果只有 guest 登录,则默认直接使用 guest 登录
@@ -1885,14 +1879,18 @@ var Login2 = function Login2(_ref) {
1885
1879
  // 渲染底部切换选项区域
1886
1880
  var renderSwitchOptions = function renderSwitchOptions() {
1887
1881
  if (!currentLoginMethod) return null;
1888
- var nonOauthButtons = [];
1889
- if (currentLoginMethod.type === 'email' || currentLoginMethod.type === 'phone') {
1882
+ var primaryMethod = loginMethods[0];
1883
+ var currentIsFormMethod = currentLoginMethod.type === 'email' || currentLoginMethod.type === 'phone';
1884
+ var primaryIsFormMethod = (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'email' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'phone';
1885
+ var shouldUseFormLayout = currentIsFormMethod || primaryIsFormMethod;
1886
+ var verificationSwitchButtons = [];
1887
+ if (currentIsFormMethod) {
1890
1888
  (currentLoginMethod.verificationMethods || []).filter(function (method) {
1891
1889
  return method !== currentVerificationMethod;
1892
1890
  }).forEach(function (method) {
1893
1891
  if (method === 'verification_code') {
1894
1892
  var text = currentLoginMethod.type === 'email' ? locales.getText('pisell-login2-switch-to-email-code') : locales.getText('pisell-login2-switch-to-sms-code');
1895
- nonOauthButtons.push( /*#__PURE__*/React.createElement("button", {
1893
+ verificationSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1896
1894
  key: "switch-to-code",
1897
1895
  className: "login2-switch-option-button",
1898
1896
  onClick: function onClick() {
@@ -1906,7 +1904,7 @@ var Login2 = function Login2(_ref) {
1906
1904
  className: "option-text"
1907
1905
  }, text)));
1908
1906
  } else {
1909
- nonOauthButtons.push( /*#__PURE__*/React.createElement("button", {
1907
+ verificationSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1910
1908
  key: "switch-to-password",
1911
1909
  className: "login2-switch-option-button",
1912
1910
  onClick: function onClick() {
@@ -1920,16 +1918,15 @@ var Login2 = function Login2(_ref) {
1920
1918
  }
1921
1919
  });
1922
1920
  }
1921
+ var emailPhoneSwitchButtons = [];
1923
1922
  loginMethods.forEach(function (method, index) {
1924
1923
  if (method.type === 'email' || method.type === 'phone') {
1925
- if (method.type === currentLoginMethod.type) {
1926
- return;
1927
- }
1924
+ if (method.type === currentLoginMethod.type) return;
1928
1925
  var isLast = isLastLoginMethod(method.type);
1929
1926
  var _className = classNames('login2-switch-option-button', {
1930
1927
  'has-last-login-badge': isLast
1931
1928
  });
1932
- nonOauthButtons.push( /*#__PURE__*/React.createElement("button", {
1929
+ emailPhoneSwitchButtons.push( /*#__PURE__*/React.createElement("button", {
1933
1930
  key: "".concat(method.type, "-").concat(index),
1934
1931
  className: _className,
1935
1932
  onClick: function onClick() {
@@ -1944,7 +1941,7 @@ var Login2 = function Login2(_ref) {
1944
1941
  }, method.type === 'email' ? locales.getText('pisell-login2-switch-to-email') : locales.getText('pisell-login2-switch-to-phone'))));
1945
1942
  }
1946
1943
  });
1947
- var showDivider = nonOauthButtons.length > 0 && oauthProviders.length > 0;
1944
+ var nonOauthButtons = [].concat(verificationSwitchButtons, emailPhoneSwitchButtons);
1948
1945
  var registerPrompt = onSwitchToRegister && /*#__PURE__*/React.createElement("div", {
1949
1946
  className: "login2-register-prompt"
1950
1947
  }, /*#__PURE__*/React.createElement("span", {
@@ -1956,18 +1953,72 @@ var Login2 = function Login2(_ref) {
1956
1953
  if (!nonOauthButtons.length && !oauthProviders.length) {
1957
1954
  return registerPrompt;
1958
1955
  }
1959
- return /*#__PURE__*/React.createElement(React.Fragment, null, showDivider && /*#__PURE__*/React.createElement("div", {
1960
- className: "login2-divider"
1961
- }, locales.getText('pisell-login2-or')), (nonOauthButtons.length > 0 || oauthProviders.length > 0) && /*#__PURE__*/React.createElement("div", {
1956
+ if (shouldUseFormLayout) {
1957
+ var groups = [];
1958
+ if (nonOauthButtons.length > 0) {
1959
+ groups.push( /*#__PURE__*/React.createElement("div", {
1960
+ key: "non-oauth",
1961
+ className: "login2-switch-options"
1962
+ }, nonOauthButtons));
1963
+ }
1964
+ if (oauthProviders.length > 0) {
1965
+ groups.push( /*#__PURE__*/React.createElement(OAuthButtonGroup, {
1966
+ key: "oauth",
1967
+ providers: oauthProviders,
1968
+ wrapperClassName: "login2-oauth-buttons",
1969
+ buttonClassName: "login2-oauth-button",
1970
+ gap: 12
1971
+ }));
1972
+ }
1973
+ if (!groups.length) {
1974
+ return registerPrompt;
1975
+ }
1976
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1977
+ className: "login2-divider"
1978
+ }, locales.getText('pisell-login2-or')), /*#__PURE__*/React.createElement("div", {
1979
+ className: "login2-switch-groups"
1980
+ }, groups), registerPrompt);
1981
+ }
1982
+ var primaryProvider = oauthProviders.find(function (provider) {
1983
+ return provider.key === (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type);
1984
+ });
1985
+ var secondaryOauthProviders = oauthProviders.filter(function (provider) {
1986
+ return provider.key !== (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type);
1987
+ });
1988
+ var hasSecondaryButtons = nonOauthButtons.length > 0 || secondaryOauthProviders.length > 0;
1989
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1962
1990
  className: "login2-switch-groups"
1963
- }, nonOauthButtons.length > 0 && /*#__PURE__*/React.createElement("div", {
1991
+ }, primaryProvider ? /*#__PURE__*/React.createElement(OAuthButtonGroup, {
1992
+ providers: [primaryProvider],
1993
+ wrapperClassName: "login2-oauth-buttons",
1994
+ buttonClassName: "login2-oauth-button",
1995
+ gap: 12
1996
+ }) : /*#__PURE__*/React.createElement("div", {
1997
+ className: "login2-switch-options"
1998
+ }, /*#__PURE__*/React.createElement("button", {
1999
+ key: "primary-fallback",
2000
+ className: "login2-switch-option-button",
2001
+ onClick: function onClick() {
2002
+ if ((primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest') {
2003
+ handleGuestLogin();
2004
+ } else if ((primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'google' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'facebook' || (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'apple') {
2005
+ handleOAuthClick(primaryMethod.type);
2006
+ }
2007
+ }
2008
+ }, /*#__PURE__*/React.createElement(Iconfont, {
2009
+ type: (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest' ? 'pisell2-user-01' : (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'google' ? 'pisell2-google' : (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'facebook' ? 'pisell2-facebook' : 'pisell2-apple'
2010
+ }), /*#__PURE__*/React.createElement("span", {
2011
+ className: "option-text"
2012
+ }, (primaryMethod === null || primaryMethod === void 0 ? void 0 : primaryMethod.type) === 'guest' ? locales.getText('pisell-login2-login-as-guest') : "".concat(locales.getText('pisell-login2-continue-with'), " ").concat(primaryMethod !== null && primaryMethod !== void 0 && primaryMethod.type ? primaryMethod.type.charAt(0).toUpperCase() + primaryMethod.type.slice(1) : '')))), hasSecondaryButtons && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2013
+ className: "login2-divider"
2014
+ }, locales.getText('pisell-login2-or')), nonOauthButtons.length > 0 && /*#__PURE__*/React.createElement("div", {
1964
2015
  className: "login2-switch-options"
1965
- }, nonOauthButtons), oauthProviders.length > 0 && /*#__PURE__*/React.createElement(OAuthButtonGroup, {
1966
- providers: oauthProviders,
2016
+ }, nonOauthButtons), secondaryOauthProviders.length > 0 && /*#__PURE__*/React.createElement(OAuthButtonGroup, {
2017
+ providers: secondaryOauthProviders,
1967
2018
  wrapperClassName: "login2-oauth-buttons",
1968
2019
  buttonClassName: "login2-oauth-button",
1969
2020
  gap: 12
1970
- })), registerPrompt);
2021
+ }))), registerPrompt);
1971
2022
  };
1972
2023
 
1973
2024
  // 渲染 OAuth 按钮
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -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) {
@@ -293,7 +293,7 @@ var CustomSelect = (props, ref) => {
293
293
  ref: searchRef,
294
294
  prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
295
295
  style: { marginTop: 16, height: 44 },
296
- placeholder: import_utils2.locales.getText("pisell2.text.search"),
296
+ placeholder: import_utils2.locales.getText("pisell2.booking.text.search-placeholder"),
297
297
  value: search,
298
298
  allowClear: true,
299
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,
@@ -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)))
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
247
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -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
  };
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | {
168
+ }) => number | "flexible" | {
169
169
  type: string;
170
170
  value: number;
171
- } | "flexible";
171
+ };
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question">;
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<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "warn" | "success" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
+ action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -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;
@@ -107,6 +107,7 @@ var ContactInfoModalContent = (props) => {
107
107
  onSave({
108
108
  first_name: (values == null ? void 0 : values.first_name) || "",
109
109
  last_name: (values == null ? void 0 : values.last_name) || "",
110
+ display_name: (values == null ? void 0 : values.first_name) || (values == null ? void 0 : values.last_name) ? `${(values == null ? void 0 : values.first_name) || ""} ${(values == null ? void 0 : values.last_name) || ""}` : "",
110
111
  phone: {
111
112
  phone: ((_c = values == null ? void 0 : values.phone) == null ? void 0 : _c.phone) || "",
112
113
  country_calling_code: ((_d = values == null ? void 0 : values.phone) == null ? void 0 : _d.countryCallingCode) || "",