@pisell/private-materials 6.5.27 → 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/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
- 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/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
- 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
|
@@ -469,19 +469,16 @@ var genRowKey = (key) => {
|
|
|
469
469
|
return `rowKey-${key}`;
|
|
470
470
|
};
|
|
471
471
|
var getGeneralParams = (item, state, isParallelResource) => {
|
|
472
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
472
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
473
473
|
const { pet, service } = state;
|
|
474
474
|
const { holders = [], formData } = pet || {};
|
|
475
475
|
const parallelResourceOtherParams = {};
|
|
476
476
|
let multiResources;
|
|
477
477
|
if (isParallelResource) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
state
|
|
483
|
-
});
|
|
484
|
-
}
|
|
478
|
+
const hasDataItem = (0, import_utils6.getProductExtend)({
|
|
479
|
+
cacheItem: { ...item, new: 0 },
|
|
480
|
+
state
|
|
481
|
+
});
|
|
485
482
|
const { resourceMaps, resources } = hasDataItem._data || {};
|
|
486
483
|
parallelResourceOtherParams.errorMessage = getErrorMessageInfo2(getAllErrorList(hasDataItem));
|
|
487
484
|
multiResources = resources.map((resource) => {
|
|
@@ -521,10 +518,11 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
521
518
|
];
|
|
522
519
|
}
|
|
523
520
|
const isNormalProduct = isNormalProductByDurationSchedule(item);
|
|
521
|
+
const isMultiDay = (0, import_utils6.isMultiDayProduct)(item);
|
|
524
522
|
return {
|
|
525
523
|
format: ["HH:mm", "HH:mm"],
|
|
526
524
|
show_time: true,
|
|
527
|
-
duration_type: "minutes",
|
|
525
|
+
duration_type: isMultiDay ? "days" : "minutes",
|
|
528
526
|
// 当前可选择holder列表
|
|
529
527
|
holders: formatHolders(holders),
|
|
530
528
|
isShowChangeHolder: !isNormalProduct,
|
|
@@ -532,15 +530,17 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
532
530
|
actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
|
533
531
|
actionIcon: "pisell2-clock-plus",
|
|
534
532
|
isMultipleResource: true,
|
|
533
|
+
isFormSubject: ((_e = (_d = (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject) == null ? void 0 : _e.type) === "form",
|
|
534
|
+
holderType: ((_h = (_g = (_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.holder) == null ? void 0 : _g.form) == null ? void 0 : _h.form_type) || "minors",
|
|
535
535
|
multiResources,
|
|
536
536
|
holderMaxCount: item == null ? void 0 : item._extend.quantity,
|
|
537
537
|
holderMode: (item == null ? void 0 : item._extend.quantity) > 1 ? "multiple" : void 0,
|
|
538
538
|
isErrorHolder: getIsSubjectRequire(state),
|
|
539
|
-
addHolderButtonText: ((
|
|
540
|
-
holder_id: (
|
|
541
|
-
start_date: !isNormalProduct ? (
|
|
542
|
-
end_date: !isNormalProduct ? ((
|
|
543
|
-
rowKey: genRowKey((
|
|
539
|
+
addHolderButtonText: ((_j = (_i = formData == null ? void 0 : formData[0]) == null ? void 0 : _i.form) == null ? void 0 : _j.title) || "",
|
|
540
|
+
holder_id: (_k = item == null ? void 0 : item._extend) == null ? void 0 : _k.holder_id,
|
|
541
|
+
start_date: !isNormalProduct ? (_l = item == null ? void 0 : item._extend) == null ? void 0 : _l.startDate : "",
|
|
542
|
+
end_date: !isNormalProduct ? ((_m = item == null ? void 0 : item._extend) == null ? void 0 : _m.endDate) || ((_n = item == null ? void 0 : item._extend) == null ? void 0 : _n.end_date) : "",
|
|
543
|
+
rowKey: genRowKey((_p = (_o = item == null ? void 0 : item._extend) == null ? void 0 : _o.other) == null ? void 0 : _p.rowKey),
|
|
544
544
|
...parallelResourceOtherParams
|
|
545
545
|
};
|
|
546
546
|
};
|
|
@@ -549,8 +549,6 @@ var calcAddTimeTotalPrice = (total, addTimeProducts) => {
|
|
|
549
549
|
};
|
|
550
550
|
var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelResource) => {
|
|
551
551
|
if (!(lists == null ? void 0 : lists.length)) return [];
|
|
552
|
-
const normalList = [];
|
|
553
|
-
const groupList = [];
|
|
554
552
|
const formItem = (item) => {
|
|
555
553
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
556
554
|
const _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
@@ -558,17 +556,13 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
558
556
|
const options = formatOptions((_c = (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.option);
|
|
559
557
|
const bundle = formatBundle((_e = (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle);
|
|
560
558
|
const isNormalProduct = !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || (state == null ? void 0 : state.renderType) === "eventBooking";
|
|
561
|
-
const isNormalProductByDurationScheduleVal = isNormalProductByDurationSchedule(item);
|
|
562
559
|
let resourceItem = {};
|
|
563
560
|
let errorMessage = "";
|
|
564
|
-
if (
|
|
561
|
+
if (_isDayBookingProduct || isGeneral) {
|
|
565
562
|
resourceItem = getResourceItem((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.resource, state);
|
|
566
563
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
567
564
|
}
|
|
568
|
-
|
|
569
|
-
if (isGeneral && !isNormalProductByDurationScheduleVal) {
|
|
570
|
-
generalParams = getGeneralParams(item, state, !!isParallelResource);
|
|
571
|
-
}
|
|
565
|
+
const generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
572
566
|
return {
|
|
573
567
|
id: item == null ? void 0 : item.id,
|
|
574
568
|
_id: item == null ? void 0 : item._id,
|
|
@@ -607,17 +601,23 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
607
601
|
_origin: item
|
|
608
602
|
};
|
|
609
603
|
};
|
|
610
|
-
console.log(normalList, "normalList");
|
|
611
604
|
if (isRenderGroup) {
|
|
612
|
-
|
|
613
|
-
|
|
605
|
+
const normalItemsWithIndex = [];
|
|
606
|
+
const groupItemsWithIndex = [];
|
|
607
|
+
const groupFirstIndexMap = {};
|
|
608
|
+
lists.forEach((item, index) => {
|
|
609
|
+
var _a, _b;
|
|
614
610
|
if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
|
|
615
|
-
|
|
611
|
+
normalItemsWithIndex.push({ item, index });
|
|
616
612
|
} else {
|
|
617
|
-
|
|
613
|
+
const groupId = (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.groupId;
|
|
614
|
+
groupItemsWithIndex.push({ item, index });
|
|
615
|
+
if (groupFirstIndexMap[groupId] === void 0) {
|
|
616
|
+
groupFirstIndexMap[groupId] = index;
|
|
617
|
+
}
|
|
618
618
|
}
|
|
619
619
|
});
|
|
620
|
-
|
|
620
|
+
const groups = groupItemsWithIndex.reduce((prev, { item }) => {
|
|
621
621
|
var _a;
|
|
622
622
|
const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
|
|
623
623
|
if (!prev[groupId]) {
|
|
@@ -626,7 +626,16 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
626
626
|
prev[groupId].push(item);
|
|
627
627
|
return prev;
|
|
628
628
|
}, {});
|
|
629
|
-
|
|
629
|
+
const mergedGroupItems = Object.entries(groups).map(([groupId, items]) => ({
|
|
630
|
+
item: formItem((0, import_utils3.concatBookings)(items)),
|
|
631
|
+
index: groupFirstIndexMap[groupId]
|
|
632
|
+
}));
|
|
633
|
+
const formattedNormalItems = normalItemsWithIndex.map(({ item, index }) => ({
|
|
634
|
+
item: formItem(item),
|
|
635
|
+
index
|
|
636
|
+
}));
|
|
637
|
+
const allItems = [...mergedGroupItems, ...formattedNormalItems].sort((a, b) => a.index - b.index);
|
|
638
|
+
return allItems.map(({ item }) => item);
|
|
630
639
|
} else {
|
|
631
640
|
return lists == null ? void 0 : lists.map((item) => formItem(item));
|
|
632
641
|
}
|
|
@@ -45,6 +45,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
45
45
|
var import_dayjs = __toESM(require("dayjs"));
|
|
46
46
|
var import_utils = require("../utils");
|
|
47
47
|
var import_utils2 = require("../info2/service/addTimeModal/utils");
|
|
48
|
+
var import_utils3 = require("../info2/service/addService/utils");
|
|
48
49
|
var getIsBundleOrCombination = (productDetail) => {
|
|
49
50
|
var _a;
|
|
50
51
|
if ((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) {
|
|
@@ -195,6 +196,9 @@ var isOpenAddTime = (state) => {
|
|
|
195
196
|
return true;
|
|
196
197
|
};
|
|
197
198
|
var isShowAddTime = (state, currentService) => {
|
|
199
|
+
if ((0, import_utils3.isMultiDayProduct)(currentService)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
198
202
|
if (!isOpenAddTime(state)) {
|
|
199
203
|
return false;
|
|
200
204
|
}
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_lodash = require("lodash");
|
|
39
40
|
var import_locales = __toESM(require("./locales"));
|
|
40
41
|
var import_clientCard = __toESM(require("../../../../plus/clientCard"));
|
|
41
42
|
var import_clinetSearch = __toESM(require("../../../../plus/clinetSearch"));
|
|
@@ -75,6 +76,7 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
75
76
|
((_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en"
|
|
76
77
|
);
|
|
77
78
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
79
|
+
var _a2, _b2;
|
|
78
80
|
dispatch({
|
|
79
81
|
type: "setClient",
|
|
80
82
|
payload: {
|
|
@@ -82,6 +84,14 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
82
84
|
edit: true
|
|
83
85
|
}
|
|
84
86
|
});
|
|
87
|
+
if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
|
|
88
|
+
dispatch({
|
|
89
|
+
type: "setService",
|
|
90
|
+
payload: {
|
|
91
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
85
95
|
});
|
|
86
96
|
const {
|
|
87
97
|
customers,
|
|
@@ -148,10 +158,34 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
148
158
|
selectCustomer(null);
|
|
149
159
|
};
|
|
150
160
|
const handleViewClient = (data) => {
|
|
161
|
+
const newSelectedCustomer = (0, import_lodash.cloneDeep)(selectedCustomer);
|
|
151
162
|
state.action({
|
|
152
163
|
type: "pisell1.handleOpenCustomerModal",
|
|
153
164
|
data: { id: state.client.value.id },
|
|
154
165
|
callback: (data2) => {
|
|
166
|
+
console.log("data>>>>>", data2);
|
|
167
|
+
const _selectedCustomer = {
|
|
168
|
+
...newSelectedCustomer || {},
|
|
169
|
+
display_name: (data2 == null ? void 0 : data2.display_name) || "",
|
|
170
|
+
email: (data2 == null ? void 0 : data2.email) || "",
|
|
171
|
+
phone: (data2 == null ? void 0 : data2.phone) || "",
|
|
172
|
+
nickname: (data2 == null ? void 0 : data2.nickname) || "",
|
|
173
|
+
country_calling_code: (data2 == null ? void 0 : data2.country_calling_code) || "",
|
|
174
|
+
first_name: (data2 == null ? void 0 : data2.first_name) || "",
|
|
175
|
+
last_name: (data2 == null ? void 0 : data2.last_name) || "",
|
|
176
|
+
contacts_info: (data2 == null ? void 0 : data2.contacts_info) || null
|
|
177
|
+
};
|
|
178
|
+
selectCustomer(_selectedCustomer);
|
|
179
|
+
if (JSON.stringify((newSelectedCustomer == null ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data2 == null ? void 0 : data2.contacts_info) || {})) {
|
|
180
|
+
dispatch({
|
|
181
|
+
type: "setContactsInfo",
|
|
182
|
+
payload: {
|
|
183
|
+
value: (data2 == null ? void 0 : data2.contacts_info) || {},
|
|
184
|
+
client_id: data2 == null ? void 0 : data2.id
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
handleSearchClient("");
|
|
155
189
|
}
|
|
156
190
|
});
|
|
157
191
|
};
|
|
@@ -237,11 +271,6 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
237
271
|
(0, import_utils3.setHandleSetClient)(handleSetClient);
|
|
238
272
|
}
|
|
239
273
|
}, [isActive]);
|
|
240
|
-
(0, import_react.useEffect)(() => {
|
|
241
|
-
return () => {
|
|
242
|
-
(0, import_utils3.setHandleSetClient)(null);
|
|
243
|
-
};
|
|
244
|
-
}, [isActive]);
|
|
245
274
|
const tags = (0, import_react.useMemo)(() => {
|
|
246
275
|
var _a2;
|
|
247
276
|
if (!selectedCustomer) return;
|
|
@@ -60,6 +60,7 @@ var import_locales2 = require("../../../utils/locales");
|
|
|
60
60
|
var import_ahooks = require("ahooks");
|
|
61
61
|
var import_cartClientCard = __toESM(require("./cartClientCard"));
|
|
62
62
|
var import_materials = require("@pisell/materials");
|
|
63
|
+
var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
|
|
63
64
|
var defaultModules = {
|
|
64
65
|
client: 1,
|
|
65
66
|
date: 1,
|
|
@@ -69,7 +70,7 @@ var defaultModules = {
|
|
|
69
70
|
};
|
|
70
71
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
71
72
|
var Info = (0, import_model.Provider)((props) => {
|
|
72
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
73
74
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
74
75
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
75
76
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -98,7 +99,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
98
99
|
}, []);
|
|
99
100
|
const Toast = (0, import_materials.useToast)();
|
|
100
101
|
(0, import_react.useMemo)(() => {
|
|
101
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2,
|
|
102
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
102
103
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
103
104
|
modal.dispatch({
|
|
104
105
|
type: "setState",
|
|
@@ -107,7 +108,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
107
108
|
...globalState,
|
|
108
109
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
109
110
|
isFranchisee,
|
|
110
|
-
timezone: (
|
|
111
|
+
timezone: (_m2 = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m2.timezone
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
}, [globalState]);
|
|
@@ -298,7 +299,12 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
298
299
|
dispatch: modal.dispatch,
|
|
299
300
|
source: "info"
|
|
300
301
|
},
|
|
301
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
302
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
303
|
+
import_cartClientCard.default,
|
|
304
|
+
{
|
|
305
|
+
clientCardProps: { dropdown: dropdownProps }
|
|
306
|
+
}
|
|
307
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
|
|
302
308
|
"div",
|
|
303
309
|
{
|
|
304
310
|
className: "booking-info-client-line-code",
|
|
@@ -314,7 +320,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
314
320
|
style: { color: "#fff", fontSize: 42 }
|
|
315
321
|
}
|
|
316
322
|
)
|
|
317
|
-
) : null), modules.holder && !((
|
|
323
|
+
) : null), ((_n = (_m = (_l = (_k = (_j = modal == null ? void 0 : modal.state) == null ? void 0 : _j.bookingConfig) == null ? void 0 : _k.config) == null ? void 0 : _l.cart_settings_tab) == null ? void 0 : _m.display_contact_info) == null ? void 0 : _n.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_o = modal.state) == null ? void 0 : _o.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
318
324
|
import_antd.Skeleton,
|
|
319
325
|
{
|
|
320
326
|
loading: globalState.loading,
|
|
@@ -27,12 +27,7 @@ module.exports = __toCommonJS(serve_exports);
|
|
|
27
27
|
var import_utils = require("../utils");
|
|
28
28
|
var import_utils2 = require("./utils");
|
|
29
29
|
var getResourceList = async (params, bookingId = []) => {
|
|
30
|
-
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/resource/list`, params
|
|
31
|
-
cache: {
|
|
32
|
-
mode: "remote_local",
|
|
33
|
-
type: "indexDB"
|
|
34
|
-
}
|
|
35
|
-
});
|
|
30
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/resource/list`, params);
|
|
36
31
|
return (0, import_utils2.getFormatResourceListAndMap)(data, bookingId);
|
|
37
32
|
};
|
|
38
33
|
var createBookings = async (params) => {
|
|
@@ -49,6 +49,7 @@ var import_utils4 = require("@pisell/utils");
|
|
|
49
49
|
var import_ahooks = require("ahooks");
|
|
50
50
|
var import_utils5 = require("../../../info/service2/utils");
|
|
51
51
|
var import_utils6 = require("../../../../ticketBooking/utils");
|
|
52
|
+
var import_utils7 = require("../../../info/service2/Group/utils");
|
|
52
53
|
var shopList = [
|
|
53
54
|
2886,
|
|
54
55
|
4422,
|
|
@@ -223,7 +224,7 @@ var Info = (props) => {
|
|
|
223
224
|
isOS: isSession,
|
|
224
225
|
customer_id: (_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id
|
|
225
226
|
},
|
|
226
|
-
callback: (e, extension_type, detail) => {
|
|
227
|
+
callback: async (e, extension_type, detail) => {
|
|
227
228
|
var _a3, _b3;
|
|
228
229
|
if (lock) {
|
|
229
230
|
return;
|
|
@@ -249,7 +250,10 @@ var Info = (props) => {
|
|
|
249
250
|
},
|
|
250
251
|
new: 1
|
|
251
252
|
};
|
|
252
|
-
|
|
253
|
+
const isMultiDay = (0, import_utils2.isMultiDayProduct)(cacheItem);
|
|
254
|
+
if (isMultiDay) {
|
|
255
|
+
cacheItem._extend.end_date = state.date.value.add(1, "day");
|
|
256
|
+
}
|
|
253
257
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
254
258
|
cacheItem._extend.total = _total;
|
|
255
259
|
cacheItem._extend.origin_total = _total;
|
|
@@ -262,7 +266,19 @@ var Info = (props) => {
|
|
|
262
266
|
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
|
263
267
|
}
|
|
264
268
|
cacheItem = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
265
|
-
|
|
269
|
+
const getMultiDayCacheItem = async (isConcatBookings) => {
|
|
270
|
+
cacheItem = await (0, import_utils2.getMultiDay)({
|
|
271
|
+
start_date: cacheItem._extend.start_date,
|
|
272
|
+
end_date: cacheItem._extend.end_date,
|
|
273
|
+
state,
|
|
274
|
+
cacheItem
|
|
275
|
+
});
|
|
276
|
+
cacheItem = (0, import_utils7.createBookingItemsByGroup)(cacheItem);
|
|
277
|
+
if (isConcatBookings) {
|
|
278
|
+
cacheItem = (0, import_utils7.concatBookings)(cacheItem);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
if (state.renderType === "eventBooking" || isMultiDay) {
|
|
266
282
|
cacheItem.autoClose = false;
|
|
267
283
|
}
|
|
268
284
|
if (cacheItem.autoClose) {
|
|
@@ -289,6 +305,9 @@ var Info = (props) => {
|
|
|
289
305
|
});
|
|
290
306
|
} else {
|
|
291
307
|
(_b3 = window.openBookingEditModal) == null ? void 0 : _b3.call(window);
|
|
308
|
+
if (isMultiDay) {
|
|
309
|
+
await getMultiDayCacheItem(true);
|
|
310
|
+
}
|
|
292
311
|
dispatch({
|
|
293
312
|
type: "setService",
|
|
294
313
|
payload: {
|
|
@@ -79,6 +79,14 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
|
|
|
79
79
|
* @Date: 2024-09-19 20:23
|
|
80
80
|
*/
|
|
81
81
|
export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
|
|
82
|
+
/**
|
|
83
|
+
* @title: 是否是跨日商品
|
|
84
|
+
* @description:
|
|
85
|
+
* @param {any} cacheItem
|
|
86
|
+
* @return {*}
|
|
87
|
+
*/
|
|
88
|
+
export declare const isMultiDayProduct: (product: any) => boolean;
|
|
89
|
+
export declare const getMultiDay: ({ start_date, end_date, state, cacheItem, }: any) => Promise<any>;
|
|
82
90
|
/**
|
|
83
91
|
* @title: 预生成服务的 extend
|
|
84
92
|
* @description:
|
|
@@ -32,11 +32,13 @@ __export(utils_exports, {
|
|
|
32
32
|
formatResources: () => formatResources,
|
|
33
33
|
getDurationProps: () => getDurationProps,
|
|
34
34
|
getFlexibleOption: () => getFlexibleOption,
|
|
35
|
+
getMultiDay: () => getMultiDay,
|
|
35
36
|
getProductExtend: () => getProductExtend,
|
|
36
37
|
getResourceByIds: () => getResourceByIds,
|
|
37
38
|
getTimeObj: () => getTimeObj,
|
|
38
39
|
getTimeSlices: () => getTimeSlices,
|
|
39
40
|
getUsableTime: () => getUsableTime,
|
|
41
|
+
isMultiDayProduct: () => isMultiDayProduct,
|
|
40
42
|
setDefaultCapacitys: () => setDefaultCapacitys,
|
|
41
43
|
setDefaultResource: () => setDefaultResource,
|
|
42
44
|
transServiceList: () => transServiceList
|
|
@@ -51,6 +53,8 @@ var import_AlertTriangle = __toESM(require("@pisell/icon/es/AlertTriangle"));
|
|
|
51
53
|
var import_utils3 = require("../editService/utils");
|
|
52
54
|
var import_mock = require("../../../mock");
|
|
53
55
|
var import_lodash = require("lodash");
|
|
56
|
+
var import_utils4 = require("../../../info/service2/utils");
|
|
57
|
+
var import_utils5 = require("../../../info/utils");
|
|
54
58
|
var getUsableTime = (cacheItem) => {
|
|
55
59
|
try {
|
|
56
60
|
let items = [];
|
|
@@ -138,6 +142,7 @@ var getTimeObj = ({
|
|
|
138
142
|
durationProps
|
|
139
143
|
}) => {
|
|
140
144
|
var _a, _b, _c;
|
|
145
|
+
const isMultiDay = isMultiDayProduct(cacheItem);
|
|
141
146
|
const flexibleOption = getFlexibleOption({
|
|
142
147
|
cacheItem,
|
|
143
148
|
useStartTime,
|
|
@@ -148,7 +153,8 @@ var getTimeObj = ({
|
|
|
148
153
|
});
|
|
149
154
|
let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
|
|
150
155
|
(_c = (_b = (_a = state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.service_time,
|
|
151
|
-
import_utils2.locales.locale
|
|
156
|
+
import_utils2.locales.locale,
|
|
157
|
+
isMultiDay
|
|
152
158
|
);
|
|
153
159
|
let timeSlices = [...obj.timeSlices];
|
|
154
160
|
let durationSlicesBasedOnTime = [...obj.durationSlicesBasedOnTime];
|
|
@@ -157,7 +163,7 @@ var getTimeObj = ({
|
|
|
157
163
|
}
|
|
158
164
|
if (useDuration && !durationSlicesBasedOnTime.some((d) => d.value === useDuration)) {
|
|
159
165
|
durationSlicesBasedOnTime.unshift({
|
|
160
|
-
label: (0, import_utils.getDiscountTime)(useDuration),
|
|
166
|
+
label: (0, import_utils.getDiscountTime)(useDuration, isMultiDay),
|
|
161
167
|
value: useDuration,
|
|
162
168
|
//@ts-ignore
|
|
163
169
|
disabled: true
|
|
@@ -395,13 +401,44 @@ var getIsAutoClose = (cacheItem) => {
|
|
|
395
401
|
}
|
|
396
402
|
);
|
|
397
403
|
};
|
|
404
|
+
var isMultiDayProduct = (product) => {
|
|
405
|
+
var _a;
|
|
406
|
+
return ((_a = product == null ? void 0 : product.duration) == null ? void 0 : _a.type) === "days";
|
|
407
|
+
};
|
|
408
|
+
var getMultiDay = async ({
|
|
409
|
+
start_date,
|
|
410
|
+
end_date,
|
|
411
|
+
state,
|
|
412
|
+
cacheItem
|
|
413
|
+
}) => {
|
|
414
|
+
let _cacheItem = cacheItem || state.service.cacheItem;
|
|
415
|
+
if (isMultiDayProduct(_cacheItem)) {
|
|
416
|
+
const { multiDayPrices, price } = await (0, import_utils4.updateAppointmentServicePrice)(
|
|
417
|
+
state,
|
|
418
|
+
{
|
|
419
|
+
start_date,
|
|
420
|
+
end_date,
|
|
421
|
+
product_id: _cacheItem.product_id
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
_cacheItem._extend.multiDayPrices = (0, import_utils5.getMultiDayPrices)(multiDayPrices || []);
|
|
425
|
+
if (!(multiDayPrices == null ? void 0 : multiDayPrices.length)) {
|
|
426
|
+
_cacheItem._extend.price = price;
|
|
427
|
+
}
|
|
428
|
+
return _cacheItem;
|
|
429
|
+
}
|
|
430
|
+
return _cacheItem;
|
|
431
|
+
};
|
|
398
432
|
var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
399
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
400
|
-
console.time("console.time getProductExtend");
|
|
433
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
401
434
|
const isNew = cacheItem.new || !cacheItem._extend.endDate;
|
|
402
435
|
let _cacheItem = { ...cacheItem };
|
|
403
436
|
const resourcesOriginMap = state.service.resourcesOriginMap || {};
|
|
404
437
|
_cacheItem._data = {};
|
|
438
|
+
if (isMultiDayProduct(cacheItem)) {
|
|
439
|
+
_cacheItem._extend.holder_id = ((_a = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a.holder_id) || [];
|
|
440
|
+
_cacheItem._extend.sub_type = "days";
|
|
441
|
+
}
|
|
405
442
|
if (isNew) {
|
|
406
443
|
_cacheItem._data.timeObj = getTimeObj({
|
|
407
444
|
cacheItem,
|
|
@@ -419,7 +456,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
419
456
|
cacheItem,
|
|
420
457
|
{
|
|
421
458
|
// 此数据用来控制 该商品所展示的资源是自身关联的, 还是全部的
|
|
422
|
-
resourceTab: (
|
|
459
|
+
resourceTab: (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.resource_tab,
|
|
423
460
|
resourcesOrigin: state.service.resourcesOrigin
|
|
424
461
|
}
|
|
425
462
|
);
|
|
@@ -445,10 +482,8 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
445
482
|
state
|
|
446
483
|
});
|
|
447
484
|
if ((0, import_utils.getDuration)(_cacheItem == null ? void 0 : _cacheItem.duration) === "flexible") {
|
|
448
|
-
_cacheItem._extend.duration = (
|
|
449
|
-
const { startDate, endDate } = (0, import_utils.getServiceTimes)(
|
|
450
|
-
_extend: _cacheItem._extend
|
|
451
|
-
});
|
|
485
|
+
_cacheItem._extend.duration = (_f = (_e = (_d = _cacheItem._data.timeObj) == null ? void 0 : _d.durationSlicesBasedOnTime) == null ? void 0 : _e[0]) == null ? void 0 : _f.value;
|
|
486
|
+
const { startDate, endDate } = (0, import_utils.getServiceTimes)(_cacheItem);
|
|
452
487
|
_cacheItem._extend.endDate = endDate;
|
|
453
488
|
}
|
|
454
489
|
}
|
|
@@ -479,7 +514,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
479
514
|
{
|
|
480
515
|
extraResources,
|
|
481
516
|
// 此数据用来控制 该商品所展示的资源是自身关联的, 还是全部的
|
|
482
|
-
resourceTab: (
|
|
517
|
+
resourceTab: (_h = (_g = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _g.config) == null ? void 0 : _h.resource_tab,
|
|
483
518
|
resourcesOrigin: state.service.resourcesOrigin
|
|
484
519
|
}
|
|
485
520
|
);
|
|
@@ -499,7 +534,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
499
534
|
state
|
|
500
535
|
});
|
|
501
536
|
}
|
|
502
|
-
console.
|
|
537
|
+
console.log("_cacheItem_cacheItem", _cacheItem);
|
|
503
538
|
return _cacheItem;
|
|
504
539
|
};
|
|
505
540
|
var transServiceList = (list) => {
|
|
@@ -519,11 +554,13 @@ var transServiceList = (list) => {
|
|
|
519
554
|
formatResources,
|
|
520
555
|
getDurationProps,
|
|
521
556
|
getFlexibleOption,
|
|
557
|
+
getMultiDay,
|
|
522
558
|
getProductExtend,
|
|
523
559
|
getResourceByIds,
|
|
524
560
|
getTimeObj,
|
|
525
561
|
getTimeSlices,
|
|
526
562
|
getUsableTime,
|
|
563
|
+
isMultiDayProduct,
|
|
527
564
|
setDefaultCapacitys,
|
|
528
565
|
setDefaultResource,
|
|
529
566
|
transServiceList
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/info2/service/contactInfoMode/index.tsx
|
|
30
|
+
var contactInfoMode_exports = {};
|
|
31
|
+
__export(contactInfoMode_exports, {
|
|
32
|
+
default: () => contactInfoMode_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(contactInfoMode_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_contactInfo = __toESM(require("../../../../../plus/contactInfo"));
|
|
38
|
+
var import_model = require("../../../info/model");
|
|
39
|
+
var ContactInfoMode = () => {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
42
|
+
console.log("state>>>>>>>>>", state);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i;
|
|
45
|
+
console.log("state>>>>>>>>>111", (_a2 = state == null ? void 0 : state.contacts_info) == null ? void 0 : _a2.client_id);
|
|
46
|
+
console.log("state>>>>>>>>>222", (_b2 = state.client.value) == null ? void 0 : _b2.id);
|
|
47
|
+
if (((_c2 = state.client.value) == null ? void 0 : _c2.id) != ((_d = state == null ? void 0 : state.contacts_info) == null ? void 0 : _d.client_id)) {
|
|
48
|
+
const contactInfo = (_f = (_e = state.client.value) == null ? void 0 : _e.contacts_info) == null ? void 0 : _f.value;
|
|
49
|
+
if (!contactInfo) {
|
|
50
|
+
const {
|
|
51
|
+
first_name,
|
|
52
|
+
last_name,
|
|
53
|
+
phone,
|
|
54
|
+
country_calling_code,
|
|
55
|
+
country_code,
|
|
56
|
+
email
|
|
57
|
+
} = ((_g = state.client) == null ? void 0 : _g.value) || {};
|
|
58
|
+
dispatch({
|
|
59
|
+
type: "setContactsInfo",
|
|
60
|
+
payload: {
|
|
61
|
+
value: {
|
|
62
|
+
first_name: first_name || "",
|
|
63
|
+
last_name: last_name || "",
|
|
64
|
+
phone: {
|
|
65
|
+
phone: phone || "",
|
|
66
|
+
country_calling_code: country_calling_code || "",
|
|
67
|
+
country_code: country_code || ""
|
|
68
|
+
},
|
|
69
|
+
email: email || ""
|
|
70
|
+
},
|
|
71
|
+
client_id: (_h = state.client.value) == null ? void 0 : _h.id
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
dispatch({
|
|
76
|
+
type: "setContactsInfo",
|
|
77
|
+
payload: {
|
|
78
|
+
value: { ...contactInfo || {} },
|
|
79
|
+
client_id: (_i = state.client.value) == null ? void 0 : _i.id
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, [(_a = state.client.value) == null ? void 0 : _a.id, (_b = state == null ? void 0 : state.contacts_info) == null ? void 0 : _b.client_id]);
|
|
85
|
+
const handleSave = (value) => {
|
|
86
|
+
dispatch({
|
|
87
|
+
type: "setContactsInfo",
|
|
88
|
+
payload: { value, edit: true }
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: "24px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: "pisell-lowcode__booking-contact-info-title",
|
|
95
|
+
style: { fontSize: "16px", fontWeight: 500, marginBottom: "8px" }
|
|
96
|
+
},
|
|
97
|
+
import_utils.locales.getText("pisell2.booking.text.contact-info.title")
|
|
98
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
import_contactInfo.default,
|
|
100
|
+
{
|
|
101
|
+
dataSource: ((_c = state.contacts_info) == null ? void 0 : _c.value) || null,
|
|
102
|
+
isShowDelete: false,
|
|
103
|
+
isShowAvatar: false,
|
|
104
|
+
isShowPhone: true,
|
|
105
|
+
isShowEmail: true,
|
|
106
|
+
style: { padding: "14px 0 14px 14px" },
|
|
107
|
+
onSave: handleSave
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
};
|
|
111
|
+
var contactInfoMode_default = ContactInfoMode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare type HolderValue = string | number;
|
|
4
|
+
interface HolderProps {
|
|
5
|
+
state: any;
|
|
6
|
+
cacheItem?: any;
|
|
7
|
+
value?: HolderValue | HolderValue[] | null;
|
|
8
|
+
onChange?: (val: HolderValue | HolderValue[] | null) => void;
|
|
9
|
+
dispatch?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const Holder: React.FC<HolderProps>;
|
|
12
|
+
export default Holder;
|