@pisell/private-materials 3.0.155 → 3.0.157-gray

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 (128) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/addons/index.js +10 -7
  12. package/es/components/booking/addons/model.d.ts +2 -1
  13. package/es/components/booking/components/TabProduct/index.js +1 -1
  14. package/es/components/booking/components/customSelect/index.js +5 -1
  15. package/es/components/booking/components/drawer/index.d.ts +3 -3
  16. package/es/components/booking/components/drawer/index.js +15 -13
  17. package/es/components/booking/components/drawer/index.less +8 -6
  18. package/es/components/booking/components/footer/index.js +24 -10
  19. package/es/components/booking/dashboard/index.d.ts +20 -0
  20. package/es/components/booking/dashboard/index.js +253 -0
  21. package/es/components/booking/dashboard/serve.d.ts +1 -0
  22. package/es/components/booking/dashboard/serve.js +27 -0
  23. package/es/components/booking/deposit/EditDepositModal/index.less +3 -0
  24. package/es/components/booking/forms/forms.d.ts +1 -0
  25. package/es/components/booking/forms/forms.js +4 -2
  26. package/es/components/booking/forms/model.d.ts +2 -1
  27. package/es/components/booking/forms/single/index.d.ts +1 -1
  28. package/es/components/booking/forms/single/index.js +4 -3
  29. package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
  30. package/es/components/booking/info/addServiceVariant/index.js +33 -0
  31. package/es/components/booking/info/client/index.js +35 -15
  32. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -4
  33. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +59 -32
  34. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +3 -0
  35. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.js +14 -0
  36. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +4 -3
  37. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +41 -35
  38. package/es/components/booking/info/clientVariant/vertical/index.d.ts +1 -1
  39. package/es/components/booking/info/clientVariant/vertical/index.js +32 -14
  40. package/es/components/booking/info/clientVariant/vertical/index.less +37 -11
  41. package/es/components/booking/info/date/index.js +1 -0
  42. package/es/components/booking/info/date/index.less +2 -0
  43. package/es/components/booking/info/header/index.js +13 -12
  44. package/es/components/booking/info/index.less +9 -0
  45. package/es/components/booking/info/main.js +10 -1
  46. package/es/components/booking/info/pet/index.js +1 -1
  47. package/es/components/booking/info/service/addService/index.d.ts +8 -2
  48. package/es/components/booking/info/service/addService/index.js +92 -44
  49. package/es/components/booking/info/service/addService/index.less +27 -1
  50. package/es/components/booking/info/service/addTimeModal/index.js +1 -0
  51. package/es/components/booking/info/service/addTimeModal/index.less +1 -1
  52. package/es/components/booking/info/service/editService/index.js +14 -15
  53. package/es/components/booking/info/service/serviceList/index.js +2 -1
  54. package/es/components/booking/info/utils.js +1 -1
  55. package/es/components/booking/info2/index.js +10 -1
  56. package/es/components/booking/locales.d.ts +48 -0
  57. package/es/components/booking/locales.js +51 -3
  58. package/es/components/booking/model.d.ts +4 -0
  59. package/es/components/booking/notes/index.d.ts +1 -1
  60. package/es/components/booking/notes/model.d.ts +2 -1
  61. package/es/components/booking/payments/model.d.ts +2 -1
  62. package/es/components/booking/utils.d.ts +1 -1
  63. package/es/components/booking/utils.js +54 -51
  64. package/es/components/schedules/index.d.ts +1 -1
  65. package/es/components/schedules/model.d.ts +2 -1
  66. package/es/index.d.ts +2 -0
  67. package/es/index.js +3 -1
  68. package/lib/components/booking/addons/index.js +2 -5
  69. package/lib/components/booking/addons/model.d.ts +2 -1
  70. package/lib/components/booking/components/TabProduct/index.js +1 -1
  71. package/lib/components/booking/components/customSelect/index.js +2 -1
  72. package/lib/components/booking/components/drawer/index.d.ts +3 -3
  73. package/lib/components/booking/components/drawer/index.js +13 -11
  74. package/lib/components/booking/components/drawer/index.less +8 -6
  75. package/lib/components/booking/components/footer/index.js +19 -15
  76. package/lib/components/booking/dashboard/index.d.ts +20 -0
  77. package/lib/components/booking/dashboard/index.js +251 -0
  78. package/lib/components/booking/dashboard/serve.d.ts +1 -0
  79. package/lib/components/booking/dashboard/serve.js +33 -0
  80. package/lib/components/booking/deposit/EditDepositModal/index.less +3 -0
  81. package/lib/components/booking/forms/forms.d.ts +1 -0
  82. package/lib/components/booking/forms/forms.js +5 -2
  83. package/lib/components/booking/forms/model.d.ts +2 -1
  84. package/lib/components/booking/forms/single/index.d.ts +1 -1
  85. package/lib/components/booking/forms/single/index.js +4 -2
  86. package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
  87. package/lib/components/booking/info/addServiceVariant/index.js +58 -0
  88. package/lib/components/booking/info/client/index.js +33 -21
  89. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -4
  90. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +33 -13
  91. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +3 -0
  92. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.js +36 -0
  93. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +4 -3
  94. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +43 -11
  95. package/lib/components/booking/info/clientVariant/vertical/index.d.ts +1 -1
  96. package/lib/components/booking/info/clientVariant/vertical/index.js +121 -88
  97. package/lib/components/booking/info/clientVariant/vertical/index.less +37 -11
  98. package/lib/components/booking/info/date/index.js +1 -0
  99. package/lib/components/booking/info/date/index.less +2 -0
  100. package/lib/components/booking/info/header/index.js +14 -12
  101. package/lib/components/booking/info/index.less +9 -0
  102. package/lib/components/booking/info/main.js +14 -1
  103. package/lib/components/booking/info/pet/index.js +2 -1
  104. package/lib/components/booking/info/service/addService/index.d.ts +8 -2
  105. package/lib/components/booking/info/service/addService/index.js +69 -30
  106. package/lib/components/booking/info/service/addService/index.less +27 -1
  107. package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
  108. package/lib/components/booking/info/service/addTimeModal/index.less +1 -1
  109. package/lib/components/booking/info/service/editService/index.js +17 -13
  110. package/lib/components/booking/info/service/serviceList/index.js +4 -3
  111. package/lib/components/booking/info/utils.js +1 -1
  112. package/lib/components/booking/info2/index.js +14 -1
  113. package/lib/components/booking/locales.d.ts +48 -0
  114. package/lib/components/booking/locales.js +51 -3
  115. package/lib/components/booking/model.d.ts +4 -0
  116. package/lib/components/booking/notes/index.d.ts +1 -1
  117. package/lib/components/booking/notes/model.d.ts +2 -1
  118. package/lib/components/booking/payments/model.d.ts +2 -1
  119. package/lib/components/booking/utils.d.ts +1 -1
  120. package/lib/components/booking/utils.js +57 -22
  121. package/lib/components/schedules/index.d.ts +1 -1
  122. package/lib/components/schedules/model.d.ts +2 -1
  123. package/lib/index.d.ts +2 -0
  124. package/lib/index.js +6 -0
  125. package/lowcode/booking-dashboard/meta.ts +137 -0
  126. package/lowcode/booking-vertical-add-service/meta.ts +124 -0
  127. package/lowcode/vertical-add-service/meta.ts +71 -0
  128. package/package.json +3 -3
