@pisell/private-materials 3.0.207 → 3.0.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +154 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -33
- package/es/businessModel/SalesModel/Sales/index.d.ts +24 -0
- package/es/businessModel/SalesModel/Sales/index.js +69 -0
- package/es/businessModel/SalesModel/hooks/index.d.ts +1 -0
- package/es/businessModel/SalesModel/hooks/index.js +7 -0
- package/es/businessModel/SalesModel/index.d.ts +4 -0
- package/es/businessModel/SalesModel/index.js +18 -0
- package/es/businessModel/index.d.ts +0 -0
- package/es/businessModel/index.js +0 -0
- package/es/components/Sales/Cart/index.d.ts +50 -0
- package/es/components/Sales/Cart/index.js +468 -0
- package/es/components/Sales/Cart/serve.d.ts +1 -0
- package/es/components/Sales/Cart/serve.js +6 -0
- package/es/components/Sales/Checkout/index.d.ts +33 -0
- package/es/components/Sales/Checkout/index.js +140 -0
- package/es/components/Sales/Checkout/serve.d.ts +2 -0
- package/es/components/Sales/Checkout/serve.js +11 -0
- package/es/components/Sales/Checkout/utils.d.ts +27 -0
- package/es/components/Sales/Checkout/utils.js +104 -0
- package/es/components/Sales/Customer/index.d.ts +24 -0
- package/es/components/Sales/Customer/index.js +56 -0
- package/es/components/Sales/Event/Detail.d.ts +27 -0
- package/es/components/Sales/Event/Detail.js +244 -0
- package/es/components/Sales/Event/index.d.ts +30 -0
- package/es/components/Sales/Event/index.js +121 -0
- package/es/components/Sales/Event/serve.d.ts +26 -0
- package/es/components/Sales/Event/serve.js +33 -0
- package/es/components/Sales/Holder/index.d.ts +33 -0
- package/es/components/Sales/Holder/index.js +226 -0
- package/es/components/Sales/Holder/serve.d.ts +8 -0
- package/es/components/Sales/Holder/serve.js +20 -0
- package/es/components/Sales/Init/index.d.ts +20 -0
- package/es/components/Sales/Init/index.js +110 -0
- package/es/components/Sales/Init/serve.d.ts +3 -0
- package/es/components/Sales/Init/serve.js +11 -0
- package/es/components/Sales/Resource/index.d.ts +26 -0
- package/es/components/Sales/Resource/index.js +126 -0
- package/es/components/Sales/Resource/serve.d.ts +4 -0
- package/es/components/Sales/Resource/serve.js +8 -0
- package/es/components/Sales/Step/index.d.ts +37 -0
- package/es/components/Sales/Step/index.js +189 -0
- package/es/components/Sales/Summary/index.d.ts +22 -0
- package/es/components/Sales/Summary/index.js +41 -0
- package/es/components/Sales/Summary/serve.d.ts +2 -0
- package/es/components/Sales/Summary/serve.js +11 -0
- package/es/components/Sales/Summary/utils.d.ts +22 -0
- package/es/components/Sales/Summary/utils.js +34 -0
- package/es/components/Sales/hooks/index.d.ts +1 -0
- package/es/components/Sales/hooks/index.js +3 -0
- package/es/components/Sales/index.d.ts +20 -0
- package/es/components/Sales/index.js +26 -0
- package/es/components/Sales/utils/index.d.ts +1 -0
- package/es/components/Sales/utils/index.js +18 -0
- package/es/components/booking/components/customSelect/index.d.ts +1 -0
- package/es/components/booking/components/customSelect/index.js +6 -2
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +38 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/components/footer/amount.js +46 -22
- package/es/components/booking/components/footer/index.js +116 -79
- package/es/components/booking/components/footer/serve.d.ts +2 -0
- package/es/components/booking/components/footer/serve.js +44 -0
- package/es/components/booking/components/footer/utils.js +282 -35
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +54 -0
- package/es/components/booking/info/addServiceVariant/index.js +8 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +14 -13
- package/es/components/booking/info/clientVariant/vertical/index.js +131 -15
- package/es/components/booking/info/dateRange/index.d.ts +5 -0
- package/es/components/booking/info/dateRange/index.js +98 -0
- package/es/components/booking/info/dateRange/index.less +21 -0
- package/es/components/booking/info/main.js +44 -28
- package/es/components/booking/info/model.js +3 -0
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/es/components/booking/info/pet/ChangePetModal/index.js +134 -0
- package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/es/components/booking/info/pet/index.d.ts +1 -1
- package/es/components/booking/info/pet/index.js +91 -32
- package/es/components/booking/info/service/addService/index.js +195 -104
- package/es/components/booking/info/service/addService/index.less +13 -3
- package/es/components/booking/info/service/addService/utils.d.ts +12 -2
- package/es/components/booking/info/service/addService/utils.js +103 -26
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/es/components/booking/info/service/editService/BookingList/index.js +39 -0
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/es/components/booking/info/service/editService/EditTabs/index.js +35 -0
- package/es/components/booking/info/service/editService/index.js +450 -142
- package/es/components/booking/info/service/editService/index.less +18 -13
- package/es/components/booking/info/service/serve.d.ts +10 -0
- package/es/components/booking/info/service/serve.js +28 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +55 -0
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service/serviceManager/index.js +281 -0
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/es/components/booking/info/service2/Group/utils.js +146 -0
- package/es/components/booking/info/service2/Lists.d.ts +3 -0
- package/es/components/booking/info/service2/Lists.js +153 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.js +54 -0
- package/es/components/booking/info/service2/index.d.ts +6 -0
- package/es/components/booking/info/service2/index.js +57 -0
- package/es/components/booking/info/service2/status.d.ts +31 -0
- package/es/components/booking/info/service2/status.js +78 -0
- package/es/components/booking/info/service2/utils.d.ts +240 -0
- package/es/components/booking/info/service2/utils.js +1077 -0
- package/es/components/booking/info/utils.d.ts +20 -0
- package/es/components/booking/info/utils.js +37 -0
- package/es/components/booking/info2/utilsByBooking.js +0 -1
- package/es/components/booking/locales.d.ts +66 -0
- package/es/components/booking/locales.js +81 -3
- package/es/components/booking/materiels/holder/index.d.ts +7 -0
- package/es/components/booking/materiels/holder/index.js +51 -0
- package/es/components/booking/model.d.ts +5 -1
- package/es/components/booking/model.js +4 -2
- package/es/components/booking/utils.d.ts +12 -3
- package/es/components/booking/utils.js +143 -26
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eventBooking/assets/alert-circle.png +0 -0
- package/es/components/eventBooking/assets/calendar-heart.svg +5 -0
- package/es/components/eventBooking/assets/compass.svg +13 -0
- package/es/components/eventBooking/assets/image.svg +5 -0
- package/es/components/eventBooking/assets/phone.svg +5 -0
- package/es/components/eventBooking/assets/shopping-cart.svg +10 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +4 -0
- package/es/components/eventBooking/components/ErrorTip/index.js +14 -0
- package/es/components/eventBooking/components/ErrorTip/index.less +51 -0
- package/es/components/eventBooking/components/OpenCard/index.d.ts +4 -0
- package/es/components/eventBooking/components/OpenCard/index.js +65 -0
- package/es/components/eventBooking/components/OpenCard/index.less +52 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +154 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +69 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.less +55 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Cart/index.js +34 -0
- package/es/components/eventBooking/components/Provider/Cart/index.less +4 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Content/index.js +41 -0
- package/es/components/eventBooking/components/Provider/Content/index.less +30 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Event/index.js +86 -0
- package/es/components/eventBooking/components/Provider/Event/index.less +20 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Footer/index.js +69 -0
- package/es/components/eventBooking/components/Provider/Footer/index.less +40 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Header/index.js +73 -0
- package/es/components/eventBooking/components/Provider/Header/index.less +2 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Information/index.js +178 -0
- package/es/components/eventBooking/components/Provider/Information/index.less +92 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.js +34 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.js +51 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +31 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/Resource/index.js +85 -0
- package/es/components/eventBooking/components/Provider/Resource/index.less +46 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.js +87 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +26 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +65 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +69 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +152 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +20 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +38 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +28 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +268 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +257 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +174 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +36 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +70 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +38 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.js +33 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +30 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +208 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.less +83 -0
- package/es/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
- package/es/components/eventBooking/components/bookingServiceList/index.js +52 -0
- package/es/components/eventBooking/components/bookingServiceList/index.less +6 -0
- package/es/components/eventBooking/components/eventCard/index.d.ts +14 -0
- package/es/components/eventBooking/components/eventCard/index.js +116 -0
- package/es/components/eventBooking/components/eventCard/index.less +81 -0
- package/es/components/eventBooking/components/productCard/index.d.ts +16 -0
- package/es/components/eventBooking/components/productCard/index.js +79 -0
- package/es/components/eventBooking/components/productCard/index.less +60 -0
- package/es/components/eventBooking/components/progressBar/index.d.ts +16 -0
- package/es/components/eventBooking/components/progressBar/index.js +77 -0
- package/es/components/eventBooking/components/progressBar/index.less +15 -0
- package/es/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
- package/es/components/eventBooking/components/resourceDisplay/index.js +148 -0
- package/es/components/eventBooking/components/resourceDisplay/index.less +81 -0
- package/es/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
- package/es/components/eventBooking/components/resourceUsability/index.js +44 -0
- package/es/components/eventBooking/components/resourceUsability/index.less +40 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +37 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +119 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.js +142 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.less +210 -0
- package/es/components/eventBooking/components/selectHolder/index.d.ts +22 -0
- package/es/components/eventBooking/components/selectHolder/index.js +122 -0
- package/es/components/eventBooking/components/selectHolder/index.less +70 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.js +168 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.less +74 -0
- package/es/components/eventBooking/index.d.ts +4 -0
- package/es/components/eventBooking/index.js +71 -0
- package/es/components/eventBooking/index.less +20 -0
- package/es/components/eventBooking/locales.d.ts +183 -0
- package/es/components/eventBooking/locales.js +200 -0
- package/es/components/eventBooking/mock.d.ts +627 -0
- package/es/components/eventBooking/mock.js +1172 -0
- package/es/components/eventBooking/status.d.ts +21 -0
- package/es/components/eventBooking/status.js +51 -0
- package/es/components/eventBooking/type.d.ts +17 -0
- package/es/components/eventBooking/type.js +1 -0
- package/es/components/eventBooking/utils.d.ts +36 -0
- package/es/components/eventBooking/utils.js +82 -0
- package/es/components/shoppingCart/Provider.d.ts +3 -0
- package/es/components/shoppingCart/Provider.js +86 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/Product.js +71 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/index.js +73 -0
- package/es/components/shoppingCart/components/Cart/index.less +68 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Empty/index.js +15 -0
- package/es/components/shoppingCart/components/Empty/index.less +19 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Render/index.js +70 -0
- package/es/components/shoppingCart/components/Render/index.less +2 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +132 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useAddService.js +23 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +60 -0
- package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useContext.js +5 -0
- package/es/components/shoppingCart/index.d.ts +4 -0
- package/es/components/shoppingCart/index.js +24 -0
- package/es/components/shoppingCart/locales.d.ts +33 -0
- package/es/components/shoppingCart/locales.js +38 -0
- package/es/components/shoppingCart/mock.d.ts +40 -0
- package/es/components/shoppingCart/mock.js +40 -0
- package/es/components/shoppingCart/status.d.ts +2 -0
- package/es/components/shoppingCart/status.js +22 -0
- package/es/components/shoppingCart/type.d.ts +40 -0
- package/es/components/shoppingCart/type.js +1 -0
- package/es/components/shoppingCart/utils.d.ts +63 -0
- package/es/components/shoppingCart/utils.js +116 -0
- package/es/index.d.ts +13 -0
- package/es/index.js +14 -1
- package/lib/businessModel/SalesModel/Sales/index.d.ts +24 -0
- package/lib/businessModel/SalesModel/Sales/index.js +104 -0
- package/lib/businessModel/SalesModel/hooks/index.d.ts +1 -0
- package/lib/businessModel/SalesModel/hooks/index.js +34 -0
- package/lib/businessModel/SalesModel/index.d.ts +4 -0
- package/lib/businessModel/SalesModel/index.js +51 -0
- package/lib/businessModel/index.d.ts +0 -0
- package/lib/businessModel/index.js +0 -0
- package/lib/components/Sales/Cart/index.d.ts +50 -0
- package/lib/components/Sales/Cart/index.js +414 -0
- package/lib/components/Sales/Cart/serve.d.ts +1 -0
- package/lib/components/Sales/Cart/serve.js +32 -0
- package/lib/components/Sales/Checkout/index.d.ts +33 -0
- package/lib/components/Sales/Checkout/index.js +126 -0
- package/lib/components/Sales/Checkout/serve.d.ts +2 -0
- package/lib/components/Sales/Checkout/serve.js +37 -0
- package/lib/components/Sales/Checkout/utils.d.ts +27 -0
- package/lib/components/Sales/Checkout/utils.js +88 -0
- package/lib/components/Sales/Customer/index.d.ts +24 -0
- package/lib/components/Sales/Customer/index.js +90 -0
- package/lib/components/Sales/Event/Detail.d.ts +27 -0
- package/lib/components/Sales/Event/Detail.js +224 -0
- package/lib/components/Sales/Event/index.d.ts +30 -0
- package/lib/components/Sales/Event/index.js +136 -0
- package/lib/components/Sales/Event/serve.d.ts +26 -0
- package/lib/components/Sales/Event/serve.js +54 -0
- package/lib/components/Sales/Holder/index.d.ts +33 -0
- package/lib/components/Sales/Holder/index.js +210 -0
- package/lib/components/Sales/Holder/serve.d.ts +8 -0
- package/lib/components/Sales/Holder/serve.js +37 -0
- package/lib/components/Sales/Init/index.d.ts +20 -0
- package/lib/components/Sales/Init/index.js +125 -0
- package/lib/components/Sales/Init/serve.d.ts +3 -0
- package/lib/components/Sales/Init/serve.js +34 -0
- package/lib/components/Sales/Resource/index.d.ts +26 -0
- package/lib/components/Sales/Resource/index.js +133 -0
- package/lib/components/Sales/Resource/serve.d.ts +4 -0
- package/lib/components/Sales/Resource/serve.js +32 -0
- package/lib/components/Sales/Step/index.d.ts +37 -0
- package/lib/components/Sales/Step/index.js +170 -0
- package/lib/components/Sales/Summary/index.d.ts +22 -0
- package/lib/components/Sales/Summary/index.js +75 -0
- package/lib/components/Sales/Summary/serve.d.ts +2 -0
- package/lib/components/Sales/Summary/serve.js +37 -0
- package/lib/components/Sales/Summary/utils.d.ts +22 -0
- package/lib/components/Sales/Summary/utils.js +60 -0
- package/lib/components/Sales/hooks/index.d.ts +1 -0
- package/lib/components/Sales/hooks/index.js +31 -0
- package/lib/components/Sales/index.d.ts +20 -0
- package/lib/components/Sales/index.js +79 -0
- package/lib/components/Sales/utils/index.d.ts +1 -0
- package/lib/components/Sales/utils/index.js +43 -0
- package/lib/components/booking/components/customSelect/index.d.ts +1 -0
- package/lib/components/booking/components/customSelect/index.js +6 -2
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +60 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/components/footer/amount.js +27 -8
- package/lib/components/booking/components/footer/index.js +50 -55
- package/lib/components/booking/components/footer/serve.d.ts +2 -0
- package/lib/components/booking/components/footer/serve.js +12 -0
- package/lib/components/booking/components/footer/utils.js +177 -35
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/addServiceVariant/index.js +5 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -7
- package/lib/components/booking/info/clientVariant/vertical/index.js +97 -20
- package/lib/components/booking/info/dateRange/index.d.ts +5 -0
- package/lib/components/booking/info/dateRange/index.js +111 -0
- package/lib/components/booking/info/dateRange/index.less +21 -0
- package/lib/components/booking/info/main.js +32 -21
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.js +121 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/lib/components/booking/info/pet/index.d.ts +1 -1
- package/lib/components/booking/info/pet/index.js +88 -41
- package/lib/components/booking/info/service/addService/index.js +132 -101
- package/lib/components/booking/info/service/addService/index.less +13 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +12 -2
- package/lib/components/booking/info/service/addService/utils.js +58 -10
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +5 -0
- package/lib/components/booking/info/service/editService/BookingList/index.js +55 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +3 -0
- package/lib/components/booking/info/service/editService/EditTabs/index.js +75 -0
- package/lib/components/booking/info/service/editService/index.js +447 -197
- package/lib/components/booking/info/service/editService/index.less +18 -13
- package/lib/components/booking/info/service/serve.d.ts +10 -0
- package/lib/components/booking/info/service/serve.js +7 -2
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +70 -0
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service/serviceManager/index.js +211 -0
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +14 -0
- package/lib/components/booking/info/service2/Group/utils.js +142 -0
- package/lib/components/booking/info/service2/Lists.d.ts +3 -0
- package/lib/components/booking/info/service2/Lists.js +116 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +50 -0
- package/lib/components/booking/info/service2/index.d.ts +6 -0
- package/lib/components/booking/info/service2/index.js +75 -0
- package/lib/components/booking/info/service2/status.d.ts +31 -0
- package/lib/components/booking/info/service2/status.js +81 -0
- package/lib/components/booking/info/service2/utils.d.ts +240 -0
- package/lib/components/booking/info/service2/utils.js +695 -0
- package/lib/components/booking/info/utils.d.ts +20 -0
- package/lib/components/booking/info/utils.js +41 -0
- package/lib/components/booking/locales.d.ts +66 -0
- package/lib/components/booking/locales.js +69 -3
- package/lib/components/booking/materiels/holder/index.d.ts +7 -0
- package/lib/components/booking/materiels/holder/index.js +65 -0
- package/lib/components/booking/model.d.ts +5 -1
- package/lib/components/booking/model.js +4 -2
- package/lib/components/booking/utils.d.ts +12 -3
- package/lib/components/booking/utils.js +89 -18
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eventBooking/assets/alert-circle.png +0 -0
- package/lib/components/eventBooking/assets/calendar-heart.svg +5 -0
- package/lib/components/eventBooking/assets/compass.svg +13 -0
- package/lib/components/eventBooking/assets/image.svg +5 -0
- package/lib/components/eventBooking/assets/phone.svg +5 -0
- package/lib/components/eventBooking/assets/shopping-cart.svg +10 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +4 -0
- package/lib/components/eventBooking/components/ErrorTip/index.js +30 -0
- package/lib/components/eventBooking/components/ErrorTip/index.less +51 -0
- package/lib/components/eventBooking/components/OpenCard/index.d.ts +4 -0
- package/lib/components/eventBooking/components/OpenCard/index.js +90 -0
- package/lib/components/eventBooking/components/OpenCard/index.less +52 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +106 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +99 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +55 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.js +63 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.less +4 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Content/index.js +75 -0
- package/lib/components/eventBooking/components/Provider/Content/index.less +30 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Event/index.js +92 -0
- package/lib/components/eventBooking/components/Provider/Event/index.less +20 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.js +85 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.less +40 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Header/index.js +77 -0
- package/lib/components/eventBooking/components/Provider/Header/index.less +2 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Information/index.js +151 -0
- package/lib/components/eventBooking/components/Provider/Information/index.less +92 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.js +67 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.less +27 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.js +73 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.less +32 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +62 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.js +93 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.less +46 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.js +95 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +55 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +25 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +11 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +78 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +32 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +86 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +12 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +13 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +121 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +35 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +37 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +28 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +5 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +58 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +87 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +55 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +25 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +197 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +119 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +63 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +198 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +122 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +4 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +14 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +70 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.less +2 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +34 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +71 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +75 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.js +66 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +3 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +70 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +177 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.less +83 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +17 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.js +79 -0
- package/lib/components/eventBooking/components/bookingServiceList/index.less +6 -0
- package/lib/components/eventBooking/components/eventCard/index.d.ts +14 -0
- package/lib/components/eventBooking/components/eventCard/index.js +124 -0
- package/lib/components/eventBooking/components/eventCard/index.less +81 -0
- package/lib/components/eventBooking/components/productCard/index.d.ts +16 -0
- package/lib/components/eventBooking/components/productCard/index.js +78 -0
- package/lib/components/eventBooking/components/productCard/index.less +60 -0
- package/lib/components/eventBooking/components/progressBar/index.d.ts +16 -0
- package/lib/components/eventBooking/components/progressBar/index.js +96 -0
- package/lib/components/eventBooking/components/progressBar/index.less +15 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +23 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.js +117 -0
- package/lib/components/eventBooking/components/resourceDisplay/index.less +81 -0
- package/lib/components/eventBooking/components/resourceUsability/index.d.ts +12 -0
- package/lib/components/eventBooking/components/resourceUsability/index.js +76 -0
- package/lib/components/eventBooking/components/resourceUsability/index.less +40 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +10 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +73 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +58 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +12 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +127 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +13 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +125 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +210 -0
- package/lib/components/eventBooking/components/selectHolder/index.d.ts +22 -0
- package/lib/components/eventBooking/components/selectHolder/index.js +106 -0
- package/lib/components/eventBooking/components/selectHolder/index.less +70 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +20 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.js +146 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.less +74 -0
- package/lib/components/eventBooking/index.d.ts +4 -0
- package/lib/components/eventBooking/index.js +86 -0
- package/lib/components/eventBooking/index.less +20 -0
- package/lib/components/eventBooking/locales.d.ts +183 -0
- package/lib/components/eventBooking/locales.js +206 -0
- package/lib/components/eventBooking/mock.d.ts +627 -0
- package/lib/components/eventBooking/mock.js +1352 -0
- package/lib/components/eventBooking/status.d.ts +21 -0
- package/lib/components/eventBooking/status.js +70 -0
- package/lib/components/eventBooking/type.d.ts +17 -0
- package/lib/components/eventBooking/type.js +17 -0
- package/lib/components/eventBooking/utils.d.ts +36 -0
- package/lib/components/eventBooking/utils.js +80 -0
- package/lib/components/shoppingCart/Provider.d.ts +3 -0
- package/lib/components/shoppingCart/Provider.js +110 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +73 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/index.js +85 -0
- package/lib/components/shoppingCart/components/Cart/index.less +68 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Empty/index.js +43 -0
- package/lib/components/shoppingCart/components/Empty/index.less +19 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Render/index.js +75 -0
- package/lib/components/shoppingCart/components/Render/index.less +2 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +55 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +66 -0
- package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useContext.js +31 -0
- package/lib/components/shoppingCart/index.d.ts +4 -0
- package/lib/components/shoppingCart/index.js +60 -0
- package/lib/components/shoppingCart/locales.d.ts +33 -0
- package/lib/components/shoppingCart/locales.js +56 -0
- package/lib/components/shoppingCart/mock.d.ts +40 -0
- package/lib/components/shoppingCart/mock.js +76 -0
- package/lib/components/shoppingCart/status.d.ts +2 -0
- package/lib/components/shoppingCart/status.js +60 -0
- package/lib/components/shoppingCart/type.d.ts +40 -0
- package/lib/components/shoppingCart/type.js +17 -0
- package/lib/components/shoppingCart/utils.d.ts +63 -0
- package/lib/components/shoppingCart/utils.js +86 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +39 -0
- package/lowcode/event-booking/meta.ts +69 -0
- package/lowcode/event-booking-availability-calendar/meta.ts +53 -0
- package/lowcode/event-booking-detail-modal/meta.ts +39 -0
- package/lowcode/event-booking-service-list/meta.ts +77 -0
- package/lowcode/event-card/meta.ts +77 -0
- package/lowcode/event-product-card/meta.ts +79 -0
- package/lowcode/event-progress-bar/meta.ts +65 -0
- package/lowcode/event-resource-display/meta.ts +169 -0
- package/lowcode/event-resource-usability/meta.ts +67 -0
- package/lowcode/event-schedule-calendar/meta.ts +56 -0
- package/lowcode/event-select-holder/meta.ts +84 -0
- package/lowcode/event-time-resource-selector/meta.ts +69 -0
- package/lowcode/shopping-cart/meta.ts +98 -0
- package/package.json +3 -3
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
.pisell-lowcode__booking-service-body-edit {
|
|
2
2
|
padding: 24px 32px 100px !important;
|
|
3
|
-
}
|
|
4
3
|
|
|
4
|
+
.pisell-lowcode__booking-service-select-date {
|
|
5
|
+
height: 40px;
|
|
6
|
+
.pisell-lowcode-picker-input > input {
|
|
7
|
+
font-size: 16px !important;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
5
11
|
|
|
6
12
|
.pisell-lowcode__booking-service-body-edit-footer {
|
|
7
13
|
position: absolute;
|
|
8
14
|
bottom: 0;
|
|
9
15
|
left: 0;
|
|
10
16
|
width: 100%;
|
|
11
|
-
border-top: 1px solid #
|
|
17
|
+
border-top: 1px solid #e7e8e9;
|
|
12
18
|
padding: 20px 32px;
|
|
13
19
|
display: flex;
|
|
14
20
|
align-items: center;
|
|
@@ -20,8 +26,8 @@
|
|
|
20
26
|
height: 48px;
|
|
21
27
|
width: 48px;
|
|
22
28
|
border-radius: 8px;
|
|
23
|
-
border: 1px solid var(--gray-300, #
|
|
24
|
-
background: var(--base-white, #
|
|
29
|
+
border: 1px solid var(--gray-300, #d0d5dd);
|
|
30
|
+
background: var(--base-white, #fff);
|
|
25
31
|
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
26
32
|
cursor: pointer;
|
|
27
33
|
display: flex;
|
|
@@ -29,7 +35,7 @@
|
|
|
29
35
|
justify-content: center;
|
|
30
36
|
|
|
31
37
|
.pisell-lowcode__booking-service-delete-icon {
|
|
32
|
-
color: #
|
|
38
|
+
color: #b42318;
|
|
33
39
|
font-size: 20px;
|
|
34
40
|
}
|
|
35
41
|
}
|
|
@@ -46,14 +52,12 @@
|
|
|
46
52
|
.pisell-lowcode-select-selection-item {
|
|
47
53
|
.resource-option {
|
|
48
54
|
padding-left: 0;
|
|
49
|
-
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
.pisell-lowcode-select-item-option-content {
|
|
54
59
|
.resource-option {
|
|
55
60
|
padding-left: 0;
|
|
56
|
-
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
gap: 8px;
|
|
64
68
|
|
|
65
69
|
.resource-option-alert-icon {
|
|
66
|
-
color: #
|
|
70
|
+
color: #b42318;
|
|
67
71
|
cursor: pointer;
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -82,16 +86,16 @@
|
|
|
82
86
|
justify-content: center;
|
|
83
87
|
padding: 0;
|
|
84
88
|
|
|
85
|
-
.like-resource {
|
|
89
|
+
.like-resource {
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
|
-
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
.current-service-info {
|
|
91
95
|
min-height: 40px;
|
|
92
96
|
cursor: pointer;
|
|
93
97
|
background-color: #ffffff;
|
|
94
|
-
border: 1px solid #
|
|
98
|
+
border: 1px solid #d0d5dd;
|
|
95
99
|
border-radius: 10px;
|
|
96
100
|
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
97
101
|
overflow: hidden;
|
|
@@ -109,10 +113,11 @@
|
|
|
109
113
|
flex: 1;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
|
-
.current-service-info-change-btn {
|
|
116
|
+
.current-service-info-change-btn {
|
|
117
|
+
}
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
&:hover {
|
|
116
121
|
border-color: #7f56d9;
|
|
117
122
|
}
|
|
118
|
-
}
|
|
123
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export declare const getProductDetail: (id: string, params: any) => Promise<any>;
|
|
2
|
+
/**
|
|
3
|
+
* @title: 跨日预约获取预约商品报价单
|
|
4
|
+
* @description:
|
|
5
|
+
* @param {string} id
|
|
6
|
+
* @param {any} params
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: WangHan
|
|
9
|
+
* @Date: 2024-12-23 17:06
|
|
10
|
+
*/
|
|
11
|
+
export declare const postMultiDay: (id: string, params: any) => Promise<any>;
|
|
@@ -18,4 +18,32 @@ export var getProductDetail = /*#__PURE__*/function () {
|
|
|
18
18
|
return function getProductDetail(_x, _x2) {
|
|
19
19
|
return _ref.apply(this, arguments);
|
|
20
20
|
};
|
|
21
|
+
}();
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @title: 跨日预约获取预约商品报价单
|
|
25
|
+
* @description:
|
|
26
|
+
* @param {string} id
|
|
27
|
+
* @param {any} params
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2024-12-23 17:06
|
|
31
|
+
*/
|
|
32
|
+
export var postMultiDay = /*#__PURE__*/function () {
|
|
33
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id, params) {
|
|
34
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
35
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
return _context2.abrupt("return", request.getRequest().post("/shop/product/multi-day/detail/".concat(id), params, {
|
|
38
|
+
useCache: true
|
|
39
|
+
}));
|
|
40
|
+
case 1:
|
|
41
|
+
case "end":
|
|
42
|
+
return _context2.stop();
|
|
43
|
+
}
|
|
44
|
+
}, _callee2);
|
|
45
|
+
}));
|
|
46
|
+
return function postMultiDay(_x3, _x4) {
|
|
47
|
+
return _ref2.apply(this, arguments);
|
|
48
|
+
};
|
|
21
49
|
}();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Product {
|
|
2
|
+
_id: string;
|
|
3
|
+
_extend: {
|
|
4
|
+
origin_total: number;
|
|
5
|
+
total: number;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare function distributeDiscountOrIncrease(products: Product[], // 商品列表
|
|
9
|
+
totalAdjustment: number, // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
|
|
10
|
+
totalPrice: number): Product[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import Decimal from 'decimal.js';
|
|
8
|
+
export function distributeDiscountOrIncrease(products,
|
|
9
|
+
// 商品列表
|
|
10
|
+
totalAdjustment,
|
|
11
|
+
// 总折扣或加价金额,可能为负数(折扣)或正数(加价)
|
|
12
|
+
totalPrice) {
|
|
13
|
+
// 总折扣
|
|
14
|
+
var totalAdjustmentDecimal = new Decimal(totalAdjustment);
|
|
15
|
+
var totalAdjustmentApplied = new Decimal(0);
|
|
16
|
+
|
|
17
|
+
// 存储调整后的商品
|
|
18
|
+
var adjustedProducts = [];
|
|
19
|
+
|
|
20
|
+
// 按比例分摊折扣/加价金额
|
|
21
|
+
products.forEach(function (product) {
|
|
22
|
+
// 原始价格
|
|
23
|
+
var productPrice = new Decimal(product._extend.origin_total);
|
|
24
|
+
// 按比例计算调整金额
|
|
25
|
+
var adjustmentAmount = productPrice.div(totalPrice).times(totalAdjustmentDecimal).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
26
|
+
|
|
27
|
+
// 防止价格变负,调整均摊金额
|
|
28
|
+
var newPrice = productPrice.plus(adjustmentAmount).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
29
|
+
var adjustedPrice = new Decimal(newPrice).lessThan(0) ? '0.00' : newPrice;
|
|
30
|
+
adjustedProducts.push(_objectSpread(_objectSpread({}, product), {}, {
|
|
31
|
+
_extend: _objectSpread(_objectSpread({}, product._extend), {}, {
|
|
32
|
+
total: parseFloat(adjustedPrice)
|
|
33
|
+
})
|
|
34
|
+
}));
|
|
35
|
+
totalAdjustmentApplied = totalAdjustmentApplied.plus(new Decimal(adjustmentAmount));
|
|
36
|
+
});
|
|
37
|
+
// 计算调整后的总金额
|
|
38
|
+
var finalTotalPrice = adjustedProducts.reduce(function (sum, product) {
|
|
39
|
+
return sum.plus(new Decimal(product._extend.total));
|
|
40
|
+
}, new Decimal(0));
|
|
41
|
+
|
|
42
|
+
// 如果总价与目标差异不为零,则调整最后一个商品价格 150 - (-10 + 140 ) = 0
|
|
43
|
+
var adjustmentDifference = new Decimal(totalPrice).minus(finalTotalPrice).plus(new Decimal(totalAdjustment));
|
|
44
|
+
if (!adjustmentDifference.isZero()) {
|
|
45
|
+
var lastProduct = adjustedProducts[adjustedProducts.length - 1];
|
|
46
|
+
var lastPrice = new Decimal(lastProduct._extend.total).plus(adjustmentDifference).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
47
|
+
|
|
48
|
+
// 确保最后调整后的价格不为负数
|
|
49
|
+
lastPrice = new Decimal(lastPrice).lessThan(0) ? '0.00' : lastPrice;
|
|
50
|
+
lastProduct._extend.total = parseFloat(lastPrice);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 将结果格式化为以 _id 为键的对象
|
|
54
|
+
return adjustedProducts;
|
|
55
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const useService: ({ renderMode, onEdit, state, dispatch, }: {
|
|
2
|
+
renderMode?: any;
|
|
3
|
+
onEdit?: any;
|
|
4
|
+
state?: any;
|
|
5
|
+
dispatch?: any;
|
|
6
|
+
}) => {
|
|
7
|
+
createBookingData: ({ product }: any) => Promise<any>;
|
|
8
|
+
editBookingData: ({ changeValues }: {
|
|
9
|
+
changeValues: any;
|
|
10
|
+
}) => Promise<any>;
|
|
11
|
+
createBooking: ({ booking }: {
|
|
12
|
+
booking: any;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
editBooking: ({ booking }: {
|
|
15
|
+
booking: any;
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
goEditPanel: ({ booking }: {
|
|
18
|
+
booking: any;
|
|
19
|
+
}) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
|
+
import { getUniqueId } from '@pisell/utils';
|
|
11
|
+
import { useCallback, useMemo } from 'react';
|
|
12
|
+
import { deleteCacheParams, getProductTotalPrice, getServiceTimes } from "../../../utils";
|
|
13
|
+
import { concatBookings, createBookingItemsByGroup } from "../../service2/Group/utils";
|
|
14
|
+
import { isBookingProduct, isDayBookingProduct, isDaysBooking, isEventBooking } from "../../service2/utils";
|
|
15
|
+
import { getMultiDay, getProductExtend } from "../addService/utils";
|
|
16
|
+
var lock = false;
|
|
17
|
+
export var useService = function useService(_ref) {
|
|
18
|
+
var _state$service2;
|
|
19
|
+
var renderMode = _ref.renderMode,
|
|
20
|
+
onEdit = _ref.onEdit,
|
|
21
|
+
state = _ref.state,
|
|
22
|
+
dispatch = _ref.dispatch;
|
|
23
|
+
var holderId = useMemo(function () {
|
|
24
|
+
var _state$activeCartId;
|
|
25
|
+
return Number((state === null || state === void 0 ? void 0 : (_state$activeCartId = state.activeCartId) === null || _state$activeCartId === void 0 ? void 0 : _state$activeCartId[0]) || 0);
|
|
26
|
+
}, [state === null || state === void 0 ? void 0 : state.activeCartId]);
|
|
27
|
+
var isDayBookingMode = useMemo(function () {
|
|
28
|
+
return isDaysBooking(state);
|
|
29
|
+
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
30
|
+
var isEventBookingMode = useMemo(function () {
|
|
31
|
+
return isEventBooking(state);
|
|
32
|
+
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
33
|
+
var createBookingData = /*#__PURE__*/function () {
|
|
34
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
35
|
+
var product, _params, cacheItem, _total, _isEdit, _state$service$cacheI, _state$service;
|
|
36
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
product = _ref2.product;
|
|
40
|
+
if (!lock) {
|
|
41
|
+
_context.next = 3;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
return _context.abrupt("return");
|
|
45
|
+
case 3:
|
|
46
|
+
lock = true;
|
|
47
|
+
|
|
48
|
+
// 2秒后解除
|
|
49
|
+
setTimeout(function () {
|
|
50
|
+
lock = false;
|
|
51
|
+
}, 2000);
|
|
52
|
+
_params = product._params;
|
|
53
|
+
cacheItem = _objectSpread(_objectSpread({}, product), {}, {
|
|
54
|
+
product_id: product.id,
|
|
55
|
+
_id: getUniqueId(),
|
|
56
|
+
_key: _params.key,
|
|
57
|
+
_extend: {
|
|
58
|
+
start_date: state.date.value,
|
|
59
|
+
quantity: 1,
|
|
60
|
+
price: product.price,
|
|
61
|
+
product_name: product.title,
|
|
62
|
+
other: JSON.parse(JSON.stringify(_params))
|
|
63
|
+
},
|
|
64
|
+
new: 1
|
|
65
|
+
}); // 跨日预约
|
|
66
|
+
if (isDayBookingMode || isEventBookingMode) {
|
|
67
|
+
cacheItem._extend.holder_id = holderId;
|
|
68
|
+
cacheItem._extend.end_date = state.date.end_date;
|
|
69
|
+
cacheItem._extend.sub_type = 'days';
|
|
70
|
+
}
|
|
71
|
+
_total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
|
|
72
|
+
cacheItem._extend.total = _total;
|
|
73
|
+
// 用于储存原价
|
|
74
|
+
cacheItem._extend.origin_total = _total;
|
|
75
|
+
|
|
76
|
+
// 是否为编辑服务时重新选择商品
|
|
77
|
+
_isEdit = !!state.service.cacheItem;
|
|
78
|
+
if (_isEdit) {
|
|
79
|
+
// 重新选择则沿用之前的id, 并且不是新增状态
|
|
80
|
+
cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
|
|
81
|
+
cacheItem.new = 0;
|
|
82
|
+
}
|
|
83
|
+
// 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
|
|
84
|
+
if (renderMode === 'current') {
|
|
85
|
+
// cacheItem._extend.resource = 0;
|
|
86
|
+
cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
|
|
87
|
+
}
|
|
88
|
+
cacheItem._extend = getProductExtend({
|
|
89
|
+
cacheItem: cacheItem,
|
|
90
|
+
state: state
|
|
91
|
+
});
|
|
92
|
+
if (!isDayBookingMode) {
|
|
93
|
+
_context.next = 20;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
_context.next = 18;
|
|
97
|
+
return getMultiDay({
|
|
98
|
+
start_date: cacheItem._extend.startDate,
|
|
99
|
+
end_date: cacheItem._extend.endDate,
|
|
100
|
+
state: state,
|
|
101
|
+
cacheItem: cacheItem
|
|
102
|
+
});
|
|
103
|
+
case 18:
|
|
104
|
+
cacheItem = _context.sent;
|
|
105
|
+
if (isDayBookingProduct(cacheItem, state)) {
|
|
106
|
+
// 更换商品需要删除当前组下面的所有子预约 --待实现 在这里删除会导致如果直接返回还需要恢复
|
|
107
|
+
// const newList = filterItemByGroupId(cacheItem._id,state.service.value)
|
|
108
|
+
cacheItem = concatBookings(createBookingItemsByGroup(cacheItem));
|
|
109
|
+
}
|
|
110
|
+
case 20:
|
|
111
|
+
if (isEventBookingMode) {
|
|
112
|
+
cacheItem.autoClose = false;
|
|
113
|
+
} else {
|
|
114
|
+
// 普通商品
|
|
115
|
+
if (isDayBookingMode && !isDayBookingProduct(cacheItem, state)) {
|
|
116
|
+
cacheItem.autoClose = true;
|
|
117
|
+
} else {
|
|
118
|
+
cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.resourcesOrigin) || []).length === 1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return _context.abrupt("return", cacheItem);
|
|
122
|
+
case 22:
|
|
123
|
+
case "end":
|
|
124
|
+
return _context.stop();
|
|
125
|
+
}
|
|
126
|
+
}, _callee);
|
|
127
|
+
}));
|
|
128
|
+
return function createBookingData(_x) {
|
|
129
|
+
return _ref3.apply(this, arguments);
|
|
130
|
+
};
|
|
131
|
+
}();
|
|
132
|
+
var currentResource = useCallback(function (useResource) {
|
|
133
|
+
var list = state.service.resources;
|
|
134
|
+
var item = list.find(function (d) {
|
|
135
|
+
return d.form_record_id == useResource;
|
|
136
|
+
}) || {};
|
|
137
|
+
return item;
|
|
138
|
+
}, [state === null || state === void 0 ? void 0 : (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.resources]);
|
|
139
|
+
var editBookingData = /*#__PURE__*/function () {
|
|
140
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref4) {
|
|
141
|
+
var _resourceItem$_extend;
|
|
142
|
+
var changeValues, _item, _extend, _getServiceTimes, startDate, endDate, resourceItem, _ref6, relation_type, item_id, schedule_id;
|
|
143
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
144
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
145
|
+
case 0:
|
|
146
|
+
changeValues = _ref4.changeValues;
|
|
147
|
+
_item = _objectSpread(_objectSpread({}, state.service.cacheItem), {}, {
|
|
148
|
+
autoClose: false
|
|
149
|
+
});
|
|
150
|
+
_extend = _objectSpread(_objectSpread({}, _item._extend), changeValues); // 跨日预约商品
|
|
151
|
+
if (isDayBookingProduct(state.service.cacheItem, state)) {
|
|
152
|
+
// 更新商品数量和更新日期
|
|
153
|
+
_extend.quantity = 1;
|
|
154
|
+
_extend.startDate = _extend === null || _extend === void 0 ? void 0 : _extend.start_date;
|
|
155
|
+
_extend.endDate = _extend === null || _extend === void 0 ? void 0 : _extend.end_date;
|
|
156
|
+
} else {
|
|
157
|
+
_getServiceTimes = getServiceTimes({
|
|
158
|
+
_extend: _extend
|
|
159
|
+
}), startDate = _getServiceTimes.startDate, endDate = _getServiceTimes.endDate;
|
|
160
|
+
_extend.startDate = startDate;
|
|
161
|
+
_extend.endDate = endDate;
|
|
162
|
+
}
|
|
163
|
+
resourceItem = currentResource(changeValues.resource);
|
|
164
|
+
_ref6 = (resourceItem === null || resourceItem === void 0 ? void 0 : (_resourceItem$_extend = resourceItem._extend) === null || _resourceItem$_extend === void 0 ? void 0 : _resourceItem$_extend.usableTime) || {}, relation_type = _ref6.relation_type, item_id = _ref6.item_id, schedule_id = _ref6.schedule_id;
|
|
165
|
+
_extend.relation_type = relation_type || 'form';
|
|
166
|
+
_extend.relation_id = item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0;
|
|
167
|
+
_extend.schedule_id = schedule_id || 0;
|
|
168
|
+
if (_extend.bundle_edit !== undefined) {
|
|
169
|
+
_extend.bundle_edit = 1;
|
|
170
|
+
}
|
|
171
|
+
_item._extend = _extend;
|
|
172
|
+
_item._time = new Date().getTime();
|
|
173
|
+
return _context2.abrupt("return", _item);
|
|
174
|
+
case 13:
|
|
175
|
+
case "end":
|
|
176
|
+
return _context2.stop();
|
|
177
|
+
}
|
|
178
|
+
}, _callee2);
|
|
179
|
+
}));
|
|
180
|
+
return function editBookingData(_x2) {
|
|
181
|
+
return _ref5.apply(this, arguments);
|
|
182
|
+
};
|
|
183
|
+
}();
|
|
184
|
+
var createBooking = /*#__PURE__*/function () {
|
|
185
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref7) {
|
|
186
|
+
var booking;
|
|
187
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
188
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
189
|
+
case 0:
|
|
190
|
+
booking = _ref7.booking;
|
|
191
|
+
// 目前都是预生成数据, 所以需要从编辑面板处理一圈数据再返回列表
|
|
192
|
+
goEditPanel({
|
|
193
|
+
booking: booking
|
|
194
|
+
});
|
|
195
|
+
case 2:
|
|
196
|
+
case "end":
|
|
197
|
+
return _context3.stop();
|
|
198
|
+
}
|
|
199
|
+
}, _callee3);
|
|
200
|
+
}));
|
|
201
|
+
return function createBooking(_x3) {
|
|
202
|
+
return _ref8.apply(this, arguments);
|
|
203
|
+
};
|
|
204
|
+
}();
|
|
205
|
+
var editBooking = /*#__PURE__*/function () {
|
|
206
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref9) {
|
|
207
|
+
var _booking$_extend;
|
|
208
|
+
var booking, _list, _id, groupId;
|
|
209
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
210
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
211
|
+
case 0:
|
|
212
|
+
booking = _ref9.booking;
|
|
213
|
+
_list = state.service.value;
|
|
214
|
+
_id = booking === null || booking === void 0 ? void 0 : booking._id;
|
|
215
|
+
groupId = booking === null || booking === void 0 ? void 0 : (_booking$_extend = booking._extend) === null || _booking$_extend === void 0 ? void 0 : _booking$_extend.groupId;
|
|
216
|
+
if (groupId) {
|
|
217
|
+
_list = _list.filter(function (d) {
|
|
218
|
+
var _d$_extend;
|
|
219
|
+
return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.groupId) !== groupId;
|
|
220
|
+
});
|
|
221
|
+
_list = _list.concat(createBookingItemsByGroup(booking, true));
|
|
222
|
+
} else {
|
|
223
|
+
// 判断是新增还是编辑
|
|
224
|
+
if (!_list.some(function (d) {
|
|
225
|
+
return d._id === _id;
|
|
226
|
+
})) {
|
|
227
|
+
// 普通商品直接返回
|
|
228
|
+
if (!isBookingProduct(booking === null || booking === void 0 ? void 0 : booking.extension_type) || !isDayBookingMode) {
|
|
229
|
+
_list.push(booking);
|
|
230
|
+
} else {}
|
|
231
|
+
} else {
|
|
232
|
+
_list = _list.map(function (d) {
|
|
233
|
+
return d._id === _id ? _objectSpread(_objectSpread({}, booking), {}, {
|
|
234
|
+
new: 0
|
|
235
|
+
}) : d;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
deleteCacheParams();
|
|
240
|
+
dispatch({
|
|
241
|
+
type: 'setService',
|
|
242
|
+
payload: {
|
|
243
|
+
editModal: false,
|
|
244
|
+
addModal: false,
|
|
245
|
+
value: _list,
|
|
246
|
+
edit: true,
|
|
247
|
+
cacheItem: null,
|
|
248
|
+
changeService: false
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
case 7:
|
|
252
|
+
case "end":
|
|
253
|
+
return _context4.stop();
|
|
254
|
+
}
|
|
255
|
+
}, _callee4);
|
|
256
|
+
}));
|
|
257
|
+
return function editBooking(_x4) {
|
|
258
|
+
return _ref10.apply(this, arguments);
|
|
259
|
+
};
|
|
260
|
+
}();
|
|
261
|
+
var goEditPanel = function goEditPanel(_ref11) {
|
|
262
|
+
var booking = _ref11.booking;
|
|
263
|
+
dispatch({
|
|
264
|
+
type: 'setService',
|
|
265
|
+
payload: {
|
|
266
|
+
editModal: true,
|
|
267
|
+
cacheItem: booking,
|
|
268
|
+
addModal: !booking.autoClose,
|
|
269
|
+
changeService: false
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
onEdit(booking);
|
|
273
|
+
};
|
|
274
|
+
return {
|
|
275
|
+
createBookingData: createBookingData,
|
|
276
|
+
editBookingData: editBookingData,
|
|
277
|
+
createBooking: createBooking,
|
|
278
|
+
editBooking: editBooking,
|
|
279
|
+
goEditPanel: goEditPanel
|
|
280
|
+
};
|
|
281
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const getGroupTotalPrice: (items: any[]) => any;
|
|
2
|
+
/**
|
|
3
|
+
* @title: 创建一个虚拟的组
|
|
4
|
+
* @description:
|
|
5
|
+
* @param {any} items
|
|
6
|
+
* @return {*}
|
|
7
|
+
* @Author: zhiwei.Wang
|
|
8
|
+
*/
|
|
9
|
+
export declare const concatBookings: (items: any[]) => any;
|
|
10
|
+
export declare const createBookingItemsByGroup: (item: any, isBatchEdit?: any) => any[];
|
|
11
|
+
export declare const isGroupBooking: (_id: any) => boolean;
|
|
12
|
+
export declare const getProductByGroupId: (groupId: string, items: any[]) => any[];
|
|
13
|
+
export declare const getGroupBooking: (groupId: string, items: any[]) => any;
|
|
14
|
+
export declare const filterItemByGroupId: (groupId: string, items: any[]) => any[];
|