@pisell/private-materials 3.3.19 → 3.3.21
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +3 -2
- package/es/components/appointmentBooking/components/Content/index.js +19 -22
- package/es/components/appointmentBooking/components/Date/index.js +66 -42
- package/es/components/appointmentBooking/components/Date/state.js +5 -0
- package/es/components/appointmentBooking/components/Form/index.js +12 -4
- package/es/components/appointmentBooking/components/Guest/index.js +4 -2
- package/es/components/appointmentBooking/components/Resource/index.js +7 -4
- package/es/components/appointmentBooking/components/Services/index.js +3 -2
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +4 -2
- package/es/components/appointmentBooking/context.js +63 -6
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +35 -11
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/hooks.js +48 -8
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/locales.js +6 -0
- package/es/components/appointmentBooking/utils.js +10 -4
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/deposit/index.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +1 -0
- package/lib/components/appointmentBooking/components/Content/index.js +11 -11
- package/lib/components/appointmentBooking/components/Date/index.js +29 -12
- package/lib/components/appointmentBooking/components/Date/state.js +7 -0
- package/lib/components/appointmentBooking/components/Form/index.js +6 -3
- package/lib/components/appointmentBooking/components/Guest/index.js +2 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +6 -4
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +2 -1
- package/lib/components/appointmentBooking/context.js +28 -7
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +39 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/hooks.js +29 -5
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/locales.js +6 -0
- package/lib/components/appointmentBooking/utils.js +8 -4
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +1 -1
- package/lib/components/booking/deposit/index.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/package.json +2 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Date/state.d.ts +0 -62
- package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Guest/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Resource/index.d.ts +0 -7
- package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -4
- package/es/components/appointmentBooking/context.d.ts +0 -33
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/hooks.d.ts +0 -106
- package/es/components/appointmentBooking/locales.d.ts +0 -348
- package/es/components/appointmentBooking/utils.d.ts +0 -114
- package/es/components/booking/deposit/index.d.ts +0 -3
- package/es/components/eftposPay/payo/config.d.ts +0 -12
- package/es/components/eftposPay/payo/hooks.d.ts +0 -10
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Date/state.d.ts +0 -62
- package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Guest/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +0 -7
- package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -4
- package/lib/components/appointmentBooking/context.d.ts +0 -33
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/hooks.d.ts +0 -106
- package/lib/components/appointmentBooking/locales.d.ts +0 -348
- package/lib/components/appointmentBooking/utils.d.ts +0 -114
- package/lib/components/booking/deposit/index.d.ts +0 -3
- package/lib/components/eftposPay/payo/config.d.ts +0 -12
- package/lib/components/eftposPay/payo/hooks.d.ts +0 -10
|
@@ -39,19 +39,31 @@ var import_utils = require("@pisell/utils");
|
|
|
39
39
|
var import_context = require("../../../context");
|
|
40
40
|
var import_index = require("./index.less");
|
|
41
41
|
var DepositModal = (props) => {
|
|
42
|
-
const {
|
|
42
|
+
const {
|
|
43
|
+
open,
|
|
44
|
+
onCancel,
|
|
45
|
+
item,
|
|
46
|
+
onChange,
|
|
47
|
+
onConfirm,
|
|
48
|
+
isHideCheckout = true
|
|
49
|
+
} = props;
|
|
43
50
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
44
51
|
const [policy, setPolicy] = (0, import_react.useState)(null);
|
|
45
52
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
53
|
+
const [disabled, setDisabled] = (0, import_react.useState)(false);
|
|
54
|
+
(0, import_react.useEffect)(() => {
|
|
55
|
+
setDisabled(!isHideCheckout);
|
|
56
|
+
}, [isHideCheckout]);
|
|
46
57
|
const getPolicy = async (id) => {
|
|
47
58
|
setLoading(true);
|
|
48
59
|
try {
|
|
49
60
|
const { data } = await appointmentBooking.getProtocol(id);
|
|
50
61
|
setPolicy(data);
|
|
51
|
-
onChange(data);
|
|
62
|
+
onChange && onChange(data);
|
|
52
63
|
} catch (error) {
|
|
53
64
|
console.log(error);
|
|
54
|
-
onChange(error);
|
|
65
|
+
onChange && onChange(error);
|
|
66
|
+
debugger;
|
|
55
67
|
} finally {
|
|
56
68
|
setLoading(false);
|
|
57
69
|
}
|
|
@@ -74,7 +86,30 @@ var DepositModal = (props) => {
|
|
|
74
86
|
className: "policy-modal-wrap",
|
|
75
87
|
cancelVisible: false,
|
|
76
88
|
okText: import_utils.locales.getText("pisell2.appointment.deposit.close"),
|
|
77
|
-
|
|
89
|
+
footer: [
|
|
90
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "policy-modal-footer" }, !isHideCheckout ? /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
+
import_materials.Checkbox,
|
|
92
|
+
{
|
|
93
|
+
className: "policy-modal-checkbox",
|
|
94
|
+
onChange: (e) => {
|
|
95
|
+
var _a;
|
|
96
|
+
return setDisabled(!((_a = e.target) == null ? void 0 : _a.checked));
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
import_utils.locales.getText("pisell2.appointment.policy")
|
|
100
|
+
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
101
|
+
import_materials.Button,
|
|
102
|
+
{
|
|
103
|
+
type: "primary",
|
|
104
|
+
size: "large",
|
|
105
|
+
onClick: isHideCheckout ? onCancel : onConfirm,
|
|
106
|
+
disabled
|
|
107
|
+
},
|
|
108
|
+
import_utils.locales.getText(
|
|
109
|
+
isHideCheckout ? "pisell2.appointment.deposit.close" : "pisell2.appointment.policy.confirm"
|
|
110
|
+
)
|
|
111
|
+
))
|
|
112
|
+
]
|
|
78
113
|
},
|
|
79
114
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { style: { minHeight: "200px" }, spinning: loading }, (policy == null ? void 0 : policy.content) ? /* @__PURE__ */ import_react.default.createElement(
|
|
80
115
|
"div",
|
|
@@ -66,7 +66,7 @@ var contextUtils = () => {
|
|
|
66
66
|
var useAppointmentBookingStep = () => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
69
|
-
const { appointmentBooking, setCurrentStep } = (0, import_context.useAppointmentBookingContext)();
|
|
69
|
+
const { appointmentBooking, setCurrentStep, policyIdsRef, openPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
70
70
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
71
71
|
const getCurrentAndLastStep = () => {
|
|
72
72
|
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
@@ -113,7 +113,30 @@ var useAppointmentBookingStep = () => {
|
|
|
113
113
|
isSkip: (step == null ? void 0 : step.isSkip) || false
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
const nextStep = () => {
|
|
117
|
+
var _a2, _b2, _c2, _d;
|
|
118
|
+
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
119
|
+
const stepList2 = ((_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList) || [];
|
|
120
|
+
if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepList2 == null ? void 0 : stepList2.length)) {
|
|
121
|
+
if ((_d = policyIdsRef == null ? void 0 : policyIdsRef.current) == null ? void 0 : _d.length) {
|
|
122
|
+
let idx = 0;
|
|
123
|
+
const showNextPolicy = () => {
|
|
124
|
+
if (idx < policyIdsRef.current.length) {
|
|
125
|
+
openPolicy({ id: policyIdsRef.current[idx] }, () => {
|
|
126
|
+
idx++;
|
|
127
|
+
showNextPolicy();
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
appointmentBooking.next();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
showNextPolicy();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
appointmentBooking.next();
|
|
138
|
+
};
|
|
139
|
+
return { getStepIndex, stepList, removeStep, addStep, updateStep, nextStep };
|
|
117
140
|
};
|
|
118
141
|
var useAppointmentBookingProduct = () => {
|
|
119
142
|
const { appointmentBooking, carts } = (0, import_context.useAppointmentBookingContext)();
|
|
@@ -284,13 +307,14 @@ var useAppointmentBookingResource = () => {
|
|
|
284
307
|
};
|
|
285
308
|
var useIsSkipResourceStep = () => {
|
|
286
309
|
var _a, _b, _c;
|
|
287
|
-
const { currentStep, setCarts } = (0, import_context.useAppointmentBookingContext)();
|
|
310
|
+
const { currentStep, setCarts, setPolicyIds } = (0, import_context.useAppointmentBookingContext)();
|
|
288
311
|
const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
|
|
289
312
|
const { isFormSubject } = useAppointmentBookingSetting();
|
|
290
313
|
const appointmentBooking = useAppointmentBooking();
|
|
291
314
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
292
315
|
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
293
316
|
const { getHolders, checkAccount } = useAppointmentBookingAccount();
|
|
317
|
+
const { nextStep } = useAppointmentBookingStep();
|
|
294
318
|
const utils = contextUtils();
|
|
295
319
|
const checkSkipResourceStep = async (isSkipUpdateFormStep) => {
|
|
296
320
|
var _a2, _b2, _c2, _d, _e;
|
|
@@ -302,8 +326,8 @@ var useIsSkipResourceStep = () => {
|
|
|
302
326
|
const { resources } = getResourceList();
|
|
303
327
|
if (!((_a2 = res == null ? void 0 : res.errorList) == null ? void 0 : _a2.length) && ((_e = (_d = (_c2 = (_b2 = resources == null ? void 0 : resources[0]) == null ? void 0 : _b2.resources) == null ? void 0 : _c2[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
|
|
304
328
|
if (!isSkipUpdateFormStep) {
|
|
305
|
-
const resultCarts = (0, import_utils2.formatCartsResources)(carts, resources);
|
|
306
|
-
(0, import_utils2.checkHasFormStep)({ isSkip: true, openLoginModal, utils, accountLists, getHolders, checkHolder: import_utils3.checkHolder, setCarts, checkAccount, carts, isFormSubject, hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0, currentStep, stepList, appointmentBooking, locales: import_utils.locales, isLogin });
|
|
329
|
+
const resultCarts = (0, import_utils2.formatCartsResources)(carts, resources, setPolicyIds);
|
|
330
|
+
(0, import_utils2.checkHasFormStep)({ nextStep, isSkip: true, openLoginModal, utils, accountLists, getHolders, checkHolder: import_utils3.checkHolder, setCarts, checkAccount, carts, isFormSubject, hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0, currentStep, stepList, appointmentBooking, locales: import_utils.locales, isLogin });
|
|
307
331
|
}
|
|
308
332
|
return true;
|
|
309
333
|
} else {
|
|
@@ -128,6 +128,8 @@ var locales_default = {
|
|
|
128
128
|
"pisell2.appointment.unselect.date": "Please select date",
|
|
129
129
|
"pisell2.appointment.unuse.date": "This date is not available, please change the date.",
|
|
130
130
|
"pisell2.appointment.add-guests": "Add guests",
|
|
131
|
+
"pisell2.appointment.policy": "You have read and agreed to this policy",
|
|
132
|
+
"pisell2.appointment.policy.confirm": "Confirm",
|
|
131
133
|
"pisell2.text.apply": "Apply",
|
|
132
134
|
"pisell2.text.goodpass": "GoodPass",
|
|
133
135
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
@@ -243,6 +245,8 @@ var locales_default = {
|
|
|
243
245
|
"pisell2.appointment.unselect.date": "请选择日期",
|
|
244
246
|
"pisell2.appointment.unuse.date": "此日期不可用,请更换日期。",
|
|
245
247
|
"pisell2.appointment.add-guests": "添加预约人",
|
|
248
|
+
"pisell2.appointment.policy": "您已仔细阅读并同意此协议",
|
|
249
|
+
"pisell2.appointment.policy.confirm": "确定",
|
|
246
250
|
"pisell2.text.apply": "应用",
|
|
247
251
|
"pisell2.text.goodpass": "商品券",
|
|
248
252
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
@@ -358,6 +362,8 @@ var locales_default = {
|
|
|
358
362
|
"pisell2.appointment.unselect.date": "請選擇日期",
|
|
359
363
|
"pisell2.appointment.unuse.date": "此日期不可用,請更換日期。",
|
|
360
364
|
"pisell2.appointment.add-guests": "添加預約人",
|
|
365
|
+
"pisell2.appointment.policy": "您已仔細閱讀並同意此協議",
|
|
366
|
+
"pisell2.appointment.policy.confirm": "確定",
|
|
361
367
|
"pisell2.text.apply": "應用",
|
|
362
368
|
"pisell2.text.goodpass": "商品券",
|
|
363
369
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
@@ -76,8 +76,9 @@ var formatGuest = (data, products) => {
|
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
var formatCartsResources = (carts, resources) => {
|
|
79
|
+
var formatCartsResources = (carts, resources, setPolicyIds) => {
|
|
80
80
|
try {
|
|
81
|
+
let policyIds = [];
|
|
81
82
|
let newCarts = carts == null ? void 0 : carts.map((d) => {
|
|
82
83
|
var _a, _b;
|
|
83
84
|
const currentResource = resources == null ? void 0 : resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
|
|
@@ -89,9 +90,12 @@ var formatCartsResources = (carts, resources) => {
|
|
|
89
90
|
...d,
|
|
90
91
|
resource_form_id: foundResource == null ? void 0 : foundResource.resource_form_id
|
|
91
92
|
};
|
|
93
|
+
} else if ((foundResource == null ? void 0 : foundResource.policy_id) && !policyIds.includes(foundResource == null ? void 0 : foundResource.policy_id)) {
|
|
94
|
+
policyIds.push(foundResource == null ? void 0 : foundResource.policy_id);
|
|
92
95
|
}
|
|
93
96
|
return false;
|
|
94
97
|
}).filter(Boolean);
|
|
98
|
+
setPolicyIds(policyIds);
|
|
95
99
|
return newCarts || [];
|
|
96
100
|
} catch (error) {
|
|
97
101
|
console.log(error, "formatCarts");
|
|
@@ -278,7 +282,7 @@ var Toast = (text) => {
|
|
|
278
282
|
window == null ? void 0 : window.alert(text);
|
|
279
283
|
}
|
|
280
284
|
};
|
|
281
|
-
var checkHasFormStep = ({ isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
|
|
285
|
+
var checkHasFormStep = ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
|
|
282
286
|
var _a, _b, _c;
|
|
283
287
|
let isNext = false;
|
|
284
288
|
if (hasResourceFormId2) {
|
|
@@ -329,13 +333,13 @@ var checkHasFormStep = ({ isSkip, checkHolder, checkAccount, carts, setCarts, ha
|
|
|
329
333
|
isNext = true;
|
|
330
334
|
}
|
|
331
335
|
if (isNext && !_checkHolder()) {
|
|
332
|
-
|
|
336
|
+
nextStep();
|
|
333
337
|
} else {
|
|
334
338
|
return true;
|
|
335
339
|
}
|
|
336
340
|
} else {
|
|
337
341
|
if (isSkip) {
|
|
338
|
-
|
|
342
|
+
nextStep();
|
|
339
343
|
}
|
|
340
344
|
}
|
|
341
345
|
};
|
|
@@ -154,7 +154,7 @@ var checkResourcesFormat = (resources, service, isChild) => {
|
|
|
154
154
|
children: ((_a = resource.children) == null ? void 0 : _a.length) ? checkResourcesFormat(resource.children, service, true) : void 0,
|
|
155
155
|
form_id: resource.form_id,
|
|
156
156
|
relation_type: resource.relation_type || "form",
|
|
157
|
-
relation_id: resource.relation_id ||
|
|
157
|
+
relation_id: resource.relation_id || 0,
|
|
158
158
|
capacity: resource.capacity,
|
|
159
159
|
like_status: resource.like_status || "common",
|
|
160
160
|
metadata: resource.metadata || {}
|
|
@@ -106,7 +106,7 @@ var Deposit = (props) => {
|
|
|
106
106
|
}, [globalState]);
|
|
107
107
|
const depositList = (0, import_react.useMemo)(() => {
|
|
108
108
|
if (!bookingId) return [];
|
|
109
|
-
if (
|
|
109
|
+
if ((bookingDetail == null ? void 0 : bookingDetail.is_deposit) === 0) return [];
|
|
110
110
|
return [
|
|
111
111
|
{
|
|
112
112
|
customer: bookingDetail == null ? void 0 : bookingDetail.customer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.21",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/date-picker": "3.0.2",
|
|
64
63
|
"@pisell/materials": "3.3.7",
|
|
64
|
+
"@pisell/date-picker": "3.0.2",
|
|
65
65
|
"@pisell/icon": "0.0.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title: 获取包括今天的后七天日期
|
|
3
|
-
* @description:
|
|
4
|
-
* @param {*}
|
|
5
|
-
* @return {*}
|
|
6
|
-
* @Author: 严文强
|
|
7
|
-
* @Date: 2024-02-01 11:00
|
|
8
|
-
*/
|
|
9
|
-
export declare const getNextSevenDaysList: (defaultDay: string) => string[];
|
|
10
|
-
/**
|
|
11
|
-
* @title: 将年月日信息只展示为天
|
|
12
|
-
* @description: 如果为今天 则返回ToDay
|
|
13
|
-
* @param {*}
|
|
14
|
-
* @return {*}
|
|
15
|
-
* @Author: 严文强
|
|
16
|
-
* @Date: 2024-02-01 11:00
|
|
17
|
-
*/
|
|
18
|
-
export declare const ShowDayOnly: (date: string) => string;
|
|
19
|
-
/**
|
|
20
|
-
* @title: 日历星期多语言
|
|
21
|
-
* @description:
|
|
22
|
-
* @param {*}
|
|
23
|
-
* @return {*}
|
|
24
|
-
* @Author: 严文强
|
|
25
|
-
* @Date: 2024-02-01 18:42
|
|
26
|
-
*/
|
|
27
|
-
export declare const weekListText: string[];
|
|
28
|
-
/**
|
|
29
|
-
* @title: 不同状态颜色值
|
|
30
|
-
* @description:
|
|
31
|
-
* @param {*}
|
|
32
|
-
* @return {*}
|
|
33
|
-
* @Author: xiangxiang.shao
|
|
34
|
-
* @Date: 2024-02-19 11:35
|
|
35
|
-
*/
|
|
36
|
-
export declare const statusColor: {
|
|
37
|
-
call_to_book: string;
|
|
38
|
-
lots_of_space: string;
|
|
39
|
-
filling_up_fast: string;
|
|
40
|
-
sold_out: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @title: 根据预约量数据判断当前状态
|
|
44
|
-
* @description:
|
|
45
|
-
* @param {*}
|
|
46
|
-
* @return {*}
|
|
47
|
-
* @Author: xiangxiang.shao
|
|
48
|
-
* @Date: 2024-02-19 11:35
|
|
49
|
-
*/
|
|
50
|
-
export declare const getStatus: (dateLimit: any, currentDate: string, cutTime: any) => {
|
|
51
|
-
status: string;
|
|
52
|
-
disabled: boolean;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* @title: 根据当前日期以设定判断当前是否是call_to_book状态
|
|
56
|
-
* @description:
|
|
57
|
-
* @param {*}
|
|
58
|
-
* @return {*}
|
|
59
|
-
* @Author: xiangxiang.shao
|
|
60
|
-
* @Date: 2024-02-21 10:10
|
|
61
|
-
*/
|
|
62
|
-
export declare const getCallToBookStatus: (currentDate: string, dateLimitData: any, cutTime: any) => boolean;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { TasksManager } from '../../utils/tasks';
|
|
3
|
-
interface AppointmentBookingContextType {
|
|
4
|
-
appointmentBooking: any;
|
|
5
|
-
times: any[];
|
|
6
|
-
resources: any[];
|
|
7
|
-
setTimes: (times: any[]) => void;
|
|
8
|
-
setResources: (lists: any[]) => void;
|
|
9
|
-
carts: any[];
|
|
10
|
-
summary: any;
|
|
11
|
-
setCarts: (val: any[]) => void;
|
|
12
|
-
setSummary: (val: any) => void;
|
|
13
|
-
currentStep: any;
|
|
14
|
-
setCurrentStep: (val: any) => void;
|
|
15
|
-
appHelper?: any;
|
|
16
|
-
symbolic?: any;
|
|
17
|
-
resourceOtherParams?: any;
|
|
18
|
-
setResourceOtherParams: (val: any) => void;
|
|
19
|
-
selectedTime: any;
|
|
20
|
-
setSelectedTime: (val: any) => void;
|
|
21
|
-
isAgreeDepositPolicy: boolean;
|
|
22
|
-
setIsAgreeDepositPolicy: (val: boolean) => void;
|
|
23
|
-
isLastStep: boolean;
|
|
24
|
-
tasksManager: TasksManager;
|
|
25
|
-
policyParams: any;
|
|
26
|
-
setPolicyParams: (val: any) => void;
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}
|
|
29
|
-
export declare const AppointmentBookingProvider: ({ children, }: {
|
|
30
|
-
children: ReactNode;
|
|
31
|
-
}) => JSX.Element;
|
|
32
|
-
export declare const useAppointmentBookingContext: () => AppointmentBookingContextType;
|
|
33
|
-
export {};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
export declare const useAppointmentBooking: () => any;
|
|
2
|
-
export declare const useShopDiscount: () => any;
|
|
3
|
-
export declare const contextUtils: () => any;
|
|
4
|
-
/**
|
|
5
|
-
* @title: 监听步骤发生变化
|
|
6
|
-
* @description:
|
|
7
|
-
* @return {*}
|
|
8
|
-
* @Author: WangHan
|
|
9
|
-
* @Date: 2025-04-15 11:11
|
|
10
|
-
*/
|
|
11
|
-
export declare const useAppointmentBookingStep: () => {
|
|
12
|
-
getStepIndex: (type: string, skipNumber?: number) => any;
|
|
13
|
-
stepList: any;
|
|
14
|
-
removeStep: (key: string) => any;
|
|
15
|
-
addStep: (props: any, stepKey?: string) => any;
|
|
16
|
-
updateStep: (key: string, step: any) => void;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @title: 获取商品数据
|
|
20
|
-
* @description:
|
|
21
|
-
* @return {*}
|
|
22
|
-
* @Author: WangHan
|
|
23
|
-
* @Date: 2025-04-15 11:12
|
|
24
|
-
*/
|
|
25
|
-
export declare const useAppointmentBookingProduct: () => {
|
|
26
|
-
checkProductType: (productId: number) => Promise<any>;
|
|
27
|
-
getProducts: () => Promise<any>;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* @title: 更新购物车数据
|
|
31
|
-
* @description:
|
|
32
|
-
* @return {*}
|
|
33
|
-
* @Author: WangHan
|
|
34
|
-
* @Date: 2025-04-15 11:12
|
|
35
|
-
*/
|
|
36
|
-
export declare const useAppointmentBookingCart: () => void;
|
|
37
|
-
/**
|
|
38
|
-
* @title: 获取登录状态
|
|
39
|
-
* @description:
|
|
40
|
-
* @return {*}
|
|
41
|
-
* @Author: WangHan
|
|
42
|
-
* @Date: 2025-04-15 11:14
|
|
43
|
-
*/
|
|
44
|
-
export declare const useAppointmentBookingLogin: () => {
|
|
45
|
-
isLogin: boolean;
|
|
46
|
-
openLoginModal: (params: {
|
|
47
|
-
callback: any;
|
|
48
|
-
}) => void;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* @title: 获取账户
|
|
52
|
-
* @description:
|
|
53
|
-
* @return {*}
|
|
54
|
-
* @Author: WangHan
|
|
55
|
-
* @Date: 2025-04-15 11:15
|
|
56
|
-
*/
|
|
57
|
-
export declare const useAppointmentBookingAccount: () => {
|
|
58
|
-
accountLists: any;
|
|
59
|
-
getHolders: () => Promise<any>;
|
|
60
|
-
form_id: any;
|
|
61
|
-
addAccount: (val: any, type?: string) => Promise<any>;
|
|
62
|
-
checkAccount: (type: any) => any;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* @title: 获取资源数据
|
|
66
|
-
* @description:
|
|
67
|
-
* @return {*}
|
|
68
|
-
* @Author: WangHan
|
|
69
|
-
* @Date: 2025-04-15 11:29
|
|
70
|
-
*/
|
|
71
|
-
export declare const useAppointmentBookingResource: () => {
|
|
72
|
-
getResourceTimeSlot: (index?: number) => Promise<void>;
|
|
73
|
-
getResourceList: () => {
|
|
74
|
-
resources: any;
|
|
75
|
-
resourceCodes: any;
|
|
76
|
-
};
|
|
77
|
-
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @title: 是否跳过资源选择步骤
|
|
81
|
-
* @description:
|
|
82
|
-
* @return {*}
|
|
83
|
-
* @Author: WangHan
|
|
84
|
-
* @Date: 2025-04-21 11:47
|
|
85
|
-
*/
|
|
86
|
-
export declare const useIsSkipResourceStep: () => {
|
|
87
|
-
checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* @title: 获取预约配置
|
|
91
|
-
* @description:
|
|
92
|
-
* @return {*}
|
|
93
|
-
* @Author: WangHan
|
|
94
|
-
* @Date: 2025-04-24 18:15
|
|
95
|
-
*/
|
|
96
|
-
export declare const useAppointmentBookingSetting: () => {
|
|
97
|
-
isDateSelectedFirst: boolean;
|
|
98
|
-
isFormSubject: boolean;
|
|
99
|
-
customPageId: any;
|
|
100
|
-
channel: any;
|
|
101
|
-
getLoadAllSchedule: () => void;
|
|
102
|
-
bookingSubject: any;
|
|
103
|
-
setOtherData: (key: string, val: any) => any;
|
|
104
|
-
getOtherData: (key: string) => any;
|
|
105
|
-
formName: any;
|
|
106
|
-
};
|