@pisell/private-materials 6.2.24 → 6.2.26
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 +9 -1
- package/build/lowcode/preview.js +8 -8
- 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/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/index.js +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/addons/index.js +4 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/actionButtons/index.js +395 -0
- package/es/components/booking/components/actionButtons/index.less +148 -0
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/clearCartModal/index.js +50 -0
- package/es/components/booking/components/clearCartModal/index.less +109 -0
- package/es/components/booking/components/customSelect/index.js +1 -0
- package/es/components/booking/components/customiseItemModal/index.js +294 -0
- package/es/components/booking/components/customiseItemModal/index.less +606 -0
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +15 -3
- package/es/components/booking/components/footer/index.js +106 -39
- package/es/components/booking/components/footer/utils.js +52 -24
- package/es/components/booking/components/tabPane/index.js +86 -5
- package/es/components/booking/components/tabPane/index.less +75 -1
- package/es/components/booking/components/voucher/index.js +19 -8
- package/es/components/booking/components/voucher/index.less +1 -1
- package/es/components/booking/dashboard/index.js +10 -3
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/hooks/useClearCart.js +11 -8
- package/es/components/booking/hooks/useQuotation.js +17 -7
- package/es/components/booking/info/client/index.js +3 -2
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +15 -7
- package/es/components/booking/info/index.less +18 -2
- package/es/components/booking/info/main.js +14 -15
- package/es/components/booking/info/service/Lists.js +41 -28
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.js +3 -0
- package/es/components/booking/info/service/editService/index.js +15 -10
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.js +2 -2
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +4 -0
- package/es/components/booking/info/service2/utils.js +32 -23
- package/es/components/booking/info2/cartClientCard/index.js +343 -0
- package/es/components/booking/info2/cartClientCard/index.less +6 -0
- package/es/components/booking/info2/cartClientCard/locales.js +26 -0
- package/es/components/booking/info2/cartClientCard/types.js +1 -0
- package/es/components/booking/info2/cartClientCard/utils.js +7 -0
- package/es/components/booking/info2/index.js +41 -18
- package/es/components/booking/info2/service/addService/utils.js +6 -3
- package/es/components/booking/info2/service/addTimeModal/index.js +5 -1
- package/es/components/booking/info2/service/editNormalService/index.js +67 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
- package/es/components/booking/info2/service/editService/index.js +267 -171
- package/es/components/booking/info2/service/index.js +27 -18
- package/es/components/booking/info2/service/serviceItem/index.js +2 -2
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +26 -3
- package/es/components/booking/locales.js +99 -3
- package/es/components/booking/materiels/duration/index.js +9 -2
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +52 -32
- package/es/components/booking/notes/addNote/index.less +53 -0
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +62 -41
- package/es/components/shoppingCart/components/Cart/index.js +21 -18
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/subTotal/index.less +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +309 -351
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
- package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
- package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +79 -68
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
- package/es/components/ticketBooking/index.js +21 -3
- package/es/components/ticketBooking/locales.js +6 -3
- package/es/components/ticketBooking/serve.js +11 -11
- package/es/components/ticketBooking/utils/index.d.ts +39 -2
- package/es/components/ticketBooking/utils/index.js +104 -11
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useToast.js +9 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/index.js +452 -0
- package/es/plus/clientCard/index.less +539 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.js +212 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.js +214 -0
- package/es/plus/clinetSearch/index.less +91 -0
- package/es/plus/clinetSearch/locales.js +101 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/noteModal/AddTempModal.js +64 -0
- package/es/plus/noteModal/index.js +199 -0
- package/es/plus/noteModal/index.less +168 -0
- package/es/plus/noteModal/locales.js +32 -0
- package/es/plus/noteModal/types.js +1 -0
- package/es/pro/comprehensiveSearch/camera.svg +4 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.js +342 -0
- package/es/pro/comprehensiveSearch/index.less +323 -0
- package/es/pro/comprehensiveSearch/locales.js +17 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.js +231 -0
- package/es/pro/pisellNumberSelector/index.less +193 -0
- package/es/pro/pisellPhoneKeyboard/index.js +211 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
- package/es/pro/pisellPriceRadio/index.js +113 -0
- package/es/pro/pisellPriceRadio/index.less +158 -0
- package/es/pro/skuDetailModal/index.js +352 -0
- package/es/pro/skuDetailModal/index.less +236 -0
- package/es/pro/skuDetailModal/locales.js +47 -0
- package/es/pro/skuDetailModal/types.js +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/index.js +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/addons/index.js +4 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/actionButtons/index.js +325 -0
- package/lib/components/booking/components/actionButtons/index.less +148 -0
- package/lib/components/booking/components/clearCartModal/index.js +80 -0
- package/lib/components/booking/components/clearCartModal/index.less +109 -0
- package/lib/components/booking/components/customSelect/index.js +1 -0
- package/lib/components/booking/components/customiseItemModal/index.js +279 -0
- package/lib/components/booking/components/customiseItemModal/index.less +606 -0
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +5 -3
- package/lib/components/booking/components/footer/index.js +93 -23
- package/lib/components/booking/components/footer/utils.js +38 -13
- package/lib/components/booking/components/tabPane/index.js +78 -4
- package/lib/components/booking/components/tabPane/index.less +75 -1
- package/lib/components/booking/components/voucher/index.js +18 -7
- package/lib/components/booking/components/voucher/index.less +1 -1
- package/lib/components/booking/dashboard/index.js +7 -2
- package/lib/components/booking/hooks/useClearCart.js +16 -13
- package/lib/components/booking/hooks/useQuotation.js +3 -1
- package/lib/components/booking/info/client/index.js +5 -4
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +16 -9
- package/lib/components/booking/info/index.less +18 -2
- package/lib/components/booking/info/main.js +12 -5
- package/lib/components/booking/info/service/Lists.js +41 -25
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.js +31 -0
- package/lib/components/booking/info/service/editService/index.js +7 -1
- package/lib/components/booking/info/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +4 -0
- package/lib/components/booking/info/service2/utils.js +31 -19
- package/lib/components/booking/info2/cartClientCard/index.js +298 -0
- package/lib/components/booking/info2/cartClientCard/index.less +6 -0
- package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
- package/lib/components/booking/info2/cartClientCard/types.js +17 -0
- package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
- package/lib/components/booking/info2/index.js +30 -9
- package/lib/components/booking/info2/service/addService/utils.js +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.js +4 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
- package/lib/components/booking/info2/service/editService/index.js +139 -74
- package/lib/components/booking/info2/service/index.js +16 -12
- package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +23 -4
- package/lib/components/booking/locales.js +93 -3
- package/lib/components/booking/materiels/duration/index.js +7 -2
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +41 -23
- package/lib/components/booking/notes/addNote/index.less +53 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +42 -21
- package/lib/components/shoppingCart/components/Cart/index.js +18 -15
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/subTotal/index.less +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +176 -248
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
- package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
- package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +100 -86
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
- package/lib/components/ticketBooking/index.js +31 -4
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/serve.js +11 -11
- package/lib/components/ticketBooking/utils/index.d.ts +39 -2
- package/lib/components/ticketBooking/utils/index.js +71 -10
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/useToast.js +42 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/index.js +442 -0
- package/lib/plus/clientCard/index.less +539 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.js +243 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.js +205 -0
- package/lib/plus/clinetSearch/index.less +91 -0
- package/lib/plus/clinetSearch/locales.js +125 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/noteModal/AddTempModal.js +95 -0
- package/lib/plus/noteModal/index.js +199 -0
- package/lib/plus/noteModal/index.less +168 -0
- package/lib/plus/noteModal/locales.js +56 -0
- package/lib/plus/noteModal/types.js +17 -0
- package/lib/pro/comprehensiveSearch/camera.svg +4 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.js +259 -0
- package/lib/pro/comprehensiveSearch/index.less +323 -0
- package/lib/pro/comprehensiveSearch/locales.js +41 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.js +260 -0
- package/lib/pro/pisellNumberSelector/index.less +193 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
- package/lib/pro/pisellPriceRadio/index.js +130 -0
- package/lib/pro/pisellPriceRadio/index.less +158 -0
- package/lib/pro/skuDetailModal/index.js +311 -0
- package/lib/pro/skuDetailModal/index.less +236 -0
- package/lib/pro/skuDetailModal/locales.js +71 -0
- package/lib/pro/skuDetailModal/types.js +17 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +337 -0
- package/lowcode/comprehensive-search/meta.ts +261 -0
- package/package.json +26 -26
- package/es/components/Sales/Cart/index.d.ts +0 -53
- package/es/components/booking/addons/index.d.ts +0 -17
- package/es/components/booking/components/tabPane/index.d.ts +0 -4
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/locales.d.ts +0 -828
- package/es/components/booking/notes/addNote/index.d.ts +0 -3
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/ticketBooking/locales.d.ts +0 -174
- package/es/components/ticketBooking/serve.d.ts +0 -287
- package/es/index.d.ts +0 -47
- package/lib/components/Sales/Cart/index.d.ts +0 -53
- package/lib/components/booking/addons/index.d.ts +0 -17
- package/lib/components/booking/components/tabPane/index.d.ts +0 -4
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/locales.d.ts +0 -828
- package/lib/components/booking/notes/addNote/index.d.ts +0 -3
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/ticketBooking/locales.d.ts +0 -174
- package/lib/components/ticketBooking/serve.d.ts +0 -287
- package/lib/index.d.ts +0 -47
@@ -54,7 +54,7 @@ var import_utils6 = require("../../../info/service2/utils");
|
|
54
54
|
var import_utils7 = require("../../../../ticketBooking/utils");
|
55
55
|
var submitLock = false;
|
56
56
|
var Info = (_, ref) => {
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I;
|
58
58
|
const [form] = import_antd.Form.useForm();
|
59
59
|
const useTotal = import_antd.Form.useWatch("total", form);
|
60
60
|
const useResource = import_antd.Form.useWatch("resource", form);
|
@@ -64,10 +64,13 @@ var Info = (_, ref) => {
|
|
64
64
|
const resourcesRef = (0, import_react.useRef)(null);
|
65
65
|
const isChangeTotal = (0, import_react.useRef)(false);
|
66
66
|
const isNormalProduct = (0, import_react.useMemo)(() => {
|
67
|
-
var _a2, _b2;
|
68
|
-
|
67
|
+
var _a2, _b2, _c2;
|
68
|
+
if (!((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem)) {
|
69
|
+
return true;
|
70
|
+
}
|
71
|
+
return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
|
69
72
|
}, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
|
70
|
-
const getCurrentCacheItem = (_cacheItem) => {
|
73
|
+
const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
|
71
74
|
let values = form.getFieldsValue();
|
72
75
|
let _item = _cacheItem || state.service.cacheItem;
|
73
76
|
return {
|
@@ -77,40 +80,43 @@ var Info = (_, ref) => {
|
|
77
80
|
...values
|
78
81
|
}
|
79
82
|
};
|
80
|
-
};
|
83
|
+
});
|
81
84
|
const currentResource = (0, import_react.useMemo)(() => {
|
82
85
|
return null;
|
83
|
-
}, [
|
86
|
+
}, []);
|
84
87
|
const durationProps = (0, import_react.useMemo)(() => {
|
85
88
|
var _a2, _b2, _c2;
|
86
89
|
let _cacheItem = getCurrentCacheItem();
|
87
|
-
|
90
|
+
const val2 = (0, import_utils4.getDurationProps)({
|
88
91
|
cacheItem: _cacheItem,
|
89
92
|
useStartTime,
|
90
|
-
currentResource,
|
93
|
+
// currentResource,
|
91
94
|
slice: (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time
|
92
95
|
});
|
96
|
+
return val2;
|
93
97
|
}, [
|
94
|
-
currentResource,
|
98
|
+
// currentResource,
|
95
99
|
state.service.cacheItem,
|
96
100
|
useStartTime,
|
97
101
|
useResource,
|
98
102
|
(_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
|
99
103
|
]);
|
100
104
|
const flexibleOption = (0, import_react.useMemo)(() => {
|
101
|
-
|
105
|
+
const op = (0, import_utils4.getFlexibleOption)({
|
102
106
|
durationProps
|
103
107
|
});
|
108
|
+
return op;
|
104
109
|
}, [durationProps, import_utils.locales.locale]);
|
105
110
|
const timeObj = (0, import_react.useMemo)(() => {
|
106
|
-
|
111
|
+
const val2 = (0, import_utils4.getTimeObj)({
|
107
112
|
durationProps,
|
108
113
|
useStartTime,
|
109
114
|
currentResource,
|
110
115
|
state,
|
111
116
|
useDuration
|
112
117
|
});
|
113
|
-
|
118
|
+
return val2;
|
119
|
+
}, [durationProps, useStartTime, currentResource, (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time, useDuration]);
|
114
120
|
(0, import_react.useEffect)(() => {
|
115
121
|
try {
|
116
122
|
if (useDuration.indexOf("flexible_") == 0) {
|
@@ -123,7 +129,7 @@ var Info = (_, ref) => {
|
|
123
129
|
} catch (err) {
|
124
130
|
}
|
125
131
|
}, [useDuration, flexibleOption]);
|
126
|
-
const handleDeleteProduct = () => {
|
132
|
+
const handleDeleteProduct = (0, import_ahooks.useMemoizedFn)(() => {
|
127
133
|
var _a2;
|
128
134
|
if (state.channelDisabledEdit) {
|
129
135
|
return;
|
@@ -140,7 +146,7 @@ var Info = (_, ref) => {
|
|
140
146
|
cacheItem: null
|
141
147
|
}
|
142
148
|
});
|
143
|
-
};
|
149
|
+
});
|
144
150
|
const getDiscount = () => {
|
145
151
|
var _a2;
|
146
152
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
@@ -218,13 +224,32 @@ var Info = (_, ref) => {
|
|
218
224
|
}
|
219
225
|
});
|
220
226
|
};
|
227
|
+
const { run: setEditDataRun } = (0, import_ahooks.useDebounceFn)(
|
228
|
+
(...params) => {
|
229
|
+
setEditData(...params);
|
230
|
+
},
|
231
|
+
{
|
232
|
+
wait: 50,
|
233
|
+
leading: true,
|
234
|
+
trailing: false
|
235
|
+
}
|
236
|
+
);
|
221
237
|
const setEditData = (0, import_ahooks.useMemoizedFn)(
|
222
238
|
(_cacheItem, open, openProductDetail) => {
|
223
|
-
|
239
|
+
console.timeEnd("handleChange");
|
240
|
+
console.log("setEditDatasetEditData", _cacheItem, open);
|
224
241
|
isChangeTotal.current = false;
|
225
242
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
226
243
|
let values = cacheItem._extend;
|
244
|
+
const startTime2 = performance.now();
|
245
|
+
console.log(startTime2, "startTime");
|
246
|
+
form.resetFields();
|
227
247
|
form.setFieldsValue(values);
|
248
|
+
const endTime = performance.now();
|
249
|
+
console.log(endTime - window.pp1, "打开商品5");
|
250
|
+
console.log("执行时间", endTime - startTime2, values);
|
251
|
+
setTimeout(() => {
|
252
|
+
}, 20);
|
228
253
|
if (openProductDetail) {
|
229
254
|
setTimeout(() => {
|
230
255
|
handleEdit({});
|
@@ -237,7 +262,7 @@ var Info = (_, ref) => {
|
|
237
262
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
238
263
|
let cPrice = Number(useTotal || 0);
|
239
264
|
return cPrice !== oPrice;
|
240
|
-
}, [useTotal, (
|
265
|
+
}, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
|
241
266
|
const getResources = () => {
|
242
267
|
let res = (0, import_utils4.formatResources)({
|
243
268
|
cacheItem: getCurrentCacheItem(),
|
@@ -259,9 +284,9 @@ var Info = (_, ref) => {
|
|
259
284
|
updateResourceErrors(res.maps);
|
260
285
|
};
|
261
286
|
const updateResourceErrors = (resourceMaps) => {
|
262
|
-
let { resource } = form.getFieldsValue();
|
263
|
-
if (
|
264
|
-
let _resource = { ...
|
287
|
+
let { resource: resource2 } = form.getFieldsValue();
|
288
|
+
if (resource2) {
|
289
|
+
let _resource = { ...resource2 };
|
265
290
|
for (let form_id in _resource) {
|
266
291
|
_resource[form_id] = _resource[form_id].map((d) => {
|
267
292
|
var _a2, _b2;
|
@@ -295,24 +320,17 @@ var Info = (_, ref) => {
|
|
295
320
|
]);
|
296
321
|
(0, import_react.useEffect)(() => {
|
297
322
|
if (state.isBookingCreatePage && state.service.editModal) {
|
298
|
-
|
323
|
+
setEditDataRun(null);
|
299
324
|
}
|
300
325
|
}, [state.service.editModal, state.isBookingCreatePage]);
|
301
326
|
(0, import_react.useEffect)(() => {
|
302
327
|
getDiscount();
|
303
|
-
}, [useTotal, (
|
304
|
-
const isDiscount = (0, import_react.useMemo)(() => {
|
305
|
-
var _a2, _b2, _c2;
|
306
|
-
if (!((_a2 = state.service) == null ? void 0 : _a2.cacheItem)) {
|
307
|
-
return false;
|
308
|
-
}
|
309
|
-
return useTotal != ((_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend.origin_total);
|
310
|
-
}, [useTotal, (_j = (_i = state.service) == null ? void 0 : _i.cacheItem) == null ? void 0 : _j._extend.origin_total]);
|
328
|
+
}, [useTotal, (_k = (_j = state.service.cacheItem) == null ? void 0 : _j._extend) == null ? void 0 : _k.origin_total]);
|
311
329
|
const bundles = (0, import_react.useMemo)(() => {
|
312
330
|
var _a2, _b2, _c2, _d2;
|
313
331
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
314
|
-
}, [(
|
315
|
-
const handleEdit = (e) => {
|
332
|
+
}, [(_o = (_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.bundle]);
|
333
|
+
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
316
334
|
var _a2, _b2, _c2, _d2, _e2;
|
317
335
|
const item = state.service.cacheItem;
|
318
336
|
let values = form.getFieldsValue();
|
@@ -398,8 +416,8 @@ var Info = (_, ref) => {
|
|
398
416
|
});
|
399
417
|
}
|
400
418
|
});
|
401
|
-
};
|
402
|
-
const handleChange = (e) => {
|
419
|
+
});
|
420
|
+
const handleChange = (0, import_ahooks.useMemoizedFn)((e) => {
|
403
421
|
if (state.channelDisabledEdit) {
|
404
422
|
return;
|
405
423
|
}
|
@@ -413,10 +431,10 @@ var Info = (_, ref) => {
|
|
413
431
|
// changeService: true,
|
414
432
|
}
|
415
433
|
});
|
416
|
-
};
|
434
|
+
});
|
417
435
|
(0, import_react.useImperativeHandle)(ref, () => {
|
418
436
|
return {
|
419
|
-
init:
|
437
|
+
init: setEditDataRun
|
420
438
|
};
|
421
439
|
});
|
422
440
|
const handleTotalChange = (number) => {
|
@@ -428,43 +446,30 @@ var Info = (_, ref) => {
|
|
428
446
|
}
|
429
447
|
return false;
|
430
448
|
}, [state.renderType, isNormalProduct]);
|
431
|
-
const SelectTime = (
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
zIndex: state.service.changeService ? 999 : 1e3,
|
437
|
-
forceRender: true,
|
438
|
-
mask: state.drawerMask,
|
439
|
-
open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
|
440
|
-
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
441
|
-
onClose: () => {
|
442
|
-
dispatch({
|
443
|
-
type: "setService",
|
444
|
-
payload: {
|
445
|
-
editModal: false,
|
446
|
-
cacheItem: null,
|
447
|
-
changeService: false
|
448
|
-
}
|
449
|
-
});
|
450
|
-
}
|
451
|
-
},
|
452
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
449
|
+
const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
|
450
|
+
const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
|
451
|
+
const productName = (0, import_react.useMemo)(() => {
|
452
|
+
var _a2, _b2, _c2;
|
453
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
453
454
|
import_collapsibleList.default,
|
454
455
|
{
|
455
456
|
style: { marginTop: bundles.length ? "8px" : 0 },
|
456
457
|
list: bundles,
|
457
458
|
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
458
459
|
}
|
459
|
-
))))
|
460
|
+
))));
|
461
|
+
}, [(_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
|
462
|
+
const price = (0, import_react.useMemo)(() => {
|
463
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
464
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
460
465
|
import_antd.Form.Item,
|
461
466
|
{
|
462
467
|
label: import_utils.locales.getText("pisell2.text.price"),
|
463
468
|
name: "total",
|
464
469
|
rules: [{ required: true }],
|
465
|
-
extra: useTotal !== ((
|
470
|
+
extra: useTotal !== ((_b2 = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
|
466
471
|
(0, import_utils.formatAmount)(
|
467
|
-
(
|
472
|
+
(_d2 = (_c2 = state.service.cacheItem) == null ? void 0 : _c2._extend) == null ? void 0 : _d2.origin_total,
|
468
473
|
2,
|
469
474
|
state.amountSymbol
|
470
475
|
),
|
@@ -480,18 +485,25 @@ var Info = (_, ref) => {
|
|
480
485
|
prefix: state.amountSymbol,
|
481
486
|
onChange: handleTotalChange,
|
482
487
|
disabled: state.channelDisabledEdit,
|
483
|
-
originValue: ((
|
484
|
-
placeholder: ((
|
488
|
+
originValue: ((_f2 = (_e2 = state.service.cacheItem) == null ? void 0 : _e2._extend) == null ? void 0 : _f2.origin_total) || 0,
|
489
|
+
placeholder: ((_h2 = (_g2 = state.service.cacheItem) == null ? void 0 : _g2._extend) == null ? void 0 : _h2.origin_total) || "0"
|
485
490
|
}
|
486
491
|
)
|
487
|
-
))
|
492
|
+
));
|
493
|
+
}, [useTotal, (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total, state.amountSymbol, state.channelDisabledEdit]);
|
494
|
+
const reason = (0, import_react.useMemo)(() => {
|
495
|
+
return isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
488
496
|
import_antd.Form.Item,
|
489
497
|
{
|
490
498
|
label: import_utils.locales.getText("pisell2.text.discount-reason"),
|
491
499
|
name: "discount_reason"
|
492
500
|
},
|
493
501
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
494
|
-
)) : null
|
502
|
+
)) : null;
|
503
|
+
}, [isReason]);
|
504
|
+
const startTime = (0, import_react.useMemo)(() => {
|
505
|
+
var _a2, _b2, _c2, _d2;
|
506
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
495
507
|
import_antd.Form.Item,
|
496
508
|
{
|
497
509
|
label: import_utils.locales.getText("pisell2.text.start_time"),
|
@@ -501,7 +513,7 @@ var Info = (_, ref) => {
|
|
501
513
|
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
502
514
|
SelectTime,
|
503
515
|
{
|
504
|
-
slice: (
|
516
|
+
slice: (_d2 = (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time) == null ? void 0 : _d2.value,
|
505
517
|
timePickerProps: {
|
506
518
|
style: { width: "100%" }
|
507
519
|
},
|
@@ -510,7 +522,11 @@ var Info = (_, ref) => {
|
|
510
522
|
}
|
511
523
|
}
|
512
524
|
) : null
|
513
|
-
))
|
525
|
+
));
|
526
|
+
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value]);
|
527
|
+
const duration = (0, import_react.useMemo)(() => {
|
528
|
+
console.log("render form duration");
|
529
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
514
530
|
import_antd.Form.Item,
|
515
531
|
{
|
516
532
|
label: import_utils.locales.getText("pisell2.text.duration"),
|
@@ -518,23 +534,34 @@ var Info = (_, ref) => {
|
|
518
534
|
rules: [{ required: true }]
|
519
535
|
},
|
520
536
|
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
521
|
-
))
|
537
|
+
));
|
538
|
+
}, [durationProps, timeObj]);
|
539
|
+
const resource = (0, import_react.useMemo)(() => {
|
540
|
+
console.log("render form resource");
|
541
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
522
542
|
import_Resources.default,
|
523
543
|
{
|
524
544
|
ref: resourcesRef,
|
525
545
|
state,
|
526
546
|
cacheItem: state.service.cacheItem,
|
527
|
-
getCurrentCacheItem
|
528
|
-
useDuration,
|
529
|
-
useStartTime
|
547
|
+
getCurrentCacheItem
|
530
548
|
}
|
531
|
-
))
|
549
|
+
));
|
550
|
+
}, [state.renderType, (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources, (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps]);
|
551
|
+
const capacity = (0, import_react.useMemo)(() => {
|
552
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
|
532
553
|
import_Capacity.default,
|
533
554
|
{
|
534
555
|
state,
|
535
556
|
cacheItem: state.service.cacheItem
|
536
557
|
}
|
537
|
-
))
|
558
|
+
));
|
559
|
+
}, [state.locale, state.isTerminal, (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys]);
|
560
|
+
const hiddenQuantity = (0, import_react.useMemo)(() => {
|
561
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
|
562
|
+
}, []);
|
563
|
+
const quantity = (0, import_react.useMemo)(() => {
|
564
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
538
565
|
import_antd.Form.Item,
|
539
566
|
{
|
540
567
|
label: import_utils.locales.getText("pisell2.text.quantity"),
|
@@ -556,7 +583,11 @@ var Info = (_, ref) => {
|
|
556
583
|
}
|
557
584
|
}
|
558
585
|
)
|
559
|
-
))
|
586
|
+
));
|
587
|
+
}, []);
|
588
|
+
const footer = (0, import_react.useMemo)(() => {
|
589
|
+
var _a2;
|
590
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
560
591
|
"div",
|
561
592
|
{
|
562
593
|
className: "pisell-lowcode__booking-service-delete-wrap",
|
@@ -568,13 +599,47 @@ var Info = (_, ref) => {
|
|
568
599
|
{
|
569
600
|
type: "primary",
|
570
601
|
className: "pisell-lowcode__booking-service-body-edit-footer-apple",
|
571
|
-
disabled: !isNormalProduct && !((
|
602
|
+
disabled: !isNormalProduct && !((_a2 = state.service.resourcesOrigin) == null ? void 0 : _a2.length),
|
572
603
|
onClick: () => {
|
573
604
|
form.submit();
|
574
605
|
}
|
575
606
|
},
|
576
607
|
import_utils.locales.getText("pisell2.text.apply")
|
577
|
-
))
|
608
|
+
));
|
609
|
+
}, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length]);
|
610
|
+
console.log("render edit");
|
611
|
+
console.log(state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose), performance.now() - window.pp1, "打开商品1");
|
612
|
+
const [val, setVal] = (0, import_react.useState)(false);
|
613
|
+
(0, import_react.useEffect)(() => {
|
614
|
+
if (isShowTimeAndResource) {
|
615
|
+
setTimeout(() => {
|
616
|
+
setVal(true);
|
617
|
+
}, 200);
|
618
|
+
} else {
|
619
|
+
setVal(false);
|
620
|
+
}
|
621
|
+
}, [isShowTimeAndResource]);
|
622
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
623
|
+
import_drawer.default,
|
624
|
+
{
|
625
|
+
titleNoWrap: true,
|
626
|
+
zIndex: state.service.changeService ? 999 : 1e3,
|
627
|
+
forceRender: true,
|
628
|
+
mask: state.drawerMask,
|
629
|
+
open: !isNoSpecAndPackage && state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
|
630
|
+
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
631
|
+
onClose: () => {
|
632
|
+
dispatch({
|
633
|
+
type: "setService",
|
634
|
+
payload: {
|
635
|
+
editModal: false,
|
636
|
+
cacheItem: null,
|
637
|
+
changeService: false
|
638
|
+
}
|
639
|
+
});
|
640
|
+
}
|
641
|
+
},
|
642
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)
|
578
643
|
));
|
579
644
|
};
|
580
645
|
var editService_default = (0, import_react.forwardRef)(Info);
|
@@ -40,7 +40,7 @@ var import_service = require("../../info/service/index.less");
|
|
40
40
|
var import_addTimeModal = __toESM(require("./addTimeModal"));
|
41
41
|
var import_useInfoHolder = __toESM(require("../../info/hooks/useInfoHolder"));
|
42
42
|
var import_Lists = __toESM(require("../../info/service/Lists"));
|
43
|
-
var
|
43
|
+
var import_editNormalService = __toESM(require("./editNormalService"));
|
44
44
|
var import_useQuotation = __toESM(require("../../hooks/useQuotation"));
|
45
45
|
var Service = () => {
|
46
46
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
@@ -49,21 +49,25 @@ var Service = () => {
|
|
49
49
|
handleEdit,
|
50
50
|
handleAction,
|
51
51
|
dispatchService,
|
52
|
-
showAddTimeModal
|
52
|
+
showAddTimeModal,
|
53
|
+
editNormalServiceRef
|
53
54
|
} = (0, import_useInfoHolder.default)(state, dispatch);
|
54
55
|
(0, import_react.useEffect)(() => {
|
55
56
|
document.body.id = "body";
|
56
57
|
}, []);
|
57
|
-
const clearCart = (0, import_useClearCart.default)(state, dispatch);
|
58
58
|
const { dom } = (0, import_useQuotation.default)(state, dispatch);
|
59
|
-
|
60
|
-
|
61
|
-
{
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
59
|
+
const renderMemo = (0, import_react.useMemo)(() => {
|
60
|
+
console.log("render info22222");
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
62
|
+
import_Lists.default,
|
63
|
+
{
|
64
|
+
isParallelResource: true,
|
65
|
+
onEdit: handleEdit,
|
66
|
+
onAction: handleAction,
|
67
|
+
onChange: (e, type) => dispatchService(type || "setService", e)
|
68
|
+
}
|
69
|
+
), !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit }) : null), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null), /* @__PURE__ */ import_react.default.createElement(import_editNormalService.default, { ref: editNormalServiceRef }), dom);
|
70
|
+
}, [dom, showAddTimeModal]);
|
71
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderMemo);
|
68
72
|
};
|
69
73
|
var service_default = import_react.default.memo(Service);
|
@@ -158,7 +158,7 @@ var ServiceItem = ({
|
|
158
158
|
},
|
159
159
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }) })
|
160
160
|
),
|
161
|
-
d.id ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-title" }, d.title) : null,
|
161
|
+
d.id || d.isCustomItem ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-title" }, d.title) : null,
|
162
162
|
d._extend && state.renderType !== "eventBooking" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-date" }, (0, import_utils.getServiceTime)(d, state.date.value)), renderResources) : null,
|
163
163
|
(((_d = (_c = d._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.bundle) || []).length ? /* @__PURE__ */ import_react.default.createElement(
|
164
164
|
import_collapsibleList.default,
|
@@ -168,7 +168,7 @@ var ServiceItem = ({
|
|
168
168
|
renderItem: (item) => (0, import_utils3.renderBundles)(item, state.amountSymbol)
|
169
169
|
}
|
170
170
|
) : null,
|
171
|
-
d.id ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-price-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-price" }, (0, import_utils2.formatAmount)((_g = d._extend) == null ? void 0 : _g.total, 2, state.amountSymbol)), isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-original-price" }, (0, import_utils2.formatAmount)(d._extend.origin_total, 2, state.amountSymbol)) : null)) : null,
|
171
|
+
d.id || d.isCustomItem ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-price-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-price" }, (0, import_utils2.formatAmount)((_g = d._extend) == null ? void 0 : _g.total, 2, state.amountSymbol)), isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-original-price" }, (0, import_utils2.formatAmount)(d._extend.origin_total, 2, state.amountSymbol)) : null)) : null,
|
172
172
|
isDiscount && ((_h = d._extend) == null ? void 0 : _h.discount_reason) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-discount-reason" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils2.locales.getText("pisell2.text.discount-reason"), ":"), " ", (_i = d._extend) == null ? void 0 : _i.discount_reason) : null,
|
173
173
|
renderUser,
|
174
174
|
((_j = d._extend.relation_details) == null ? void 0 : _j.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-relation-details" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-title" }, import_utils2.locales.getText("page.booking.text.sales")), d._extend.relation_details.map((item, index) => {
|
@@ -33,3 +33,4 @@ export declare const getAppointmentTimingPreference: (state: any) => any;
|
|
33
33
|
* @Date: 2024-01-26 14:09
|
34
34
|
*/
|
35
35
|
export declare const getServiceStartTimeAndEndTime: (state: any, cacheItem: any, timeObj: any) => any;
|
36
|
+
export declare const getIsNoSpecAndPackage: (product: any) => boolean;
|
@@ -33,6 +33,7 @@ __export(utilsByBooking_exports, {
|
|
33
33
|
formatTimes: () => formatTimes,
|
34
34
|
getAppointmentTimingPreference: () => getAppointmentTimingPreference,
|
35
35
|
getErrorList: () => getErrorList,
|
36
|
+
getIsNoSpecAndPackage: () => getIsNoSpecAndPackage,
|
36
37
|
getResourceTimeIsUsable: () => getResourceTimeIsUsable,
|
37
38
|
getServiceStartTimeAndEndTime: () => getServiceStartTimeAndEndTime,
|
38
39
|
getSumCapacity: () => getSumCapacity
|
@@ -41,6 +42,7 @@ module.exports = __toCommonJS(utilsByBooking_exports);
|
|
41
42
|
var import_dayjs = __toESM(require("dayjs"));
|
42
43
|
var import_utils = require("@pisell/utils");
|
43
44
|
var import_utils2 = require("../utils");
|
45
|
+
var import_utils3 = require("../info/service2/utils");
|
44
46
|
var getUseableEventCount = (eventList, current) => {
|
45
47
|
return (eventList || []).reduce((pre, event) => {
|
46
48
|
return pre - event.pax;
|
@@ -208,15 +210,21 @@ var getAppointmentTimingPreference = (state) => {
|
|
208
210
|
return ((_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.information_tab) == null ? void 0 : _c.appointment_timing_preference) || "sequential";
|
209
211
|
};
|
210
212
|
var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
211
|
-
var _a, _b, _c;
|
213
|
+
var _a, _b, _c, _d;
|
214
|
+
if (cacheItem == null ? void 0 : cacheItem.isCustomItem) {
|
215
|
+
return {
|
216
|
+
duration: null
|
217
|
+
// 自定义商品没有时长概念
|
218
|
+
};
|
219
|
+
}
|
212
220
|
const appointmentTimingPreference = getAppointmentTimingPreference(state);
|
213
|
-
let lastServer = (0, import_utils2.getLastServer)(state.service.value);
|
221
|
+
let lastServer = (0, import_utils2.getLastServer)((_a = state.service.value) == null ? void 0 : _a.filter((item) => !item.isCustomItem));
|
214
222
|
let _extend = {
|
215
223
|
// 时长: 当前商品时长 > 第一个时长
|
216
224
|
duration: (0, import_utils2.findNextDuration)(
|
217
225
|
cacheItem.duration,
|
218
226
|
timeObj.durationSlicesBasedOnTime,
|
219
|
-
(
|
227
|
+
(_b = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _b.value
|
220
228
|
)
|
221
229
|
};
|
222
230
|
if (lastServer) {
|
@@ -259,7 +267,7 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
259
267
|
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({ _extend });
|
260
268
|
_extend.startDate = startDate;
|
261
269
|
_extend.endDate = endDate;
|
262
|
-
const session = (
|
270
|
+
const session = (_d = (_c = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.session;
|
263
271
|
if ((0, import_utils2.isSessionProduct)(cacheItem) && session) {
|
264
272
|
_extend.start_date = session.start_at;
|
265
273
|
_extend.startDate = session.start_at;
|
@@ -270,12 +278,23 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
270
278
|
}
|
271
279
|
return _extend;
|
272
280
|
};
|
281
|
+
var getIsNoSpecAndPackage = (product) => {
|
282
|
+
var _a, _b, _c, _d;
|
283
|
+
if (!(0, import_utils3.isNormalProductByDurationSchedule)(product)) {
|
284
|
+
return false;
|
285
|
+
}
|
286
|
+
if (product == null ? void 0 : product.isEditBooking) {
|
287
|
+
return ((_a = product == null ? void 0 : product.product_bundle) == null ? void 0 : _a.length) === 0 && (product == null ? void 0 : product.product_variant_id) === 0 && (((_c = (_b = product == null ? void 0 : product.product_sku) == null ? void 0 : _b.option) == null ? void 0 : _c.length) || 0) === 0;
|
288
|
+
}
|
289
|
+
return (product == null ? void 0 : product.is_bundle) === 0 && (((_d = product == null ? void 0 : product.variant) == null ? void 0 : _d.length) || 0) === 0 && ((product == null ? void 0 : product.option_group_count) || 0) === 0;
|
290
|
+
};
|
273
291
|
// Annotate the CommonJS export names for ESM import in node:
|
274
292
|
0 && (module.exports = {
|
275
293
|
formatResource,
|
276
294
|
formatTimes,
|
277
295
|
getAppointmentTimingPreference,
|
278
296
|
getErrorList,
|
297
|
+
getIsNoSpecAndPackage,
|
279
298
|
getResourceTimeIsUsable,
|
280
299
|
getServiceStartTimeAndEndTime,
|
281
300
|
getSumCapacity
|