@@ -17,19 +17,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  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; }
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
19
  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); }
20
- import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
20
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
21
21
  import Drawer from "../../../components/drawer";
22
- import { Avatar, Button, Checkbox, Empty, Input, Spin } from "antd";
23
- import SearchLg from "@pisell/icon/es/SearchLg";
24
- import { image, locales } from "@pisell/utils";
25
- import Plus from "@pisell/icon/es/Plus";
26
- import User01 from "@pisell/icon/es/User01";
22
+ import { Avatar, Button, Checkbox, Empty, Input, Spin } from 'antd';
23
+ import SearchLg from '@pisell/icon/es/SearchLg';
24
+ import { image, locales } from '@pisell/utils';
25
+ import Plus from '@pisell/icon/es/Plus';
26
+ import User01 from '@pisell/icon/es/User01';
27
27
  import { isWalkIn as getIsWalkIn } from "../../../utils";
28
- import classNames from "classnames";
28
+ import classNames from 'classnames';
29
29
  import "./SelectDrawer.less";
30
30
  import { formatAddFormValues, sortFormValues } from "../../../forms/format";
31
31
  import { uniqueByField } from "../../utils";
32
- import PlusCircle from "@pisell/icon/es/PlusCircle";
32
+ import PlusCircle from '@pisell/icon/es/PlusCircle';
33
33
  var ActionItem = function ActionItem(props) {
34
34
  return /*#__PURE__*/React.createElement("div", {
35
35
  className: "vertical-client-select-drawer-item-wrap",
@@ -39,7 +39,7 @@ var ActionItem = function ActionItem(props) {
39
39
  }, /*#__PURE__*/React.createElement(Plus, {
40
40
  style: {
41
41
  fontSize: 28,
42
- color: "#7F56D9"
42
+ color: '#7F56D9'
43
43
  }
44
44
  })), /*#__PURE__*/React.createElement("span", {
45
45
  className: "vertical-client-item-title"
@@ -55,7 +55,7 @@ var Item = function Item(_ref) {
55
55
  style = _ref.style,
56
56
  loading = _ref.loading;
57
57
  return /*#__PURE__*/React.createElement("div", {
58
- className: classNames("vertical-client-select-drawer-item-wrap", _defineProperty({}, "checked", checked)),
58
+ className: classNames('vertical-client-select-drawer-item-wrap', _defineProperty({}, 'checked', checked)),
59
59
  onClick: onClick,
60
60
  style: style
61
61
  }, /*#__PURE__*/React.createElement(Avatar, {
@@ -98,7 +98,8 @@ var SelectDrawer = function SelectDrawer(props, ref) {
98
98
  showPet = props.showPet,
99
99
  handleAddPet = props.handleAddPet,
100
100
  modalOpen = props.modalOpen,
101
- franchiseeLoading = props.franchiseeLoading;
101
+ franchiseeLoading = props.franchiseeLoading,
102
+ showHeader = props.showHeader;
102
103
  var form = (formData === null || formData === void 0 ? void 0 : formData[0]) || {};
103
104
  var valList = (childrenValue === null || childrenValue === void 0 ? void 0 : childrenValue[form.id]) || defaultArr;
104
105
  var _useState = useState(valList),
@@ -120,7 +121,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
120
121
  _useState4 = _slicedToArray(_useState3, 2),
121
122
  open = _useState4[0],
122
123
  setOpen = _useState4[1];
123
- var _useState5 = useState(""),
124
+ var _useState5 = useState(''),
124
125
  _useState6 = _slicedToArray(_useState5, 2),
125
126
  search = _useState6[0],
126
127
  _setSearch = _useState6[1];
@@ -133,7 +134,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
133
134
  // 关闭
134
135
  setOpen(false);
135
136
  // 清空搜索
136
- _setSearch("");
137
+ _setSearch('');
137
138
  onClose === null || onClose === void 0 ? void 0 : onClose();
138
139
  };
139
140
  var handleOpenModal = function handleOpenModal() {
@@ -165,12 +166,15 @@ var SelectDrawer = function SelectDrawer(props, ref) {
165
166
  }, [open]);
166
167
  var getNickname = useCallback(function (item) {
167
168
  if (getIsWalkIn(item === null || item === void 0 ? void 0 : item.id)) {
168
- return locales.getText("pisell2.text.select-a-customer");
169
+ return locales.getText('pisell2.text.select-a-customer');
169
170
  }
170
- return item.name || (item.display_name || "").trim() || (item.nickname || "").trim() || "";
171
+ var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : "";
172
+ return item.name || (item.display_name || '').trim() || (item.nickname || '').trim() || firstLastName.trim() || '';
171
173
  }, [locales.localeMap]);
172
174
  var handleAddClient = function handleAddClient() {
173
- handleCreateItem();
175
+ handleCreateItem(function () {
176
+ _setSearch("");
177
+ });
174
178
  };
175
179
  var handleChildrenValueChange = /*#__PURE__*/function () {
176
180
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value, item) {
@@ -182,7 +186,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
182
186
  if (!(client !== null && client !== void 0 && client.id) || client.id === 1) {
183
187
  clientId = ((_clientRef$current = clientRef.current) === null || _clientRef$current === void 0 ? void 0 : _clientRef$current.id) || item.id;
184
188
  }
185
- if (!(mode === "single")) {
189
+ if (!(mode === 'single')) {
186
190
  _context.next = 10;
187
191
  break;
188
192
  }
@@ -236,11 +240,11 @@ var SelectDrawer = function SelectDrawer(props, ref) {
236
240
  };
237
241
  }();
238
242
  var mode = useMemo(function () {
239
- if (["form"].includes(holder === null || holder === void 0 ? void 0 : holder.type)) {
240
- return "single";
243
+ if (['form'].includes(holder === null || holder === void 0 ? void 0 : holder.type)) {
244
+ return 'single';
241
245
  }
242
- if (["table"].includes(holder === null || holder === void 0 ? void 0 : holder.type)) {
243
- return "multiple";
246
+ if (['table'].includes(holder === null || holder === void 0 ? void 0 : holder.type)) {
247
+ return 'multiple';
244
248
  }
245
249
  return holder === null || holder === void 0 ? void 0 : holder.type;
246
250
  }, [holder === null || holder === void 0 ? void 0 : holder.type]);
@@ -278,7 +282,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
278
282
  _context3.next = 2;
279
283
  return handleSelectClient([item]);
280
284
  case 2:
281
- if (mode === "multiple") {
285
+ if (mode === 'multiple') {
282
286
  isHasChildren = _value.some(function (val) {
283
287
  return item.form_record.some(function (f) {
284
288
  return f.id || f.form_record_id === val.id || val.form_record_id;
@@ -292,7 +296,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
292
296
  customer: item
293
297
  });
294
298
  })
295
- }))), "id")));
299
+ }))), 'id')));
296
300
  }
