@pisell/private-materials 3.0.87 → 3.0.89

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 (68) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/render/default/view.js +3 -3
  7. package/build/lowcode/view.js +7 -7
  8. package/es/components/booking/addons/index.d.ts +1 -1
  9. package/es/components/booking/addons/model.d.ts +1 -2
  10. package/es/components/booking/components/footer/index.d.ts +2 -2
  11. package/es/components/booking/components/footer/index.js +172 -157
  12. package/es/components/booking/deposit/DepositItem/index.d.ts +4 -3
  13. package/es/components/booking/deposit/DepositItem/index.js +22 -21
  14. package/es/components/booking/deposit/index.d.ts +1 -1
  15. package/es/components/booking/deposit/index.js +23 -18
  16. package/es/components/booking/forms/forms.d.ts +1 -1
  17. package/es/components/booking/forms/index.d.ts +1 -1
  18. package/es/components/booking/forms/model.d.ts +1 -2
  19. package/es/components/booking/index.d.ts +1 -1
  20. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  21. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +5 -3
  22. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  23. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +140 -77
  24. package/es/components/booking/info/clientVariant/vertical/index.js +8 -4
  25. package/es/components/booking/info/index.d.ts +1 -1
  26. package/es/components/booking/info/model.d.ts +1 -2
  27. package/es/components/booking/info/service/addService/index.js +1 -1
  28. package/es/components/booking/info/service/editService/index.d.ts +2 -2
  29. package/es/components/booking/info/service/editService/index.js +60 -59
  30. package/es/components/booking/model.d.ts +1 -2
  31. package/es/components/booking/notes/index.d.ts +1 -1
  32. package/es/components/booking/notes/model.d.ts +1 -2
  33. package/es/components/booking/payments/index.d.ts +1 -1
  34. package/es/components/booking/payments/model.d.ts +1 -2
  35. package/es/components/booking/utils.js +3 -1
  36. package/es/components/schedules/index.d.ts +1 -1
  37. package/es/components/schedules/model.d.ts +1 -2
  38. package/lib/components/booking/addons/index.d.ts +1 -1
  39. package/lib/components/booking/addons/model.d.ts +1 -2
  40. package/lib/components/booking/components/footer/index.d.ts +2 -2
  41. package/lib/components/booking/components/footer/index.js +27 -12
  42. package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -3
  43. package/lib/components/booking/deposit/DepositItem/index.js +3 -2
  44. package/lib/components/booking/deposit/index.d.ts +1 -1
  45. package/lib/components/booking/deposit/index.js +32 -6
  46. package/lib/components/booking/forms/forms.d.ts +1 -1
  47. package/lib/components/booking/forms/index.d.ts +1 -1
  48. package/lib/components/booking/forms/model.d.ts +1 -2
  49. package/lib/components/booking/index.d.ts +1 -1
  50. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  51. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +5 -3
  52. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  53. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +16 -12
  54. package/lib/components/booking/info/clientVariant/vertical/index.js +17 -13
  55. package/lib/components/booking/info/index.d.ts +1 -1
  56. package/lib/components/booking/info/model.d.ts +1 -2
  57. package/lib/components/booking/info/service/addService/index.js +1 -1
  58. package/lib/components/booking/info/service/editService/index.d.ts +2 -2
  59. package/lib/components/booking/info/service/editService/index.js +16 -15
  60. package/lib/components/booking/model.d.ts +1 -2
  61. package/lib/components/booking/notes/index.d.ts +1 -1
  62. package/lib/components/booking/notes/model.d.ts +1 -2
  63. package/lib/components/booking/payments/index.d.ts +1 -1
  64. package/lib/components/booking/payments/model.d.ts +1 -2
  65. package/lib/components/booking/utils.js +1 -1
  66. package/lib/components/schedules/index.d.ts +1 -1
  67. package/lib/components/schedules/model.d.ts +1 -2
  68. package/package.json +1 -1
