@pisell/private-materials 3.2.17 → 3.2.19

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 (144) 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 +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +19 -10
  12. package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +10 -20
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +73 -0
  14. package/es/components/appointmentBooking/components/Content/index.js +29 -15
  15. package/es/components/appointmentBooking/components/Date/index.js +77 -12
  16. package/es/components/appointmentBooking/components/Date/index.less +1 -0
  17. package/es/components/appointmentBooking/components/Footer/index.js +3 -3
  18. package/es/components/appointmentBooking/components/Guest/index.d.ts +3 -0
  19. package/es/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +50 -59
  20. package/es/components/appointmentBooking/components/Header/index.js +6 -4
  21. package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  22. package/es/components/appointmentBooking/components/Resource/index.js +62 -29
  23. package/es/components/appointmentBooking/components/Resource/index.less +6 -0
  24. package/es/components/appointmentBooking/components/Services/index.js +25 -135
  25. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  26. package/es/components/appointmentBooking/components/TimeSlicing/index.js +57 -755
  27. package/es/components/appointmentBooking/context.d.ts +23 -0
  28. package/es/components/appointmentBooking/context.js +71 -0
  29. package/es/components/appointmentBooking/hooks.d.ts +6 -8
  30. package/es/components/appointmentBooking/hooks.js +119 -62
  31. package/es/components/appointmentBooking/index.js +2 -3
  32. package/es/components/appointmentBooking/locales.d.ts +12 -0
  33. package/es/components/appointmentBooking/locales.js +21 -3
  34. package/es/components/appointmentBooking/utils.d.ts +12 -0
  35. package/es/components/appointmentBooking/utils.js +70 -0
  36. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +18 -16
  37. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +7 -11
  38. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.js +22 -21
  39. package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +1 -1
  40. package/lib/components/appointmentBooking/components/Content/index.js +26 -14
  41. package/lib/components/appointmentBooking/components/Date/index.js +53 -16
  42. package/lib/components/appointmentBooking/components/Date/index.less +1 -0
  43. package/lib/components/appointmentBooking/components/Footer/index.js +3 -3
  44. package/lib/components/appointmentBooking/components/Guest/index.d.ts +3 -0
  45. package/lib/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +43 -52
  46. package/lib/components/appointmentBooking/components/Header/index.js +2 -3
  47. package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
  48. package/lib/components/appointmentBooking/components/Resource/index.js +55 -41
  49. package/lib/components/appointmentBooking/components/Resource/index.less +6 -0
  50. package/lib/components/appointmentBooking/components/Services/index.js +15 -155
  51. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
  52. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +27 -940
  53. package/lib/components/appointmentBooking/context.d.ts +23 -0
  54. package/lib/components/appointmentBooking/context.js +85 -0
  55. package/lib/components/appointmentBooking/hooks.d.ts +6 -8
  56. package/lib/components/appointmentBooking/hooks.js +44 -20
  57. package/lib/components/appointmentBooking/index.js +2 -5
  58. package/lib/components/appointmentBooking/locales.d.ts +12 -0
  59. package/lib/components/appointmentBooking/locales.js +15 -3
  60. package/lib/components/appointmentBooking/utils.d.ts +12 -0
  61. package/lib/components/appointmentBooking/utils.js +62 -2
  62. package/package.json +2 -2
  63. package/es/components/appointmentBooking/components/Information/index.d.ts +0 -3
  64. package/es/components/appointmentBooking/components/Information/index.js +0 -178
  65. package/es/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  66. package/es/components/appointmentBooking/components/Provider/Cart/Item/index.js +0 -68
  67. package/es/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
  68. package/es/components/appointmentBooking/components/Provider/Content/index.js +0 -64
  69. package/es/components/appointmentBooking/components/Provider/Content/index.less +0 -31
  70. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
  71. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -34
  72. package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
  73. package/es/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
  74. package/es/components/appointmentBooking/components/Provider/Event/index.js +0 -93
  75. package/es/components/appointmentBooking/components/Provider/Event/index.less +0 -20
  76. package/es/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
  77. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
  78. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -34
  79. package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
  80. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
  81. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -27
  82. package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
  83. package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
  84. package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
  85. package/es/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
  86. package/es/components/appointmentBooking/components/Provider/Resource/index.js +0 -79
  87. package/es/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
  88. package/es/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
  89. package/es/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -90
  90. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  91. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -77
  92. package/es/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
  93. package/es/components/booking/info/service2/utils.d.ts +0 -240
  94. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  95. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  96. package/lib/components/appointmentBooking/components/Information/index.d.ts +0 -3
  97. package/lib/components/appointmentBooking/components/Information/index.js +0 -151
  98. package/lib/components/appointmentBooking/components/Information/index.less +0 -92
  99. package/lib/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  100. package/lib/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
  101. package/lib/components/appointmentBooking/components/Provider/Content/index.js +0 -90
  102. package/lib/components/appointmentBooking/components/Provider/Content/index.less +0 -31
  103. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
  104. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -60
  105. package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
  106. package/lib/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
  107. package/lib/components/appointmentBooking/components/Provider/Event/index.js +0 -100
  108. package/lib/components/appointmentBooking/components/Provider/Event/index.less +0 -20
  109. package/lib/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
  110. package/lib/components/appointmentBooking/components/Provider/Information/index.less +0 -92
  111. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
  112. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -67
  113. package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
  114. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
  115. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -57
  116. package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
  117. package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
  118. package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
  119. package/lib/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
  120. package/lib/components/appointmentBooking/components/Provider/Resource/index.js +0 -90
  121. package/lib/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
  122. package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
  123. package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -97
  124. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  125. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -69
  126. package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
  127. package/lib/components/booking/info/service2/utils.d.ts +0 -240
  128. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  129. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  130. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
  131. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
  132. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
  133. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
  134. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
  135. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +0 -0
  136. /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
  137. /package/es/components/appointmentBooking/components/{Information → Guest}/index.less +0 -0
  138. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
  139. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
  140. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
  141. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
  142. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
  143. /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
  144. /package/{es/components/appointmentBooking/components/Provider/Information → lib/components/appointmentBooking/components/Guest}/index.less +0 -0
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/appointmentBooking/components/Provider/Cart/ContinueButton/index.tsx
29
+ // src/components/appointmentBooking/components/Cart/ContinueButton/index.tsx
30
30
  var ContinueButton_exports = {};