297
301
  closeDrawer();
298
302
  case 4:
@@ -306,17 +310,18 @@ var SelectDrawer = function SelectDrawer(props, ref) {
306
310
  };
307
311
  }();
308
312
  return /*#__PURE__*/React.createElement(Drawer, {
309
- title: locales.getText("pisell2.text.select-customer"),
313
+ showGoBack: showHeader,
314
+ title: showHeader && locales.getText("pisell2.text.select-customer"),
310
315
  open: open,
311
316
  onClose: closeDrawer,
312
317
  header: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
313
318
  ref: searchRef,
314
319
  prefix: /*#__PURE__*/React.createElement(SearchLg, null),
315
320
  style: {
316
- margin: "16px 0",
321
+ margin: '16px 0',
317
322
  height: 44
318
323
  },
319
- placeholder: locales.getText("pisell2.text.search"),
324
+ placeholder: locales.getText('pisell2.text.search'),
320
325
  value: search,
321
326
  allowClear: true,
322
327
  onChange: function onChange(e) {
@@ -333,20 +338,18 @@ var SelectDrawer = function SelectDrawer(props, ref) {
333
338
  push: {
334
339
  distance: 180
335
340
  },
336
- footer: mode === "multiple" && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
341
+ footer: mode === 'multiple' && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
337
342
  block: true,
338
343
  type: "primary",
339
344
  onClick: handleOk,
340
345
  loading: !!franchiseeLoading
341
- }, locales.getText("pisell2.text.apply")))
342
- }, /*#__PURE__*/React.createElement(Spin, {
343
- spinning: loading
346
+ }, locales.getText('pisell2.text.apply')))
344
347
  }, /*#__PURE__*/React.createElement("div", {
345
348
  className: "vertical-client-select-drawer-content-wrap"
346
349
  }, /*#__PURE__*/React.createElement("div", {
347
350
  className: "vertical-client-select-drawer-top"
348
351
  }, /*#__PURE__*/React.createElement(ActionItem, {
349
- title: locales.getText("pisell2.text.create-new-customer"),
352
+ title: locales.getText('pisell2.text.create-new-customer'),
350
353
  onClick: handleAddClient
351
354
  }), /*#__PURE__*/React.createElement(ActionItem, {
352
355
  title: "Walk-In",
@@ -354,7 +357,10 @@ var SelectDrawer = function SelectDrawer(props, ref) {
354
357
  handleSelectClient([]);
355
358
  closeDrawer();
356
359
  }
357
- })), !!options.length ? options.map(function (item) {
360
+ })), /*#__PURE__*/React.createElement(Spin, {
361
+ spinning: !!loading,
362
+ delay: 500
363
+ }, !!options.length ? options.map(function (item) {
358
364
  var _holder$form2;
359
365
  return /*#__PURE__*/React.createElement("div", {
360
366
  className: "vertical-client-select-drawer-content-item",
@@ -385,8 +391,8 @@ var SelectDrawer = function SelectDrawer(props, ref) {
385
391
  },
386
392
  id: "".concat(f.id),
387
393
  key: f.id,
388
- className: classNames("vertical-client-select-drawer-content-item-children-item", _defineProperty({}, "checked", checked))
389
- }, mode === "multiple" && /*#__PURE__*/React.createElement(Checkbox, {
394
+ className: classNames('vertical-client-select-drawer-content-item-children-item', _defineProperty({}, 'checked', checked))
395
+ }, mode === 'multiple' && /*#__PURE__*/React.createElement(Checkbox, {
390
396
  checked: checked
391
397
  }), /*#__PURE__*/React.createElement(Item, {
392
398
  coverSize: 48,
@@ -405,7 +411,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
405
411
  className: "pisell-lowcode__custom-select-create-icon"
406
412
  }), /*#__PURE__*/React.createElement("span", {
407
413
  className: "pisell-lowcode__custom-select-create-txt"
408
- }, "".concat(locales.getText("pisell2.text.create-new"), " ").concat(((_holder$form2 = holder.form) === null || _holder$form2 === void 0 ? void 0 : _holder$form2.title) || "-")))), /*#__PURE__*/React.createElement("div", null)));
414
+ }, "".concat(locales.getText('pisell2.text.create-new'), " ").concat(((_holder$form2 = holder.form) === null || _holder$form2 === void 0 ? void 0 : _holder$form2.title) || '-')))), /*#__PURE__*/React.createElement("div", null)));
409
415
  }) : /*#__PURE__*/React.createElement(Empty, {
410
416
  image: Empty.PRESENTED_IMAGE_SIMPLE
411
417
  }), /*#__PURE__*/React.createElement("div", null, loadMore))));