@@ -21,7 +21,7 @@ import Pet from "../../pet";
21
21
  import "./index.less";
22
22
  import useEngineContext from "../../../../../hooks/useEngineContext";
23
23
  var VerticalClient = function VerticalClient(props) {
24
- var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$client$value, _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$pet5, _state$pet5$value, _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _state$bookingConfig12, _state$client;
24
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$client$value, _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$pet5, _state$pet5$value, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig12, _state$client;
25
25
  var globalState = props.globalState,
26
26
  setGlobalState = props.setGlobalState;
27
27
  var modalRef = useRef();
@@ -29,6 +29,8 @@ var VerticalClient = function VerticalClient(props) {
29
29
  var stateRef = useRef(state);
30
30
  var prevCustomerId = useRef(null);
31
31
  var context = useEngineContext();
32
+ var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
33
+ state.isFranchisee = isFranchisee;
32
34
  stateRef.current = state;
33
35
  var _useClientFn = useClientFn({
34
36
  state: state,
@@ -48,7 +50,8 @@ var VerticalClient = function VerticalClient(props) {
48
50
  loading = _useClientFn.loading,
49
51
  loadMore = _useClientFn.loadMore,
50
52
  handleOpenClientModal = _useClientFn.handleOpenClientModal,
51
- getNickname = _useClientFn.getNickname;
53
+ getNickname = _useClientFn.getNickname,
54
+ franchiseeLoading = _useClientFn.franchiseeLoading;
52
55
  var renderList = useMemo(function () {
53
56
  var _list = _toConsumableArray(state.client.clients);
54
57
  return _list;
@@ -227,7 +230,7 @@ var VerticalClient = function VerticalClient(props) {
227
230
  }, locales.getText('pisell2.text.add'))), /*#__PURE__*/React.createElement(SelectDrawer, {
228
231
  modalOpen: state.modalOpen,
229
232
  loading: loading,
230
- autoFocus: !(context !== null && context !== void 0 && (_context$appHelper = context.appHelper) !== null && _context$appHelper !== void 0 && (_context$appHelper$ut = _context$appHelper.utils) !== null && _context$appHelper$ut !== void 0 && (_context$appHelper$ut2 = _context$appHelper$ut.isTerminal) !== null && _context$appHelper$ut2 !== void 0 && _context$appHelper$ut2.call(_context$appHelper$ut)),
233
+ 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)),
231
234
  ref: modalRef,
232
235
  onClose: handleClose,
233
236
  handleSelectClient: handleSelectClient,
@@ -241,7 +244,8 @@ var VerticalClient = function VerticalClient(props) {
241
244
  client: state === null || state === void 0 ? void 0 : (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value,
242
245
  loadMore: loadMore,
243
246
  showPet: (boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.type) === 'form',
244
- handleAddPet: handleAddPet
247
+ handleAddPet: handleAddPet,
248
+ franchiseeLoading: franchiseeLoading
245
249
  }));
246
250
  };
247
251
  export default VerticalClient;
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => any;
11
+ declare const Info: (props: any) => JSX.Element;
12
12
  export default Info;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
2
  export declare const walkInData: {
4
3
  id: number;
5
4
  nickname: string;
6
5
  };
7
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
6
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
8
7
  state: FormState;
9
8
  } & {
10
9
  dispatch: (params: {
@@ -264,7 +264,6 @@ var Info = function Info() {
264
264
  }
265
265
  });
266
266
  };
267
- console.log('state.service.cacheItem', state.service.cacheItem);
268
267
  var renderList = useMemo(function () {
269
268
  var _state$service2;
270
269
  var _list = ((_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services) || [];
@@ -275,6 +274,7 @@ var Info = function Info() {
275
274
  return isIncludes(item.title);
276
275
  } : undefined);
277
276
  }, [search, (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.services]);
277
+ console.log('state.service.renderList', renderList);
278
278
  var isService = useMemo(function () {
279
279
  return state.service.value.length > 0;
280
280
  }, [state.service.value]);
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  declare const Info: () => React.JSX.Element;
4
4
  export default Info;
@@ -18,32 +18,32 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
18
18
  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; }
19
19
  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; } }
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
- import React, { useCallback, useContext, useEffect, useMemo, useState } from "react";
22
- import Delete_wght300_24px from "@pisell/icon/es/Delete_wght300_24px";
21
+ import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
22
+ import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
23
23
  import Drawer from "../../../components/drawer";
