@pisell/private-materials 3.2.31 → 3.2.32
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Event/index.js +7 -7
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -40
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -5
- package/es/components/appointmentBooking/components/Content/index.less +4 -0
- package/es/components/appointmentBooking/components/Header/index.js +56 -21
- package/es/components/appointmentBooking/components/Services/index.js +11 -3
- package/es/components/appointmentBooking/components/Services/index.less +1 -1
- package/es/components/appointmentBooking/context.d.ts +2 -2
- package/es/components/appointmentBooking/context.js +1 -1
- package/es/components/appointmentBooking/hooks.d.ts +13 -1
- package/es/components/appointmentBooking/hooks.js +83 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +3 -5
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +2 -3
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -4
- package/es/components/booking/info2/service/editService/index.js +11 -4
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/data.d.ts +0 -0
- package/es/components/ticketBooking/data.js +82 -0
- package/es/components/ticketBooking/index.d.ts +3 -0
- package/es/components/ticketBooking/index.js +6 -0
- package/es/components/wallet/Detail/index.js +1 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Event/index.js +1 -5
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +19 -7
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -7
- package/lib/components/appointmentBooking/components/Content/index.less +4 -0
- package/lib/components/appointmentBooking/components/Header/index.js +10 -1
- package/lib/components/appointmentBooking/components/Services/index.js +10 -1
- package/lib/components/appointmentBooking/components/Services/index.less +1 -1
- package/lib/components/appointmentBooking/context.d.ts +2 -2
- package/lib/components/appointmentBooking/context.js +1 -1
- package/lib/components/appointmentBooking/hooks.d.ts +13 -1
- package/lib/components/appointmentBooking/hooks.js +38 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +5 -7
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +3 -4
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +1 -2
- package/lib/components/booking/info2/service/editService/index.js +11 -4
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/data.d.ts +0 -0
- package/lib/components/ticketBooking/data.js +0 -0
- package/lib/components/ticketBooking/index.d.ts +3 -0
- package/lib/components/ticketBooking/index.js +28 -0
- package/lib/components/wallet/Detail/index.js +1 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -56,10 +56,14 @@ var ContinueButton = () => {
|
|
|
56
56
|
resourceOtherParams,
|
|
57
57
|
summary
|
|
58
58
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
59
|
-
const {
|
|
59
|
+
const {
|
|
60
|
+
getResourceTimeSlot,
|
|
61
|
+
getResourceList,
|
|
62
|
+
autoSelectAllProductResources
|
|
63
|
+
} = (0, import_hooks.useAppointmentBookingResource)();
|
|
64
|
+
const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
|
|
65
|
+
const { getStepIndex } = (0, import_hooks.useAppointmentBookingStep)();
|
|
60
66
|
const disabled = (0, import_react.useMemo)(() => {
|
|
61
|
-
var _a2;
|
|
62
|
-
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
63
67
|
if (!carts.length) return true;
|
|
64
68
|
return false;
|
|
65
69
|
}, [
|
|
@@ -74,7 +78,7 @@ var ContinueButton = () => {
|
|
|
74
78
|
(_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
|
|
75
79
|
};
|
|
76
80
|
const handleNextStep = async () => {
|
|
77
|
-
var _a2, _b
|
|
81
|
+
var _a2, _b;
|
|
78
82
|
if (isLastStep) {
|
|
79
83
|
setLoading(true);
|
|
80
84
|
try {
|
|
@@ -109,14 +113,12 @@ var ContinueButton = () => {
|
|
|
109
113
|
if (((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource") {
|
|
110
114
|
getResourceTimeSlot();
|
|
111
115
|
}
|
|
112
|
-
if (((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-time") {
|
|
113
|
-
}
|
|
114
116
|
return appointmentBooking.next();
|
|
115
117
|
};
|
|
116
118
|
const handleContinue = async () => {
|
|
117
119
|
var _a2;
|
|
118
120
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
119
|
-
console.log(currentStep, isLastStep, isLogin, "wh9896788222");
|
|
121
|
+
console.log(currentStep, isLastStep, isLogin, accountLists, "wh9896788222");
|
|
120
122
|
if (isLastStep) {
|
|
121
123
|
if (!isLogin) {
|
|
122
124
|
return openLoginModal({
|
|
@@ -133,6 +135,16 @@ var ContinueButton = () => {
|
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
}
|
|
138
|
+
if (key === "select-date") {
|
|
139
|
+
const skipResourceStep = await checkSkipResourceStep();
|
|
140
|
+
if (skipResourceStep) {
|
|
141
|
+
const index = getStepIndex("next", 2);
|
|
142
|
+
getResourceList();
|
|
143
|
+
autoSelectAllProductResources();
|
|
144
|
+
appointmentBooking.gotoStep(index);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
136
148
|
if (key === "select-resource" && (0, import_utils2.isEmptyCartsResourceId)(carts)) {
|
|
137
149
|
(0, import_materials.PisellToast)({
|
|
138
150
|
content: import_utils.locales.getText("pisell2.appointment.no.available.time")
|
|
@@ -45,7 +45,7 @@ var import_Total = __toESM(require("./Total"));
|
|
|
45
45
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
46
46
|
var import_index = require("./index.less");
|
|
47
47
|
var CartItem = ({ onConfirm }) => {
|
|
48
|
-
var _a, _b, _c;
|
|
48
|
+
var _a, _b, _c, _d;
|
|
49
49
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
50
50
|
const {
|
|
51
51
|
carts,
|
|
@@ -66,10 +66,8 @@ var CartItem = ({ onConfirm }) => {
|
|
|
66
66
|
const holders = (0, import_react.useMemo)(() => {
|
|
67
67
|
return (0, import_utils2.formatHolder)(accountLists);
|
|
68
68
|
}, [accountLists]);
|
|
69
|
-
const hasGoodPassApp = (0
|
|
70
|
-
|
|
71
|
-
return !!((_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "goodpass"));
|
|
72
|
-
}, []);
|
|
69
|
+
const hasGoodPassApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "goodpass"));
|
|
70
|
+
console.log("has goodpass app:", hasGoodPassApp);
|
|
73
71
|
const handleClickCard = (e, type, val) => {
|
|
74
72
|
if (type === "note") {
|
|
75
73
|
return appointmentBooking.updateCart({
|
|
@@ -107,8 +105,8 @@ var CartItem = ({ onConfirm }) => {
|
|
|
107
105
|
hideAddBtn: false,
|
|
108
106
|
holders,
|
|
109
107
|
disabledEdit: isLastStep,
|
|
110
|
-
isShowChangeResource: ((
|
|
111
|
-
isShowDelete: ((
|
|
108
|
+
isShowChangeResource: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-resource",
|
|
109
|
+
isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
|
|
112
110
|
isShowPackageNote: false
|
|
113
111
|
},
|
|
114
112
|
collapseParams: {
|
|
@@ -44,6 +44,8 @@ var Header = () => {
|
|
|
44
44
|
const { currentStep, appointmentBooking, resources, setTimes } = (0, import_context.useAppointmentBookingContext)();
|
|
45
45
|
const shopDiscount = (0, import_hooks.useShopDiscount)();
|
|
46
46
|
const context = (0, import_useEngineContext.default)();
|
|
47
|
+
const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
|
|
48
|
+
const { getStepIndex } = (0, import_hooks.useAppointmentBookingStep)();
|
|
47
49
|
const stepName = (0, import_react.useMemo)(() => {
|
|
48
50
|
var _a2, _b2, _c, _d, _e;
|
|
49
51
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
@@ -53,7 +55,7 @@ var Header = () => {
|
|
|
53
55
|
}
|
|
54
56
|
return (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description;
|
|
55
57
|
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
|
|
56
|
-
const handleBack = () => {
|
|
58
|
+
const handleBack = async () => {
|
|
57
59
|
var _a2;
|
|
58
60
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
59
61
|
const types = {
|
|
@@ -68,6 +70,13 @@ var Header = () => {
|
|
|
68
70
|
}
|
|
69
71
|
if (key === "select-time") {
|
|
70
72
|
setTimes([]);
|
|
73
|
+
const skipResourceStep = await checkSkipResourceStep();
|
|
74
|
+
if (skipResourceStep) {
|
|
75
|
+
appointmentBooking.deleteCartItemInfo("resource");
|
|
76
|
+
const index = getStepIndex("prev", 2);
|
|
77
|
+
appointmentBooking.gotoStep(index);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
71
80
|
}
|
|
72
81
|
appointmentBooking.back();
|
|
73
82
|
};
|
|
@@ -54,6 +54,8 @@ var Services = () => {
|
|
|
54
54
|
const { productModuleParams } = appointmentBooking.otherParams || {};
|
|
55
55
|
appointmentBooking.loadProducts(productModuleParams).then((res) => {
|
|
56
56
|
setProducts(res || []);
|
|
57
|
+
}).catch(() => {
|
|
58
|
+
setProducts([]);
|
|
57
59
|
});
|
|
58
60
|
}, []);
|
|
59
61
|
const handleSelectProduct = (item) => {
|
|
@@ -106,7 +108,14 @@ var Services = () => {
|
|
|
106
108
|
setSearch(e.target.value);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
|
-
)),
|
|
111
|
+
)), !products ? /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
import_antd.Skeleton,
|
|
113
|
+
{
|
|
114
|
+
loading: true,
|
|
115
|
+
active: true,
|
|
116
|
+
style: { padding: (0, import_utils.isMobile)() ? "20px" : 0 }
|
|
117
|
+
}
|
|
118
|
+
) : (products == null ? void 0 : products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
110
119
|
import_TabProduct.default,
|
|
111
120
|
{
|
|
112
121
|
list: renderList,
|
|
@@ -5,10 +5,10 @@ interface AppointmentBookingContextType {
|
|
|
5
5
|
resources: any[];
|
|
6
6
|
setTimes: (times: any[]) => void;
|
|
7
7
|
setResources: (lists: any[]) => void;
|
|
8
|
-
products: any
|
|
8
|
+
products: any;
|
|
9
9
|
carts: any[];
|
|
10
10
|
summary: any;
|
|
11
|
-
setProducts: (val: any
|
|
11
|
+
setProducts: (val: any) => void;
|
|
12
12
|
setCarts: (val: any[]) => void;
|
|
13
13
|
setSummary: (val: any) => void;
|
|
14
14
|
currentStep: any;
|
|
@@ -42,7 +42,7 @@ var AppointmentBookingProvider = ({
|
|
|
42
42
|
}) => {
|
|
43
43
|
var _a;
|
|
44
44
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
45
|
-
const [products, setProducts] = (0, import_react.useState)(
|
|
45
|
+
const [products, setProducts] = (0, import_react.useState)();
|
|
46
46
|
const [summary, setSummary] = (0, import_react.useState)({});
|
|
47
47
|
const [times, setTimes] = (0, import_react.useState)([]);
|
|
48
48
|
const [resources, setResources] = (0, import_react.useState)([]);
|
|
@@ -7,7 +7,9 @@ export declare const useShopDiscount: () => any;
|
|
|
7
7
|
* @Author: WangHan
|
|
8
8
|
* @Date: 2025-04-15 11:11
|
|
9
9
|
*/
|
|
10
|
-
export declare const useAppointmentBookingStep: () =>
|
|
10
|
+
export declare const useAppointmentBookingStep: () => {
|
|
11
|
+
getStepIndex: (type: string, skipNumber?: number) => any;
|
|
12
|
+
};
|
|
11
13
|
/**
|
|
12
14
|
* @title: 获取商品数据
|
|
13
15
|
* @description:
|
|
@@ -62,3 +64,13 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
62
64
|
};
|
|
63
65
|
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
64
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* @title: 是否跳过资源选择步骤
|
|
69
|
+
* @description:
|
|
70
|
+
* @return {*}
|
|
71
|
+
* @Author: WangHan
|
|
72
|
+
* @Date: 2025-04-21 11:47
|
|
73
|
+
*/
|
|
74
|
+
export declare const useIsSkipResourceStep: () => {
|
|
75
|
+
checkSkipResourceStep: () => Promise<boolean>;
|
|
76
|
+
};
|
|
@@ -36,6 +36,7 @@ __export(hooks_exports, {
|
|
|
36
36
|
useAppointmentBookingProduct: () => useAppointmentBookingProduct,
|
|
37
37
|
useAppointmentBookingResource: () => useAppointmentBookingResource,
|
|
38
38
|
useAppointmentBookingStep: () => useAppointmentBookingStep,
|
|
39
|
+
useIsSkipResourceStep: () => useIsSkipResourceStep,
|
|
39
40
|
useShopDiscount: () => useShopDiscount
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(hooks_exports);
|
|
@@ -73,6 +74,19 @@ var useAppointmentBookingStep = () => {
|
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
76
|
}, []);
|
|
77
|
+
const getStepIndex = (type, skipNumber = 0) => {
|
|
78
|
+
const currentStep = appointmentBooking.getCurrentStep();
|
|
79
|
+
const index = (currentStep == null ? void 0 : currentStep.index) || 1;
|
|
80
|
+
if (type === "next") {
|
|
81
|
+
const nextIndex = index + skipNumber;
|
|
82
|
+
return nextIndex + 1 > stepList.length ? stepList.length - 1 : nextIndex;
|
|
83
|
+
}
|
|
84
|
+
if (type === "prev") {
|
|
85
|
+
const prevIndex = index - skipNumber;
|
|
86
|
+
return prevIndex < 1 ? 1 : prevIndex;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return { getStepIndex };
|
|
76
90
|
};
|
|
77
91
|
var useAppointmentBookingProduct = () => {
|
|
78
92
|
const { appointmentBooking, setProducts } = (0, import_context.useAppointmentBookingContext)();
|
|
@@ -180,6 +194,29 @@ var useAppointmentBookingResource = () => {
|
|
|
180
194
|
};
|
|
181
195
|
return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
|
|
182
196
|
};
|
|
197
|
+
var useIsSkipResourceStep = () => {
|
|
198
|
+
const { accountLists } = useAppointmentBookingAccount();
|
|
199
|
+
const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
|
|
200
|
+
const checkSkipResourceStep = async () => {
|
|
201
|
+
var _a, _b, _c, _d, _e;
|
|
202
|
+
try {
|
|
203
|
+
if ((accountLists == null ? void 0 : accountLists.length) === 1) {
|
|
204
|
+
const res = await autoSelectAllProductResources();
|
|
205
|
+
const { resources } = getResourceList();
|
|
206
|
+
if (!((_a = res == null ? void 0 : res.errorList) == null ? void 0 : _a.length) && ((_e = (_d = (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
|
|
207
|
+
return true;
|
|
208
|
+
} else {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
} catch (error) {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
return { checkSkipResourceStep };
|
|
219
|
+
};
|
|
183
220
|
// Annotate the CommonJS export names for ESM import in node:
|
|
184
221
|
0 && (module.exports = {
|
|
185
222
|
useAppointmentBooking,
|
|
@@ -189,5 +226,6 @@ var useAppointmentBookingResource = () => {
|
|
|
189
226
|
useAppointmentBookingProduct,
|
|
190
227
|
useAppointmentBookingResource,
|
|
191
228
|
useAppointmentBookingStep,
|
|
229
|
+
useIsSkipResourceStep,
|
|
192
230
|
useShopDiscount
|
|
193
231
|
});
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -51,7 +51,7 @@ var import_serve2 = require("./serve");
|
|
|
51
51
|
var import_utils4 = require("./utils");
|
|
52
52
|
var import_voucher = __toESM(require("../voucher"));
|
|
53
53
|
var Footer = (props) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
55
55
|
const { state, buttons, dispatch, source } = props;
|
|
56
56
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
57
57
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
@@ -189,10 +189,8 @@ var Footer = (props) => {
|
|
|
189
189
|
}
|
|
190
190
|
return false;
|
|
191
191
|
}, [state, params]);
|
|
192
|
-
const hasGoodPassApp = (0
|
|
193
|
-
|
|
194
|
-
return !!((_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "goodpass"));
|
|
195
|
-
}, []);
|
|
192
|
+
const hasGoodPassApp = !!((_h = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _h.call(businessUtils, "goodpass"));
|
|
193
|
+
console.log("has goodpass app:", hasGoodPassApp);
|
|
196
194
|
const goCheckout = async (order_id) => {
|
|
197
195
|
var _a2, _b2;
|
|
198
196
|
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
@@ -753,7 +751,7 @@ var Footer = (props) => {
|
|
|
753
751
|
}, [
|
|
754
752
|
state.bookingId,
|
|
755
753
|
state.bookingDetail,
|
|
756
|
-
(
|
|
754
|
+
(_i = state.addons) == null ? void 0 : _i.load,
|
|
757
755
|
state.renderType
|
|
758
756
|
]);
|
|
759
757
|
const menuChange = (e) => {
|
|
@@ -814,7 +812,7 @@ var Footer = (props) => {
|
|
|
814
812
|
},
|
|
815
813
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }),
|
|
816
814
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.subtotal")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.productAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
|
|
817
|
-
(((
|
|
815
|
+
(((_j = state.bookingDetail) == null ? void 0 : _j.surcharge) || []).map((d) => {
|
|
818
816
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item", key: d.id }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, d.name[state.locale]), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(d.amount, 2, (state == null ? void 0 : state.amountSymbol) || "$")));
|
|
819
817
|
}),
|
|
820
818
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -118,14 +118,13 @@ var AddTimeModal = () => {
|
|
|
118
118
|
arr = [
|
|
119
119
|
...arr,
|
|
120
120
|
...resource[form_id].map((d) => {
|
|
121
|
-
var _a3;
|
|
122
|
-
return (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps[form_id].renderListMaps[d.relation_id];
|
|
121
|
+
var _a3, _b3, _c2, _d2;
|
|
122
|
+
return (_d2 = (_c2 = (_b3 = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps) == null ? void 0 : _b3[form_id]) == null ? void 0 : _c2.renderListMaps) == null ? void 0 : _d2[d.relation_id];
|
|
123
123
|
})
|
|
124
124
|
];
|
|
125
125
|
}
|
|
126
|
-
return arr;
|
|
126
|
+
return arr.filter(Boolean);
|
|
127
127
|
}, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
|
|
128
|
-
console.log("currentResource", currentResource);
|
|
129
128
|
const getTimeUsableStatus = (time) => {
|
|
130
129
|
var _a2, _b2;
|
|
131
130
|
if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
|
|
@@ -309,15 +309,14 @@ var Info = (_, ref) => {
|
|
|
309
309
|
value: item._extend.other
|
|
310
310
|
},
|
|
311
311
|
callback: (e2, extension_type, detail) => {
|
|
312
|
+
var _a2;
|
|
312
313
|
const _detail = detail || item;
|
|
313
314
|
let cacheItem = {
|
|
315
|
+
...item,
|
|
314
316
|
..._detail,
|
|
315
317
|
product_id: item.id,
|
|
316
318
|
_id: item == null ? void 0 : item._id,
|
|
317
319
|
_key: e2.key,
|
|
318
|
-
_data: {
|
|
319
|
-
...item._data
|
|
320
|
-
},
|
|
321
320
|
_extend: {
|
|
322
321
|
...item._extend,
|
|
323
322
|
// 将当前表单的值覆盖进去
|
|
@@ -329,6 +328,13 @@ var Info = (_, ref) => {
|
|
|
329
328
|
};
|
|
330
329
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
331
330
|
cacheItem._extend.total = _total;
|
|
331
|
+
try {
|
|
332
|
+
cacheItem._extend.capacity = (0, import_utils4.setDefaultCapacitys)({
|
|
333
|
+
capacitys: cacheItem._data.capacitys,
|
|
334
|
+
cacheItem
|
|
335
|
+
});
|
|
336
|
+
} catch (err) {
|
|
337
|
+
}
|
|
332
338
|
cacheItem._extend.origin_total = _total;
|
|
333
339
|
dispatch({
|
|
334
340
|
type: "setService",
|
|
@@ -337,7 +343,8 @@ var Info = (_, ref) => {
|
|
|
337
343
|
}
|
|
338
344
|
});
|
|
339
345
|
form.setFieldsValue({
|
|
340
|
-
total: _total
|
|
346
|
+
total: _total,
|
|
347
|
+
capacity: (_a2 = cacheItem._extend) == null ? void 0 : _a2.capacity
|
|
341
348
|
});
|
|
342
349
|
}
|
|
343
350
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -104,4 +105,11 @@ export declare const walkInData: {
|
|
|
104
105
|
id: number;
|
|
105
106
|
nickname: string;
|
|
106
107
|
};
|
|
107
|
-
export declare const Provider: any, Context:
|
|
108
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
109
|
+
state: FormState;
|
|
110
|
+
} & {
|
|
111
|
+
dispatch: (params: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void;
|
|
115
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
|
|
301
301
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -24,4 +25,11 @@ export interface PayGroup {
|
|
|
24
25
|
pay_number?: string;
|
|
25
26
|
_order: any;
|
|
26
27
|
}
|
|
27
|
-
export declare const Provider: any, Context:
|
|
28
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
29
|
+
state: FormState;
|
|
30
|
+
} & {
|
|
31
|
+
dispatch: (params: {
|
|
32
|
+
type: string;
|
|
33
|
+
payload: any;
|
|
34
|
+
}) => void;
|
|
35
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
|
19
19
|
destroy: () => void;
|
|
20
|
-
update: (configUpdate: import("antd
|
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
21
|
}>;
|
|
22
22
|
export { modal };
|
|
File without changes
|
|
File without changes
|