@@ -4,5 +4,5 @@ interface VerticalClientProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const VerticalClient: (props: VerticalClientProps) => React.JSX.Element;
7
+ declare const VerticalClient: React.ForwardRefExoticComponent<VerticalClientProps & React.RefAttributes<unknown>>;
8
8
  export default VerticalClient;
@@ -17,11 +17,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
17
17
  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; }
18
18
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
20
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
21
21
  import User01 from '@pisell/icon/es/User01';
22
22
  import PlusCircle from '@pisell/icon/es/PlusCircle';
23
23
  import { Avatar, Button, Dropdown, Empty, Skeleton } from 'antd';
24
24
  import { image, locales } from '@pisell/utils';
25
+ import { useMemoizedFn } from 'ahooks';
26
+ import classNames from 'classnames';
25
27
  import useClientFn from "../hooks/useClientFn";
26
28
  import SelectDrawer from "./SelectDrawer";
27
29
  import Pet from "../../pet";
@@ -29,8 +31,8 @@ import "./index.less";
29
31
  import useEngineContext from "../../../../../hooks/useEngineContext";
30
32
  import { formatAddFormValues } from "../../../forms/format";
31
33
  import { moveItemToFront } from "../../utils";
32
- import { useMemoizedFn } from "ahooks";
33
- var VerticalClient = function VerticalClient(props) {
34
+ import { request } from "../../../utils";
35
+ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
34
36
  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$pet6, _state$pet6$formData, _state$pet6$formData$, _state$pet8, _state$client$value4, _state$bookingConfig17, _state$bookingConfig18, _state$bookingConfig19, _state$pet9, _state$pet9$formData, _state$bookingConfig20, _state$bookingConfig21, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig22, _state$client6;
35
37
  var globalState = props.globalState,
36
38
  setGlobalState = props.setGlobalState;
@@ -44,6 +46,7 @@ var VerticalClient = function VerticalClient(props) {
44
46
  isHasFormRecord = _useState2[0],
45
47
  setIsHasFormRecord = _useState2[1];
46
48
  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');
49
+ request.setRequest(context.appHelper.utils.request);
47
50
  state.isFranchisee = isFranchisee;
48
51
  stateRef.current = state;
49
52
  var _useClientFn = useClientFn({
@@ -289,18 +292,29 @@ var VerticalClient = function VerticalClient(props) {
289
292
  previewItemTitleRender: previewItemTitleRender
290
293
  }));
291
294
  }, [isWalkIn, isHasFormRecord, state === null || state === void 0 ? void 0 : state.disabledEdit, boardConfig.type, state === null || state === void 0 ? void 0 : (_state$bookingConfig17 = state.bookingConfig) === null || _state$bookingConfig17 === void 0 ? void 0 : (_state$bookingConfig18 = _state$bookingConfig17.holder) === null || _state$bookingConfig18 === void 0 ? void 0 : (_state$bookingConfig19 = _state$bookingConfig18.form) === null || _state$bookingConfig19 === void 0 ? void 0 : _state$bookingConfig19.title, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : _state$pet9$formData[0], state, petDispatch, handleOpenModal, handleOpenClientModal, previewItemTitleRender, handleAddPet, currentPetValue, formId, state === null || state === void 0 ? void 0 : (_state$bookingConfig20 = state.bookingConfig) === null || _state$bookingConfig20 === void 0 ? void 0 : (_state$bookingConfig21 = _state$bookingConfig20.holder) === null || _state$bookingConfig21 === void 0 ? void 0 : _state$bookingConfig21.data_range]);
