@pisell/private-materials 3.0.203 → 3.0.205
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +33 -18
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -46
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +35 -266
- package/es/components/booking/forms/model.d.ts +1 -1
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +9 -124
- package/es/components/booking/info/main.js +15 -28
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +96 -187
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -12
- package/es/components/booking/info/service/addService/utils.js +26 -103
- package/es/components/booking/info/service/editService/index.js +132 -435
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/service/serve.d.ts +0 -10
- package/es/components/booking/info/service/serve.js +0 -28
- package/es/components/booking/info/utils.d.ts +0 -20
- package/es/components/booking/info/utils.js +0 -37
- package/es/components/booking/locales.d.ts +0 -66
- package/es/components/booking/locales.js +3 -81
- package/es/components/booking/model.d.ts +1 -5
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -1
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +26 -143
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/app.d.ts +11 -0
- package/es/components/eftposPay/app.js +173 -0
- package/es/components/eftposPay/component/fail/failCustom.js +1 -0
- package/es/components/eftposPay/component/fail/index.js +1 -0
- package/es/components/eftposPay/component/manual/index.js +4 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/const.d.ts +27 -1
- package/es/components/eftposPay/const.js +22 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +2 -2
- package/es/components/eftposPay/helper.d.ts +6 -0
- package/es/components/eftposPay/helper.js +24 -4
- package/es/components/eftposPay/hooks.d.ts +2 -1
- package/es/components/eftposPay/hooks.js +22 -16
- package/es/components/eftposPay/index.d.ts +1 -1
- package/es/components/eftposPay/index.js +130 -179
- package/es/components/eftposPay/locales.d.ts +15 -0
- package/es/components/eftposPay/locales.js +15 -0
- package/es/components/eftposPay/payo/config.js +20 -8
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +10 -0
- package/es/components/eftposPay/tip.js +177 -0
- package/es/components/eftposPay/tip.less +9 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/tyro/index.js +55 -22
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.js +17 -6
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -27
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +35 -161
- package/lib/components/booking/forms/model.d.ts +1 -1
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +11 -87
- package/lib/components/booking/info/main.js +9 -17
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +84 -115
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
- package/lib/components/booking/info/service/addService/utils.js +10 -58
- package/lib/components/booking/info/service/editService/index.js +182 -425
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/service/serve.d.ts +0 -10
- package/lib/components/booking/info/service/serve.js +2 -7
- package/lib/components/booking/info/utils.d.ts +0 -20
- package/lib/components/booking/info/utils.js +0 -41
- package/lib/components/booking/locales.d.ts +0 -66
- package/lib/components/booking/locales.js +3 -69
- package/lib/components/booking/model.d.ts +1 -5
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +18 -89
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/app.d.ts +11 -0
- package/lib/components/eftposPay/app.js +166 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
- package/lib/components/eftposPay/component/fail/index.js +1 -1
- package/lib/components/eftposPay/component/manual/index.js +19 -5
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/const.d.ts +27 -1
- package/lib/components/eftposPay/const.js +18 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +2 -2
- package/lib/components/eftposPay/helper.d.ts +6 -0
- package/lib/components/eftposPay/helper.js +29 -4
- package/lib/components/eftposPay/hooks.d.ts +2 -1
- package/lib/components/eftposPay/hooks.js +8 -2
- package/lib/components/eftposPay/index.d.ts +1 -1
- package/lib/components/eftposPay/index.js +106 -144
- package/lib/components/eftposPay/locales.d.ts +15 -0
- package/lib/components/eftposPay/locales.js +15 -0
- package/lib/components/eftposPay/payo/config.js +33 -9
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +10 -0
- package/lib/components/eftposPay/tip.js +159 -0
- package/lib/components/eftposPay/tip.less +9 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/tyro/index.js +40 -9
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.js +29 -6
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +5 -5
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +0 -54
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
- package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceManager/index.js +0 -277
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/es/components/booking/info/service2/Group/utils.js +0 -146
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -152
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -6
- package/es/components/booking/info/service2/index.js +0 -57
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -237
- package/es/components/booking/info/service2/utils.js +0 -1064
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -68
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -69
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -59
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -116
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
- package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceManager/index.js +0 -207
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/lib/components/booking/info/service2/Group/utils.js +0 -142
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -115
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -6
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -237
- package/lib/components/booking/info/service2/utils.js +0 -678
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -75
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -86
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -51,16 +51,13 @@ var import_notes = __toESM(require("./notes"));
|
|
|
51
51
|
var import_index = require("./index.less");
|
|
52
52
|
var import_classnames = __toESM(require("classnames"));
|
|
53
53
|
var import_antd = require("antd");
|
|
54
|
-
var import_service2 = require("./service2");
|
|
55
|
-
var import_utils3 = require("./service2/utils");
|
|
56
54
|
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
57
55
|
var defaultModules = {
|
|
58
56
|
client: 1,
|
|
59
57
|
date: 1,
|
|
60
58
|
service: 1,
|
|
61
59
|
holder: 1,
|
|
62
|
-
note: 1
|
|
63
|
-
service2: 0
|
|
60
|
+
note: 1
|
|
64
61
|
};
|
|
65
62
|
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
66
63
|
var Info = (0, import_model.Provider)((props) => {
|
|
@@ -99,8 +96,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
99
96
|
...globalState,
|
|
100
97
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
101
98
|
isFranchisee,
|
|
102
|
-
timezone: (_m = (_l = (_k = (_j = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j.getState()) == null ? void 0 : _k.global) == null ? void 0 : _l.globalConfig) == null ? void 0 : _m.timezone
|
|
103
|
-
isDayBooking: (globalState == null ? void 0 : globalState.renderType) === "dayBooking"
|
|
99
|
+
timezone: (_m = (_l = (_k = (_j = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j.getState()) == null ? void 0 : _k.global) == null ? void 0 : _l.globalConfig) == null ? void 0 : _m.timezone
|
|
104
100
|
}
|
|
105
101
|
});
|
|
106
102
|
}, [JSON.stringify(globalState)]);
|
|
@@ -125,14 +121,11 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
125
121
|
globalState == null ? void 0 : globalState.renderType
|
|
126
122
|
]);
|
|
127
123
|
const notes = (0, import_react.useMemo)(() => {
|
|
128
|
-
var _a2, _b2
|
|
124
|
+
var _a2, _b2;
|
|
129
125
|
if (!modules.note) {
|
|
130
126
|
return null;
|
|
131
127
|
}
|
|
132
|
-
|
|
133
|
-
return /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
|
|
134
|
-
}
|
|
135
|
-
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_d2 = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d2.orderNote, onChange: addNote });
|
|
128
|
+
return (globalState == null ? void 0 : globalState.bookingId) ? globalState.renderType === "eventBooking" || globalState.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_notes.default, null) : null : /* @__PURE__ */ import_react.default.createElement(import_addNote.default, { value: (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote, onChange: addNote });
|
|
136
129
|
}, [
|
|
137
130
|
modules.note,
|
|
138
131
|
globalState == null ? void 0 : globalState.bookingId,
|
|
@@ -142,10 +135,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
142
135
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
|
|
143
136
|
import_tabPane.default,
|
|
144
137
|
{
|
|
145
|
-
style
|
|
146
|
-
...style,
|
|
147
|
-
height: ((_h = (_g = context == null ? void 0 : context.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.isMobile) ? "100%" : "100vh"
|
|
148
|
-
},
|
|
138
|
+
style,
|
|
149
139
|
header,
|
|
150
140
|
footer: /* @__PURE__ */ import_react.default.createElement(
|
|
151
141
|
import_footer.default,
|
|
@@ -155,9 +145,12 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
155
145
|
source: "info"
|
|
156
146
|
}
|
|
157
147
|
),
|
|
148
|
+
style: {
|
|
149
|
+
height: ((_h = (_g = context == null ? void 0 : context.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.isMobile) ? "100%" : "100vh"
|
|
150
|
+
},
|
|
158
151
|
bodyClassName: (0, import_classnames.default)("booking-info-warp", {
|
|
159
152
|
["create-booking-page-info-wrap"]: isBookingCreatePage,
|
|
160
|
-
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
153
|
+
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
161
154
|
})
|
|
162
155
|
},
|
|
163
156
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((_i = modal.state) == null ? void 0 : _i.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -170,7 +163,6 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
170
163
|
style: { paddingTop: 20 }
|
|
171
164
|
},
|
|
172
165
|
modules.service ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service.default, null) : null) : null,
|
|
173
|
-
modules.service2 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, modal.state.date.value ? /* @__PURE__ */ import_react.default.createElement(import_service2.Service2Cart, null) : null) : null,
|
|
174
166
|
notes,
|
|
175
167
|
slot ? slot : null
|
|
176
168
|
))
|
|
@@ -43,8 +43,6 @@ var import_format = require("../../forms/format");
|
|
|
43
43
|
var import_utils2 = require("../../utils");
|
|
44
44
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
45
45
|
var import_ahooks = require("ahooks");
|
|
46
|
-
var import_utils3 = require("../../info/service2/utils");
|
|
47
|
-
var import_ChangePetModal = __toESM(require("./ChangePetModal"));
|
|
48
46
|
var defaultParams = {
|
|
49
47
|
skip: 1,
|
|
50
48
|
num: 20,
|
|
@@ -67,7 +65,6 @@ var Pet = (props) => {
|
|
|
67
65
|
const context = (0, import_useEngineContext.default)();
|
|
68
66
|
const { isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
69
67
|
const [params, setParams] = (0, import_react.useState)(defaultParams);
|
|
70
|
-
const changePetRef = (0, import_react.useRef)(null);
|
|
71
68
|
state = state || (props == null ? void 0 : props.state);
|
|
72
69
|
dispatch = dispatch || (props == null ? void 0 : props.dispatch);
|
|
73
70
|
const boardParams = (0, import_react.useMemo)(() => {
|
|
@@ -211,14 +208,10 @@ var Pet = (props) => {
|
|
|
211
208
|
let cur = [...state.pet.value[petForm.form_id] || []];
|
|
212
209
|
let options = ((_c2 = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || [];
|
|
213
210
|
if (res.type === "delete") {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
cur = cur.filter((d) => d.form_record_id !== item.form_record_id);
|
|
211
|
+
cur = cur.filter(
|
|
212
|
+
(d) => d.form_record_id !== item.form_record_id
|
|
213
|
+
);
|
|
218
214
|
addCallback();
|
|
219
|
-
if (isDay) {
|
|
220
|
-
handleDayChange(item);
|
|
221
|
-
}
|
|
222
215
|
} else {
|
|
223
216
|
let obj = {
|
|
224
217
|
customer: item == null ? void 0 : item.customer,
|
|
@@ -279,29 +272,27 @@ var Pet = (props) => {
|
|
|
279
272
|
}
|
|
280
273
|
});
|
|
281
274
|
});
|
|
282
|
-
const onValueChange = (0, import_ahooks.useMemoizedFn)(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
options
|
|
291
|
-
}
|
|
292
|
-
];
|
|
293
|
-
updateObj.pets = options;
|
|
294
|
-
}
|
|
295
|
-
dispatch({
|
|
296
|
-
type: "setPet",
|
|
297
|
-
payload: {
|
|
298
|
-
edit,
|
|
299
|
-
value: values,
|
|
300
|
-
...updateObj
|
|
275
|
+
const onValueChange = (0, import_ahooks.useMemoizedFn)(({ values, edit = true, options }) => {
|
|
276
|
+
var _a2, _b2;
|
|
277
|
+
const updateObj = {};
|
|
278
|
+
if (options) {
|
|
279
|
+
updateObj.formData = [
|
|
280
|
+
{
|
|
281
|
+
...(_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0],
|
|
282
|
+
options
|
|
301
283
|
}
|
|
302
|
-
|
|
284
|
+
];
|
|
285
|
+
updateObj.pets = options;
|
|
303
286
|
}
|
|
304
|
-
|
|
287
|
+
dispatch({
|
|
288
|
+
type: "setPet",
|
|
289
|
+
payload: {
|
|
290
|
+
edit,
|
|
291
|
+
value: values,
|
|
292
|
+
...updateObj
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
});
|
|
305
296
|
(0, import_react.useEffect)(() => {
|
|
306
297
|
var _a2, _b2, _c2, _d2;
|
|
307
298
|
if (clientChangeNotSetPet)
|
|
@@ -372,29 +363,6 @@ var Pet = (props) => {
|
|
|
372
363
|
import_utils.locales.getText("pisell2.text.load-more")
|
|
373
364
|
)) : null;
|
|
374
365
|
}, [loadLoading, params, (_l = (_k = (_j = (_i = state.pet) == null ? void 0 : _i.formData) == null ? void 0 : _j[0]) == null ? void 0 : _k.options) == null ? void 0 : _l.length]);
|
|
375
|
-
const handleDayChange = (e) => {
|
|
376
|
-
var _a2, _b2;
|
|
377
|
-
const id = e == null ? void 0 : e.form_record_id;
|
|
378
|
-
const service = (_a2 = state.service.value) == null ? void 0 : _a2.filter(
|
|
379
|
-
(item) => item._extend.holder_id === id
|
|
380
|
-
);
|
|
381
|
-
if (id && (service == null ? void 0 : service.length)) {
|
|
382
|
-
changePetRef == null ? void 0 : changePetRef.current.open({
|
|
383
|
-
ids: [id],
|
|
384
|
-
dispatch,
|
|
385
|
-
service: ((_b2 = state.service) == null ? void 0 : _b2.value) || []
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
const dayCustomSelect = (0, import_react.useMemo)(() => {
|
|
390
|
-
const isDay = (0, import_utils3.isDayBooking)(state);
|
|
391
|
-
if (isDay) {
|
|
392
|
-
return {
|
|
393
|
-
handleDayChange
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
return {};
|
|
397
|
-
}, [state.renderType, state.service.value]);
|
|
398
366
|
return (0, import_react.useMemo)(() => {
|
|
399
367
|
var _a2;
|
|
400
368
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: valueLoading, active: true, round: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -404,10 +372,7 @@ var Pet = (props) => {
|
|
|
404
372
|
watch: { value: state.pet.value },
|
|
405
373
|
addCallback: (formDataConfig, data) => {
|
|
406
374
|
var _a3, _b2, _c2;
|
|
407
|
-
setPetOptions([
|
|
408
|
-
{ ...data, form_id: formDataConfig == null ? void 0 : formDataConfig.form_id },
|
|
409
|
-
...((_c2 = (_b2 = (_a3 = state.pet) == null ? void 0 : _a3.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || []
|
|
410
|
-
]);
|
|
375
|
+
setPetOptions([{ ...data, form_id: formDataConfig == null ? void 0 : formDataConfig.form_id }, ...((_c2 = (_b2 = (_a3 = state.pet) == null ? void 0 : _a3.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) || []]);
|
|
411
376
|
},
|
|
412
377
|
loading: valueLoading,
|
|
413
378
|
forms: state.pet.formData,
|
|
@@ -433,8 +398,7 @@ var Pet = (props) => {
|
|
|
433
398
|
return true;
|
|
434
399
|
},
|
|
435
400
|
handleOpenModal,
|
|
436
|
-
previewItemTitleRender
|
|
437
|
-
...dayCustomSelect
|
|
401
|
+
previewItemTitleRender
|
|
438
402
|
},
|
|
439
403
|
optionRender: (item) => {
|
|
440
404
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -478,7 +442,7 @@ var Pet = (props) => {
|
|
|
478
442
|
...addButtonProps
|
|
479
443
|
}
|
|
480
444
|
}
|
|
481
|
-
))
|
|
445
|
+
)));
|
|
482
446
|
}, [
|
|
483
447
|
valueLoading,
|
|
484
448
|
hideTitle,
|
|
@@ -43,14 +43,10 @@ var import_index = require("./index.less");
|
|
|
43
43
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
44
44
|
var import_serve = require("../serve");
|
|
45
45
|
var import_utils = require("../../utils");
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var import_utils3 = require("../../service2/utils");
|
|
49
|
-
var import_status = require("../../service2/status");
|
|
46
|
+
var import_utils2 = require("./utils");
|
|
47
|
+
var import_utils3 = require("../../../utils");
|
|
50
48
|
var import_utils4 = require("@pisell/utils");
|
|
51
49
|
var import_ahooks = require("ahooks");
|
|
52
|
-
var import_debounce = __toESM(require("lodash/debounce"));
|
|
53
|
-
var import_serviceManager = require("../serviceManager");
|
|
54
50
|
var shopList = [
|
|
55
51
|
2886,
|
|
56
52
|
4422,
|
|
@@ -68,49 +64,16 @@ var shopList = [
|
|
|
68
64
|
6305
|
|
69
65
|
];
|
|
70
66
|
var Info = (props) => {
|
|
71
|
-
var _a, _b, _c, _d
|
|
67
|
+
var _a, _b, _c, _d;
|
|
72
68
|
const { onEdit, drawerProps, renderMode } = props;
|
|
73
69
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
74
70
|
let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
75
71
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
76
72
|
const searchRef = (0, import_react.useRef)();
|
|
77
|
-
const headerRef = (0, import_react.useRef)(null);
|
|
78
|
-
const [headerHeight, setHeaderHeight] = (0, import_react.useState)(0);
|
|
79
73
|
const context = (0, import_useEngineContext.default)();
|
|
80
74
|
state = state || (props == null ? void 0 : props.state);
|
|
81
75
|
dispatch = dispatch || (props == null ? void 0 : props.dispatch);
|
|
82
|
-
|
|
83
|
-
const { createBookingData, createBooking } = (0, import_serviceManager.useService)({
|
|
84
|
-
renderMode,
|
|
85
|
-
onEdit,
|
|
86
|
-
state,
|
|
87
|
-
dispatch
|
|
88
|
-
});
|
|
89
|
-
const isDay = (0, import_react.useMemo)(() => {
|
|
90
|
-
return (0, import_utils3.isDayBooking)(state);
|
|
91
|
-
}, [state.renderType]);
|
|
92
|
-
const handleResize = () => {
|
|
93
|
-
var _a2;
|
|
94
|
-
if (headerRef == null ? void 0 : headerRef.current) {
|
|
95
|
-
setHeaderHeight((_a2 = headerRef.current) == null ? void 0 : _a2.offsetHeight);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const debouncedHandleResize = (0, import_debounce.default)(handleResize, 100);
|
|
99
|
-
(0, import_react.useEffect)(() => {
|
|
100
|
-
if (isDay && state.isTerminalDayBookingPage) {
|
|
101
|
-
handleResize();
|
|
102
|
-
window.addEventListener("resize", debouncedHandleResize);
|
|
103
|
-
}
|
|
104
|
-
return () => {
|
|
105
|
-
window.removeEventListener("resize", debouncedHandleResize);
|
|
106
|
-
};
|
|
107
|
-
}, [debouncedHandleResize]);
|
|
108
|
-
const customerId = (0, import_react.useMemo)(() => {
|
|
109
|
-
var _a2, _b2;
|
|
110
|
-
if (!isDay)
|
|
111
|
-
return void 0;
|
|
112
|
-
return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || 1;
|
|
113
|
-
}, [(_b = (_a = state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id, isDay]);
|
|
76
|
+
import_utils3.request.setRequest(context.appHelper.utils.request);
|
|
114
77
|
const setDefaultService = async (list) => {
|
|
115
78
|
if (state.renderType !== "eventBooking") {
|
|
116
79
|
return;
|
|
@@ -128,8 +91,7 @@ var Info = (props) => {
|
|
|
128
91
|
setLoading(true);
|
|
129
92
|
let product = list[0];
|
|
130
93
|
const detail = await (0, import_serve.getProductDetail)(product.id, {
|
|
131
|
-
schedule_date: state.date.value.format("YYYY-MM-DD")
|
|
132
|
-
customer_id: customerId
|
|
94
|
+
schedule_date: state.date.value.format("YYYY-MM-DD")
|
|
133
95
|
});
|
|
134
96
|
const isBundleOrCombination = (0, import_utils.getIsBundleOrCombination)(detail.data);
|
|
135
97
|
setLoading(false);
|
|
@@ -142,7 +104,7 @@ var Info = (props) => {
|
|
|
142
104
|
_extend: {
|
|
143
105
|
start_date: state.date.value,
|
|
144
106
|
startDate: state.date.value,
|
|
145
|
-
endDate:
|
|
107
|
+
endDate: state.date.value,
|
|
146
108
|
start_time: "00:00:00",
|
|
147
109
|
duration: 10,
|
|
148
110
|
quantity: 1,
|
|
@@ -174,11 +136,6 @@ var Info = (props) => {
|
|
|
174
136
|
setLoading(false);
|
|
175
137
|
return;
|
|
176
138
|
}
|
|
177
|
-
let dayParams = {};
|
|
178
|
-
if (isDay) {
|
|
179
|
-
dayParams.extension_type = ["normal", "product_appointment"];
|
|
180
|
-
dayParams.customer_id = customerId;
|
|
181
|
-
}
|
|
182
139
|
let data = await state.apis.getServices({
|
|
183
140
|
skip: 1,
|
|
184
141
|
num: 500,
|
|
@@ -194,22 +151,16 @@ var Info = (props) => {
|
|
|
194
151
|
_config: {
|
|
195
152
|
useCache: true
|
|
196
153
|
}
|
|
197
|
-
}
|
|
198
|
-
...dayParams
|
|
154
|
+
}
|
|
199
155
|
});
|
|
200
156
|
setLoading(false);
|
|
201
|
-
let lists = (data == null ? void 0 : data.list) || [];
|
|
202
|
-
if (isDay) {
|
|
203
|
-
const id = (0, import_utils3.holderId)(state);
|
|
204
|
-
lists = (0, import_utils3.getDayProducts)(id, lists, state == null ? void 0 : state.isTerminalDayBookingPage);
|
|
205
|
-
}
|
|
206
157
|
if (!state.service.addModal) {
|
|
207
|
-
setDefaultService(
|
|
158
|
+
setDefaultService(data == null ? void 0 : data.list);
|
|
208
159
|
}
|
|
209
160
|
dispatch({
|
|
210
161
|
type: "setService",
|
|
211
162
|
payload: {
|
|
212
|
-
services:
|
|
163
|
+
services: (data == null ? void 0 : data.list) || []
|
|
213
164
|
}
|
|
214
165
|
});
|
|
215
166
|
};
|
|
@@ -229,29 +180,71 @@ var Info = (props) => {
|
|
|
229
180
|
};
|
|
230
181
|
const handleSelectProduct = (0, import_ahooks.useMemoizedFn)(
|
|
231
182
|
(item, type) => {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
isEject = type === "detail" || item.bundle_group_count > 0 || item.option_group_count > 0 || item.is_variant > 0;
|
|
235
|
-
}
|
|
183
|
+
const isEject = type === "detail" || item.bundle_group_count > 0;
|
|
184
|
+
let lock = false;
|
|
236
185
|
state.action({
|
|
237
186
|
type: "pisell1.handleOpenProductModal",
|
|
238
187
|
data: {
|
|
239
188
|
id: item.id,
|
|
240
189
|
date: state.date.value.format("YYYY-MM-DD"),
|
|
241
190
|
showConfig: {
|
|
242
|
-
option:
|
|
191
|
+
option: false,
|
|
243
192
|
session: false,
|
|
244
|
-
variant:
|
|
193
|
+
variant: false,
|
|
245
194
|
package: true
|
|
246
195
|
},
|
|
247
|
-
is_eject: isEject ? 1 : 0
|
|
248
|
-
customer_id: customerId
|
|
196
|
+
is_eject: isEject ? 1 : 0
|
|
249
197
|
},
|
|
250
|
-
callback:
|
|
251
|
-
|
|
252
|
-
|
|
198
|
+
callback: (e) => {
|
|
199
|
+
var _a2, _b2;
|
|
200
|
+
if (lock) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
lock = true;
|
|
204
|
+
setTimeout(() => {
|
|
205
|
+
lock = false;
|
|
206
|
+
}, 2e3);
|
|
207
|
+
let cacheItem = {
|
|
208
|
+
...item,
|
|
209
|
+
product_id: item.id,
|
|
210
|
+
_id: (0, import_utils4.getUniqueId)(),
|
|
211
|
+
_key: e.key,
|
|
212
|
+
_extend: {
|
|
213
|
+
start_date: state.date.value,
|
|
214
|
+
quantity: 1,
|
|
215
|
+
price: item.price,
|
|
216
|
+
product_name: item.title,
|
|
217
|
+
other: JSON.parse(JSON.stringify(e))
|
|
218
|
+
},
|
|
219
|
+
new: 1
|
|
220
|
+
};
|
|
221
|
+
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
222
|
+
cacheItem._extend.total = _total;
|
|
223
|
+
cacheItem._extend.origin_total = _total;
|
|
224
|
+
const _isEdit = !!state.service.cacheItem;
|
|
225
|
+
if (_isEdit) {
|
|
226
|
+
cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
227
|
+
cacheItem.new = 0;
|
|
228
|
+
}
|
|
229
|
+
if (renderMode === "current") {
|
|
230
|
+
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
|
231
|
+
}
|
|
232
|
+
cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
233
|
+
if (state.renderType === "eventBooking") {
|
|
234
|
+
cacheItem.autoClose = false;
|
|
235
|
+
} else {
|
|
236
|
+
cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_b2 = state.service) == null ? void 0 : _b2.resourcesOrigin) || []).length === 1);
|
|
237
|
+
}
|
|
238
|
+
dispatch({
|
|
239
|
+
type: "setService",
|
|
240
|
+
payload: {
|
|
241
|
+
editModal: true,
|
|
242
|
+
cacheItem,
|
|
243
|
+
addModal: !cacheItem.autoClose,
|
|
244
|
+
changeService: false
|
|
245
|
+
}
|
|
253
246
|
});
|
|
254
|
-
|
|
247
|
+
onEdit == null ? void 0 : onEdit(cacheItem);
|
|
255
248
|
}
|
|
256
249
|
});
|
|
257
250
|
}
|
|
@@ -259,38 +252,32 @@ var Info = (props) => {
|
|
|
259
252
|
const renderList = (0, import_react.useMemo)(() => {
|
|
260
253
|
var _a2;
|
|
261
254
|
let _list = ((_a2 = state.service) == null ? void 0 : _a2.services) || [];
|
|
262
|
-
if (isDay) {
|
|
263
|
-
if (!(0, import_utils3.holderId)(state)) {
|
|
264
|
-
_list = _list.filter(
|
|
265
|
-
(item) => !import_status.appointmentTypes.includes(item.extension_type)
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
255
|
const isIncludes = (str) => {
|
|
270
256
|
return str.toLowerCase().indexOf(search.toLowerCase()) !== -1;
|
|
271
257
|
};
|
|
272
|
-
return (0,
|
|
258
|
+
return (0, import_utils3.formatProductListByCategory)(
|
|
273
259
|
_list,
|
|
274
260
|
search ? (item) => isIncludes(item.title) : void 0
|
|
275
261
|
);
|
|
276
|
-
}, [search, (
|
|
262
|
+
}, [search, (_a = state.service) == null ? void 0 : _a.services]);
|
|
263
|
+
console.log("state.service.renderList", renderList);
|
|
277
264
|
const isService = (0, import_react.useMemo)(() => {
|
|
278
265
|
var _a2, _b2;
|
|
279
266
|
return ((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) > 0;
|
|
280
267
|
}, [state.service.value]);
|
|
281
268
|
(0, import_react.useEffect)(() => {
|
|
282
|
-
var _a2, _b2, _c2, _d2,
|
|
269
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g;
|
|
283
270
|
if (shopList.includes(
|
|
284
|
-
(
|
|
271
|
+
(_e = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e.id
|
|
285
272
|
) || state.closeAutoOpenService) {
|
|
286
273
|
return;
|
|
287
274
|
}
|
|
288
|
-
if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (
|
|
275
|
+
if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f = state.service) == null ? void 0 : _f.value) == null ? void 0 : _g.length) === 0) {
|
|
289
276
|
setTimeout(() => {
|
|
290
277
|
handleSelectService();
|
|
291
278
|
}, 10);
|
|
292
279
|
}
|
|
293
|
-
}, [state.modalOpen, state.bookingId, (
|
|
280
|
+
}, [state.modalOpen, state.bookingId, (_b = state.service) == null ? void 0 : _b.value]);
|
|
294
281
|
const showAddButton = (0, import_react.useMemo)(() => {
|
|
295
282
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
296
283
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
@@ -315,9 +302,6 @@ var Info = (props) => {
|
|
|
315
302
|
}
|
|
316
303
|
}, [state.renderType, state.modalOpen]);
|
|
317
304
|
const addButton = (0, import_react.useMemo)(() => {
|
|
318
|
-
if (isDay) {
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
305
|
if (state.isBookingCreatePage) {
|
|
322
306
|
return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
|
|
323
307
|
}
|
|
@@ -352,14 +336,9 @@ var Info = (props) => {
|
|
|
352
336
|
const isRenderCurrent = (0, import_react.useMemo)(() => {
|
|
353
337
|
return renderMode === "current";
|
|
354
338
|
}, [renderMode]);
|
|
355
|
-
const colSpan = (0, import_react.useMemo)(() => {
|
|
356
|
-
const isTerminal = state.isTerminalDayBookingPage;
|
|
357
|
-
const showDate = !!(isDay && (0, import_utils3.holderId)(state));
|
|
358
|
-
return (0, import_status.inputDateCol)(showDate, isTerminal);
|
|
359
|
-
}, [state.isTerminalDayBookingPage, isDay, (0, import_utils3.holderId)(state)]);
|
|
360
339
|
return (0, import_react.useMemo)(() => {
|
|
361
340
|
var _a2, _b2;
|
|
362
|
-
const header = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header"
|
|
341
|
+
const header = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
|
|
363
342
|
import_antd.Input,
|
|
364
343
|
{
|
|
365
344
|
ref: searchRef,
|
|
@@ -372,22 +351,16 @@ var Info = (props) => {
|
|
|
372
351
|
setSearch(e.target.value);
|
|
373
352
|
}
|
|
374
353
|
}
|
|
375
|
-
))
|
|
376
|
-
const content = /* @__PURE__ */ import_react.default.createElement(
|
|
377
|
-
|
|
354
|
+
));
|
|
355
|
+
const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
356
|
+
import_TabProduct.default,
|
|
378
357
|
{
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
amountSymbol: state.amountSymbol,
|
|
386
|
-
onChange: handleSelectProduct,
|
|
387
|
-
scrollDom: isRenderCurrent ? ".pisell-lowcode__booking-vertical-add-service-wrap" : ".booking-server-wrap .pisell-lowcode-drawer-body "
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
);
|
|
358
|
+
list: renderList,
|
|
359
|
+
amountSymbol: state.amountSymbol,
|
|
360
|
+
onChange: handleSelectProduct,
|
|
361
|
+
scrollDom: isRenderCurrent ? ".pisell-lowcode__booking-vertical-add-service-wrap" : ".booking-server-wrap .pisell-lowcode-drawer-body "
|
|
362
|
+
}
|
|
363
|
+
));
|
|
391
364
|
if (renderMode === "current") {
|
|
392
365
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
393
366
|
"div",
|
|
@@ -403,8 +376,8 @@ var Info = (props) => {
|
|
|
403
376
|
import_drawer.default,
|
|
404
377
|
{
|
|
405
378
|
titleNoWrap: true,
|
|
406
|
-
open: state.service.addModal && !state.isBookingCreatePage
|
|
407
|
-
title:
|
|
379
|
+
open: state.service.addModal && !state.isBookingCreatePage,
|
|
380
|
+
title: import_utils4.locales.getText("pisell2.text.select-service"),
|
|
408
381
|
rootClassName: "booking-server-wrap",
|
|
409
382
|
onClose: () => {
|
|
410
383
|
dispatch({
|
|
@@ -421,17 +394,13 @@ var Info = (props) => {
|
|
|
421
394
|
content
|
|
422
395
|
));
|
|
423
396
|
}, [
|
|
424
|
-
(
|
|
397
|
+
(_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose,
|
|
425
398
|
addButton,
|
|
426
399
|
state.service.addModal,
|
|
427
400
|
import_utils4.locales,
|
|
428
401
|
search,
|
|
429
402
|
renderList,
|
|
430
|
-
state.amountSymbol
|
|
431
|
-
state.renderType,
|
|
432
|
-
state == null ? void 0 : state.activeCartId,
|
|
433
|
-
headerHeight,
|
|
434
|
-
(0, import_utils3.holderId)(state)
|
|
403
|
+
state.amountSymbol
|
|
435
404
|
]);
|
|
436
405
|
};
|
|
437
406
|
var addService_default = Info;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
// border-bottom: 1px solid var(--gray-300, #D0D5DD);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.pisell-lowcode__booking-service-body
|
|
7
|
-
|
|
8
|
-
background: var(--gray-50, #f9fafb);
|
|
6
|
+
.pisell-lowcode__booking-service-body {
|
|
7
|
+
background: var(--gray-50, #F9FAFB);
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
.pisell-lowcode__booking-vertical-add-service-wrap {
|
|
@@ -26,7 +25,6 @@
|
|
|
26
25
|
.booking-category-list {
|
|
27
26
|
padding: 0 16px !important;
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
.pisell-lowcode__booking-service-body {
|
|
31
29
|
.booking-tab-product {
|
|
32
30
|
.booking-tabs-wrap {
|
|
@@ -34,12 +32,4 @@
|
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
.pisell-lowcode__booking-service-date-body {
|
|
39
|
-
.booking-tab-product {
|
|
40
|
-
.booking-tabs-wrap {
|
|
41
|
-
top: 136px !important;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
35
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import dayjs from
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
2
|
export declare const getDurationProps: ({ cacheItem, useStartTime, currentResource, slice, }: any) => {
|
|
3
3
|
startDate: dayjs.Dayjs;
|
|
4
4
|
usableTime: any;
|
|
@@ -48,7 +48,7 @@ export declare const getTimeObj: ({ cacheItem, useStartTime, currentResource, st
|
|
|
48
48
|
* @Author: zhiwei.Wang
|
|
49
49
|
* @Date: 2024-01-09 13:38
|
|
50
50
|
*/
|
|
51
|
-
export declare const formatResources: ({ cacheItem, resourcesOrigin
|
|
51
|
+
export declare const formatResources: ({ cacheItem, resourcesOrigin }: any) => any[];
|
|
52
52
|
export declare const checkCacheItemResource: ({ cacheItem, resources }: any) => any;
|
|
53
53
|
/**
|
|
54
54
|
* @title: 预生成服务的 extend
|
|
@@ -59,13 +59,3 @@ export declare const checkCacheItemResource: ({ cacheItem, resources }: any) =>
|
|
|
59
59
|
* @Date: 2024-06-01 13:25
|
|
60
60
|
*/
|
|
61
61
|
export declare const getProductExtend: ({ cacheItem, state }: any) => any;
|
|
62
|
-
/**
|
|
63
|
-
* @title: 获取资源标题
|
|
64
|
-
* @description:
|
|
65
|
-
* @param {any} param1
|
|
66
|
-
* @return {*}
|
|
67
|
-
* @Author: WangHan
|
|
68
|
-
* @Date: 2024-12-09 15:53
|
|
69
|
-
*/
|
|
70
|
-
export declare const getResourceTitle: ({ state, id }: any) => any;
|
|
71
|
-
export declare const getMultiDay: ({ start_date, end_date, state, cacheItem, }: any) => Promise<any>;
|