@pisell/private-materials 3.2.17 → 3.2.18
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +19 -10
- package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +10 -20
- package/es/components/appointmentBooking/components/Cart/Item/index.js +73 -0
- package/es/components/appointmentBooking/components/Content/index.js +29 -15
- package/es/components/appointmentBooking/components/Date/index.js +77 -12
- package/es/components/appointmentBooking/components/Date/index.less +1 -0
- package/es/components/appointmentBooking/components/Footer/index.js +3 -3
- package/es/components/appointmentBooking/components/Guest/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +50 -59
- package/es/components/appointmentBooking/components/Header/index.js +6 -4
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +62 -29
- package/es/components/appointmentBooking/components/Resource/index.less +6 -0
- package/es/components/appointmentBooking/components/Services/index.js +25 -135
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +44 -755
- package/es/components/appointmentBooking/context.d.ts +23 -0
- package/es/components/appointmentBooking/context.js +71 -0
- package/es/components/appointmentBooking/hooks.d.ts +6 -8
- package/es/components/appointmentBooking/hooks.js +119 -62
- package/es/components/appointmentBooking/index.js +2 -3
- package/es/components/appointmentBooking/locales.d.ts +12 -0
- package/es/components/appointmentBooking/locales.js +21 -3
- package/es/components/appointmentBooking/utils.d.ts +12 -0
- package/es/components/appointmentBooking/utils.js +70 -0
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +18 -16
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +7 -11
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.js +22 -21
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.js +26 -14
- package/lib/components/appointmentBooking/components/Date/index.js +53 -16
- package/lib/components/appointmentBooking/components/Date/index.less +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +3 -3
- package/lib/components/appointmentBooking/components/Guest/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +43 -52
- package/lib/components/appointmentBooking/components/Header/index.js +2 -3
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +55 -41
- package/lib/components/appointmentBooking/components/Resource/index.less +6 -0
- package/lib/components/appointmentBooking/components/Services/index.js +15 -155
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +17 -941
- package/lib/components/appointmentBooking/context.d.ts +23 -0
- package/lib/components/appointmentBooking/context.js +85 -0
- package/lib/components/appointmentBooking/hooks.d.ts +6 -8
- package/lib/components/appointmentBooking/hooks.js +44 -20
- package/lib/components/appointmentBooking/index.js +2 -5
- package/lib/components/appointmentBooking/locales.d.ts +12 -0
- package/lib/components/appointmentBooking/locales.js +15 -3
- package/lib/components/appointmentBooking/utils.d.ts +12 -0
- package/lib/components/appointmentBooking/utils.js +62 -2
- package/package.json +2 -2
- package/es/components/appointmentBooking/components/Information/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Information/index.js +0 -178
- package/es/components/appointmentBooking/components/Provider/Cart/Item/index.js +0 -68
- package/es/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Content/index.js +0 -64
- package/es/components/appointmentBooking/components/Provider/Content/index.less +0 -31
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -34
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/es/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Event/index.js +0 -93
- package/es/components/appointmentBooking/components/Provider/Event/index.less +0 -20
- package/es/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -34
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -27
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
- package/es/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Resource/index.js +0 -79
- package/es/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
- package/es/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/es/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -90
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
- package/es/components/booking/info/service2/utils.d.ts +0 -240
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Information/index.js +0 -151
- package/lib/components/appointmentBooking/components/Information/index.less +0 -92
- package/lib/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Content/index.js +0 -90
- package/lib/components/appointmentBooking/components/Provider/Content/index.less +0 -31
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -60
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/lib/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Event/index.js +0 -100
- package/lib/components/appointmentBooking/components/Provider/Event/index.less +0 -20
- package/lib/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Information/index.less +0 -92
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -67
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -57
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
- package/lib/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Resource/index.js +0 -90
- package/lib/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
- package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -97
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/booking/info/service2/utils.d.ts +0 -240
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Information → Guest}/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
- /package/{es/components/eventBooking/components/Provider → lib/components/appointmentBooking/components}/Cart/Item/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
- /package/{es/components/appointmentBooking/components/Provider/Information → lib/components/appointmentBooking/components/Guest}/index.less +0 -0
package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js
RENAMED
|
@@ -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/
|
|
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("
|
|
39
|
-
var import_useEngineContext = __toESM(require("
|
|
40
|
-
var import_hooks = require("
|
|
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,
|
|
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
|
|
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: ((
|
|
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 (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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: !(
|
|
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/
|
|
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("
|
|
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
|
|
43
|
+
var _a, _b, _c;
|
|
44
44
|
const context = (0, import_useEngineContext.default)();
|
|
45
|
-
const
|
|
46
|
-
const taxTitle =
|
|
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
|
-
`${(
|
|
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/
|
|
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("
|
|
37
|
+
var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
|
|
38
38
|
var import_ContinueButton = __toESM(require("../ContinueButton"));
|
|
39
|
-
var import_hooks = require("
|
|
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
|
|
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
|
|
50
|
-
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
78
|
+
holders,
|
|
78
79
|
disabledEdit: isLastStep
|
|
79
80
|
},
|
|
80
81
|
collapseParams: {
|
|
81
|
-
activeKey:
|
|
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: !!(
|
|
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/
|
|
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("../
|
|
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
|
-
|
|
45
|
-
|
|
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
|
-
}, [
|
|
61
|
+
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
|
|
53
62
|
const Com = (0, import_react.useMemo)(() => {
|
|
54
|
-
|
|
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,
|
|
68
|
-
}, [
|
|
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
|
|
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 = ((
|
|
76
|
-
const footerHeight = ((
|
|
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
|
-
}, [
|
|
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
|
-
(
|
|
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__ */
|
|
108
|
-
), /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
162
|
+
setCurrentDate(date);
|
|
163
|
+
appointmentBooking.setDateRange([day]);
|
|
127
164
|
}
|
|
128
165
|
},
|
|
129
|
-
isCurrentMonth && /* @__PURE__ */
|
|
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;
|
|
@@ -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("../
|
|
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("../
|
|
42
|
-
var import_Total = __toESM(require("../
|
|
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;
|
package/lib/components/appointmentBooking/components/{Provider/Information → Guest}/index.js
RENAMED
|
@@ -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/
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
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(
|
|
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
|
|
40
|
-
var
|
|
41
|
-
var
|
|
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
|
|
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.
|
|
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
|
-
|
|
65
|
-
|
|
65
|
+
appointmentBooking.setActiveAccount(item.id);
|
|
66
|
+
appointmentBooking.back();
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
|
-
|
|
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:
|
|
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
|
-
|
|
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.
|
|
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(
|
|
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.
|
|
129
|
-
))
|
|
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
|
|
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
|
|
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,
|
|
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
|
};
|