295
+ var handleOpenClient = function handleOpenClient() {
296
+ if (!isWalkIn || state !== null && state !== void 0 && state.disableEventBookingEdit) {
297
+ return;
298
+ }
299
+ handleOpenClientModal();
300
+ };
301
+ useImperativeHandle(ref, function () {
302
+ var _modalRef$current, _modalRef$current2;
303
+ return {
304
+ open: handleOpenClientModal,
305
+ close: (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.close,
306
+ setSearch: (_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 ? void 0 : _modalRef$current2.setSearch
307
+ };
308
+ });
292
309
  return /*#__PURE__*/React.createElement("div", {
293
- className: "pisell-lowcode__booking-vertical-client-wrap"
310
+ className: classNames('pisell-lowcode__booking-vertical-client-wrap', _defineProperty({}, 'create-booking-page-vertical-client-wrap', state.isBookingCreatePage))
294
311
  }, /*#__PURE__*/React.createElement("div", {
295
- className: "pisell-lowcode__booking-vertical-client",
296
- onClick: function onClick() {
297
- if (!isWalkIn || state !== null && state !== void 0 && state.disableEventBookingEdit) {
298
- return;
299
- }
300
- handleOpenClientModal();
301
- }
312
+ className: classNames('pisell-lowcode__booking-vertical-client', {
313
+ 'pisell-lowcode__booking-vertical-client-walkin': isWalkIn
314
+ }),
315
+ onClick: handleOpenClient
302
316
  }, /*#__PURE__*/React.createElement(Skeleton, {
303
- loading: state.loading,
317
+ loading: false,
304
318
  active: true,
305
319
  round: true
306
320
  }, /*#__PURE__*/React.createElement(Avatar, {
@@ -339,7 +353,10 @@ var VerticalClient = function VerticalClient(props) {
339
353
  handleViewClient();
340
354
  }
341
355
  }, locales.getText('pisell2.text.view-profile'))))), /*#__PURE__*/React.createElement("div", {
342
- className: "pisell-lowcode__booking-vertical-pet"
356
+ className: classNames('pisell-lowcode__booking-vertical-pet', {
357
+ 'pisell-lowcode__booking-vertical-pet-walkin': isWalkIn
358
+ }),
359
+ onClick: handleOpenClient
343
360
  }, petRender), isShowAddBtn && /*#__PURE__*/React.createElement("div", {
344
361
  className: "pisell-lowcode__booking-vertical-footer"
345
362
  }, /*#__PURE__*/React.createElement(Button, {
@@ -351,6 +368,7 @@ var VerticalClient = function VerticalClient(props) {
351
368
  block: true,
352
369
  size: "large"
353
370
  }, locales.getText('pisell2.text.select'))), /*#__PURE__*/React.createElement(SelectDrawer, {
371
+ showHeader: !state.isBookingCreatePage,
354
372
  modalOpen: state.modalOpen,
355
373
  loading: loading,
356
374
  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)),
@@ -370,5 +388,5 @@ var VerticalClient = function VerticalClient(props) {
370
388
  handleAddPet: handleAddPet,
371
389
  franchiseeLoading: franchiseeLoading
372
390
  }));
373
- };
391
+ });
374
392
  export default VerticalClient;