31
31
  __export(ContinueButton_exports, {
32
32
  default: () => ContinueButton_default
@@ -35,17 +35,17 @@ module.exports = __toCommonJS(ContinueButton_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_materials = require("@pisell/materials");
38
- var import_utils2 = require("../../../../../Sales/Checkout/utils");
39
- var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngineContext"));
40
- var import_hooks = require("../../../../hooks");
38
+ var import_utils2 = require("../../../../Sales/Checkout/utils");
39
+ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
40
+ var import_hooks = require("../../../hooks");
41
+ var import_context = require("../../../context");
41
42
  var import_index = require("./index.less");
42
43
  var ContinueButton = () => {
43
- var _a;
44
44
  const context = (0, import_useEngineContext.default)();
45
45
  const utils = context.appHelper.utils || {};
46
46
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
47
47
  const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
48
- const { currentStep, isLastStep } = (0, import_hooks.useAppointmentBookingStep)();
48
+ const { currentStep, isLastStep, products } = (0, import_context.useAppointmentBookingContext)();
49
49
  const [openCheckout, setOpenCheckout] = (0, import_react.useState)(false);
50
50
  const [checkedNumber, setCheckedNumber] = (0, import_react.useState)(0);
51
51
  const [openEmptyHolder, setOpenEmptyHolder] = (0, import_react.useState)(false);
@@ -61,13 +61,13 @@ var ContinueButton = () => {
61
61
  };
62
62
  const cartData = {};
63
63
  const handleCheckout = async () => {
64
- var _a2;
64
+ var _a;
65
65
  const value = (0, import_utils2.formatValues)(data);
66
66
  const result = { success: true };
67
67
  if (result == null ? void 0 : result.success) {
68
68
  } else {
69
69
  (0, import_materials.PisellToast)({
70
- content: ((_a2 = result == null ? void 0 : result.err) == null ? void 0 : _a2.message) || ""
70
+ content: ((_a = result == null ? void 0 : result.err) == null ? void 0 : _a.message) || ""
71
71
  });
72
72
  }
73
73
  };
@@ -80,14 +80,16 @@ var ContinueButton = () => {
80
80
  const handleHolder = () => {
81
81
  };
82
82
  const handleContinue = async () => {
83
- if (!isLogin) {
84
- return openLoginModal({
85
- callback: (status) => {
86
- if (status === "success") {
87
- handleNextStep();
83
+ if (isLastStep) {
84
+ if (!isLogin) {
85
+ return openLoginModal({
86
+ callback: (status) => {
87
+ if (status === "success") {
88
+ handleNextStep();
89
+ }
88
90
  }
89
- }
90
- });
91
+ });
92
+ }
91
93
  }
92
94
  handleNextStep();
93
95
  };
@@ -105,7 +107,7 @@ var ContinueButton = () => {
105
107
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
106
108
  import_materials.Button,
107
109
  {
108
- disabled: !((_a = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a.length),
110
+ disabled: !(products == null ? void 0 : products.length),
109
111
  size: "large",
110
112
  type: "primary",
111
113
  onClick: () => handleContinue(),
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/appointmentBooking/components/Provider/Cart/Item/Total.tsx
29
+ // src/components/appointmentBooking/components/Cart/Item/Total.tsx
30
30
  var Total_exports = {};
31
31
  __export(Total_exports, {
32
32
  default: () => Total_default
@@ -35,19 +35,15 @@ module.exports = __toCommonJS(Total_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_materials = require("@pisell/materials");
38
- var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngineContext"));
39
- var import_hooks = require("../../../../hooks");
38
+ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
40
39
  var import_index = require("./index.less");
41
40
  var import_classnames = __toESM(require("classnames"));
41
+ var import_context = require("../../../context");
42
42
  var Total = ({ className, isFooter }) => {
43
- var _a, _b, _c, _d;
43
+ var _a, _b, _c;
44
44
  const context = (0, import_useEngineContext.default)();
45
- const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
46
- const taxTitle = "GST";
47
- const totalTaxFee = 0;
48
- const isPriceIncludeTax = true;
49
- const total = 0;
50
- console.log((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils, "wh978976");
45
+ const { summary } = (0, import_context.useAppointmentBookingContext)();
46
+ const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
51
47
  return /* @__PURE__ */ import_react.default.createElement("div", { className: `event-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
52
48
  "div",
53
49
  {
@@ -64,7 +60,7 @@ var Total = ({ className, isFooter }) => {
64
60
  }
65
61
  ) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("span", { className: "gst" }, import_utils.locales.getText("pisell2.event.total.gst")(
66
62
  `${isFooter ? `${taxTitle}: ` : taxTitle}`,
67
- `${(_d = (_c = (_b = context == null ? void 0 : context.appHelper) == null ? void 0 : _b.utils) == null ? void 0 : _c.getSymbolic) == null ? void 0 : _d.call(_c)}${totalTaxFee}`
63
+ `${(_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getSymbolic) == null ? void 0 : _c.call(_b)}${totalTaxFee}`
68
64
  )) : null),
69
65
  !isFooter ? /* @__PURE__ */ import_react.default.createElement(
70
66
  import_materials.PisellText.Amount,
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/appointmentBooking/components/Provider/Cart/Item/index.tsx
29
+ // src/components/appointmentBooking/components/Cart/Item/index.tsx
30
30
  var Item_exports = {};
31
31
  __export(Item_exports, {
32
32
  default: () => Item_default
@@ -34,33 +34,34 @@ __export(Item_exports, {
34
34
  module.exports = __toCommonJS(Item_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
- var import_shoppingCart = __toESM(require("../../../../../shoppingCart"));
37
+ var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
38
38
  var import_ContinueButton = __toESM(require("../ContinueButton"));
39
- var import_hooks = require("../../../../hooks");
39
+ var import_hooks = require("../../../hooks");
40
+ var import_context = require("../../../context");
40
41
  var import_Total = __toESM(require("./Total"));
42
+ var import_utils2 = require("../../../utils");
41
43
  var import_index = require("./index.less");
42
44
  var CartItem = () => {
43
- const open = false;
44
- const holderData = {};
45
- const selectedHolderIds = [];
46
- const cartData = {};
47
- const appointmentBookingCart = (0, import_hooks.useAppointmentBookingCart)();
45
+ const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
48
46
  const appointmentBookingAccount = (0, import_hooks.useAppointmentBookingAccount)();
49
- const appointmentBookingStep = (0, import_hooks.useAppointmentBookingStep)();
50
- const { products } = appointmentBookingCart;
51
- const { isLastStep } = appointmentBookingStep;
52
- console.log(
53
- appointmentBookingCart,
54
- appointmentBookingAccount,
55
- "whappointmentBookingCart"
56
- );
47
+ const { carts, summary, isLastStep } = (0, import_context.useAppointmentBookingContext)();
48
+ const { accountLists } = appointmentBookingAccount;
49
+ console.log(summary, carts, "accountLists");
50
+ const holderIds = (0, import_react.useMemo)(() => {
51
+ return accountLists.map((item) => item.id);
52
+ }, [accountLists]);
53
+ const holders = (0, import_react.useMemo)(() => {
54
+ return (0, import_utils2.formatHolder)(accountLists);
55
+ }, [accountLists]);
57
56
  const handleClickCard = (e, type, key) => {
57
+ console.log(e, type, key, "wh9988767");
58
58
  if (type === "note") {
59
+ return appointmentBooking.updateCart(e == null ? void 0 : e._id, { products: e });
59
60
  }
60
- console.log(e, type, key, "wh9988767");
61
61
  if (type === "delete") {
62
62
  }
63
63
  if (type === "delete_holders") {
64
+ return appointmentBooking.removeAccount(key);
64
65
  }
65
66
  };
66
67
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -72,18 +73,18 @@ var CartItem = () => {
72
73
  import_shoppingCart.default,
73
74
  {
74
75
  productParams: {
75
- products,
76
+ products: carts,
76
77
  hideAddBtn: false,
77
- holders: (holderData == null ? void 0 : holderData.selectedHolderItems) || [],
78
+ holders,
78
79
  disabledEdit: isLastStep
79
80
  },
80
81
  collapseParams: {
81
- activeKey: selectedHolderIds,
82
+ activeKey: holderIds,
82
83
  ghost: true
83
84
  },
84
85
  platform: "h5",
85
86
  emptyText: import_utils.locales.getText("pisell2.event.empty.service"),
86
- isOpenGroup: !!(selectedHolderIds == null ? void 0 : selectedHolderIds.length),
87
+ isOpenGroup: !!(holderIds == null ? void 0 : holderIds.length),
87
88
  onChange: (e, type, key) => handleClickCard(e, type, key)
88
89
  }
89
90
  )),
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/appointmentBooking/components/Provider/Cart/index.tsx
29
+ // src/components/appointmentBooking/components/Cart/index.tsx
30
30
  var Cart_exports = {};
31
31
  __export(Cart_exports, {
32
32
  default: () => Cart_default
@@ -34,28 +34,40 @@ __export(Content_exports, {
34
34
  module.exports = __toCommonJS(Content_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
- var import_Item = __toESM(require("../Provider/Cart/Item"));
37
+ var import_Item = __toESM(require("../Cart/Item"));
38
+ var import_Header = __toESM(require("../Header"));
39
+ var import_Footer = __toESM(require("../Footer"));
38
40
  var import_Services = __toESM(require("../Services"));
39
41
  var import_Date = __toESM(require("../Date"));
40
42
  var import_Resource = __toESM(require("../Resource"));
41
43
  var import_TimeSlicing = __toESM(require("../TimeSlicing"));
44
+ var import_Guest = __toESM(require("../Guest"));
45
+ var import_hooks = require("../../hooks");
46
+ var import_context = require("../../context");
42
47
  var import_index = require("./index.less");
43
48
  var Layout = () => {
44
- const [currentStepData, setCurrentStepData] = (0, import_react.useState)({
45
- key: "select-service"
46
- });
49
+ var _a, _b, _c;
50
+ const appointmentBookingStep = (0, import_hooks.useAppointmentBookingStep)();
51
+ const appointmentBookingCart = (0, import_hooks.useAppointmentBookingCart)();
52
+ const { currentStep } = (0, import_context.useAppointmentBookingContext)();
53
+ const [params, setParams] = (0, import_react.useState)({});
47
54
  (0, import_react.useEffect)(() => {
55
+ var _a2;
56
+ console.log((_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key, "whcurrentStep?.step?.key");
48
57
  window.scrollTo({
49
58
  top: 0,
50
59
  behavior: "smooth"
51
60
  });
52
- }, [currentStepData == null ? void 0 : currentStepData.key]);
61
+ }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
53
62
  const Com = (0, import_react.useMemo)(() => {
54
- const key = currentStepData == null ? void 0 : currentStepData.key;
63
+ var _a2;
64
+ const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
55
65
  if (!key) return null;
56
66
  const components = {
57
67
  // 选择服务
58
68
  "select-service": import_Services.default,
69
+ // 添加客户
70
+ "select-guest": import_Guest.default,
59
71
  // 选择时间
60
72
  "select-date": import_Date.default,
61
73
  // 选择资源
@@ -64,16 +76,16 @@ var Layout = () => {
64
76
  "select-time": import_TimeSlicing.default
65
77
  };
66
78
  let Com2 = components[key];
67
- return /* @__PURE__ */ import_react.default.createElement(Com2, null);
68
- }, [currentStepData == null ? void 0 : currentStepData.key]);
79
+ return /* @__PURE__ */ import_react.default.createElement(Com2, { onChange: setParams, params });
80
+ }, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key]);
69
81
  (0, import_react.useEffect)(() => {
70
- var _a, _b;
82
+ var _a2, _b2;
71
83
  if ((0, import_utils.isMobile)()) {
72
84
  const header = document.querySelector(".event-progress-bar");
73
85
  const footer = document.querySelector(".pisell-section-footers-wrapper");
74
86
  const content = document.querySelector(".event-content-mobile-wrap");
75
- const headerHeight = ((_a = header == null ? void 0 : header.getBoundingClientRect()) == null ? void 0 : _a.height) || 0;
76
- const footerHeight = ((_b = footer == null ? void 0 : footer.getBoundingClientRect()) == null ? void 0 : _b.height) || 0;
87
+ const headerHeight = ((_a2 = header == null ? void 0 : header.getBoundingClientRect()) == null ? void 0 : _a2.height) || 0;
88
+ const footerHeight = ((_b2 = footer == null ? void 0 : footer.getBoundingClientRect()) == null ? void 0 : _b2.height) || 0;
77
89
  const windowHeight = window.innerHeight;
78
90
  const contentHeight = windowHeight - headerHeight - footerHeight;
79
91
  if (content && (content == null ? void 0 : content.style)) {
@@ -81,14 +93,14 @@ var Layout = () => {
81
93
  content.style.overflowY = "auto";
82
94
  }
83
95
  }
84
- }, [currentStepData == null ? void 0 : currentStepData.key]);
85
- return /* @__PURE__ */ import_react.default.createElement(
96
+ }, [(_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key]);
97
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null), /* @__PURE__ */ import_react.default.createElement(
86
98
  "div",
87
99
  {
88
100
  className: `parallel-content-wrap ${(0, import_utils.isMobile)() ? "parallel-content-mobile-wrap" : ""}`
89
101
  },
90
102
  /* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-left" }, Com),
91
103
  !(0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-right" }, /* @__PURE__ */ import_react.default.createElement(import_Item.default, null)) : null
92
- );
104
+ ), (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Footer.default, null) : null);
93
105
  };
94
106
  var Content_default = Layout;
@@ -32,20 +32,23 @@ __export(Date_exports, {
32
32
  default: () => Date_default
33
33
  });
34
34
  module.exports = __toCommonJS(Date_exports);
35
- var import_react = require("react");
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
36
37
  var import_dayjs = __toESM(require("dayjs"));
37
38
  var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
38
39
  var import_state = require("./state");
39
40
  var import_classnames = __toESM(require("classnames"));
40
41
  var import_icons = require("@ant-design/icons");
42
+ var import_context = require("../../context");
41
43
  var import_index = require("./index.less");
42
44
  import_dayjs.default.extend(import_isSameOrBefore.default);
43
45
  var CalendarDate = (props) => {
44
- const [currentDate, setCurrentDate] = (0, import_react.useState)("");
46
+ const [currentDate, setCurrentDate] = (0, import_react.useState)();
45
47
  const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
46
48
  const [currentMonth, setCurrentMonth] = (0, import_react.useState)(() => {
47
49
  return (0, import_dayjs.default)();
48
50
  });
51
+ const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
49
52
  const startingColumn = 0 % 7;
50
53
  const columns = Array.from(
51
54
  { length: 7 },
@@ -76,24 +79,56 @@ var CalendarDate = (props) => {
76
79
  let lastDate = (0, import_dayjs.default)(newCurrentMonth).subtract(1, "month");
77
80
  return lastDate.isBefore((0, import_dayjs.default)(), "month");
78
81
  };
82
+ const getDates = async (date) => {
83
+ const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
84
+ const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
85
+ const params = {
86
+ startDate,
87
+ endDate
88
+ };
89
+ const data = await appointmentBooking.getAvailableDate(params);
90
+ console.log(
91
+ data,
92
+ params,
93
+ date,
94
+ date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM"),
95
+ "wh78968"
96
+ );
97
+ if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
98
+ const firstAvailableDate = data.find(
99
+ (d) => d.status === "available"
100
+ );
101
+ setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
102
+ appointmentBooking.setDateRange([firstAvailableDate]);
103
+ }
104
+ const baseMonthData = getMonthData(date.format("YYYY-MM"));
105
+ const updatedDates = baseMonthData.map((day) => {
106
+ const matchedDay = data.find((d) => d.date === day.date);
107
+ if (matchedDay) {
108
+ return {
109
+ ...day,
110
+ ...matchedDay,
111
+ disabled: matchedDay.status === "unavailable"
112
+ };
113
+ }
114
+ return day;
115
+ });
116
+ setDateMonthList(updatedDates);
117
+ };
118
+ (0, import_react.useEffect)(() => {
119
+ getDates(currentMonth);
120
+ }, [currentMonth]);
79
121
  const lastMonth = () => {
80
122
  let currentLastText = currentMonth.format("YYYY-MM");
81
123
  let newLastMonth = (0, import_dayjs.default)(currentLastText).subtract(1, "month");
82
124
  setCurrentMonth(newLastMonth);
83
- setDateMonthList(getMonthData(newLastMonth.format("YYYY-MM")));
84
125
  };
85
126
  const nextMonth = () => {
86
127
  let currentMonthText = currentMonth.format("YYYY-MM");
87
128
  let newNextMonth = (0, import_dayjs.default)(currentMonthText).add(1, "month");
88
129
  setCurrentMonth(newNextMonth);
89
- setDateMonthList(getMonthData(newNextMonth.format("YYYY-MM")));
90
130
  };
91
- (0, import_react.useEffect)(() => {
92
- let date = "2025-04-25";
93
- let daysText = (0, import_dayjs.default)(date).format("YYYY-MM");
94
- setDateMonthList(getMonthData(daysText));
95
- }, []);
96
- return /* @__PURE__ */ React.createElement("div", { className: "calendar-date-box" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ React.createElement(
131
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-date-box" }, !dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
97
132
  "div",
98
133
  {
99
134
  className: (0, import_classnames.default)("calendar-last-month", {
@@ -104,14 +139,14 @@ var CalendarDate = (props) => {
104
139
  lastMonth();
105
140
  }
106
141
  },
107
- /* @__PURE__ */ React.createElement(import_icons.CaretLeftOutlined, null)
108
- ), /* @__PURE__ */ React.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ React.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ React.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ React.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ React.createElement("div", { key: col, className: "calendar-weeks-items" }, import_state.weekListText[Number(col)]))), /* @__PURE__ */ React.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
142
+ /* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
143
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, import_state.weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
109
144
  const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
110
145
  const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
111
146
  currentMonth,
112
147
  "month"
113
148
  );
114
- return /* @__PURE__ */ React.createElement(
149
+ return /* @__PURE__ */ import_react.default.createElement(
115
150
  "div",
116
151
  {
117
152
  key: index,
@@ -122,11 +157,13 @@ var CalendarDate = (props) => {
122
157
  ["other-month-days"]: !isCurrentMonth
123
158
  }),
124
159
  onClick: () => {
160
+ if (day == null ? void 0 : day.disabled) return;
125
161
  console.log(day, "wh987976");
126
- !(day == null ? void 0 : day.disabled) && setCurrentDate(date);
162
+ setCurrentDate(date);
163
+ appointmentBooking.setDateRange([day]);
127
164
  }
128
165
  },
129
- isCurrentMonth && /* @__PURE__ */ React.createElement(
166
+ isCurrentMonth && /* @__PURE__ */ import_react.default.createElement(
130
167
  "div",
131
168
  {
132
169
  className: (0, import_classnames.default)("day-text", {
@@ -136,6 +173,6 @@ var CalendarDate = (props) => {
136
173
  (0, import_dayjs.default)(day.date).format("D")
137
174
  )
138
175
  );
139
- }))));
176
+ })))));
140
177
  };
141
178
  var Date_default = CalendarDate;
@@ -3,6 +3,7 @@
3
3
  flex-direction: column;
4
4
  gap: 32px;
5
5
  user-select: none;
6
+ margin-top: 16px;
6
7
 
7
8
  .calendar-header {
8
9
  display: flex;
@@ -35,11 +35,11 @@ module.exports = __toCommonJS(Footer_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_materials = require("@pisell/materials");
37
37
  var import_react2 = require("react");
38
- var import_ContinueButton = __toESM(require("../Provider/Cart/ContinueButton"));
38
+ var import_ContinueButton = __toESM(require("../Cart/ContinueButton"));
39
39
  var import_shopping_cart = __toESM(require("../../assets/shopping-cart.svg"));
40
40
  var import_hooks = require("../../hooks");
41
- var import_Cart = __toESM(require("../Provider/Cart"));
42
- var import_Total = __toESM(require("../Provider/Cart/Item/Total"));
41
+ var import_Cart = __toESM(require("../Cart"));
42
+ var import_Total = __toESM(require("../Cart/Item/Total"));
43
43
  var import_index = require("./index.less");
44
44
  var Footer = () => {
45
45
  var _a;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Guest: () => JSX.Element;
3
+ export default Guest;
@@ -26,33 +26,34 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/appointmentBooking/components/Provider/Information/index.tsx
30
- var Information_exports = {};
31
- __export(Information_exports, {
32
- default: () => Information_default
29
+ // src/components/appointmentBooking/components/Guest/index.tsx
30
+ var Guest_exports = {};
31
+ __export(Guest_exports, {
32
+ default: () => Guest_default
33
33
  });
34
- module.exports = __toCommonJS(Information_exports);
34
+ module.exports = __toCommonJS(Guest_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
- var import_Sales = require("../../../../Sales");
40
- var import_SelectHolderModal = __toESM(require("../SelectHolderModal"));
41
- var import_InformationOptionsModal = __toESM(require("../InformationOptionsModal/index"));
42
- var import_RemoveOptionConfirmModal = __toESM(require("../RemoveOptionConfirmModal"));
39
+ var import_hooks = require("../../hooks");
40
+ var import_context = require("../../context");
41
+ var import_utils2 = require("../../utils");
43
42
  var import_index = require("./index.less");
44
- var Information = () => {
45
- const { onHolderOpen, open } = (0, import_Sales.useHolder)();
46
- const { cartDataHolderList } = (0, import_Sales.useCart)();
47
- const { selectHolder, deleteHolderById } = (0, import_Sales.useHolder)();
48
- const { prevStep } = (0, import_Sales.useStep)();
43
+ var Guest = () => {
49
44
  const [openOption, setOpenOption] = (0, import_react.useState)(false);
50
45
  const [holderItem, setHolderItem] = (0, import_react.useState)(null);
51
46
  const [removeOpen, setRemoveOpen] = (0, import_react.useState)(false);
47
+ const { carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
48
+ const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
49
+ const lists = (0, import_react.useMemo)(() => {
50
+ const _lists = (0, import_utils2.formatGuest)(accountLists, carts);
51
+ return _lists;
52
+ }, [accountLists, carts]);
52
53
  const options = [
53
54
  {
54
55
  key: "edit",
55
- label: /* @__PURE__ */ import_react.default.createElement("span", { className: "dropdown-menu-item" }, import_utils.locales.getText("pisell2.event.edit.event"))
56
+ label: /* @__PURE__ */ import_react.default.createElement("span", { className: "dropdown-menu-item" }, import_utils.locales.getText("pisell2.appointment.edit.service"))
56
57
  },
57
58
  {
58
59
  key: "remove",
@@ -61,13 +62,18 @@ var Information = () => {
61
62
  ];
62
63
  const handleClick = ({ key }, item) => {
63
64
  if (key === "edit") {
64
- selectHolder(item || holderItem, "createCartItem");
65
- prevStep();
65
+ appointmentBooking.setActiveAccount(item.id);
66
+ appointmentBooking.back();
66
67
  return;
67
68
  }
68
- setRemoveOpen(true);
69
+ appointmentBooking.removeAccount(item.id);
69
70
  };
70
71
  const renderOptionButton = (item) => {
72
+ console.log(item, options, "wh978776");
73
+ let _options = [...options];
74
+ if (!item.isGuest) {
75
+ _options = _options.filter((option) => option.key !== "remove");
76
+ }
71
77
  if ((0, import_utils.isMobile)()) {
72
78
  return /* @__PURE__ */ import_react.default.createElement(
73
79
  import_materials.Button,
@@ -85,7 +91,7 @@ var Information = () => {
85
91
  import_antd.Dropdown,
86
92
  {
87
93
  menu: {
88
- items: options,
94
+ items: _options,
89
95
  onClick: (e) => {
90
96
  setHolderItem(item);
91
97
  handleClick(e, item);
@@ -97,7 +103,17 @@ var Information = () => {
97
103
  /* @__PURE__ */ import_react.default.createElement(import_materials.Button, null, import_utils.locales.getText("pisell2.event.option"))
98
104
  );
99
105
  };
100
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "provider-information-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "title" }, import_utils.locales.getText("pisell2.event.confirm.information.tip")), cartDataHolderList == null ? void 0 : cartDataHolderList.map((item) => {
106
+ const handleAddGuest = () => {
107
+ const guest = {
108
+ id: (0, import_utils.getUniqueId)(),
109
+ username: `Guest${accountLists.length + 1}`,
110
+ isGuest: true
111
+ };
112
+ appointmentBooking.addAccount([guest]);
113
+ appointmentBooking.setActiveAccount(guest.id);
114
+ appointmentBooking.back();
115
+ };
116
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "provider-information-wrap" }, lists == null ? void 0 : lists.map((item) => {
101
117
  var _a;
102
118
  return /* @__PURE__ */ import_react.default.createElement(
103
119
  import_materials.PisellCard,
@@ -108,44 +124,19 @@ var Information = () => {
108
124
  isClickable: false
109
125
  },
110
126
  /* @__PURE__ */ import_react.default.createElement("div", { className: "information-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "information-left" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellAvatar, { src: item.avatar, size: "md" }), /* @__PURE__ */ import_react.default.createElement("div", { className: "information-title" }, /* @__PURE__ */ import_react.default.createElement("span", null, item.name), /* @__PURE__ */ import_react.default.createElement("span", { className: "subtitle" }, `${import_utils.locales.getText(
111
- "pisell2.event.title"
112
- )((_a = item.children) == null ? void 0 : _a.length)}`))), renderOptionButton(item)),
113
- item.children.map((child) => {
114
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "child-wrap" }, child.name);
115
- })
127
+ "pisell2.appointment.service.title"
128
+ )((_a = item.children) == null ? void 0 : _a.length)}`))), renderOptionButton(item))
116
129
  );
117
- }), /* @__PURE__ */ import_react.default.createElement("span", { className: "add-tip" }, import_utils.locales.getText("pisell2.event.confirm.information.other")), /* @__PURE__ */ import_react.default.createElement(
130
+ }), /* @__PURE__ */ import_react.default.createElement(
118
131
  import_materials.Button,
119
132
  {
120
133
  size: "large",
121
134
  style: { width: "max-content" },
122
- onClick: () => {
123
- onHolderOpen();
124
- },
135
+ onClick: handleAddGuest,
125
136
  className: "provider-information-add-button"
126
137
  },
127
138
  /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-plus", style: { fontSize: "20px" } }),
128
- import_utils.locales.getText("pisell2.event.add.others")
129
- )), /* @__PURE__ */ import_react.default.createElement(import_SelectHolderModal.default, { open, type: "create" }), /* @__PURE__ */ import_react.default.createElement(
130
- import_InformationOptionsModal.default,
131
- {
132
- options,
133
- open: openOption,
134
- holderItem,
135
- onCancel: () => setOpenOption(false),
136
- onClick: handleClick
137
- }
138
- ), /* @__PURE__ */ import_react.default.createElement(
139
- import_RemoveOptionConfirmModal.default,
140
- {
141
- removeOpen,
142
- onCancel: () => setRemoveOpen(false),
143
- onOk: () => {
144
- deleteHolderById(holderItem.id);
145
- setRemoveOpen(false);
146
- setOpenOption(false);
147
- }
148
- }
149
- ));
139
+ import_utils.locales.getText("pisell2.appointment.add.guest")
140
+ )));
150
141
  };
151
- var Information_default = Information;
142
+ var Guest_default = Guest;
@@ -34,12 +34,11 @@ __export(Header_exports, {
34
34
  module.exports = __toCommonJS(Header_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_progressBar = __toESM(require("../../../eventBooking/components/progressBar"));
37
- var import_hooks = require("../../hooks");
37
+ var import_context = require("../../context");
38
38
  var import_index = require("./index.less");
39
39
  var Header = () => {
40
40
  var _a, _b;
41
- const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
42
- const { currentStep } = (0, import_hooks.useAppointmentBookingStep)();
41
+ const { currentStep, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
43
42
  const handleBack = () => {
44
43
  appointmentBooking.back();
45
44
  };
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const Resource: () => JSX.Element;
2
+ declare const Resource: ({ onChange }: any) => JSX.Element;
3
3
  export default Resource;