@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
|
@@ -51,6 +51,7 @@ var import_index = require("./index.less");
|
|
|
51
51
|
var import_serve2 = require("./serve");
|
|
52
52
|
var import_utils3 = require("./utils");
|
|
53
53
|
var import_noteModal = __toESM(require("../../../../plus/noteModal"));
|
|
54
|
+
var import_confirmHolderModal = require("../../utils/confirmHolderModal");
|
|
54
55
|
var import__ = require("../../../../index");
|
|
55
56
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
56
57
|
var import_utils4 = require("@pisell/utils");
|
|
@@ -61,6 +62,7 @@ var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCusto
|
|
|
61
62
|
var import_ahooks = require("ahooks");
|
|
62
63
|
var import_lodash = require("lodash");
|
|
63
64
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
65
|
+
var import_utils5 = require("../../utils");
|
|
64
66
|
var Footer = (props) => {
|
|
65
67
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
66
68
|
const { state, buttons, dispatch, source } = props;
|
|
@@ -205,7 +207,7 @@ var Footer = (props) => {
|
|
|
205
207
|
return false;
|
|
206
208
|
}, [(_h = state.addons) == null ? void 0 : _h.edit]);
|
|
207
209
|
const infoEdit = (0, import_react.useMemo)(() => {
|
|
208
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
210
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
209
211
|
if (!state.bookingId) {
|
|
210
212
|
return true;
|
|
211
213
|
}
|
|
@@ -227,6 +229,9 @@ var Footer = (props) => {
|
|
|
227
229
|
if ((_f2 = state.contacts) == null ? void 0 : _f2.edit) {
|
|
228
230
|
return true;
|
|
229
231
|
}
|
|
232
|
+
if ((_g2 = state.contacts_info) == null ? void 0 : _g2.edit) {
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
230
235
|
return false;
|
|
231
236
|
}, [state]);
|
|
232
237
|
const isEdit = (0, import_react.useMemo)(() => {
|
|
@@ -593,12 +598,19 @@ var Footer = (props) => {
|
|
|
593
598
|
messageShow = true,
|
|
594
599
|
noSubmit = false
|
|
595
600
|
}) => {
|
|
596
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
601
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
597
602
|
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
598
603
|
if ((0, import_utils2.isDayBooking)(state)) {
|
|
599
604
|
const isHasDayProducts = handleDaySubmit();
|
|
600
605
|
if (isHasDayProducts) return;
|
|
601
606
|
}
|
|
607
|
+
const hasUnspecifiedHolderProduct = (_a2 = state.service.value) == null ? void 0 : _a2.some((item) => {
|
|
608
|
+
var _a3, _b3, _c3;
|
|
609
|
+
return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
|
|
610
|
+
});
|
|
611
|
+
if (!(0, import_utils5.isWalkIn)((_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id) && (0, import_utils2.getIsSubjectRequire)(state) && hasUnspecifiedHolderProduct) {
|
|
612
|
+
await (0, import_confirmHolderModal.showConfirmHolderModal)(state, dispatch);
|
|
613
|
+
}
|
|
602
614
|
if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
|
|
603
615
|
return;
|
|
604
616
|
}
|
|
@@ -609,7 +621,7 @@ var Footer = (props) => {
|
|
|
609
621
|
const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
|
|
610
622
|
let saveOtherValue = {};
|
|
611
623
|
if (type === "save") {
|
|
612
|
-
saveOtherValue = await ((
|
|
624
|
+
saveOtherValue = await ((_d2 = state == null ? void 0 : state.onSave) == null ? void 0 : _d2.call(state, state.client)) || {};
|
|
613
625
|
}
|
|
614
626
|
try {
|
|
615
627
|
let callbackData = null;
|
|
@@ -655,7 +667,7 @@ var Footer = (props) => {
|
|
|
655
667
|
{ key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
|
|
656
668
|
{
|
|
657
669
|
key: "店铺id",
|
|
658
|
-
value: (
|
|
670
|
+
value: (_h2 = (_g2 = (_f2 = (_e2 = store == null ? void 0 : store.getState) == null ? void 0 : _e2.call(store)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id
|
|
659
671
|
},
|
|
660
672
|
{
|
|
661
673
|
key: "shopApi",
|
|
@@ -1241,6 +1253,7 @@ var Footer = (props) => {
|
|
|
1241
1253
|
}
|
|
1242
1254
|
};
|
|
1243
1255
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
1256
|
+
var _a2, _b2;
|
|
1244
1257
|
dispatch({
|
|
1245
1258
|
type: "setClient",
|
|
1246
1259
|
payload: {
|
|
@@ -1248,6 +1261,14 @@ var Footer = (props) => {
|
|
|
1248
1261
|
edit: true
|
|
1249
1262
|
}
|
|
1250
1263
|
});
|
|
1264
|
+
if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
|
|
1265
|
+
dispatch({
|
|
1266
|
+
type: "setService",
|
|
1267
|
+
payload: {
|
|
1268
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1251
1272
|
});
|
|
1252
1273
|
const { selectCustomer } = (0, import_useCustomer.useCustomer)({
|
|
1253
1274
|
changeCustomerToGlobalState
|
|
@@ -1430,6 +1451,6 @@ var Footer = (props) => {
|
|
|
1430
1451
|
}
|
|
1431
1452
|
}
|
|
1432
1453
|
}
|
|
1433
|
-
));
|
|
1454
|
+
), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
|
|
1434
1455
|
};
|
|
1435
1456
|
var footer_default = Footer;
|
|
@@ -37,5 +37,12 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
|
|
|
37
37
|
* @Date: 2024-12-23 12:05
|
|
38
38
|
*/
|
|
39
39
|
export declare const formatProductPrice: (item: any) => number;
|
|
40
|
+
/**
|
|
41
|
+
* @title: 是否包含跨日预约商品
|
|
42
|
+
* @description:
|
|
43
|
+
* @param {any} data
|
|
44
|
+
* @return {*}
|
|
45
|
+
*/
|
|
46
|
+
export declare const getHasMultiDayProduct: (data: any) => any;
|
|
40
47
|
export declare const formatValues: (state: any) => any;
|
|
41
48
|
export declare const checkHolderIsError: (state: any) => any;
|
|
@@ -35,7 +35,8 @@ __export(utils_exports, {
|
|
|
35
35
|
formatProductBundle: () => formatProductBundle,
|
|
36
36
|
formatProductOption: () => formatProductOption,
|
|
37
37
|
formatProductPrice: () => formatProductPrice,
|
|
38
|
-
formatValues: () => formatValues
|
|
38
|
+
formatValues: () => formatValues,
|
|
39
|
+
getHasMultiDayProduct: () => getHasMultiDayProduct
|
|
39
40
|
});
|
|
40
41
|
module.exports = __toCommonJS(utils_exports);
|
|
41
42
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -74,10 +75,10 @@ var formatProductOption = (option) => {
|
|
|
74
75
|
}
|
|
75
76
|
return option.map((d) => {
|
|
76
77
|
return {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
num: d.num,
|
|
79
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
80
|
+
option_group_id: d.option_group_id,
|
|
81
|
+
custom_add_price: Number(d == null ? void 0 : d.add_price)
|
|
81
82
|
};
|
|
82
83
|
});
|
|
83
84
|
};
|
|
@@ -95,7 +96,9 @@ var formatProductBundle = (bundle) => {
|
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
97
98
|
try {
|
|
98
|
-
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
99
|
+
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
100
|
+
(d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id)
|
|
101
|
+
);
|
|
99
102
|
if ((errorBundles == null ? void 0 : errorBundles.length) > 0) {
|
|
100
103
|
log(errorBundles);
|
|
101
104
|
}
|
|
@@ -118,7 +121,7 @@ var formatProductBundle = (bundle) => {
|
|
|
118
121
|
// checkout 2.0 新增
|
|
119
122
|
"price_type": d == null ? void 0 : d.price_type,
|
|
120
123
|
// checkout 2.0 新增
|
|
121
|
-
"custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
|
|
124
|
+
"custom_price": Math.abs(new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
|
|
122
125
|
"custom_price_type": d == null ? void 0 : d.price_type,
|
|
123
126
|
"option": option
|
|
124
127
|
};
|
|
@@ -179,11 +182,14 @@ var formatResource = (service) => {
|
|
|
179
182
|
return void 0;
|
|
180
183
|
}
|
|
181
184
|
try {
|
|
182
|
-
return Object.values(service._extend.resource).reduce(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
return Object.values(service._extend.resource).reduce(
|
|
186
|
+
(pre, cur) => {
|
|
187
|
+
const newList = checkResourcesFormat(cur, service);
|
|
188
|
+
pre = pre.concat(newList);
|
|
189
|
+
return pre;
|
|
190
|
+
},
|
|
191
|
+
[]
|
|
192
|
+
);
|
|
187
193
|
} catch (err) {
|
|
188
194
|
return void 0;
|
|
189
195
|
}
|
|
@@ -210,7 +216,9 @@ var formatProductPrice = (item) => {
|
|
|
210
216
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
211
217
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
212
218
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
213
|
-
const variant = item.variant.find(
|
|
219
|
+
const variant = item.variant.find(
|
|
220
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
221
|
+
);
|
|
214
222
|
if (variant) {
|
|
215
223
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
216
224
|
}
|
|
@@ -255,7 +263,9 @@ var getSourceProductPrice = (item) => {
|
|
|
255
263
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
256
264
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
257
265
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
258
|
-
const variant = item.variant.find(
|
|
266
|
+
const variant = item.variant.find(
|
|
267
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
268
|
+
);
|
|
259
269
|
if (variant) {
|
|
260
270
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
261
271
|
}
|
|
@@ -275,45 +285,49 @@ var formatProducts = (item, quantity) => {
|
|
|
275
285
|
unique_identification_number: `${item._extend.unique_identification_number}_${d.discount.resource_id}`
|
|
276
286
|
};
|
|
277
287
|
});
|
|
278
|
-
const notManualDiscount = discount_list.filter(
|
|
288
|
+
const notManualDiscount = discount_list.filter(
|
|
289
|
+
(item2) => item2.type !== "product"
|
|
290
|
+
);
|
|
279
291
|
if (item.isCustomItem) {
|
|
280
292
|
item.product_id = 0;
|
|
281
293
|
}
|
|
282
294
|
return {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
name: item.name,
|
|
296
|
+
num: quantity || item._extend.quantity,
|
|
297
|
+
price: formatProductPrice(item),
|
|
298
|
+
source_product_price: getSourceProductPrice(item),
|
|
299
|
+
product_id: (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
|
|
300
|
+
discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
301
|
+
product_discount_reason: item._extend.discount_reason || "",
|
|
302
|
+
is_charge_tax: item.is_charge_tax,
|
|
303
|
+
note: ((_a = item._extend) == null ? void 0 : _a.note) || "",
|
|
304
|
+
discountway: item._extend.discountway || "num",
|
|
305
|
+
discount_per: item._extend.discount_per,
|
|
306
|
+
discount_type: item._extend.discount_type || discount_type,
|
|
307
|
+
order_detail_id: item._extend.order_detail_id || 0,
|
|
308
|
+
product_bundle: formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
|
|
309
|
+
bundle_edit: item._extend.bundle_edit,
|
|
310
|
+
product_option_item: formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
|
|
311
|
+
product_variant_id: ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
|
|
312
|
+
discount_list: notManualDiscount,
|
|
301
313
|
metadata: formatMetaData(item),
|
|
302
314
|
// checkout 需求新增字段
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
315
|
+
calculated_original_price: formatOriginalPrice(item),
|
|
316
|
+
calculated_selling_price: formatSellingPrice(item),
|
|
317
|
+
tax_fee: item._extend.tax_fee,
|
|
318
|
+
custom_deposit_data: item.custom_deposit_data
|
|
307
319
|
};
|
|
308
320
|
};
|
|
309
321
|
var formatAppointmentProductLists = (data) => {
|
|
310
322
|
var _a;
|
|
311
323
|
try {
|
|
312
324
|
let list = data.service.value;
|
|
313
|
-
list = list.filter(
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
325
|
+
list = list.filter(
|
|
326
|
+
(item) => {
|
|
327
|
+
var _a2;
|
|
328
|
+
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
|
|
329
|
+
}
|
|
330
|
+
);
|
|
317
331
|
const groupMap = /* @__PURE__ */ new Map();
|
|
318
332
|
list.forEach((item) => {
|
|
319
333
|
var _a2;
|
|
@@ -323,7 +337,10 @@ var formatAppointmentProductLists = (data) => {
|
|
|
323
337
|
}
|
|
324
338
|
groupMap.get(key).push(item);
|
|
325
339
|
});
|
|
326
|
-
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
340
|
+
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
341
|
+
(acc, group) => acc.concat(group),
|
|
342
|
+
[]
|
|
343
|
+
);
|
|
327
344
|
return list || [];
|
|
328
345
|
} catch (error) {
|
|
329
346
|
}
|
|
@@ -335,6 +352,14 @@ var getHolderByIndex = (holder, index) => {
|
|
|
335
352
|
form_record: [(_a = holder == null ? void 0 : holder.form_record) == null ? void 0 : _a[index]].filter(Boolean)
|
|
336
353
|
};
|
|
337
354
|
};
|
|
355
|
+
var getHasMultiDayProduct = (data) => {
|
|
356
|
+
const list = data.service.value;
|
|
357
|
+
const isHas = list.some((item) => {
|
|
358
|
+
var _a;
|
|
359
|
+
return (_a = item._extend) == null ? void 0 : _a.groupId;
|
|
360
|
+
});
|
|
361
|
+
return isHas;
|
|
362
|
+
};
|
|
338
363
|
var formatBookings = (data, values) => {
|
|
339
364
|
const isDay = (0, import_utils4.isDaysBooking)(data);
|
|
340
365
|
const isEvent = (0, import_utils4.isEventBooking)(data);
|
|
@@ -355,7 +380,7 @@ var formatBookings = (data, values) => {
|
|
|
355
380
|
const eventOtherParams = data.eventOtherParams;
|
|
356
381
|
let bookings = [];
|
|
357
382
|
list.forEach((item) => {
|
|
358
|
-
var _a, _b, _c, _d, _e;
|
|
383
|
+
var _a, _b, _c, _d, _e, _f;
|
|
359
384
|
if (item.isCustomItem) {
|
|
360
385
|
bookings.push({
|
|
361
386
|
...item._extend,
|
|
@@ -364,6 +389,7 @@ var formatBookings = (data, values) => {
|
|
|
364
389
|
});
|
|
365
390
|
return;
|
|
366
391
|
}
|
|
392
|
+
const isMultiDay = (_a = item._extend) == null ? void 0 : _a.groupId;
|
|
367
393
|
let start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
368
394
|
let end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
369
395
|
let end_time = item._extend.endDate.format("HH:mm");
|
|
@@ -373,45 +399,51 @@ var formatBookings = (data, values) => {
|
|
|
373
399
|
}
|
|
374
400
|
dayParams.holder = formatHolders(data, item, values);
|
|
375
401
|
if (isDay) {
|
|
376
|
-
const startDate = ((
|
|
377
|
-
const endDate = ((
|
|
378
|
-
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
402
|
+
const startDate = ((_b = item._extend) == null ? void 0 : _b.startDate) || ((_c = item._extend) == null ? void 0 : _c.start_date);
|
|
403
|
+
const endDate = ((_d = item._extend) == null ? void 0 : _d.endDate) || ((_e = item._extend) == null ? void 0 : _e.end_date);
|
|
404
|
+
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
405
|
+
startDate,
|
|
406
|
+
endDate
|
|
407
|
+
});
|
|
379
408
|
start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
|
|
380
409
|
start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
|
|
381
410
|
end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
|
|
382
411
|
end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
|
|
383
412
|
dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
|
|
384
413
|
dayParams.holder = formatHolders(data, item, values);
|
|
385
|
-
dayParams.duration = (0, import_utils3.getDays)(
|
|
414
|
+
dayParams.duration = (0, import_utils3.getDays)(
|
|
415
|
+
{ _extend: { start_date: startDateTime, end_date: endDateTime } },
|
|
416
|
+
"minutes"
|
|
417
|
+
);
|
|
386
418
|
}
|
|
387
|
-
if (!((
|
|
419
|
+
if (!((_f = item._extend) == null ? void 0 : _f.unique_identification_number)) {
|
|
388
420
|
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
|
389
421
|
item._extend.unique_identification_number = unique_identification_number;
|
|
390
422
|
}
|
|
391
423
|
const booking = {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
424
|
+
product: formatProducts(item),
|
|
425
|
+
metadata: formatMetaData(item),
|
|
426
|
+
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
427
|
+
id: item.booking_id || 0,
|
|
428
|
+
relation_id: item._extend.relation_id || 0,
|
|
429
|
+
like_status: item._extend.like_status || "common",
|
|
430
|
+
relation_type: item._extend.relation_type || "",
|
|
431
|
+
is_all: false,
|
|
432
|
+
schedule_id: item._extend.schedule_id || 0,
|
|
433
|
+
end_time,
|
|
434
|
+
sub_type: isDay ? "days" : getSubType(item),
|
|
435
|
+
select_date: start_date,
|
|
436
|
+
start_time,
|
|
437
|
+
end_date,
|
|
438
|
+
start_date,
|
|
439
|
+
duration: isDay || isMultiDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
440
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
441
|
+
resources: formatResource(item),
|
|
442
|
+
note: item._extend.note,
|
|
411
443
|
...eventOtherParams || {},
|
|
412
444
|
...dayParams
|
|
413
445
|
};
|
|
414
|
-
if (isDay) {
|
|
446
|
+
if (isDay || isMultiDay) {
|
|
415
447
|
bookings.push(booking);
|
|
416
448
|
return;
|
|
417
449
|
}
|
|
@@ -420,10 +452,10 @@ var formatBookings = (data, values) => {
|
|
|
420
452
|
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
|
421
453
|
bookings.push({
|
|
422
454
|
...booking,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
455
|
+
product: formatProducts(newItem, 1),
|
|
456
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
|
|
457
|
+
holder: getHolderByIndex(booking.holder, i),
|
|
458
|
+
metadata: formatMetaData(newItem)
|
|
427
459
|
});
|
|
428
460
|
}
|
|
429
461
|
});
|
|
@@ -485,7 +517,7 @@ var formatHolder = (state, values) => {
|
|
|
485
517
|
return obj;
|
|
486
518
|
};
|
|
487
519
|
var formatValues = (state) => {
|
|
488
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
520
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
489
521
|
let values = {
|
|
490
522
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
491
523
|
platform: state.isBookingTicket2 ? "pos" : "shop",
|
|
@@ -499,6 +531,7 @@ var formatValues = (state) => {
|
|
|
499
531
|
metadata: {}
|
|
500
532
|
};
|
|
501
533
|
const isDay = (0, import_utils4.isDaysBooking)(state);
|
|
534
|
+
const isHasMultiDay = getHasMultiDayProduct(state);
|
|
502
535
|
const isEvent = (0, import_utils4.isEventBooking)(state);
|
|
503
536
|
if (!state.bookingId || isDay) {
|
|
504
537
|
values.shop_note = formatNote(state);
|
|
@@ -516,8 +549,11 @@ var formatValues = (state) => {
|
|
|
516
549
|
...customer
|
|
517
550
|
};
|
|
518
551
|
values.holder = formatHolder(state, values);
|
|
519
|
-
if (
|
|
520
|
-
values.relation_products = formatRelationProducts(
|
|
552
|
+
if (isEvent) {
|
|
553
|
+
values.relation_products = formatRelationProducts(
|
|
554
|
+
state,
|
|
555
|
+
"event"
|
|
556
|
+
);
|
|
521
557
|
} else {
|
|
522
558
|
values.relation_products = formatNormalProducts(state);
|
|
523
559
|
if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
|
|
@@ -530,28 +566,29 @@ var formatValues = (state) => {
|
|
|
530
566
|
startTime = `${startTime || "00:00"}:00`;
|
|
531
567
|
values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
|
|
532
568
|
}
|
|
533
|
-
if (isDay) {
|
|
569
|
+
if (isDay || isHasMultiDay) {
|
|
534
570
|
values.metadata.is_multiday_appointment = 1;
|
|
535
571
|
}
|
|
536
572
|
if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
|
|
537
573
|
values.type = "virtual";
|
|
538
574
|
}
|
|
575
|
+
values.contacts_info = ((_h = state.contacts_info) == null ? void 0 : _h.value) || null;
|
|
539
576
|
return values;
|
|
540
577
|
};
|
|
541
578
|
var checkHolderIsError = (state) => {
|
|
542
579
|
var _a, _b;
|
|
543
580
|
let errorRowKey = "";
|
|
544
581
|
const holderError = state.service.value.some((item) => {
|
|
545
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
582
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
546
583
|
if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
|
|
547
584
|
return false;
|
|
548
585
|
}
|
|
549
|
-
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
550
|
-
errorRowKey = (0, import_utils4.genRowKey)((
|
|
586
|
+
if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_a2 = item._extend.holder_id) == null ? void 0 : _a2.length) === 0)) {
|
|
587
|
+
errorRowKey = (0, import_utils4.genRowKey)((_c = (_b2 = item == null ? void 0 : item._extend) == null ? void 0 : _b2.other) == null ? void 0 : _c.rowKey);
|
|
551
588
|
return true;
|
|
552
589
|
}
|
|
553
|
-
if (item._extend.quantity > 1 && ((
|
|
554
|
-
errorRowKey = (0, import_utils4.genRowKey)((
|
|
590
|
+
if (item._extend.quantity > 1 && ((_e = (_d = item._extend) == null ? void 0 : _d.holder_id) == null ? void 0 : _e.length) !== item._extend.quantity) {
|
|
591
|
+
errorRowKey = (0, import_utils4.genRowKey)((_g = (_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.rowKey);
|
|
555
592
|
return true;
|
|
556
593
|
}
|
|
557
594
|
return false;
|
|
@@ -581,5 +618,6 @@ var checkHolderIsError = (state) => {
|
|
|
581
618
|
formatProductBundle,
|
|
582
619
|
formatProductOption,
|
|
583
620
|
formatProductPrice,
|
|
584
|
-
formatValues
|
|
621
|
+
formatValues,
|
|
622
|
+
getHasMultiDayProduct
|
|
585
623
|
});
|
|
@@ -62,6 +62,7 @@ var VoucherCard = (props) => {
|
|
|
62
62
|
const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
|
|
63
63
|
services = state.service;
|
|
64
64
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
65
|
+
var _a2, _b2;
|
|
65
66
|
dispatch({
|
|
66
67
|
type: "setClient",
|
|
67
68
|
payload: {
|
|
@@ -69,6 +70,14 @@ var VoucherCard = (props) => {
|
|
|
69
70
|
edit: true
|
|
70
71
|
}
|
|
71
72
|
});
|
|
73
|
+
if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
|
|
74
|
+
dispatch({
|
|
75
|
+
type: "setService",
|
|
76
|
+
payload: {
|
|
77
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
72
81
|
});
|
|
73
82
|
const { selectCustomer } = (0, import_pisellos.useCustomer)({
|
|
74
83
|
changeCustomerToGlobalState
|
|
@@ -163,7 +172,7 @@ var VoucherCard = (props) => {
|
|
|
163
172
|
productListToValue(val.productList);
|
|
164
173
|
}
|
|
165
174
|
},
|
|
166
|
-
{ wait:
|
|
175
|
+
{ wait: 500 }
|
|
167
176
|
);
|
|
168
177
|
(0, import_react.useEffect)(() => {
|
|
169
178
|
run();
|
|
@@ -24,12 +24,7 @@ __export(serve_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(serve_exports);
|
|
25
25
|
var import_utils = require("../utils");
|
|
26
26
|
var getBookingList = async (params) => {
|
|
27
|
-
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params
|
|
28
|
-
cache: {
|
|
29
|
-
mode: "remote_local",
|
|
30
|
-
type: "indexDB"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
27
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params);
|
|
33
28
|
return data;
|
|
34
29
|
};
|
|
35
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -39,31 +39,49 @@ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
|
|
|
39
39
|
var import_sendModal = __toESM(require("./sendModal"));
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var Footer = ({ state, reload }) => {
|
|
42
|
-
var _a, _b, _c, _d;
|
|
42
|
+
var _a, _b, _c, _d, _e;
|
|
43
43
|
const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
|
|
44
44
|
const handleReload = async () => {
|
|
45
45
|
await reload();
|
|
46
46
|
import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
|
|
47
47
|
};
|
|
48
48
|
const defaultValues = (0, import_react.useMemo)(() => {
|
|
49
|
-
var _a2, _b2
|
|
49
|
+
var _a2, _b2;
|
|
50
|
+
const { email: contactsEmail, phone: contactsPhone } = ((_a2 = state.contacts_info) == null ? void 0 : _a2.value) || {};
|
|
51
|
+
const {
|
|
52
|
+
email: clientEmail,
|
|
53
|
+
phone: clientPhone,
|
|
54
|
+
country_calling_code: clientCode
|
|
55
|
+
} = ((_b2 = state.client) == null ? void 0 : _b2.value) || {};
|
|
56
|
+
let email = contactsEmail || clientEmail;
|
|
57
|
+
let phone = (contactsPhone == null ? void 0 : contactsPhone.phone) || clientPhone;
|
|
58
|
+
let code = (contactsPhone == null ? void 0 : contactsPhone.country_calling_code) || clientCode || "+61";
|
|
59
|
+
if (!code.startsWith("+")) {
|
|
60
|
+
code = `+${code}`;
|
|
61
|
+
}
|
|
50
62
|
return {
|
|
51
|
-
sendSms: !!
|
|
52
|
-
sendEmail: !!
|
|
53
|
-
email
|
|
63
|
+
sendSms: !!phone,
|
|
64
|
+
sendEmail: !!email,
|
|
65
|
+
email,
|
|
54
66
|
phone: {
|
|
55
|
-
code
|
|
56
|
-
phone
|
|
67
|
+
code,
|
|
68
|
+
phone
|
|
57
69
|
}
|
|
58
70
|
};
|
|
59
|
-
}, [(_a = state.client) == null ? void 0 : _a.value]);
|
|
60
|
-
if (!state.bookingId || !((
|
|
71
|
+
}, [(_a = state.client) == null ? void 0 : _a.value, (_b = state.contacts_info) == null ? void 0 : _b.value]);
|
|
72
|
+
if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
|
|
61
73
|
return null;
|
|
62
74
|
}
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
import_materials.Tooltip,
|
|
77
|
+
{
|
|
78
|
+
title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip")
|
|
79
|
+
},
|
|
80
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })
|
|
81
|
+
), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), open && /* @__PURE__ */ import_react.default.createElement(
|
|
64
82
|
import_sendModal.default,
|
|
65
83
|
{
|
|
66
|
-
refreshKey: (
|
|
84
|
+
refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
|
|
67
85
|
open,
|
|
68
86
|
onCancel: () => setOpen(false),
|
|
69
87
|
onOk: handleOk,
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -24,18 +24,8 @@ __export(serve_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(serve_exports);
|
|
26
26
|
var import_utils = require("../utils");
|
|
27
|
-
var getFormData = async (params) => import_utils.request.getRequest().get(`/shop/form/data/v1`, params
|
|
28
|
-
|
|
29
|
-
mode: "remote_local",
|
|
30
|
-
type: "indexDB"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
var sendFormReminder = async (params) => import_utils.request.getRequest().post(`/shop/form/form-reminder`, params, {
|
|
34
|
-
cache: {
|
|
35
|
-
mode: "remote_local",
|
|
36
|
-
type: "indexDB"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
27
|
+
var getFormData = async (params) => import_utils.request.getRequest().get(`/shop/form/data/v1`, params);
|
|
28
|
+
var sendFormReminder = async (params) => import_utils.request.getRequest().post(`/shop/form/form-reminder`, params);
|
|
39
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
30
|
0 && (module.exports = {
|
|
41
31
|
getFormData,
|