@@ -3,12 +3,12 @@
3
3
  overflow: hidden;
4
4
  height: 100%;
5
5
  width: 100%;
6
- border-right: 1px solid var(--Gray-200, #EAECF0);
7
- background: var(--Gray-50, #F9FAFB);
6
+ border-right: 1px solid var(--Gray-200, #eaecf0);
7
+ background: var(--Gray-50, #f9fafb);
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  .pisell-lowcode-drawer-content {
11
- border-right: 1px solid var(--Gray-200, #EAECF0);
11
+ border-right: 1px solid var(--Gray-200, #eaecf0);
12
12
  }
13
13
  .pisell-lowcode__booking-drawer-title-wrap {
14
14
  padding: 24px 24px 0;
@@ -16,17 +16,21 @@
16
16
  .pisell-lowcode__booking-drawer-back {
17
17
  margin-right: 6px;
18
18
  }
19
- .pisell-lowcode__booking-drawer-back, .pisell-lowcode__booking-drawer-title {
19
+ .pisell-lowcode__booking-drawer-back,
20
+ .pisell-lowcode__booking-drawer-title {
20
21
  font-size: 18px;
21
22
  }
22
23
  }
24
+ .pisell-lowcode__booking-vertical-client-walkin {
25
+ cursor: pointer;
26
+ }
23
27
  .pisell-lowcode__booking-vertical-client {
24
28
  padding: 24px 16px;
25
29
  display: flex;
26
30
  flex-direction: column;
27
31
  align-items: center;
28
32
  width: 100%;
29
- border-bottom: 1px solid var(--Gray-200, #EAECF0);
33
+ border-bottom: 1px solid var(--Gray-200, #eaecf0);
30
34
  .pisell-lowcode__booking-client-avatar {
31
35
  margin-bottom: 16px;
32
36
  }
@@ -37,16 +41,17 @@
37
41
  font-weight: 600;
38
42
  line-height: 24px; /* 150% */
39
43
  text-align: center;
44
+ display: inline-block;
40
45
  }
41
46
  .pisell-lowcode__booking-client-desc-item {
42
- color: var(--Gray-400, #98A2B3);
47
+ color: var(--Gray-400, #98a2b3);
43
48
  font-size: 14px;
44
49
  font-style: normal;
45
50
  font-weight: 400;
46
51
  line-height: 20px; /* 142.857% */
47
52
  text-align: center;
48
53
  max-width: 200px;
49
- word-break:break-word
54
+ word-break: break-word;
50
55
  }
51
56
  .pisell-lowcode__booking-client-action-wrap {
52
57
  display: flex;
@@ -56,11 +61,23 @@
56
61
  }
57
62
  }
58
63
 
64
+ .pisell-lowcode__booking-client-info-desc {
65
+ display: flex;
66
+ flex-direction: column;
67
+ justify-content: center;
68
+ div > span {
69
+ cursor: pointer;
70
+ }
71
+ }
72
+
59
73
  .pisell-lowcode__booking-vertical-pet {
60
74
  padding: 0 24px 24px;
61
- flex:1;
75
+ flex: 1;
62
76
  overflow: auto;
63
77
  }
78
+ .pisell-lowcode__booking-vertical-pet-walkin {
79
+ cursor: pointer;
80
+ }
64
81
  .pisell-lowcode__booking-pet-title {
65
82
  color: var(--Gray-700, #344054);
66
83
  font-size: 14px;
@@ -77,9 +94,10 @@
77
94
  flex-direction: column;
78
95
  align-items: flex-start;
79
96
  gap: 16px;
80
- border-top: 1px solid var(--Gray-200, #EAECF0);
81
- background: var(--Base-White, #FFF);
82
- box-shadow: 0px -4px 8px -2px rgba(16, 24, 40, 0.10), 0px -2px 4px -2px rgba(16, 24, 40, 0.06);
97
+ border-top: 1px solid var(--Gray-200, #eaecf0);
98
+ background: var(--Base-White, #fff);
99
+ box-shadow: 0px -4px 8px -2px rgba(16, 24, 40, 0.1),
100
+ 0px -2px 4px -2px rgba(16, 24, 40, 0.06);
83
101
  }
84
102
  .pisell-lowcode__create-form-wrap {
85
103
  display: flex;
@@ -98,4 +116,12 @@
98
116
  font-weight: 400;
99
117
  line-height: 24px;
100
118
  }
119
+ }
120
+ .create-booking-page-vertical-client-wrap {
121
+ .pisell-lowcode__booking-drawer-title-wrap {
122
+ padding: 16px 16px 0 !important;
123
+ }
124
+ .pisell-lowcode-input-affix-wrapper {
125
+ margin-top: 0 !important;
126
+ }
101
127
  }
@@ -92,6 +92,7 @@ var DateCom = function DateCom() {
92
92
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
93
93
  className: "pisell-lowcode__booking-body-select-date"
94
94
  }, /*#__PURE__*/React.createElement(DatePicker, {
95
+ inputReadOnly: true,
95
96
  allowClear: false,
96
97
  size: "large",
97
98
  style: {
@@ -1,9 +1,11 @@
1
1
  .pisell-lowcode__booking-body-select-date {
2
2
  padding: 24px 0 8px;
3
3
  font-weight: 550;
4
+ cursor: pointer;
4
5
 
5
6
  .pisell-lowcode-picker-input>input {
6
7
  font-weight: 550;
8
+ cursor: pointer;
7
9
  }
8
10
 
9
11
  .ant-picker-suffix,
@@ -1,12 +1,12 @@
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
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
2
5
  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
6
  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
7
  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
8
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
9
  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
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
8
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
12
  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); }
@@ -21,7 +21,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
21
21
  import "./index.less";
22
22
  import classNames from 'classnames';
23
23
  var header = function header(_ref) {
24
- var _context$appHelper, _state$bookingDetail2, _state$service2, _state$bookingDetail4, _state$bookingDetail5, _state$bookingDetail6;
24
+ var _context$appHelper, _state$service2, _bookingDetail$bookin;
25
25
  var state = _ref.state,
26
26
  dispatch = _ref.dispatch;
27
27
  var context = useEngineContext();
@@ -44,6 +44,9 @@ var header = function header(_ref) {
44
44
  interaction = _context$appHelper$ut.interaction,
45
45
  store = _context$appHelper$ut.store,
46
46
  storage = _context$appHelper$ut.storage;
47
+ var bookingDetail = useMemo(function () {
48
+ return _objectSpread(_objectSpread({}, state.preliminaryBookingDetail || {}), state.bookingDetail || {});
49
+ }, [state.bookingDetail, state.preliminaryBookingDetail]);
47
50
 
48
51
  // 预约状态列表
49
52
  var statusList = [{
@@ -264,10 +267,9 @@ var header = function header(_ref) {
264
267
  */
265
268
  var isPaid = useMemo(function () {
266
269
  return ['partially_paid', 'paid'].find(function (d) {
267
- var _state$bookingDetail;
268
- return d === ((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status);
270
+ return d === (bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.payment_status);
269
271
  });
270
- }, [(_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.payment_status]);
272
+ }, [bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.payment_status]);
271
273
 
272
274
  /**
273
275
  * @title: 是否包含票务商品
@@ -293,8 +295,7 @@ var header = function header(_ref) {
293
295
  * @Date: 2024-08-22 09:32
294
296
  */
295
297
  var paymentProcessingPayment = function paymentProcessingPayment(type) {
296
- var _state$bookingDetail3;
297
- var payments = (state === null || state === void 0 ? void 0 : (_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.payments) || [];
298
+ var payments = (bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.payments) || [];
298
299
  var status = ['payment_processing'];
299
300
  var payment_method = ['BANK_DEPOSIT'];
300
301
 
@@ -555,18 +556,18 @@ var header = function header(_ref) {
555
556
  }
556
557
  }, /*#__PURE__*/React.createElement("div", {
557
558
  className: "booking-order-sales-channel"
558
- }, orderSalesChannel[(_state$bookingDetail4 = state.bookingDetail) === null || _state$bookingDetail4 === void 0 ? void 0 : _state$bookingDetail4.order_sales_channel] || ''), /*#__PURE__*/React.createElement("div", {
559
+ }, orderSalesChannel[bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.order_sales_channel] || ''), /*#__PURE__*/React.createElement("div", {
559
560
  className: "booking-header-line-2"
560
561
  }, /*#__PURE__*/React.createElement("div", {
561
562
  className: "booking-header-left"
562
- }, locales.getText('pisell2.text.status.booking_id'), ":", ' ', ((_state$bookingDetail5 = state.bookingDetail) === null || _state$bookingDetail5 === void 0 ? void 0 : (_state$bookingDetail6 = _state$bookingDetail5.bookings) === null || _state$bookingDetail6 === void 0 ? void 0 : _state$bookingDetail6.booking_id) || '-'), /*#__PURE__*/React.createElement("div", {
563
+ }, locales.getText('pisell2.text.status.booking_id'), ":", ' ', (bookingDetail === null || bookingDetail === void 0 ? void 0 : (_bookingDetail$bookin = bookingDetail.bookings) === null || _bookingDetail$bookin === void 0 ? void 0 : _bookingDetail$bookin.booking_id) || '-'), /*#__PURE__*/React.createElement("div", {
563
564
  className: "booking-header-right"
564
565
  }, /*#__PURE__*/React.createElement(Dropdown, {
565
566
  menu: {
566
567
  items: items,
567
568
  onClick: onSelect
568
569
  },
569
- disabled: state.appointment_status === 'cancelled'
570
+ disabled: state.appointment_status === 'cancelled' || !state.bookingDetail
570
571
  }, /*#__PURE__*/React.createElement("div", {
571
572
  className: "booking-header-right-status"
572
573
  }, currentStatus.label, state.appointment_status !== 'cancelled' ? /*#__PURE__*/React.createElement(DownOutlined, {
@@ -15,4 +15,13 @@
15
15
  // height: 42px;
16
16
  // background: #069456;
17
17
  // }
18
+ }
19
+ #create-booking-page-info-wrap {
20
+ .pisell-lowcode__booking-tab-pane-footer {
21
+ padding: 12px 16px !important;
22
+ }
23
+ }
24
+ .create-booking-page-info-wrap {
25
+ position: initial !important;
26
+ padding: 0 16px !important;
18
27
  }
@@ -21,6 +21,7 @@ import { updateServiceDate } from "./date";
21
21
  import useEngineContext from "../../../hooks/useEngineContext";
22
22
  import Notes from "./notes";
23
23
  import "./index.less";
24
+ import { Skeleton } from "antd";
24
25
  var defaultModules = {
25
26
  client: 1,
26
27
  date: 1,
@@ -119,6 +120,14 @@ var Info = Provider(function (props) {
119
120
  height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
120
121
  }), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
121
122
  className: "booking-info"
122
- }, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
123
+ }, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
124
+ loading: globalState.loading,
125
+ round: true,
126
+ active: true,
127
+ avatar: false,
128
+ style: {
129
+ paddingTop: 20
130
+ }
131
+ }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null))) : null);
123
132
  });
124
133
  export default Info;