24
24
  import { Context } from "../../model";
25
- import { formatAmount, locales } from "@pisell/utils";
25
+ import { formatAmount, locales } from '@pisell/utils';
26
26
  import Duration from "../../../materiels/duration";
27
- import { Input, Button, Select, Row, Col, Form, Alert, InputNumber } from "antd";
27
+ import { Input, Button, Select, Row, Col, Form, Alert, InputNumber } from 'antd';
28
28
  import "./index.less";
29
29
  import CollapsibleList from "../../../components/collapsibleList";
30
30
  import { renderBundles } from "../../../components/collapsibleList/utils";
31
- import { useUpdateEffect, useMemoizedFn } from "ahooks";
31
+ import { useUpdateEffect, useMemoizedFn } from 'ahooks';
32
32
  // import SelectTime from "../../../../../../../materials/src/components/select-time";
33
33
  import { getErrorList, getServiceTimes, deleteCacheParams } from "../../../utils";
34
34
  import Like from "../like";
35
35
  import { getNoResource } from "../../../mock";
36
36
  import { formatResources, getDurationProps, getFlexibleOption, getTimeObj } from "../addService/utils";
37
37
  var Info = function Info() {
38
- var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _window$BaseMaterials, _state$service$cacheI5, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8;
38
+ var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service$cacheI6, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _window$BaseMaterials, _state$service$cacheI7, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$service$cacheI11, _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8;
39
39
  var _Form$useForm = Form.useForm(),
40
40
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
41
41
  form = _Form$useForm2[0];
42
- var useTotal = Form.useWatch("total", form);
43
- var useLikeStatus = Form.useWatch("like_status", form);
44
- var useResource = Form.useWatch("resource", form);
45
- var useStartTime = Form.useWatch("start_time", form);
46
- var useDuration = Form.useWatch("duration", form);
42
+ var useTotal = Form.useWatch('total', form);
43
+ var useLikeStatus = Form.useWatch('like_status', form);
44
+ var useResource = Form.useWatch('resource', form);
45
+ var useStartTime = Form.useWatch('start_time', form);
46
+ var useDuration = Form.useWatch('duration', form);
47
47
  var _useState = useState(false),
48
48
  _useState2 = _slicedToArray(_useState, 2),
49
49
  resourceLoading = _useState2[0],
@@ -136,7 +136,7 @@ var Info = function Info() {
136
136
  // 由于灵活时长的结束时间随时变动, 这里发现如果当前选择的值没有在列表内,则选择最新的灵活时长值
137
137
  useEffect(function () {
138
138
  try {
139
- if (useDuration.indexOf("flexible_") == 0) {
139
+ if (useDuration.indexOf('flexible_') == 0) {
140
140
  if (flexibleOption) {
141
141
  form.setFieldsValue({
142
142
  duration: flexibleOption.value
@@ -171,7 +171,7 @@ var Info = function Info() {
171
171
  return _context.abrupt("return");
172
172
  case 6:
173
173
  dispatch({
174
- type: "setService",
174
+ type: 'setService',
175
175
  payload: {
176
176
  resources: formatResources({
177
177
  cacheItem: _cacheItem,
@@ -227,7 +227,7 @@ var Info = function Info() {
227
227
  return d._id !== _id;
228
228
  });
229
229
  dispatch({
230
- type: "setService",
230
+ type: 'setService',
231
231
  payload: {
232
232
  editModal: false,
233
233
  value: _list,
@@ -245,12 +245,12 @@ var Info = function Info() {
245
245
  * @Date: 2024-01-09 14:02
246
246
  */
247
247
  var renderOptions = useCallback(function (array) {
248
- var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "value";
249
- var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "label";
248
+ var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'value';
249
+ var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'label';
250
250
  var type = arguments.length > 3 ? arguments[3] : undefined;
251
251
  return array.map(function (d) {
252
252
  var props = {};
253
- if (type === "resource") {
253
+ if (type === 'resource') {
254
254
  props.labelText = d.labelText;
255
255
  }
256
256
  return /*#__PURE__*/React.createElement(Select.Option, _extends({
@@ -289,7 +289,7 @@ var Info = function Info() {
289
289
  var _item$_extend$usableT;
290
290
  var isMaxLimitRange = (_item$_extend$usableT = item._extend.usableTime) === null || _item$_extend$usableT === void 0 ? void 0 : _item$_extend$usableT._extend.isMaxLimitRange;
291
291
  // unknown 为未知是否可用, 需要掉后端接口确定
292
- if (isMaxLimitRange === "unknown") {
292
+ if (isMaxLimitRange === 'unknown') {
293
293
  // 调接口
294
294
  }
295
295
  }
@@ -306,17 +306,17 @@ var Info = function Info() {
306
306
  var _state$service$cacheI3;
307
307
  var oPrice = Number(((_state$service$cacheI3 = state.service.cacheItem) === null || _state$service$cacheI3 === void 0 ? void 0 : _state$service$cacheI3._extend.origin_total) || 0);
308
308
  var cPrice = Number(useTotal || 0);
309
- var discount = "";
309
+ var discount = '';
310
310
  // 原价 = 现价 为无折扣
311
311
  if (cPrice === oPrice) {
312
- discount = locales.getText("pisell2.text.status.no-discount");
312
+ discount = locales.getText('pisell2.text.status.no-discount');
313
313
  } else {
314
314
  // 判断加价还是减价
315
- discount = "".concat(locales.getText("pisell2.text.status.manual"), " ");
315
+ discount = "".concat(locales.getText('pisell2.text.status.manual'), " ");
316
316
  if (cPrice < oPrice) {
317
- discount += formatAmount(cPrice - oPrice, 2, state.amountSymbol) + "";
317
+ discount += formatAmount(cPrice - oPrice, 2, state.amountSymbol) + '';
318
318
  } else {
319
- discount += "+" + formatAmount(cPrice - oPrice, 2, state.amountSymbol) + "";
319
+ discount += '+' + formatAmount(cPrice - oPrice, 2, state.amountSymbol) + '';
320
320
  }
321
321
  }
322
322
  // 赋值文案
@@ -351,7 +351,7 @@ var Info = function Info() {
351
351
  relation_type = _ref2.relation_type,
352
352
  item_id = _ref2.item_id,
353
353
  schedule_id = _ref2.schedule_id;
354
- _extend.relation_type = relation_type || "form";
354
+ _extend.relation_type = relation_type || 'form';
355
355
  _extend.relation_id = item_id || (currentResource === null || currentResource === void 0 ? void 0 : currentResource.form_record_id) || 0;
356
356
  _extend.schedule_id = schedule_id || 0;
357
357
  if (_extend.bundle_edit !== undefined) {
@@ -374,7 +374,7 @@ var Info = function Info() {
374
374
  }
375
375
  deleteCacheParams();
376
376
  dispatch({
377
- type: "setService",
377
+ type: 'setService',
378
378
  payload: {
379
379
  editModal: false,
380
380
  addModal: false,
@@ -389,7 +389,7 @@ var Info = function Info() {
389
389
  var cacheItem = state.service.cacheItem;
390
390
  var values = cacheItem._extend;
391
391
  form.setFieldsValue(values);
392
- if (state.renderType !== "eventBooking") {
392
+ if (state.renderType !== 'eventBooking') {
393
393
  // 获取资源列表
394
394
  getResources();
395
395
  }
@@ -435,10 +435,14 @@ var Info = function Info() {
435
435
  * @Date: 2024-01-09 14:07
436
436
  */
437
437
  useUpdateEffect(function () {
438
- if (useStartTime && useDuration && state.renderType !== "eventBooking") {
439
- getResources();
438
+ var _state$service$cacheI5;
439
+ // autoClose 不执行下面逻辑
440
+ if (state.service.cacheItem && !((_state$service$cacheI5 = state.service.cacheItem) !== null && _state$service$cacheI5 !== void 0 && _state$service$cacheI5.autoClose)) {
441
+ if (useStartTime && useDuration && state.renderType !== 'eventBooking') {
442
+ getResources();
443
+ }
440
444
  }
441
- }, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin]);
445
+ }, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin, (_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.autoClose]);
442
446
 
443
447
  /**
444
448
  * @title: 打开弹窗时 设置数据
@@ -485,7 +489,7 @@ var Info = function Info() {
485
489
  }, [useTotal, (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : (_state$service3$cache = _state$service3.cacheItem) === null || _state$service3$cache === void 0 ? void 0 : _state$service3$cache._extend.origin_total]);
486
490
  useEffect(function () {
487
491
  if (useResource === 0) {
488
- handleLikeResource("common");
492
+ handleLikeResource('common');
489
493
  }
490
494
  }, [useResource]);
491
495
  var bundles = useMemo(function () {
@@ -512,8 +516,8 @@ var Info = function Info() {
512
516
  return state.apis.getResources({
513
517
  skip: 1,
514
518
  num: 1000,
515
- with_date_times: state.date.value.format("YYYY-MM-DD"),
516
- codes: ["resources", "therapist", "table"],
519
+ with_date_times: state.date.value.format('YYYY-MM-DD'),
520
+ codes: ['resources', 'therapist', 'table'],
517
521
  _config: {
518
522
  abort: true
519
523
  }
@@ -523,7 +527,7 @@ var Info = function Info() {
523
527
  // 合并无资源
524
528
  _list = [getNoResource()].concat((data === null || data === void 0 ? void 0 : data.list) || []);
525
529
  dispatch({
526
- type: "setService",
530
+ type: 'setService',
527
531
  payload: {
528
532
  resourcesOrigin: _list
529
533
  }
@@ -553,11 +557,11 @@ var Info = function Info() {
553
557
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
554
558
  zIndex: 1000,
555
559
  forceRender: true,
556
- open: state.service.editModal && !((_state$service$cacheI5 = state.service.cacheItem) !== null && _state$service$cacheI5 !== void 0 && _state$service$cacheI5.autoClose),
557
- title: locales.getText("pisell2.text.edit-service"),
560
+ open: state.service.editModal && !((_state$service$cacheI7 = state.service.cacheItem) !== null && _state$service$cacheI7 !== void 0 && _state$service$cacheI7.autoClose),
561
+ title: locales.getText('pisell2.text.edit-service'),
558
562
  onClose: function onClose() {
559
563
  dispatch({
560
- type: "setService",
564
+ type: 'setService',
561
565
  payload: {
562
566
  editModal: false,
563
567
  cacheItem: null
@@ -572,7 +576,7 @@ var Info = function Info() {
572
576
  onFinish: onFinish
573
577
  }, /*#__PURE__*/React.createElement(Row, {
574
578
  style: {
575
- width: "100%"
579
+ width: '100%'
576
580
  },
577
581
  gutter: [16, 0]
578
582
  }, /*#__PURE__*/React.createElement(Col, {
@@ -586,7 +590,7 @@ var Info = function Info() {
586
590
  return;
587
591
  }
588
592
  dispatch({
589
- type: "setService",
593
+ type: 'setService',
590
594
  payload: {
591
595
  addModal: true,
592
596
  editModal: false
@@ -595,9 +599,9 @@ var Info = function Info() {
595
599
  }
596
600
  }, /*#__PURE__*/React.createElement("div", {
597
601
  className: "current-service-info-name"
598
- }, ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : (_state$service6$cache2 = _state$service6$cache._extend) === null || _state$service6$cache2 === void 0 ? void 0 : _state$service6$cache2.product_name) || "-"), /*#__PURE__*/React.createElement(CollapsibleList, {
602
+ }, ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : (_state$service6$cache2 = _state$service6$cache._extend) === null || _state$service6$cache2 === void 0 ? void 0 : _state$service6$cache2.product_name) || '-'), /*#__PURE__*/React.createElement(CollapsibleList, {
599
603
  style: {
600
- marginTop: bundles.length ? "8px" : 0
604
+ marginTop: bundles.length ? '8px' : 0
601
605
  },
602
606
  list: bundles,
603
607
  renderItem: function renderItem(item) {
@@ -606,7 +610,7 @@ var Info = function Info() {
606
610
  })))), /*#__PURE__*/React.createElement(Col, {
607
611
  span: 12
608
612
  }, /*#__PURE__*/React.createElement(Form.Item, {
609
- label: locales.getText("pisell2.text.price"),
613
+ label: locales.getText('pisell2.text.price'),
610
614
  name: "total",
611
615
  rules: [{
612
616
  required: true
@@ -617,15 +621,15 @@ var Info = function Info() {
617
621
  size: "large",
618
622
  precision: 2,
619
623
  style: {
620
- width: "100%"
624
+ width: '100%'
621
625
  },
622
626
  min: 0,
623
- max: ((_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 ? void 0 : (_state$service$cacheI7 = _state$service$cacheI6._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total) || 0,
624
- placeholder: ((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 ? void 0 : (_state$service$cacheI9 = _state$service$cacheI8._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || "0"
627
+ max: ((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 ? void 0 : (_state$service$cacheI9 = _state$service$cacheI8._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
628
+ placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 ? void 0 : (_state$service$cacheI11 = _state$service$cacheI10._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total) || '0'
625
629
  }))), /*#__PURE__*/React.createElement(Col, {
626
630
  span: 12
627
631
  }, /*#__PURE__*/React.createElement(Form.Item, {
628
- label: locales.getText("pisell2.text.discount"),
632
+ label: locales.getText('pisell2.text.discount'),
629
633
  name: "discount"
630
634
  }, /*#__PURE__*/React.createElement(Select, {
631
635
  disabled: state.channelDisabledEdit,
@@ -640,26 +644,23 @@ var Info = function Info() {
640
644
  }))), isReason ? /*#__PURE__*/React.createElement(Col, {
641
645
  span: 24
642
646
  }, /*#__PURE__*/React.createElement(Form.Item, {
643
- label: locales.getText("pisell2.text.discount-reason"),
647
+ label: locales.getText('pisell2.text.discount-reason'),
644
648
  name: "discount_reason"
645
649
  }, /*#__PURE__*/React.createElement(Input.TextArea, {
646
650
  size: "large"
647
- }))) : null, state.renderType !== "eventBooking" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
651
+ }))) : null, state.renderType !== 'eventBooking' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
648
652
  span: 12
649
653
  }, /*#__PURE__*/React.createElement(Form.Item, {
650
- label: locales.getText("pisell2.text.start_time"),
654
+ label: locales.getText('pisell2.text.start_time'),
651
655
  name: "start_time",
652
656
  rules: [{
653
657
  required: true
654
658
  }]
655
659
  }, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
656
660
  slice: (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.basic) === null || _state$bookingConfig7 === void 0 ? void 0 : (_state$bookingConfig8 = _state$bookingConfig7.service_time) === null || _state$bookingConfig8 === void 0 ? void 0 : _state$bookingConfig8.value,
657
- onChange: function onChange(e) {
658
- console.log("eeee", e);
659
- },
660
661
  timePickerProps: {
661
662
  style: {
662
- width: "100%"
663
+ width: '100%'
663
664
  }
664
665
  },
665
666
  timeProps: {
@@ -670,7 +671,7 @@ var Info = function Info() {
670
671
  }) : null)), /*#__PURE__*/React.createElement(Col, {
671
672
  span: 12
672
673
  }, /*#__PURE__*/React.createElement(Form.Item, {
673
- label: locales.getText("pisell2.text.duration"),
674
+ label: locales.getText('pisell2.text.duration'),
674
675
  name: "duration",
675
676
  rules: [{
676
677
  required: true
@@ -681,14 +682,14 @@ var Info = function Info() {
681
682
  span: 24
682
683
  }, /*#__PURE__*/React.createElement(Form.Item, {
683
684
  required: true,
684
- label: locales.getText("pisell2.text.resource")
685
+ label: locales.getText('pisell2.text.resource')
685
686
  }, /*#__PURE__*/React.createElement("div", {
686
687
  className: "resource-col"
687
688
  }, /*#__PURE__*/React.createElement(Button, {
688
689
  className: "resource-col-like-wrap",
689
690
  disabled: !useResource,
690
691
  onClick: function onClick() {
691
- handleLikeResource(useLikeStatus === "like" ? "common" : "like");
692
+ handleLikeResource(useLikeStatus === 'like' ? 'common' : 'like');
692
693
  }
693
694
  }, /*#__PURE__*/React.createElement(Like
694
695
  // onChange={handleLikeResource}
@@ -709,15 +710,15 @@ var Info = function Info() {
709
710
  open: selectOpen,
710
711
  onDropdownVisibleChange: setSelectOpen,
711
712
  filterOption: function filterOption(str, option) {
712
- return (option.labelText || "").toLowerCase().includes((str || "").toLowerCase());
713
+ return (option.labelText || '').toLowerCase().includes((str || '').toLowerCase());
713
714
  }
714
- }, renderOptions(state.service.resources || [], "form_record_id", "label", "resource")))))), /*#__PURE__*/React.createElement(Form.Item, {
715
+ }, renderOptions(state.service.resources || [], 'form_record_id', 'label', 'resource')))))), /*#__PURE__*/React.createElement(Form.Item, {
715
716
  hidden: true,
716
717
  name: "quantity"
717
718
  }, /*#__PURE__*/React.createElement(InputNumber, null)), /*#__PURE__*/React.createElement(Form.Item, {
718
719
  hidden: true,
719
720
  name: "like_status"
720
- }, /*#__PURE__*/React.createElement(Input, null))))), state.renderType !== "eventBooking" && errorList.map(function (d, i) {
721
+ }, /*#__PURE__*/React.createElement(Input, null))))), state.renderType !== 'eventBooking' && errorList.map(function (d, i) {
721
722
  return /*#__PURE__*/React.createElement(Alert, {
722
723
  key: d.type,
723
724
  message: d.label,
@@ -741,6 +742,6 @@ var Info = function Info() {
741
742
  onClick: function onClick() {
742
743
  form.submit();
743
744
  }
744
- }, locales.getText("pisell2.text.apply"))))));
745
+ }, locales.getText('pisell2.text.apply'))))));
745
746
  };
746
747
  export default Info;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -96,7 +95,7 @@ export declare const walkInData: {
96
95
  id: number;
97
96
  nickname: string;
98
97
  };
99
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
98
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
100
99
  state: FormState;
101
100
  } & {
102
101
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => any;
8
+ declare const Payments: (props: any) => JSX.Element;
9
9
  export default Payments;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -217,7 +217,9 @@ export var formatProductListByCategory = function formatProductListByCategory(li
217
217
  });
218
218
  }
219
219
  }
220
- return Object.values(categoryObject);
220
+ return Object.values(categoryObject).sort(function (a, b) {
221
+ return b.sort - a.sort;
222
+ });
221
223
  };
222
224
  export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cacheItem) {
223
225
  var startDate = dayjs(cacheItem._extend.start_date.format("YYYY-MM-DD") + ' ' + getServeStartTime(cacheItem._extend.start_time));
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => any;
16
+ declare const Addons: (props: any) => JSX.Element;
17
17
  export default Addons;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  /**
4
4
  * @title: 底部
5
5
  * @description:
@@ -52,10 +52,13 @@ var Footer = (props) => {
52
52
  const [loading, setLoading] = (0, import_react.useState)(false);
53
53
  const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
54
54
  const context = (0, import_useEngineContext.default)();
55
- const { isTerminal, interaction, store } = (_a = context.appHelper) == null ? void 0 : _a.utils;
55
+ const { isTerminal, interaction, store, storage } = (_a = context.appHelper) == null ? void 0 : _a.utils;
56
56
  const isShowPaymentLink = (_d = (_c = (_b = store == null ? void 0 : store.getState) == null ? void 0 : _b.call(store)) == null ? void 0 : _c.global) == null ? void 0 : _d.paymentLinkBtnShow;
57
57
  const [modal, contextHolder] = import_antd.Modal.useModal();
58
58
  const { setActiveTab } = state;
59
+ const isTeam = (0, import_react.useMemo)(() => {
60
+ return storage.get("channel") === "android_team_portal" || storage.get("channel") === "ios_team_portal";
61
+ }, []);
59
62
  const actionMap = {
60
63
  sale: {
61
64
  label: import_utils.locales.getText("pisell2.text.addons"),
@@ -509,11 +512,15 @@ var Footer = (props) => {
509
512
  }
510
513
  }
511
514
  }
512
- if (transaction_habit_selection.button_rows == 1) {
513
- arr.push(actionMap.orderDetail);
515
+ if (!isTeam) {
516
+ if (transaction_habit_selection.button_rows == 1) {
517
+ arr.push(actionMap.orderDetail);
518
+ }
514
519
  }
515
- if (total.paidAmount > 0) {
516
- arr.push(actionMap.refund);
520
+ if (!isTeam) {
521
+ if (total.paidAmount > 0) {
522
+ arr.push(actionMap.refund);
523
+ }
517
524
  }
518
525
  if (state.appointment_status !== "cancelled") {
519
526
  arr.push(actionMap.rebook);
@@ -537,18 +544,22 @@ var Footer = (props) => {
537
544
  if (state.bookingId && isShowPaymentLink) {
538
545
  arr.push(buttonMap.paymentLink);
539
546
  }
540
- if (total.paidAmount > 0) {
541
- arr.push(buttonMap.refund);
542
- }
543
- if (isCheckout) {
544
- arr.push(buttonMap.checkout);
547
+ if (!isTeam) {
548
+ if (total.paidAmount > 0) {
549
+ arr.push(buttonMap.refund);
550
+ }
551
+ if (isCheckout) {
552
+ arr.push(buttonMap.checkout);
553
+ }
545
554
  }
546
555
  return arr;
547
556
  }
548
557
  if (source === "info") {
549
558
  let arr = [];
550
559
  if (isCheckout) {
551
- arr.push(buttonMap.checkout);
560
+ if (!isTeam) {
561
+ arr.push(buttonMap.checkout);
562
+ }
552
563
  } else {
553
564
  if (!isEdit) {
554
565
  arr.push(buttonMap.complete);
@@ -557,6 +568,9 @@ var Footer = (props) => {
557
568
  if (isEdit) {
558
569
  arr.push(buttonMap.save);
559
570
  }
571
+ if (arr.length === 0) {
572
+ return [buttonMap.rebook];
573
+ }
560
574
  return arr;
561
575
  }
562
576
  if (source === "addTime") {
@@ -575,7 +589,8 @@ var Footer = (props) => {
575
589
  buttonMap,
576
590
  loading,
577
591
  isCheckout,
578
- state
592
+ state,
593
+ isTeam
579
594
  ]);
580
595
  const isOnlyDeposit = (0, import_react.useMemo)(() => {
581
596
  var _a2, _b2, _c2, _d2;