@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
|
@@ -38,50 +38,31 @@ var import_drawer = __toESM(require("../../../components/drawer"));
|
|
|
38
38
|
var import_model = require("../../model");
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var import_duration = __toESM(require("../../../materiels/duration"));
|
|
41
|
-
var import_holder = __toESM(require("../../../materiels/holder"));
|
|
42
41
|
var import_antd = require("antd");
|
|
43
42
|
var import_index = require("./index.less");
|
|
44
43
|
var import_collapsibleList = __toESM(require("../../../components/collapsibleList"));
|
|
45
44
|
var import_utils2 = require("../../../components/collapsibleList/utils");
|
|
46
45
|
var import_ahooks = require("ahooks");
|
|
47
|
-
var import_BookingList = __toESM(require("./BookingList"));
|
|
48
46
|
var import_utils3 = require("../../../utils");
|
|
49
47
|
var import_like = __toESM(require("../like"));
|
|
50
48
|
var import_mock = require("../../../mock");
|
|
51
49
|
var import_utils4 = require("../addService/utils");
|
|
52
50
|
var import_materials = require("@pisell/materials");
|
|
53
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
54
|
-
var import_useSelectPet = __toESM(require("../../service2/hooks/useSelectPet"));
|
|
55
|
-
var import_utils5 = require("../../service2/utils");
|
|
56
|
-
var import_utils6 = require("../../service2/Group/utils");
|
|
57
|
-
var import_utils7 = require("../../service2/Group/utils");
|
|
58
|
-
var import_utils8 = require("../../utils");
|
|
59
|
-
var import_serviceManager = require("../serviceManager");
|
|
60
|
-
var import_EditTabs = __toESM(require("./EditTabs"));
|
|
61
51
|
var submitLock = false;
|
|
62
52
|
var Info = (_, ref) => {
|
|
63
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
64
54
|
const [form] = import_antd.Form.useForm();
|
|
65
55
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
66
56
|
const useLikeStatus = import_antd.Form.useWatch("like_status", form);
|
|
67
57
|
const useResource = import_antd.Form.useWatch("resource", form);
|
|
68
58
|
const useStartTime = import_antd.Form.useWatch("start_time", form);
|
|
69
59
|
const useDuration = import_antd.Form.useWatch("duration", form);
|
|
70
|
-
const useStartDate = import_antd.Form.useWatch("start_date", form);
|
|
71
|
-
const useEndDate = import_antd.Form.useWatch("end_date", form);
|
|
72
60
|
const [resourceLoading, setResourceLoading] = (0, import_react.useState)(false);
|
|
73
61
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
74
62
|
const [selectOpen, setSelectOpen] = (0, import_react.useState)();
|
|
75
|
-
const { holderLists } = (0, import_useSelectPet.default)(state);
|
|
76
|
-
const { editBookingData, editBooking } = (0, import_serviceManager.useService)({ state, dispatch });
|
|
77
|
-
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
78
|
-
const isDayBookingMode = (0, import_react.useMemo)(() => {
|
|
79
|
-
return (0, import_utils5.isDayBooking)(state);
|
|
80
|
-
}, [state == null ? void 0 : state.renderType]);
|
|
81
63
|
const getCurrentCacheItem = (_cacheItem) => {
|
|
82
|
-
var _a2;
|
|
83
64
|
let values = form.getFieldsValue();
|
|
84
|
-
let _item = _cacheItem ||
|
|
65
|
+
let _item = _cacheItem || state.service.cacheItem;
|
|
85
66
|
return {
|
|
86
67
|
..._item,
|
|
87
68
|
_extend: {
|
|
@@ -151,8 +132,7 @@ var Info = (_, ref) => {
|
|
|
151
132
|
payload: {
|
|
152
133
|
resources: (0, import_utils4.formatResources)({
|
|
153
134
|
cacheItem: _cacheItem,
|
|
154
|
-
resourcesOrigin: _list
|
|
155
|
-
isDay: isDayBookingMode
|
|
135
|
+
resourcesOrigin: _list
|
|
156
136
|
})
|
|
157
137
|
}
|
|
158
138
|
});
|
|
@@ -179,11 +159,7 @@ var Info = (_, ref) => {
|
|
|
179
159
|
}
|
|
180
160
|
let _list = [...state.service.value];
|
|
181
161
|
let _id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
182
|
-
|
|
183
|
-
_list = (0, import_utils7.filterItemByGroupId)(_id, _list);
|
|
184
|
-
} else {
|
|
185
|
-
_list = _list.filter((d) => d._id !== _id);
|
|
186
|
-
}
|
|
162
|
+
_list = _list.filter((d) => d._id !== _id);
|
|
187
163
|
dispatch({
|
|
188
164
|
type: "setService",
|
|
189
165
|
payload: {
|
|
@@ -212,11 +188,11 @@ var Info = (_, ref) => {
|
|
|
212
188
|
});
|
|
213
189
|
});
|
|
214
190
|
const getErrorMsg = () => {
|
|
215
|
-
var _a2
|
|
191
|
+
var _a2;
|
|
216
192
|
const list = state.service.resources;
|
|
217
193
|
let item = list.find((d) => d.form_record_id == useResource);
|
|
218
194
|
if (item) {
|
|
219
|
-
const isMaxLimitRange = (
|
|
195
|
+
const isMaxLimitRange = (_a2 = item._extend.usableTime) == null ? void 0 : _a2._extend.isMaxLimitRange;
|
|
220
196
|
if (isMaxLimitRange === "unknown") {
|
|
221
197
|
}
|
|
222
198
|
}
|
|
@@ -239,7 +215,8 @@ var Info = (_, ref) => {
|
|
|
239
215
|
}
|
|
240
216
|
form.setFieldsValue({ discount });
|
|
241
217
|
};
|
|
242
|
-
const onFinish = (0, import_ahooks.useMemoizedFn)(
|
|
218
|
+
const onFinish = (0, import_ahooks.useMemoizedFn)((values) => {
|
|
219
|
+
var _a2;
|
|
243
220
|
if (submitLock) {
|
|
244
221
|
return;
|
|
245
222
|
}
|
|
@@ -247,22 +224,51 @@ var Info = (_, ref) => {
|
|
|
247
224
|
setTimeout(() => {
|
|
248
225
|
submitLock = false;
|
|
249
226
|
}, 1500);
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
227
|
+
let _list = [...state.service.value];
|
|
228
|
+
let _item = {
|
|
229
|
+
...state.service.cacheItem,
|
|
230
|
+
autoClose: false,
|
|
231
|
+
errorList
|
|
232
|
+
};
|
|
233
|
+
let _extend = {
|
|
234
|
+
..._item._extend,
|
|
235
|
+
...values
|
|
236
|
+
};
|
|
237
|
+
const { startDate, endDate } = (0, import_utils3.getServiceTimes)({ _extend });
|
|
238
|
+
_extend.startDate = startDate;
|
|
239
|
+
_extend.endDate = endDate;
|
|
240
|
+
const { relation_type, item_id, schedule_id } = ((_a2 = currentResource == null ? void 0 : currentResource._extend) == null ? void 0 : _a2.usableTime) || {};
|
|
241
|
+
_extend.relation_type = relation_type || "form";
|
|
242
|
+
_extend.relation_id = item_id || (currentResource == null ? void 0 : currentResource.form_record_id) || 0;
|
|
243
|
+
_extend.schedule_id = schedule_id || 0;
|
|
244
|
+
if (_extend.bundle_edit !== void 0) {
|
|
245
|
+
_extend.bundle_edit = 1;
|
|
246
|
+
}
|
|
247
|
+
_item._extend = _extend;
|
|
248
|
+
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
249
|
+
let _id = _item == null ? void 0 : _item._id;
|
|
250
|
+
if (!_list.some((d) => d._id === _id)) {
|
|
251
|
+
_list.push(_item);
|
|
252
|
+
} else {
|
|
253
|
+
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
254
|
+
}
|
|
255
|
+
(0, import_utils3.deleteCacheParams)();
|
|
256
|
+
console.log("_onFinish", _list);
|
|
257
|
+
dispatch({
|
|
258
|
+
type: "setService",
|
|
259
|
+
payload: {
|
|
260
|
+
editModal: false,
|
|
261
|
+
addModal: false,
|
|
262
|
+
value: _list,
|
|
263
|
+
edit: true,
|
|
264
|
+
cacheItem: null,
|
|
265
|
+
changeService: false
|
|
254
266
|
}
|
|
255
267
|
});
|
|
256
|
-
await editBooking({ booking: data });
|
|
257
268
|
});
|
|
258
269
|
const setEditData = (0, import_ahooks.useMemoizedFn)((_cacheItem, open) => {
|
|
259
|
-
setCurrentTab("batch_edit");
|
|
260
270
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
261
271
|
let values = cacheItem._extend;
|
|
262
|
-
values = {
|
|
263
|
-
...values,
|
|
264
|
-
discount_reason: (values == null ? void 0 : values.discount_reason) || ""
|
|
265
|
-
};
|
|
266
272
|
form.setFieldsValue(values);
|
|
267
273
|
if (state.renderType !== "eventBooking") {
|
|
268
274
|
getResources(cacheItem, open);
|
|
@@ -275,11 +281,7 @@ var Info = (_, ref) => {
|
|
|
275
281
|
return cPrice !== oPrice;
|
|
276
282
|
}, [useTotal, (_e = (_d = state.service.cacheItem) == null ? void 0 : _d._extend) == null ? void 0 : _e.origin_total]);
|
|
277
283
|
const errorList = (0, import_react.useMemo)(() => {
|
|
278
|
-
return (0, import_utils3.getErrorList)(
|
|
279
|
-
currentResource,
|
|
280
|
-
getCurrentCacheItem(),
|
|
281
|
-
isDayBookingMode
|
|
282
|
-
);
|
|
284
|
+
return (0, import_utils3.getErrorList)(currentResource, getCurrentCacheItem());
|
|
283
285
|
}, [currentResource, useDuration, useStartTime]);
|
|
284
286
|
(0, import_ahooks.useUpdateEffect)(() => {
|
|
285
287
|
var _a2;
|
|
@@ -295,17 +297,14 @@ var Info = (_, ref) => {
|
|
|
295
297
|
state.service.resourcesOrigin,
|
|
296
298
|
(_f = state.service.cacheItem) == null ? void 0 : _f.autoClose
|
|
297
299
|
]);
|
|
298
|
-
const isTerminalBooking = (0, import_react.useMemo)(() => {
|
|
299
|
-
return state.isBookingCreatePage || state.isTerminalDayBookingPage;
|
|
300
|
-
}, [state.isBookingCreatePage, state.isTerminalDayBookingPage]);
|
|
301
300
|
(0, import_react.useEffect)(() => {
|
|
302
|
-
if (
|
|
301
|
+
if (state.isBookingCreatePage && state.service.editModal) {
|
|
303
302
|
setEditData(null, true);
|
|
304
303
|
}
|
|
305
|
-
}, [state.service.editModal,
|
|
304
|
+
}, [state.service.editModal, state.isBookingCreatePage]);
|
|
306
305
|
(0, import_react.useEffect)(() => {
|
|
307
306
|
getErrorMsg();
|
|
308
|
-
}, [useResource, useStartTime, useDuration
|
|
307
|
+
}, [useResource, useStartTime, useDuration]);
|
|
309
308
|
(0, import_react.useEffect)(() => {
|
|
310
309
|
getDiscount();
|
|
311
310
|
}, [useTotal, (_h = (_g = state.service.cacheItem) == null ? void 0 : _g._extend) == null ? void 0 : _h.origin_total]);
|
|
@@ -325,44 +324,15 @@ var Info = (_, ref) => {
|
|
|
325
324
|
var _a2, _b2, _c2, _d2;
|
|
326
325
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
327
326
|
}, [(_n = (_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.other) == null ? void 0 : _n.bundle]);
|
|
328
|
-
const multiDayPrices = (0, import_react.useMemo)(() => {
|
|
329
|
-
var _a2, _b2, _c2;
|
|
330
|
-
return Object.entries(
|
|
331
|
-
(0, import_utils8.getMultiDayPrices)(((_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.multi_day) || [])
|
|
332
|
-
).map(([key, value]) => {
|
|
333
|
-
return {
|
|
334
|
-
key,
|
|
335
|
-
value
|
|
336
|
-
};
|
|
337
|
-
});
|
|
338
|
-
}, [(_q = (_p = (_o = state.service) == null ? void 0 : _o.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.multi_day]);
|
|
339
327
|
const getResourcesData = async () => {
|
|
340
328
|
setResourceLoading(true);
|
|
341
329
|
try {
|
|
342
|
-
let params = {};
|
|
343
|
-
if (isDayBookingMode) {
|
|
344
|
-
const format = "YYYY-MM-DD HH:mm";
|
|
345
|
-
const startDate = useStartDate || state.date.value;
|
|
346
|
-
const endDate = useEndDate || state.date.end_date;
|
|
347
|
-
const { startDateTime, endDateTime } = (0, import_utils5.formatDayTime)({
|
|
348
|
-
startDate,
|
|
349
|
-
endDate
|
|
350
|
-
});
|
|
351
|
-
if ((0, import_dayjs.default)(startDateTime).isAfter((0, import_dayjs.default)(endDateTime)))
|
|
352
|
-
return;
|
|
353
|
-
params.check_time = {
|
|
354
|
-
start_time: (0, import_dayjs.default)(startDateTime).format(format),
|
|
355
|
-
end_time: (0, import_dayjs.default)(endDateTime).format(format)
|
|
356
|
-
};
|
|
357
|
-
} else {
|
|
358
|
-
params.with_date_times = state.date.value.format("YYYY-MM-DD");
|
|
359
|
-
}
|
|
360
330
|
let data = await state.apis.getResources({
|
|
361
331
|
skip: 1,
|
|
362
332
|
num: 1e3,
|
|
333
|
+
with_date_times: state.date.value.format("YYYY-MM-DD"),
|
|
363
334
|
codes: ["resources", "therapist", "table"],
|
|
364
|
-
_config: { abort: true }
|
|
365
|
-
...params
|
|
335
|
+
_config: { abort: true }
|
|
366
336
|
});
|
|
367
337
|
let _list = [(0, import_mock.getNoResource)()].concat((data == null ? void 0 : data.list) || []);
|
|
368
338
|
dispatch({
|
|
@@ -380,46 +350,24 @@ var Info = (_, ref) => {
|
|
|
380
350
|
setTimeout(() => {
|
|
381
351
|
getResourcesData();
|
|
382
352
|
}, 20);
|
|
383
|
-
}, [
|
|
384
|
-
(_t = (_s = (_r = state.date) == null ? void 0 : _r.value) == null ? void 0 : _s.format) == null ? void 0 : _t.call(_s, "YYYY-MM-DD"),
|
|
385
|
-
(_u = state.date) == null ? void 0 : _u.end_date,
|
|
386
|
-
useStartDate,
|
|
387
|
-
useEndDate
|
|
388
|
-
]);
|
|
353
|
+
}, [(_q = (_p = (_o = state.date) == null ? void 0 : _o.value) == null ? void 0 : _p.format) == null ? void 0 : _q.call(_p, "YYYY-MM-DD")]);
|
|
389
354
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
390
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
391
355
|
const item = state.service.cacheItem;
|
|
392
356
|
let values = form.getFieldsValue();
|
|
393
|
-
let dayValue = {};
|
|
394
|
-
if (isDayBookingMode) {
|
|
395
|
-
const option = (_c2 = (_b2 = (_a2 = item._extend) == null ? void 0 : _a2.other) == null ? void 0 : _b2.option) == null ? void 0 : _c2.map((o) => {
|
|
396
|
-
return {
|
|
397
|
-
...o,
|
|
398
|
-
option_group_item_id: o.product_option_item_id
|
|
399
|
-
};
|
|
400
|
-
});
|
|
401
|
-
dayValue.product_variant = ((_e2 = (_d2 = item._extend) == null ? void 0 : _d2.other) == null ? void 0 : _e2.product_variant_id) || 0;
|
|
402
|
-
dayValue.product_option = option || [];
|
|
403
|
-
}
|
|
404
357
|
state.action({
|
|
405
358
|
type: "pisell1.handleOpenProductModal",
|
|
406
359
|
data: {
|
|
407
360
|
id: item.id,
|
|
408
361
|
date: state.date.value.format("YYYY-MM-DD"),
|
|
409
362
|
showConfig: {
|
|
410
|
-
option:
|
|
363
|
+
option: false,
|
|
411
364
|
session: false,
|
|
412
|
-
variant:
|
|
365
|
+
variant: false,
|
|
413
366
|
package: true
|
|
414
367
|
},
|
|
415
|
-
value:
|
|
416
|
-
...((_f2 = item._extend) == null ? void 0 : _f2.other) || {},
|
|
417
|
-
...dayValue
|
|
418
|
-
},
|
|
419
|
-
customer_id: isDayBookingMode ? ((_h2 = (_g2 = state.client) == null ? void 0 : _g2.value) == null ? void 0 : _h2.id) || 1 : void 0
|
|
368
|
+
value: item._extend.other
|
|
420
369
|
},
|
|
421
370
|
callback: (e2) => {
|
|
422
|
-
var _a3, _b3, _c3, _d3;
|
|
423
371
|
let cacheItem = {
|
|
424
372
|
...item,
|
|
425
373
|
product_id: item.id,
|
|
@@ -435,9 +383,6 @@ var Info = (_, ref) => {
|
|
|
435
383
|
new: 0
|
|
436
384
|
};
|
|
437
385
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
438
|
-
if ((_b3 = (_a3 = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a3.other) == null ? void 0 : _b3.product_variant_id) {
|
|
439
|
-
cacheItem._extend.price = Number((_d3 = (_c3 = cacheItem._extend) == null ? void 0 : _c3.other) == null ? void 0 : _d3.price);
|
|
440
|
-
}
|
|
441
386
|
cacheItem._extend.total = _total;
|
|
442
387
|
cacheItem._extend.origin_total = _total;
|
|
443
388
|
dispatch({
|
|
@@ -446,12 +391,9 @@ var Info = (_, ref) => {
|
|
|
446
391
|
cacheItem
|
|
447
392
|
}
|
|
448
393
|
});
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
end_date: values.end_date
|
|
453
|
-
});
|
|
454
|
-
}, 100);
|
|
394
|
+
form.setFieldsValue({
|
|
395
|
+
total: _total
|
|
396
|
+
});
|
|
455
397
|
}
|
|
456
398
|
});
|
|
457
399
|
});
|
|
@@ -474,105 +416,7 @@ var Info = (_, ref) => {
|
|
|
474
416
|
init: setEditData
|
|
475
417
|
};
|
|
476
418
|
});
|
|
477
|
-
const SelectTime = (
|
|
478
|
-
const DateCom = (position) => {
|
|
479
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
480
|
-
import_antd.DatePicker,
|
|
481
|
-
{
|
|
482
|
-
className: "pisell-lowcode__booking-service-select-date",
|
|
483
|
-
disabledDate: (current) => (0, import_utils5.disabledDate)(current, position, useStartDate),
|
|
484
|
-
size: "large",
|
|
485
|
-
style: { width: "100%" },
|
|
486
|
-
format: state.locale === "en" ? "DD/MM/YYYY" : "YYYY-MM-DD"
|
|
487
|
-
}
|
|
488
|
-
);
|
|
489
|
-
};
|
|
490
|
-
const updateMultiDay = async ({ start_date, end_date, duration }) => {
|
|
491
|
-
const cacheItem = await (0, import_utils4.getMultiDay)({
|
|
492
|
-
start_date,
|
|
493
|
-
end_date,
|
|
494
|
-
state,
|
|
495
|
-
cacheItem: getCurrentCacheItem()
|
|
496
|
-
});
|
|
497
|
-
if (duration !== void 0) {
|
|
498
|
-
cacheItem._extend.duration = duration;
|
|
499
|
-
}
|
|
500
|
-
cacheItem._extend.items = (0, import_utils6.createBookingItemsByGroup)(cacheItem);
|
|
501
|
-
cacheItem._extend = {
|
|
502
|
-
...cacheItem._extend,
|
|
503
|
-
...(0, import_utils6.getGroupTotalPrice)(cacheItem._extend.items)
|
|
504
|
-
};
|
|
505
|
-
dispatch({
|
|
506
|
-
type: "setService",
|
|
507
|
-
payload: {
|
|
508
|
-
cacheItem
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
let fieldsValues = {
|
|
512
|
-
total: cacheItem._extend.total
|
|
513
|
-
};
|
|
514
|
-
form.setFieldsValue(fieldsValues);
|
|
515
|
-
};
|
|
516
|
-
const onValuesChange = (changedValues) => {
|
|
517
|
-
if (isDayBookingMode) {
|
|
518
|
-
if (changedValues == null ? void 0 : changedValues.duration) {
|
|
519
|
-
const end_date = (0, import_dayjs.default)(useStartDate).add(
|
|
520
|
-
changedValues == null ? void 0 : changedValues.duration,
|
|
521
|
-
"day"
|
|
522
|
-
);
|
|
523
|
-
form.setFieldsValue({
|
|
524
|
-
end_date
|
|
525
|
-
});
|
|
526
|
-
return updateMultiDay({
|
|
527
|
-
start_date: useStartDate,
|
|
528
|
-
end_date,
|
|
529
|
-
duration: changedValues == null ? void 0 : changedValues.duration
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
if (changedValues == null ? void 0 : changedValues.start_date) {
|
|
533
|
-
const startDate = (0, import_dayjs.default)(changedValues == null ? void 0 : changedValues.start_date);
|
|
534
|
-
const endDate = (0, import_dayjs.default)(useEndDate);
|
|
535
|
-
if (startDate.isAfter(endDate)) {
|
|
536
|
-
return form.setFieldsValue({
|
|
537
|
-
duration: void 0,
|
|
538
|
-
end_date: void 0
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
if ((changedValues == null ? void 0 : changedValues.start_date) || (changedValues == null ? void 0 : changedValues.end_date)) {
|
|
543
|
-
const cacheItem = getCurrentCacheItem();
|
|
544
|
-
const duration = (0, import_utils3.getDays)(cacheItem, "days");
|
|
545
|
-
const start_date = (changedValues == null ? void 0 : changedValues.start_date) || useStartDate;
|
|
546
|
-
const end_date = (changedValues == null ? void 0 : changedValues.end_date) || useEndDate;
|
|
547
|
-
updateMultiDay({ start_date, end_date, duration });
|
|
548
|
-
return form.setFieldsValue({
|
|
549
|
-
duration
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
const showResource = (0, import_react.useMemo)(() => {
|
|
555
|
-
if (state.renderType === "eventBooking") {
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
if (isDayBookingMode) {
|
|
559
|
-
return (0, import_utils5.isDayBookingProduct)(state.service.cacheItem, state);
|
|
560
|
-
}
|
|
561
|
-
return true;
|
|
562
|
-
}, [state.service.cacheItem, state.renderType]);
|
|
563
|
-
const items = (0, import_react.useMemo)(() => {
|
|
564
|
-
var _a2, _b2;
|
|
565
|
-
return ((_b2 = (_a2 = getCurrentCacheItem()) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.items) || [];
|
|
566
|
-
}, [
|
|
567
|
-
getCurrentCacheItem(),
|
|
568
|
-
state.service.cacheItem,
|
|
569
|
-
useLikeStatus,
|
|
570
|
-
currentResource,
|
|
571
|
-
useTotal
|
|
572
|
-
]);
|
|
573
|
-
const isEditGroup = (0, import_react.useMemo)(() => {
|
|
574
|
-
return items.length;
|
|
575
|
-
}, [items]);
|
|
419
|
+
const SelectTime = (_r = window.BaseMaterials) == null ? void 0 : _r.SelectTime;
|
|
576
420
|
return (0, import_react.useMemo)(() => {
|
|
577
421
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
578
422
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -582,7 +426,7 @@ var Info = (_, ref) => {
|
|
|
582
426
|
zIndex: state.service.changeService ? 999 : 1e3,
|
|
583
427
|
forceRender: true,
|
|
584
428
|
open: state.service.editModal && !((_a2 = state.service.cacheItem) == null ? void 0 : _a2.autoClose),
|
|
585
|
-
title:
|
|
429
|
+
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
586
430
|
onClose: () => {
|
|
587
431
|
dispatch({
|
|
588
432
|
type: "setService",
|
|
@@ -594,217 +438,137 @@ var Info = (_, ref) => {
|
|
|
594
438
|
});
|
|
595
439
|
}
|
|
596
440
|
},
|
|
597
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" },
|
|
598
|
-
|
|
441
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_d2 = (_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
|
442
|
+
import_collapsibleList.default,
|
|
599
443
|
{
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
setCurrentTab(e);
|
|
604
|
-
}
|
|
444
|
+
style: { marginTop: bundles.length ? "8px" : 0 },
|
|
445
|
+
list: bundles,
|
|
446
|
+
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
|
605
447
|
}
|
|
606
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
607
|
-
|
|
448
|
+
)))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
449
|
+
import_antd.Form.Item,
|
|
608
450
|
{
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
451
|
+
label: import_utils.locales.getText("pisell2.text.price"),
|
|
452
|
+
name: "total",
|
|
453
|
+
rules: [{ required: true }],
|
|
454
|
+
extra: useTotal !== ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
|
|
455
|
+
(0, import_utils.formatAmount)(
|
|
456
|
+
(_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total,
|
|
457
|
+
2,
|
|
458
|
+
state.amountSymbol
|
|
459
|
+
),
|
|
460
|
+
(0, import_utils.formatAmount)(useTotal, 2, state.amountSymbol)
|
|
461
|
+
)
|
|
462
|
+
},
|
|
463
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
464
|
+
import_materials.PisellAdjustPriceInputNumber,
|
|
465
|
+
{
|
|
466
|
+
style: { width: "100%" },
|
|
467
|
+
min: 0,
|
|
468
|
+
precision: 2,
|
|
469
|
+
prefix: state.amountSymbol,
|
|
470
|
+
disabled: state.channelDisabledEdit,
|
|
471
|
+
originValue: ((_j2 = (_i2 = state.service.cacheItem) == null ? void 0 : _i2._extend) == null ? void 0 : _j2.origin_total) || 0,
|
|
472
|
+
placeholder: ((_l2 = (_k2 = state.service.cacheItem) == null ? void 0 : _k2._extend) == null ? void 0 : _l2.origin_total) || "0"
|
|
612
473
|
}
|
|
474
|
+
)
|
|
475
|
+
)), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
476
|
+
import_antd.Form.Item,
|
|
477
|
+
{
|
|
478
|
+
label: import_utils.locales.getText("pisell2.text.discount-reason"),
|
|
479
|
+
name: "discount_reason"
|
|
613
480
|
},
|
|
614
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
615
|
-
)) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
616
|
-
|
|
481
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
482
|
+
)) : null, state.renderType !== "eventBooking" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
483
|
+
import_antd.Form.Item,
|
|
617
484
|
{
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
485
|
+
label: import_utils.locales.getText("pisell2.text.start_time"),
|
|
486
|
+
name: "start_time",
|
|
487
|
+
rules: [{ required: true }]
|
|
488
|
+
},
|
|
489
|
+
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
490
|
+
SelectTime,
|
|
491
|
+
{
|
|
492
|
+
slice: (_p2 = (_o2 = (_n2 = (_m2 = state.bookingConfig) == null ? void 0 : _m2.config) == null ? void 0 : _n2.basic) == null ? void 0 : _o2.service_time) == null ? void 0 : _p2.value,
|
|
493
|
+
timePickerProps: {
|
|
494
|
+
style: { width: "100%" }
|
|
495
|
+
},
|
|
496
|
+
timeProps: {
|
|
497
|
+
style: { zoom: 0.8 }
|
|
498
|
+
}
|
|
621
499
|
}
|
|
500
|
+
) : null
|
|
501
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
502
|
+
import_antd.Form.Item,
|
|
503
|
+
{
|
|
504
|
+
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
505
|
+
name: "duration",
|
|
506
|
+
rules: [{ required: true }]
|
|
622
507
|
},
|
|
623
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
624
|
-
|
|
508
|
+
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
|
509
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
510
|
+
import_antd.Form.Item,
|
|
511
|
+
{
|
|
512
|
+
required: true,
|
|
513
|
+
label: import_utils.locales.getText("pisell2.text.resource")
|
|
514
|
+
},
|
|
515
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, /* @__PURE__ */ import_react.default.createElement(
|
|
516
|
+
import_antd.Button,
|
|
625
517
|
{
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
518
|
+
className: "resource-col-like-wrap",
|
|
519
|
+
disabled: !useResource,
|
|
520
|
+
onClick: () => {
|
|
521
|
+
handleLikeResource(
|
|
522
|
+
useLikeStatus === "like" ? "common" : "like"
|
|
523
|
+
);
|
|
524
|
+
}
|
|
630
525
|
},
|
|
631
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
632
|
-
|
|
526
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
527
|
+
import_like.default,
|
|
633
528
|
{
|
|
634
|
-
|
|
635
|
-
list: bundles,
|
|
636
|
-
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
|
529
|
+
status: useLikeStatus
|
|
637
530
|
}
|
|
638
|
-
)
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
state.amountSymbol
|
|
649
|
-
),
|
|
650
|
-
(0, import_utils.formatAmount)(useTotal, 2, state.amountSymbol)
|
|
651
|
-
)
|
|
652
|
-
},
|
|
653
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
654
|
-
import_materials.PisellAdjustPriceInputNumber,
|
|
655
|
-
{
|
|
656
|
-
style: { width: "100%" },
|
|
657
|
-
min: 0,
|
|
658
|
-
precision: 2,
|
|
659
|
-
prefix: state.amountSymbol,
|
|
660
|
-
disabled: state.channelDisabledEdit,
|
|
661
|
-
originValue: ((_j2 = (_i2 = state.service.cacheItem) == null ? void 0 : _i2._extend) == null ? void 0 : _j2.origin_total) || 0,
|
|
662
|
-
placeholder: ((_l2 = (_k2 = state.service.cacheItem) == null ? void 0 : _k2._extend) == null ? void 0 : _l2.origin_total) || "0"
|
|
663
|
-
}
|
|
664
|
-
)
|
|
665
|
-
)), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
666
|
-
import_antd.Form.Item,
|
|
667
|
-
{
|
|
668
|
-
label: import_utils.locales.getText(
|
|
669
|
-
"pisell2.text.discount-reason"
|
|
670
|
-
),
|
|
671
|
-
name: "discount_reason"
|
|
672
|
-
},
|
|
673
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
674
|
-
)) : null, showResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
675
|
-
import_antd.Form.Item,
|
|
531
|
+
)
|
|
532
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
533
|
+
import_antd.Form.Item,
|
|
534
|
+
{
|
|
535
|
+
name: "resource",
|
|
536
|
+
noStyle: true,
|
|
537
|
+
rules: [{ required: true }]
|
|
538
|
+
},
|
|
539
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
540
|
+
import_antd.Select,
|
|
676
541
|
{
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
{
|
|
686
|
-
slice: (_p2 = (_o2 = (_n2 = (_m2 = state.bookingConfig) == null ? void 0 : _m2.config) == null ? void 0 : _n2.basic) == null ? void 0 : _o2.service_time) == null ? void 0 : _p2.value,
|
|
687
|
-
timePickerProps: {
|
|
688
|
-
style: { width: "100%" }
|
|
689
|
-
},
|
|
690
|
-
timeProps: {
|
|
691
|
-
style: { zoom: 0.8 }
|
|
692
|
-
}
|
|
542
|
+
loading: resourceLoading,
|
|
543
|
+
size: "large",
|
|
544
|
+
allowClear: true,
|
|
545
|
+
showSearch: true,
|
|
546
|
+
open: selectOpen,
|
|
547
|
+
onDropdownVisibleChange: setSelectOpen,
|
|
548
|
+
filterOption: (str, option) => {
|
|
549
|
+
return (option.labelText || "").toLowerCase().includes((str || "").toLowerCase());
|
|
693
550
|
}
|
|
694
|
-
) : null
|
|
695
|
-
)), isDayBookingMode ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
696
|
-
import_antd.Form.Item,
|
|
697
|
-
{
|
|
698
|
-
label: import_utils.locales.getText(
|
|
699
|
-
isDayBookingMode ? "pisell2.text.end_date" : "pisell2.text.end_time"
|
|
700
|
-
),
|
|
701
|
-
name: "end_date",
|
|
702
|
-
rules: [{ required: true }]
|
|
703
|
-
},
|
|
704
|
-
DateCom("end")
|
|
705
|
-
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
706
|
-
import_antd.Form.Item,
|
|
707
|
-
{
|
|
708
|
-
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
709
|
-
name: "duration",
|
|
710
|
-
rules: [{ required: true }]
|
|
711
551
|
},
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
name: "holder_id",
|
|
718
|
-
rules: [{ required: true }]
|
|
719
|
-
},
|
|
720
|
-
/* @__PURE__ */ import_react.default.createElement(import_holder.default, { size: "large" })
|
|
721
|
-
)) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
722
|
-
import_antd.Form.Item,
|
|
723
|
-
{
|
|
724
|
-
required: true,
|
|
725
|
-
label: import_utils.locales.getText("pisell2.text.resource")
|
|
726
|
-
},
|
|
727
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, /* @__PURE__ */ import_react.default.createElement(
|
|
728
|
-
import_antd.Button,
|
|
729
|
-
{
|
|
730
|
-
className: "resource-col-like-wrap",
|
|
731
|
-
disabled: !useResource,
|
|
732
|
-
onClick: () => {
|
|
733
|
-
handleLikeResource(
|
|
734
|
-
useLikeStatus === "like" ? "common" : "like"
|
|
735
|
-
);
|
|
736
|
-
}
|
|
737
|
-
},
|
|
738
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
739
|
-
import_like.default,
|
|
740
|
-
{
|
|
741
|
-
status: useLikeStatus
|
|
742
|
-
}
|
|
743
|
-
)
|
|
744
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
745
|
-
import_antd.Form.Item,
|
|
746
|
-
{
|
|
747
|
-
name: "resource",
|
|
748
|
-
noStyle: true,
|
|
749
|
-
rules: [{ required: true }]
|
|
750
|
-
},
|
|
751
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
752
|
-
import_antd.Select,
|
|
753
|
-
{
|
|
754
|
-
loading: resourceLoading,
|
|
755
|
-
size: "large",
|
|
756
|
-
allowClear: true,
|
|
757
|
-
showSearch: true,
|
|
758
|
-
open: selectOpen,
|
|
759
|
-
onDropdownVisibleChange: setSelectOpen,
|
|
760
|
-
filterOption: (str, option) => {
|
|
761
|
-
return (option.labelText || "").toLowerCase().includes((str || "").toLowerCase());
|
|
762
|
-
}
|
|
763
|
-
},
|
|
764
|
-
renderOptions(
|
|
765
|
-
state.service.resources || [],
|
|
766
|
-
"form_record_id",
|
|
767
|
-
"label",
|
|
768
|
-
"resource"
|
|
769
|
-
)
|
|
770
|
-
)
|
|
771
|
-
))
|
|
772
|
-
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "like_status" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null))), isDayBookingMode && !(0, import_utils5.isDayBookingProduct)(state.service.cacheItem, state) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
|
773
|
-
import_antd.Form.Item,
|
|
774
|
-
{
|
|
775
|
-
label: import_utils.locales.getText("pisell2.text.quantity"),
|
|
776
|
-
name: "quantity",
|
|
777
|
-
rules: [{ required: true }]
|
|
778
|
-
},
|
|
779
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
780
|
-
import_antd.InputNumber,
|
|
781
|
-
{
|
|
782
|
-
size: "large",
|
|
783
|
-
style: { width: "100%" },
|
|
784
|
-
min: 1,
|
|
785
|
-
max: 999999,
|
|
786
|
-
formatter: (value) => {
|
|
787
|
-
if (value !== void 0) {
|
|
788
|
-
return Math.floor(value);
|
|
789
|
-
}
|
|
790
|
-
return value;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
552
|
+
renderOptions(
|
|
553
|
+
state.service.resources || [],
|
|
554
|
+
"form_record_id",
|
|
555
|
+
"label",
|
|
556
|
+
"resource"
|
|
793
557
|
)
|
|
794
|
-
)
|
|
795
|
-
))
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
558
|
+
)
|
|
559
|
+
))
|
|
560
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "like_status" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)))))), state.renderType !== "eventBooking" && errorList.map((d, i) => {
|
|
561
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
562
|
+
import_antd.Alert,
|
|
563
|
+
{
|
|
564
|
+
key: d.type,
|
|
565
|
+
message: d.label,
|
|
566
|
+
type: "warning",
|
|
567
|
+
showIcon: true,
|
|
568
|
+
style: { marginBottom: 12 }
|
|
569
|
+
}
|
|
570
|
+
);
|
|
571
|
+
}), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
808
572
|
"div",
|
|
809
573
|
{
|
|
810
574
|
className: "pisell-lowcode__booking-service-delete-wrap",
|
|
@@ -827,17 +591,17 @@ var Info = (_, ref) => {
|
|
|
827
591
|
}, [
|
|
828
592
|
state.service.changeService,
|
|
829
593
|
state.service.editModal,
|
|
830
|
-
(
|
|
594
|
+
(_s = state.service.cacheItem) == null ? void 0 : _s.autoClose,
|
|
831
595
|
import_utils.locales,
|
|
832
|
-
(
|
|
596
|
+
(_v = (_u = (_t = state.service) == null ? void 0 : _t.cacheItem) == null ? void 0 : _u._extend) == null ? void 0 : _v.product_name,
|
|
833
597
|
bundles,
|
|
834
598
|
state.amountSymbol,
|
|
835
599
|
state.channelDisabledEdit,
|
|
836
|
-
(
|
|
600
|
+
(_x = (_w = state.service.cacheItem) == null ? void 0 : _w._extend) == null ? void 0 : _x.origin_total,
|
|
837
601
|
isDiscount,
|
|
838
602
|
isReason,
|
|
839
603
|
state.renderType,
|
|
840
|
-
(
|
|
604
|
+
(_B = (_A = (_z = (_y = state.bookingConfig) == null ? void 0 : _y.config) == null ? void 0 : _z.basic) == null ? void 0 : _A.service_time) == null ? void 0 : _B.value,
|
|
841
605
|
SelectTime,
|
|
842
606
|
durationProps,
|
|
843
607
|
timeObj,
|
|
@@ -847,14 +611,7 @@ var Info = (_, ref) => {
|
|
|
847
611
|
selectOpen,
|
|
848
612
|
state.service.resources,
|
|
849
613
|
errorList,
|
|
850
|
-
useTotal
|
|
851
|
-
useStartDate,
|
|
852
|
-
useEndDate,
|
|
853
|
-
showResource,
|
|
854
|
-
holderLists,
|
|
855
|
-
multiDayPrices,
|
|
856
|
-
currentTab,
|
|
857
|
-
items
|
|
614
|
+
useTotal
|
|
858
615
|
]);
|
|
859
616
|
};
|
|
860
617
|
var editService_default = (0, import_react.forwardRef)(Info);
|