@pisell/private-materials 6.5.26 → 6.6.1
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 +2 -2
- package/build/lowcode/preview.js +146 -165
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/actionButtons/index.js +34 -20
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +66 -33
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +126 -99
- package/es/components/booking/components/voucher/index.js +25 -9
- package/es/components/booking/dashboard/serve.js +1 -6
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/serve.js +2 -12
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/client/serve.js +2 -11
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/pet/serve.js +1 -6
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +10 -4
- package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +25 -18
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +92 -56
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +49 -9
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/serve.js +1 -6
- package/es/components/booking/info2/service/addService/index.js +146 -89
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +83 -14
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +313 -57
- package/es/components/booking/info2/utilsByBooking.js +19 -14
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +48 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +16 -7
- package/es/components/booking/utils.js +26 -37
- package/es/components/checkout/PaymentModal.js +61 -30
- package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/es/components/checkout/components/ScrollableList/index.js +0 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/eftposPay/linkly/index.js +64 -2
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/list/List.js +3 -0
- package/es/components/pay/toB/components/MX51/index.js +14 -44
- package/es/components/pay/toB/types/index.d.ts +0 -12
- package/es/components/pay/toB/types/index.js +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +419 -794
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +1 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.js +0 -2
- package/es/components/ticketBooking/serve.js +17 -119
- package/es/components/ticketBooking/utils/index.d.ts +7 -1
- package/es/components/ticketBooking/utils/index.js +44 -28
- package/es/hooks/useEngineContext.d.ts +0 -1
- package/es/hooks/useEngineContext.js +0 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/es/plus/productSelect/ProductCard/index.js +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/actionButtons/index.js +11 -2
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +26 -5
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +120 -82
- package/lib/components/booking/components/voucher/index.js +10 -1
- package/lib/components/booking/dashboard/serve.js +1 -6
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/serve.js +2 -12
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/client/serve.js +2 -13
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/pet/serve.js +1 -6
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +5 -3
- package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +8 -17
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +38 -29
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +34 -5
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/serve.js +1 -6
- package/lib/components/booking/info2/service/addService/index.js +22 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +48 -11
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +254 -32
- package/lib/components/booking/info2/utilsByBooking.js +26 -19
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +16 -7
- package/lib/components/booking/utils.js +18 -21
- package/lib/components/checkout/PaymentModal.js +41 -18
- package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/lib/components/checkout/components/ScrollableList/index.js +0 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/eftposPay/linkly/index.js +31 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/list/List.js +3 -0
- package/lib/components/pay/toB/components/MX51/index.js +12 -37
- package/lib/components/pay/toB/types/index.d.ts +0 -12
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +279 -313
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.js +0 -2
- package/lib/components/ticketBooking/serve.js +15 -117
- package/lib/components/ticketBooking/utils/index.d.ts +7 -1
- package/lib/components/ticketBooking/utils/index.js +29 -23
- package/lib/hooks/useEngineContext.d.ts +0 -1
- package/lib/hooks/useEngineContext.js +2 -10
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/lib/plus/productSelect/ProductCard/index.js +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/plus/selectHolder/locales.js +47 -0
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/plus/selectHolder/utils.js +34 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +13 -11
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/printer.js +0 -35
- package/lib/hooks/printer.d.ts +0 -4
|
@@ -40,6 +40,7 @@ var import_model = require("../../../info/model");
|
|
|
40
40
|
var import_duration = __toESM(require("../../../materiels/duration"));
|
|
41
41
|
var import_Capacity = __toESM(require("./Capacity"));
|
|
42
42
|
var import_Resources = __toESM(require("./Resources"));
|
|
43
|
+
var import_Holder = __toESM(require("./Holder"));
|
|
43
44
|
var import_antd = require("antd");
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var import_collapsibleList = __toESM(require("../../../components/collapsibleList"));
|
|
@@ -55,20 +56,29 @@ var import_utilsByBooking = require("../../utilsByBooking");
|
|
|
55
56
|
var import_utils7 = require("../addService/utils");
|
|
56
57
|
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
|
57
58
|
var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
|
|
59
|
+
var import_EditTabs = __toESM(require("../../../info/service/editService/EditTabs"));
|
|
60
|
+
var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
|
|
61
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
62
|
+
var import_utils8 = require("../../../info/service2/Group/utils");
|
|
58
63
|
var submitLock = false;
|
|
59
64
|
var Info = (_, ref) => {
|
|
60
|
-
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, _C, _D, _E, _F, _G, _H, _I;
|
|
65
|
+
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, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
61
66
|
const [form] = import_antd.Form.useForm();
|
|
62
67
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
63
68
|
const useResource = import_antd.Form.useWatch("resource", form);
|
|
64
69
|
const useStartTime = import_antd.Form.useWatch("start_time", form);
|
|
65
70
|
const useDuration = import_antd.Form.useWatch("duration", form);
|
|
71
|
+
const useHolder = import_antd.Form.useWatch("holder", form);
|
|
72
|
+
const useHolderId = import_antd.Form.useWatch("holder_id", form);
|
|
66
73
|
const useNote = import_antd.Form.useWatch("note", form);
|
|
74
|
+
const useStartDate = import_antd.Form.useWatch("start_date", form);
|
|
75
|
+
const useEndDate = import_antd.Form.useWatch("end_date", form);
|
|
67
76
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
68
77
|
const resourcesRef = (0, import_react.useRef)(null);
|
|
69
78
|
const isChangeTotal = (0, import_react.useRef)(false);
|
|
70
79
|
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
|
71
80
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
81
|
+
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
72
82
|
(0, import_react.useEffect)(() => {
|
|
73
83
|
window.openBookingEditModal = () => {
|
|
74
84
|
setOpen(true);
|
|
@@ -123,6 +133,7 @@ var Info = (_, ref) => {
|
|
|
123
133
|
}, [durationProps, import_utils.locales.locale]);
|
|
124
134
|
const timeObj = (0, import_react.useMemo)(() => {
|
|
125
135
|
const val2 = (0, import_utils7.getTimeObj)({
|
|
136
|
+
cacheItem: getCurrentCacheItem(),
|
|
126
137
|
durationProps,
|
|
127
138
|
useStartTime,
|
|
128
139
|
currentResource,
|
|
@@ -187,7 +198,7 @@ var Info = (_, ref) => {
|
|
|
187
198
|
form.setFieldsValue({ discount });
|
|
188
199
|
};
|
|
189
200
|
const onFinish = (values) => {
|
|
190
|
-
var _a2, _b2, _c2, _d2;
|
|
201
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
191
202
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
192
203
|
if (isShowTimeAndResource && !isSuccess) {
|
|
193
204
|
return;
|
|
@@ -212,29 +223,63 @@ var Info = (_, ref) => {
|
|
|
212
223
|
},
|
|
213
224
|
...values
|
|
214
225
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
226
|
+
if (isEditGroup) {
|
|
227
|
+
_extend.quantity = 1;
|
|
228
|
+
_extend.startDate = _extend == null ? void 0 : _extend.start_date;
|
|
229
|
+
_extend.endDate = _extend == null ? void 0 : _extend.end_date;
|
|
230
|
+
} else {
|
|
231
|
+
const { startDate, endDate } = (0, import_utils6.getServiceTimes)({ _extend });
|
|
232
|
+
_extend.startDate = startDate;
|
|
233
|
+
_extend.endDate = endDate;
|
|
234
|
+
}
|
|
218
235
|
if (_extend.bundle_edit !== void 0) {
|
|
219
236
|
_extend.bundle_edit = 1;
|
|
220
237
|
}
|
|
221
238
|
_item._extend = _extend;
|
|
222
239
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
223
240
|
_item._serviceKey = (0, import_utils3.genServiceKey)(_item);
|
|
241
|
+
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
242
|
+
if (((_d2 = (_c2 = _item._extend) == null ? void 0 : _c2.holder_id) == null ? void 0 : _d2.length) > 1 || ((_e2 = _item._extend) == null ? void 0 : _e2.quantity) > 1 && ((_g2 = (_f2 = _item._extend) == null ? void 0 : _f2.holder_id) == null ? void 0 : _g2.length) >= 1) {
|
|
243
|
+
let holder_ids = _item._extend.holder_id;
|
|
244
|
+
_item._extend.holder_id = holder_ids[0];
|
|
245
|
+
holder_ids = holder_ids.slice(1);
|
|
246
|
+
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
247
|
+
holder_ids.forEach((holder_id) => {
|
|
248
|
+
const newItem = { ..._item, _id: (0, import_utils.getUniqueId)(), _extend: { ..._item._extend, holder_id: [holder_id], quantity: 1 } };
|
|
249
|
+
newItem._holderKey = (0, import_utils3.genHolderKey)(newItem);
|
|
250
|
+
_list.unshift(newItem);
|
|
251
|
+
_item._extend.quantity -= 1;
|
|
252
|
+
});
|
|
253
|
+
if (_item._extend.quantity > 1) {
|
|
254
|
+
const newItem = { ..._item, _id: (0, import_utils.getUniqueId)(), _extend: { ..._item._extend, holder_id: void 0, quantity: _item._extend.quantity - 1 } };
|
|
255
|
+
newItem._holderKey = (0, import_utils3.genHolderKey)(newItem);
|
|
256
|
+
_list.unshift(newItem);
|
|
257
|
+
_item._extend.quantity = 1;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
224
260
|
let _id = _item == null ? void 0 : _item._id;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
_list =
|
|
261
|
+
let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
|
|
262
|
+
if (groupId) {
|
|
263
|
+
_list = _list.filter((d) => {
|
|
264
|
+
var _a3;
|
|
265
|
+
return ((_a3 = d._extend) == null ? void 0 : _a3.groupId) !== groupId;
|
|
266
|
+
});
|
|
267
|
+
_list = _list.concat((0, import_utils8.createBookingItemsByGroup)(_item, true));
|
|
228
268
|
} else {
|
|
229
|
-
if (
|
|
230
|
-
|
|
269
|
+
if (!_list.some((d) => d._id === _id)) {
|
|
270
|
+
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
271
|
+
_list = detail.list;
|
|
272
|
+
} else {
|
|
273
|
+
if (isChangeTotal.current) {
|
|
274
|
+
delete _item.discount_list;
|
|
275
|
+
}
|
|
276
|
+
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
231
277
|
}
|
|
232
|
-
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
233
278
|
}
|
|
234
279
|
(0, import_utils6.deleteCacheParams)();
|
|
235
280
|
console.log("_onFinish", _list);
|
|
236
281
|
form.resetFields();
|
|
237
|
-
if (!!((
|
|
282
|
+
if (!!((_i2 = state.service.cacheItem) == null ? void 0 : _i2.new)) {
|
|
238
283
|
window.dispatchEvent(
|
|
239
284
|
new CustomEvent("onAddNewService", {
|
|
240
285
|
detail: {
|
|
@@ -243,7 +288,15 @@ var Info = (_, ref) => {
|
|
|
243
288
|
})
|
|
244
289
|
);
|
|
245
290
|
}
|
|
246
|
-
(
|
|
291
|
+
(_j2 = window.closeBookingEditModal) == null ? void 0 : _j2.call(window);
|
|
292
|
+
_list.sort((a, b) => {
|
|
293
|
+
var _a3, _b3;
|
|
294
|
+
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
295
|
+
const bHasHolderId = ((_b3 = b._extend) == null ? void 0 : _b3.holder_id) && (Array.isArray(b._extend.holder_id) ? b._extend.holder_id.length > 0 : true);
|
|
296
|
+
if (!aHasHolderId && bHasHolderId) return -1;
|
|
297
|
+
if (aHasHolderId && !bHasHolderId) return 1;
|
|
298
|
+
return 0;
|
|
299
|
+
});
|
|
247
300
|
dispatch({
|
|
248
301
|
type: "setService",
|
|
249
302
|
payload: {
|
|
@@ -270,6 +323,7 @@ var Info = (_, ref) => {
|
|
|
270
323
|
(_cacheItem, open2, openProductDetail) => {
|
|
271
324
|
console.timeEnd("handleChange");
|
|
272
325
|
console.log("setEditDatasetEditData", _cacheItem, open2);
|
|
326
|
+
setCurrentTab("batch_edit");
|
|
273
327
|
isChangeTotal.current = false;
|
|
274
328
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
275
329
|
let values = cacheItem._extend;
|
|
@@ -277,9 +331,9 @@ var Info = (_, ref) => {
|
|
|
277
331
|
console.log(startTime2, "startTime");
|
|
278
332
|
form.resetFields();
|
|
279
333
|
form.setFieldsValue(values);
|
|
280
|
-
const
|
|
281
|
-
console.log(
|
|
282
|
-
console.log("执行时间",
|
|
334
|
+
const endTime2 = performance.now();
|
|
335
|
+
console.log(endTime2 - window.pp1, "打开商品5");
|
|
336
|
+
console.log("执行时间", endTime2 - startTime2, values);
|
|
283
337
|
setTimeout(() => {
|
|
284
338
|
}, 20);
|
|
285
339
|
if (openProductDetail) {
|
|
@@ -296,9 +350,10 @@ var Info = (_, ref) => {
|
|
|
296
350
|
return cPrice !== oPrice;
|
|
297
351
|
}, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
|
|
298
352
|
const getResources = () => {
|
|
353
|
+
var _a2, _b2;
|
|
299
354
|
let res = (0, import_utils7.formatResources)({
|
|
300
355
|
cacheItem: getCurrentCacheItem(),
|
|
301
|
-
resourcesOrigin: state.service.cacheItem._data.resourcesOrigin
|
|
356
|
+
resourcesOrigin: (_b2 = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._data) == null ? void 0 : _b2.resourcesOrigin
|
|
302
357
|
});
|
|
303
358
|
dispatch({
|
|
304
359
|
type: "setService",
|
|
@@ -482,6 +537,18 @@ var Info = (_, ref) => {
|
|
|
482
537
|
}, [state.renderType, isNormalProduct]);
|
|
483
538
|
const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
|
|
484
539
|
const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
|
|
540
|
+
const items = (0, import_react.useMemo)(() => {
|
|
541
|
+
var _a2, _b2;
|
|
542
|
+
return ((_b2 = (_a2 = getCurrentCacheItem()) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.items) || [];
|
|
543
|
+
}, [
|
|
544
|
+
getCurrentCacheItem(),
|
|
545
|
+
state.service.cacheItem,
|
|
546
|
+
currentResource,
|
|
547
|
+
useTotal
|
|
548
|
+
]);
|
|
549
|
+
const isEditGroup = (0, import_react.useMemo)(() => {
|
|
550
|
+
return items.length;
|
|
551
|
+
}, [items]);
|
|
485
552
|
const handleNoteConfirm = (noteValue) => {
|
|
486
553
|
form.setFieldsValue({ note: noteValue });
|
|
487
554
|
setNoteModalOpen(false);
|
|
@@ -564,16 +631,28 @@ var Info = (_, ref) => {
|
|
|
564
631
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
565
632
|
)) : null;
|
|
566
633
|
}, [isReason]);
|
|
634
|
+
const DateCom = (position) => {
|
|
635
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
636
|
+
import_antd.DatePicker,
|
|
637
|
+
{
|
|
638
|
+
className: "pisell-lowcode__booking-service-select-date",
|
|
639
|
+
disabledDate: (current) => (0, import_utils4.disabledDate)(current, position, state.date.value),
|
|
640
|
+
size: "large",
|
|
641
|
+
style: { width: "100%" },
|
|
642
|
+
format: state.locale === "en" ? "DD/MM/YYYY" : "YYYY-MM-DD"
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
};
|
|
567
646
|
const startTime = (0, import_react.useMemo)(() => {
|
|
568
647
|
var _a2, _b2, _c2, _d2;
|
|
569
648
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
570
649
|
import_antd.Form.Item,
|
|
571
650
|
{
|
|
572
|
-
label: import_utils.locales.getText("pisell2.text.start_time"),
|
|
573
|
-
name: "start_time",
|
|
651
|
+
label: import_utils.locales.getText(isEditGroup ? "pisell2.text.start_date" : "pisell2.text.start_time"),
|
|
652
|
+
name: isEditGroup ? "start_date" : "start_time",
|
|
574
653
|
rules: [{ required: true }]
|
|
575
654
|
},
|
|
576
|
-
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
655
|
+
isEditGroup ? DateCom("start") : SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
577
656
|
SelectTime,
|
|
578
657
|
{
|
|
579
658
|
slice: (_d2 = (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time) == null ? void 0 : _d2.value,
|
|
@@ -586,10 +665,23 @@ var Info = (_, ref) => {
|
|
|
586
665
|
}
|
|
587
666
|
) : null
|
|
588
667
|
));
|
|
589
|
-
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value]);
|
|
668
|
+
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value, isEditGroup]);
|
|
669
|
+
const endTime = (0, import_react.useMemo)(() => {
|
|
670
|
+
if (!isEditGroup) {
|
|
671
|
+
return null;
|
|
672
|
+
}
|
|
673
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
674
|
+
import_antd.Form.Item,
|
|
675
|
+
{
|
|
676
|
+
label: import_utils.locales.getText("pisell2.text.end_date"),
|
|
677
|
+
name: "end_date"
|
|
678
|
+
},
|
|
679
|
+
DateCom("end")
|
|
680
|
+
));
|
|
681
|
+
}, [isEditGroup]);
|
|
590
682
|
const duration = (0, import_react.useMemo)(() => {
|
|
591
683
|
console.log("render form duration");
|
|
592
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
684
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: isEditGroup ? 24 : 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
593
685
|
import_antd.Form.Item,
|
|
594
686
|
{
|
|
595
687
|
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
@@ -598,7 +690,7 @@ var Info = (_, ref) => {
|
|
|
598
690
|
},
|
|
599
691
|
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
|
600
692
|
));
|
|
601
|
-
}, [durationProps, timeObj]);
|
|
693
|
+
}, [durationProps, timeObj, isEditGroup]);
|
|
602
694
|
const resource = (0, import_react.useMemo)(() => {
|
|
603
695
|
console.log("render form resource");
|
|
604
696
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -615,6 +707,38 @@ var Info = (_, ref) => {
|
|
|
615
707
|
(_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
|
|
616
708
|
(_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
|
|
617
709
|
]);
|
|
710
|
+
const holder = (0, import_react.useMemo)(() => {
|
|
711
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
712
|
+
const showExtra = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.subject_require) === "require" && (!useHolderId || (useHolderId == null ? void 0 : useHolderId.length) < ((_e2 = (_d2 = state.service.cacheItem) == null ? void 0 : _d2._extend) == null ? void 0 : _e2.quantity));
|
|
713
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
714
|
+
import_antd.Form.Item,
|
|
715
|
+
{
|
|
716
|
+
name: "holder_id",
|
|
717
|
+
style: { width: "100%" },
|
|
718
|
+
rules: [
|
|
719
|
+
{
|
|
720
|
+
required: ((_h2 = (_g2 = (_f2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f2.config) == null ? void 0 : _g2.basic) == null ? void 0 : _h2.subject_require) === "require",
|
|
721
|
+
validator: (rule, value, callback) => {
|
|
722
|
+
debugger;
|
|
723
|
+
if (showExtra) {
|
|
724
|
+
callback(import_utils.locales.getText("page.booking.text.holder.length-error"));
|
|
725
|
+
} else {
|
|
726
|
+
callback();
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
733
|
+
import_Holder.default,
|
|
734
|
+
{
|
|
735
|
+
state,
|
|
736
|
+
cacheItem: state.service.cacheItem,
|
|
737
|
+
dispatch
|
|
738
|
+
}
|
|
739
|
+
)
|
|
740
|
+
));
|
|
741
|
+
}, [state.pet, state.client, state.service.cacheItem, useHolderId]);
|
|
618
742
|
const capacity = (0, import_react.useMemo)(() => {
|
|
619
743
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(import_Capacity.default, { state, cacheItem: state.service.cacheItem }));
|
|
620
744
|
}, [
|
|
@@ -717,6 +841,91 @@ var Info = (_, ref) => {
|
|
|
717
841
|
setVal(false);
|
|
718
842
|
}
|
|
719
843
|
}, [isShowTimeAndResource]);
|
|
844
|
+
const groupDom = (0, import_react.useMemo)(() => {
|
|
845
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!isEditGroup && /* @__PURE__ */ import_react.default.createElement(
|
|
846
|
+
import_EditTabs.default,
|
|
847
|
+
{
|
|
848
|
+
value: currentTab,
|
|
849
|
+
onChange: (e) => {
|
|
850
|
+
console.log(e);
|
|
851
|
+
setCurrentTab(e);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
className: "",
|
|
858
|
+
style: {
|
|
859
|
+
display: currentTab === "booking_list" ? "block" : "none"
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
/* @__PURE__ */ import_react.default.createElement(import_BookingList.default, { items })
|
|
863
|
+
));
|
|
864
|
+
}, [isEditGroup, currentTab, items]);
|
|
865
|
+
const updateMultiDay = async ({ start_date, end_date, duration: duration2 }) => {
|
|
866
|
+
const cacheItem = await (0, import_utils7.getMultiDay)({
|
|
867
|
+
start_date,
|
|
868
|
+
end_date,
|
|
869
|
+
state,
|
|
870
|
+
cacheItem: getCurrentCacheItem()
|
|
871
|
+
});
|
|
872
|
+
if (duration2 !== void 0) {
|
|
873
|
+
cacheItem._extend.duration = duration2;
|
|
874
|
+
}
|
|
875
|
+
cacheItem._extend.items = (0, import_utils8.createBookingItemsByGroup)(cacheItem);
|
|
876
|
+
cacheItem._extend = {
|
|
877
|
+
...cacheItem._extend,
|
|
878
|
+
...(0, import_utils8.getGroupTotalPrice)(cacheItem._extend.items)
|
|
879
|
+
};
|
|
880
|
+
dispatch({
|
|
881
|
+
type: "setService",
|
|
882
|
+
payload: {
|
|
883
|
+
cacheItem
|
|
884
|
+
}
|
|
885
|
+
});
|
|
886
|
+
let fieldsValues = {
|
|
887
|
+
total: cacheItem._extend.total
|
|
888
|
+
};
|
|
889
|
+
form.setFieldsValue(fieldsValues);
|
|
890
|
+
};
|
|
891
|
+
const onValuesChange = (changedValues) => {
|
|
892
|
+
if (isEditGroup) {
|
|
893
|
+
if (changedValues == null ? void 0 : changedValues.duration) {
|
|
894
|
+
const end_date = (0, import_dayjs.default)(useStartDate).add(
|
|
895
|
+
changedValues == null ? void 0 : changedValues.duration,
|
|
896
|
+
"day"
|
|
897
|
+
);
|
|
898
|
+
form.setFieldsValue({
|
|
899
|
+
end_date
|
|
900
|
+
});
|
|
901
|
+
return updateMultiDay({
|
|
902
|
+
start_date: useStartDate,
|
|
903
|
+
end_date,
|
|
904
|
+
duration: changedValues == null ? void 0 : changedValues.duration
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
if (changedValues == null ? void 0 : changedValues.start_date) {
|
|
908
|
+
const startDate = (0, import_dayjs.default)(changedValues == null ? void 0 : changedValues.start_date);
|
|
909
|
+
const endDate = (0, import_dayjs.default)(useEndDate);
|
|
910
|
+
if (startDate.isAfter(endDate)) {
|
|
911
|
+
return form.setFieldsValue({
|
|
912
|
+
duration: void 0,
|
|
913
|
+
end_date: void 0
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if ((changedValues == null ? void 0 : changedValues.start_date) || (changedValues == null ? void 0 : changedValues.end_date)) {
|
|
918
|
+
const cacheItem = getCurrentCacheItem();
|
|
919
|
+
const duration2 = (0, import_utils6.getDays)(cacheItem, "days");
|
|
920
|
+
const start_date = (changedValues == null ? void 0 : changedValues.start_date) || useStartDate;
|
|
921
|
+
const end_date = (changedValues == null ? void 0 : changedValues.end_date) || useEndDate;
|
|
922
|
+
updateMultiDay({ start_date, end_date, duration: duration2 });
|
|
923
|
+
return form.setFieldsValue({
|
|
924
|
+
duration: duration2
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
};
|
|
720
929
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
721
930
|
import_drawer.default,
|
|
722
931
|
{
|
|
@@ -739,16 +948,29 @@ var Info = (_, ref) => {
|
|
|
739
948
|
});
|
|
740
949
|
}
|
|
741
950
|
},
|
|
742
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" },
|
|
743
|
-
|
|
951
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, groupDom, /* @__PURE__ */ import_react.default.createElement(
|
|
952
|
+
import_antd.Form,
|
|
744
953
|
{
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
954
|
+
layout: "vertical",
|
|
955
|
+
form,
|
|
956
|
+
onFinish,
|
|
957
|
+
onValuesChange,
|
|
958
|
+
style: {
|
|
959
|
+
display: currentTab === "batch_edit" ? "block" : "none"
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_K = (_J = state.client) == null ? void 0 : _J.value) == null ? void 0 : _K.id) && holder),
|
|
963
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
|
|
964
|
+
import_noteModal.default,
|
|
965
|
+
{
|
|
966
|
+
open: noteModalOpen,
|
|
967
|
+
value: form.getFieldValue("note"),
|
|
968
|
+
onConfirm: handleNoteConfirm,
|
|
969
|
+
onDelete: handleNoteDelete,
|
|
970
|
+
onCancel: handleNoteCancel
|
|
971
|
+
}
|
|
972
|
+
))
|
|
973
|
+
), footer)
|
|
752
974
|
));
|
|
753
975
|
};
|
|
754
976
|
var editService_default = (0, import_react.forwardRef)(Info);
|
|
@@ -42,8 +42,8 @@ module.exports = __toCommonJS(utilsByBooking_exports);
|
|
|
42
42
|
var import_dayjs = __toESM(require("dayjs"));
|
|
43
43
|
var import_utils = require("@pisell/utils");
|
|
44
44
|
var import_utils2 = require("../utils");
|
|
45
|
-
var import_utils3 = require("
|
|
46
|
-
var import_utils4 = require("
|
|
45
|
+
var import_utils3 = require("../../ticketBooking/components/addServiceVariant/utils");
|
|
46
|
+
var import_utils4 = require("./service/addService/utils");
|
|
47
47
|
var getUseableEventCount = (eventList, current) => {
|
|
48
48
|
return (eventList || []).reduce((pre, event) => {
|
|
49
49
|
return pre - event.pax;
|
|
@@ -219,14 +219,21 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
const appointmentTimingPreference = getAppointmentTimingPreference(state);
|
|
222
|
-
let lastServer = (0, import_utils2.getLastServer)((_a = state.service.value) == null ? void 0 : _a.filter((item) => !item.isCustomItem
|
|
222
|
+
let lastServer = (0, import_utils2.getLastServer)((_a = state.service.value) == null ? void 0 : _a.filter((item) => !item.isCustomItem));
|
|
223
|
+
const getDuration = (cacheItem2) => {
|
|
224
|
+
var _a2;
|
|
225
|
+
if ((0, import_utils4.isMultiDayProduct)(cacheItem2)) {
|
|
226
|
+
return (0, import_utils2.getDays)(cacheItem2, "days");
|
|
227
|
+
}
|
|
228
|
+
return (0, import_utils2.findNextDuration)(
|
|
229
|
+
cacheItem2.duration,
|
|
230
|
+
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
|
231
|
+
(_a2 = cacheItem2 == null ? void 0 : cacheItem2.duration) == null ? void 0 : _a2.value
|
|
232
|
+
);
|
|
233
|
+
};
|
|
223
234
|
let _extend = {
|
|
224
235
|
// 时长: 当前商品时长 > 第一个时长
|
|
225
|
-
duration: (
|
|
226
|
-
cacheItem.duration,
|
|
227
|
-
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
|
228
|
-
(_b = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _b.value
|
|
229
|
-
)
|
|
236
|
+
duration: getDuration(cacheItem)
|
|
230
237
|
};
|
|
231
238
|
if (lastServer) {
|
|
232
239
|
let lastServerStartDate = lastServer._extend.startDate;
|
|
@@ -235,9 +242,9 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
235
242
|
_extend.start_time = lastServerStartDate.format("HH:mm");
|
|
236
243
|
} else {
|
|
237
244
|
if ((0, import_dayjs.default)(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
|
238
|
-
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[((
|
|
245
|
+
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[((_b = timeObj == null ? void 0 : timeObj.timeSlices) == null ? void 0 : _b.length) - 1].value;
|
|
239
246
|
} else {
|
|
240
|
-
_extend.start_time = lastServerEndDate.format("HH:mm");
|
|
247
|
+
_extend.start_time = (_c = lastServerEndDate || (0, import_dayjs.default)()) == null ? void 0 : _c.format("HH:mm");
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
250
|
} else {
|
|
@@ -265,19 +272,19 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
265
272
|
..._extend,
|
|
266
273
|
...cacheItem._extend
|
|
267
274
|
};
|
|
268
|
-
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({
|
|
275
|
+
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({
|
|
276
|
+
...cacheItem,
|
|
277
|
+
_extend
|
|
278
|
+
});
|
|
269
279
|
_extend.startDate = startDate;
|
|
270
280
|
_extend.endDate = endDate;
|
|
271
281
|
const session = (_e = (_d = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.session;
|
|
272
282
|
if ((0, import_utils2.isSessionProduct)(cacheItem) && session) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
_extend.start_date = startAt;
|
|
276
|
-
_extend.startDate = startAt;
|
|
283
|
+
_extend.start_date = session.start_at;
|
|
284
|
+
_extend.startDate = session.start_at;
|
|
277
285
|
_extend.start_time = session.start_time;
|
|
278
|
-
_extend.end_date =
|
|
279
|
-
_extend.endDate =
|
|
280
|
-
_extend.end_time = session.end_time;
|
|
286
|
+
_extend.end_date = session.end_at;
|
|
287
|
+
_extend.endDate = session.end_at;
|
|
281
288
|
_extend.duration = (0, import_utils2.getDays)({ _extend }, "minutes");
|
|
282
289
|
}
|
|
283
290
|
return _extend;
|
|
@@ -290,7 +297,7 @@ var getIsNoSpecAndPackage = (product) => {
|
|
|
290
297
|
if (product == null ? void 0 : product.isEditBooking) {
|
|
291
298
|
return ((_a = product == null ? void 0 : product.product_bundle) == null ? void 0 : _a.length) === 0 && (product == null ? void 0 : product.product_variant_id) === 0 && (((_c = (_b = product == null ? void 0 : product.product_sku) == null ? void 0 : _b.option) == null ? void 0 : _c.length) || 0) === 0;
|
|
292
299
|
}
|
|
293
|
-
return (product == null ? void 0 : product.is_bundle) === 0 && (((_d = product == null ? void 0 : product.variant) == null ? void 0 : _d.length) || 0) === 0 && !(0,
|
|
300
|
+
return (product == null ? void 0 : product.is_bundle) === 0 && (((_d = product == null ? void 0 : product.variant) == null ? void 0 : _d.length) || 0) === 0 && !(0, import_utils3.isOption)(product);
|
|
294
301
|
};
|
|
295
302
|
// Annotate the CommonJS export names for ESM import in node:
|
|
296
303
|
0 && (module.exports = {
|