@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
@@ -40,17 +40,17 @@ var import_utils2 = require("../../../booking/utils");
|
|
40
40
|
var import_utils3 = require("../../../booking/info2/service/addService/utils");
|
41
41
|
var import_utils4 = require("../../../booking/info/service2/utils");
|
42
42
|
var import_utils5 = require("../../../booking/info/utils");
|
43
|
-
var import_serve = require("../../../booking/info/service/serve");
|
44
43
|
var import_serviceManager = require("../../../booking/info/service/serviceManager");
|
45
44
|
var import_productSelect = __toESM(require("../../../productSelect"));
|
46
45
|
var import_index = require("./index.less");
|
47
46
|
var import_utils6 = require("../../utils");
|
48
47
|
var import_notAvailable = __toESM(require("../notAvailable"));
|
49
48
|
var import_dayjs = __toESM(require("dayjs"));
|
49
|
+
var import_pisellos = require("../../hooks/pisellos");
|
50
|
+
var import_utils7 = require("./utils");
|
50
51
|
var AddSerivce = (props) => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
52
53
|
const { onEdit, state, dispatch, renderMode = "current" } = props;
|
53
|
-
const [loading, setLoading] = (0, import_react.useState)(true);
|
54
54
|
const context = (0, import_useEngineContext.default)();
|
55
55
|
const notAvailableRef = (0, import_react.useRef)(null);
|
56
56
|
const isLoadedServiceRef = (0, import_react.useRef)(false);
|
@@ -70,6 +70,7 @@ var AddSerivce = (props) => {
|
|
70
70
|
const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
|
71
71
|
const stateRef = (0, import_react.useRef)(state);
|
72
72
|
stateRef.current = state;
|
73
|
+
const { getProducts, products, loading } = (0, import_pisellos.useProducts)();
|
73
74
|
const menuList = (0, import_react.useMemo)(() => {
|
74
75
|
var _a2, _b2, _c2;
|
75
76
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.menu_list_tab) == null ? void 0 : _c2.menu_list) || [];
|
@@ -78,129 +79,44 @@ var AddSerivce = (props) => {
|
|
78
79
|
var _a2, _b2;
|
79
80
|
return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
|
80
81
|
}, [(_k = (_j = state.client) == null ? void 0 : _j.value) == null ? void 0 : _k.id]);
|
81
|
-
const
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}
|
88
|
-
if (list.length !== 1) {
|
89
|
-
return;
|
90
|
-
}
|
91
|
-
let _list = [...state.service.value];
|
92
|
-
if (_list.length !== 0) {
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
setLoading(true);
|
96
|
-
let product = list[0];
|
97
|
-
const detail = await (0, import_serve.getProductDetail)(product.id, {
|
98
|
-
schedule_date: state.date.value.format("YYYY-MM-DD")
|
99
|
-
});
|
100
|
-
const isBundleOrCombination = (0, import_utils5.getIsBundleOrCombination)(detail.data);
|
101
|
-
setLoading(false);
|
102
|
-
if (isBundleOrCombination) return;
|
103
|
-
let _item = {
|
104
|
-
...product,
|
105
|
-
product_id: product.id,
|
106
|
-
_id: (0, import_utils.getUniqueId)(),
|
107
|
-
_extend: {
|
108
|
-
start_date: state.date.value,
|
109
|
-
startDate: state.date.value,
|
110
|
-
endDate: state.date.value,
|
111
|
-
start_time: "00:00:00",
|
112
|
-
duration: 10,
|
113
|
-
quantity: 1,
|
114
|
-
price: product.price,
|
115
|
-
total: product.price,
|
116
|
-
origin_total: product.price,
|
117
|
-
product_name: product.title
|
118
|
-
}
|
119
|
-
};
|
120
|
-
_list.push(_item);
|
121
|
-
dispatch({
|
122
|
-
type: "setService",
|
123
|
-
payload: {
|
124
|
-
value: _list,
|
125
|
-
edit: true
|
82
|
+
const scanAddService = (0, import_ahooks.useMemoizedFn)((list, code) => {
|
83
|
+
let newService = [...state.service.value];
|
84
|
+
list.forEach((item) => {
|
85
|
+
if ((0, import_utils7.isBundle)(item) || (0, import_utils7.isOption)(item)) {
|
86
|
+
handleSelectProduct(item);
|
87
|
+
return;
|
126
88
|
}
|
89
|
+
const values = (0, import_utils7.genValues)(item, code);
|
90
|
+
let cacheItem = (0, import_utils7.createCacheItem)(item, values, state);
|
91
|
+
cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
|
92
|
+
cacheItem.autoClose = false;
|
93
|
+
let { list: _list, quantity } = (0, import_utils6.addService)(
|
94
|
+
[...newService],
|
95
|
+
cacheItem,
|
96
|
+
state
|
97
|
+
);
|
98
|
+
handleAddToast(cacheItem.title, quantity);
|
99
|
+
newService = _list;
|
127
100
|
});
|
128
|
-
};
|
129
|
-
const removeNotAvailableService = (list) => {
|
130
|
-
var _a2, _b2, _c2, _d2, _e2;
|
131
|
-
if (!((_c2 = (_b2 = (_a2 = stateRef.current) == null ? void 0 : _a2.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length)) return;
|
132
|
-
const listMap = list.reduce((acc, cur) => {
|
133
|
-
acc[cur.id] = cur;
|
134
|
-
return acc;
|
135
|
-
}, {});
|
136
|
-
const newValue = (((_e2 = (_d2 = stateRef.current) == null ? void 0 : _d2.service) == null ? void 0 : _e2.value) || []).filter(
|
137
|
-
(item) => listMap[item.product_id]
|
138
|
-
);
|
139
101
|
dispatch({
|
140
102
|
type: "setService",
|
141
103
|
payload: {
|
142
|
-
value:
|
104
|
+
value: newService,
|
143
105
|
edit: true
|
144
106
|
}
|
145
107
|
});
|
146
|
-
};
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
return;
|
159
|
-
}
|
160
|
-
let data = await state.apis.getServices({
|
161
|
-
skip: 1,
|
162
|
-
num: 500,
|
163
|
-
// extension_type: state.productExtensionType,
|
164
|
-
exclude_extension_type: [
|
165
|
-
"product_party",
|
166
|
-
"product_event",
|
167
|
-
"product_series_event",
|
168
|
-
"product_package_ticket",
|
169
|
-
"ticket",
|
170
|
-
"event_item"
|
171
|
-
],
|
172
|
-
with: ["category"],
|
173
|
-
open_quotation: 1,
|
174
|
-
with_schedule: 1,
|
175
|
-
with_count: ["bundleGroup", "optionGroup"],
|
176
|
-
order_by_string: "sort:desc",
|
177
|
-
status: "published",
|
178
|
-
schedule_date: params == null ? void 0 : params.schedule_date,
|
179
|
-
schedule_datetime: params == null ? void 0 : params.schedule_datetime,
|
180
|
-
customer_id: params == null ? void 0 : params.customer_id,
|
181
|
-
menu_list_ids: params == null ? void 0 : params.menu_list_ids,
|
182
|
-
_config: {
|
183
|
-
fullResult: true,
|
184
|
-
customResponse: true
|
185
|
-
}
|
186
|
-
});
|
187
|
-
setLoading(false);
|
188
|
-
if ((data == null ? void 0 : data.code) === 607100) {
|
189
|
-
if (!isLoadedServiceRef.current || ((_d2 = (_c2 = state.service) == null ? void 0 : _c2.services) == null ? void 0 : _d2.length)) {
|
190
|
-
(_e2 = notAvailableRef.current) == null ? void 0 : _e2.open();
|
191
|
-
}
|
192
|
-
}
|
193
|
-
if (!state.service.addModal) {
|
194
|
-
setDefaultService((_f2 = data == null ? void 0 : data.data) == null ? void 0 : _f2.list);
|
195
|
-
}
|
196
|
-
removeNotAvailableService((_g2 = data == null ? void 0 : data.data) == null ? void 0 : _g2.list);
|
197
|
-
isLoadedServiceRef.current = true;
|
198
|
-
dispatch({
|
199
|
-
type: "setService",
|
200
|
-
payload: {
|
201
|
-
services: ((_h2 = data == null ? void 0 : data.data) == null ? void 0 : _h2.list) || []
|
202
|
-
}
|
203
|
-
});
|
108
|
+
});
|
109
|
+
(0, import_react.useMemo)(() => {
|
110
|
+
(0, import_utils7.setHandleSetService)(scanAddService);
|
111
|
+
}, []);
|
112
|
+
const handleAddToast = (title, quantity) => {
|
113
|
+
var _a2;
|
114
|
+
(_a2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _a2.call(
|
115
|
+
Toast,
|
116
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
|
117
|
+
quantity || 1
|
118
|
+
)))
|
119
|
+
);
|
204
120
|
};
|
205
121
|
const handleSelectProduct = (0, import_ahooks.useMemoizedFn)(
|
206
122
|
(item, type = "select") => {
|
@@ -221,10 +137,148 @@ var AddSerivce = (props) => {
|
|
221
137
|
const isEject = (0, import_utils2.getIsEject)(item, type);
|
222
138
|
const isOnlySession = (0, import_utils2.getIsOnlySession)(item);
|
223
139
|
let lock = false;
|
140
|
+
let cacheValues = null;
|
224
141
|
if (isEject) {
|
225
142
|
setCurrentProduct(item);
|
226
143
|
} else {
|
227
144
|
setCurrentProduct(null);
|
145
|
+
if (!isSession) {
|
146
|
+
cacheValues = {
|
147
|
+
bundle: [],
|
148
|
+
key: item.id,
|
149
|
+
option: [],
|
150
|
+
product_id: item.id,
|
151
|
+
product_variant_id: 0,
|
152
|
+
quantity: 1,
|
153
|
+
rowKey: item.id,
|
154
|
+
session: null,
|
155
|
+
unique: "08974625397"
|
156
|
+
};
|
157
|
+
}
|
158
|
+
}
|
159
|
+
const callback = async (e, extension_type, detail) => {
|
160
|
+
var _a3, _b2, _c2, _d2, _e2, _f2;
|
161
|
+
setCurrentProduct(null);
|
162
|
+
if (lock) {
|
163
|
+
return;
|
164
|
+
}
|
165
|
+
lock = true;
|
166
|
+
setTimeout(() => {
|
167
|
+
lock = false;
|
168
|
+
}, 2e3);
|
169
|
+
if (!isBooking4) {
|
170
|
+
const data = await createBookingData({
|
171
|
+
product: { ...detail || item, _params: e }
|
172
|
+
});
|
173
|
+
createBooking({ booking: data });
|
174
|
+
return;
|
175
|
+
}
|
176
|
+
const _detail = detail || item;
|
177
|
+
const other = JSON.parse(JSON.stringify(e));
|
178
|
+
other.session = e.session;
|
179
|
+
let cacheItem = {
|
180
|
+
..._detail,
|
181
|
+
product_id: item.id,
|
182
|
+
_id: (0, import_utils.getUniqueId)(),
|
183
|
+
_key: e.key,
|
184
|
+
_extend: {
|
185
|
+
start_date: state.date.value,
|
186
|
+
quantity: (e == null ? void 0 : e.quantity) || 1,
|
187
|
+
price: _detail.price,
|
188
|
+
product_name: item.title,
|
189
|
+
other
|
190
|
+
},
|
191
|
+
new: 1
|
192
|
+
};
|
193
|
+
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
194
|
+
cacheItem._extend.total = _total;
|
195
|
+
cacheItem._extend.origin_total = _total;
|
196
|
+
const _isEdit = !!state.service.cacheItem;
|
197
|
+
if (_isEdit) {
|
198
|
+
cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
|
199
|
+
cacheItem.new = 0;
|
200
|
+
}
|
201
|
+
if (renderMode === "current") {
|
202
|
+
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
203
|
+
}
|
204
|
+
cacheItem = (0, import_utils3.getProductExtend)({
|
205
|
+
cacheItem,
|
206
|
+
state,
|
207
|
+
isDisabledTime: true
|
208
|
+
});
|
209
|
+
if (state.renderType === "eventBooking") {
|
210
|
+
cacheItem.autoClose = false;
|
211
|
+
}
|
212
|
+
if (cacheItem.autoClose) {
|
213
|
+
cacheItem.autoClose = false;
|
214
|
+
cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
|
215
|
+
let { list: _list, quantity } = (0, import_utils6.addService)(
|
216
|
+
[...state.service.value],
|
217
|
+
cacheItem,
|
218
|
+
state
|
219
|
+
);
|
220
|
+
handleAddToast(cacheItem.title, quantity || 1);
|
221
|
+
(0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
|
222
|
+
try {
|
223
|
+
if (((_f2 = (_e2 = (_d2 = (_c2 = (_b2 = context.appHelper.utils.store) == null ? void 0 : _b2.getState) == null ? void 0 : _c2.call(_b2)) == null ? void 0 : _d2.global) == null ? void 0 : _e2.globalConfig) == null ? void 0 : _f2.id) === 2155) {
|
224
|
+
const val = _list == null ? void 0 : _list.map((s) => {
|
225
|
+
return {
|
226
|
+
product_id: s == null ? void 0 : s.product_id,
|
227
|
+
detailId: s == null ? void 0 : s.id,
|
228
|
+
detailProductId: s == null ? void 0 : s.product_id,
|
229
|
+
product_name: s == null ? void 0 : s.title,
|
230
|
+
price: s == null ? void 0 : s.price,
|
231
|
+
_id: s == null ? void 0 : s._id,
|
232
|
+
_key: s == null ? void 0 : s._key,
|
233
|
+
_serviceKey: s == null ? void 0 : s._serviceKey
|
234
|
+
};
|
235
|
+
});
|
236
|
+
const sendData = {
|
237
|
+
product_id: item == null ? void 0 : item.id,
|
238
|
+
detailId: _detail == null ? void 0 : _detail.id,
|
239
|
+
detailProductId: _detail == null ? void 0 : _detail.product_id,
|
240
|
+
product_name: item == null ? void 0 : item.title,
|
241
|
+
price: _detail == null ? void 0 : _detail.price,
|
242
|
+
serviceVal: val
|
243
|
+
};
|
244
|
+
(0, import_utils.sendWarningLog)({
|
245
|
+
title: "addService",
|
246
|
+
content: [
|
247
|
+
{ key: "添加数据", value: JSON.stringify(sendData) },
|
248
|
+
{
|
249
|
+
key: "日期",
|
250
|
+
value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
251
|
+
}
|
252
|
+
]
|
253
|
+
});
|
254
|
+
}
|
255
|
+
} catch (error) {
|
256
|
+
}
|
257
|
+
dispatch({
|
258
|
+
type: "setService",
|
259
|
+
payload: {
|
260
|
+
addModal: false,
|
261
|
+
value: _list,
|
262
|
+
edit: true,
|
263
|
+
changeService: false
|
264
|
+
}
|
265
|
+
});
|
266
|
+
} else {
|
267
|
+
dispatch({
|
268
|
+
type: "setService",
|
269
|
+
payload: {
|
270
|
+
editModal: true,
|
271
|
+
cacheItem,
|
272
|
+
addModal: !cacheItem.autoClose,
|
273
|
+
changeService: false
|
274
|
+
}
|
275
|
+
});
|
276
|
+
onEdit == null ? void 0 : onEdit(cacheItem);
|
277
|
+
}
|
278
|
+
};
|
279
|
+
if (cacheValues) {
|
280
|
+
callback(cacheValues, "", item);
|
281
|
+
return;
|
228
282
|
}
|
229
283
|
state.action({
|
230
284
|
type: "pisell1.handleOpenProductModal",
|
@@ -246,137 +300,12 @@ var AddSerivce = (props) => {
|
|
246
300
|
onCancel: () => {
|
247
301
|
setCurrentProduct(null);
|
248
302
|
},
|
249
|
-
callback
|
250
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
|
251
|
-
setCurrentProduct(null);
|
252
|
-
if (lock) {
|
253
|
-
return;
|
254
|
-
}
|
255
|
-
lock = true;
|
256
|
-
setTimeout(() => {
|
257
|
-
lock = false;
|
258
|
-
}, 2e3);
|
259
|
-
if (!isBooking4) {
|
260
|
-
const data = await createBookingData({
|
261
|
-
product: { ...detail || item, _params: e }
|
262
|
-
});
|
263
|
-
createBooking({ booking: data });
|
264
|
-
return;
|
265
|
-
}
|
266
|
-
const _detail = detail || item;
|
267
|
-
const other = JSON.parse(JSON.stringify(e));
|
268
|
-
other.session = e.session;
|
269
|
-
let cacheItem = {
|
270
|
-
..._detail,
|
271
|
-
product_id: item.id,
|
272
|
-
_id: (0, import_utils.getUniqueId)(),
|
273
|
-
_key: e.key,
|
274
|
-
_extend: {
|
275
|
-
start_date: state.date.value,
|
276
|
-
quantity: (e == null ? void 0 : e.quantity) || 1,
|
277
|
-
price: _detail.price,
|
278
|
-
product_name: item.title,
|
279
|
-
other
|
280
|
-
},
|
281
|
-
new: 1
|
282
|
-
};
|
283
|
-
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
284
|
-
cacheItem._extend.total = _total;
|
285
|
-
cacheItem._extend.origin_total = _total;
|
286
|
-
const _isEdit = !!state.service.cacheItem;
|
287
|
-
if (_isEdit) {
|
288
|
-
cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
|
289
|
-
cacheItem.new = 0;
|
290
|
-
}
|
291
|
-
if (renderMode === "current") {
|
292
|
-
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
293
|
-
}
|
294
|
-
cacheItem = (0, import_utils3.getProductExtend)({
|
295
|
-
cacheItem,
|
296
|
-
state,
|
297
|
-
isDisabledTime: true
|
298
|
-
});
|
299
|
-
if (state.renderType === "eventBooking") {
|
300
|
-
cacheItem.autoClose = false;
|
301
|
-
}
|
302
|
-
if (cacheItem.autoClose) {
|
303
|
-
cacheItem.autoClose = false;
|
304
|
-
cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
|
305
|
-
let { list: _list, quantity } = (0, import_utils6.addService)(
|
306
|
-
[...state.service.value],
|
307
|
-
cacheItem,
|
308
|
-
state
|
309
|
-
);
|
310
|
-
(_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
|
311
|
-
Toast,
|
312
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
|
313
|
-
quantity || 1
|
314
|
-
)))
|
315
|
-
);
|
316
|
-
(0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
|
317
|
-
try {
|
318
|
-
if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
|
319
|
-
const val = _list == null ? void 0 : _list.map((s) => {
|
320
|
-
return {
|
321
|
-
product_id: s == null ? void 0 : s.product_id,
|
322
|
-
detailId: s == null ? void 0 : s.id,
|
323
|
-
detailProductId: s == null ? void 0 : s.product_id,
|
324
|
-
product_name: s == null ? void 0 : s.title,
|
325
|
-
price: s == null ? void 0 : s.price,
|
326
|
-
_id: s == null ? void 0 : s._id,
|
327
|
-
_key: s == null ? void 0 : s._key,
|
328
|
-
_serviceKey: s == null ? void 0 : s._serviceKey
|
329
|
-
};
|
330
|
-
});
|
331
|
-
const sendData = {
|
332
|
-
product_id: item == null ? void 0 : item.id,
|
333
|
-
detailId: _detail == null ? void 0 : _detail.id,
|
334
|
-
detailProductId: _detail == null ? void 0 : _detail.product_id,
|
335
|
-
product_name: item == null ? void 0 : item.title,
|
336
|
-
price: _detail == null ? void 0 : _detail.price,
|
337
|
-
serviceVal: val
|
338
|
-
};
|
339
|
-
(0, import_utils.sendWarningLog)({
|
340
|
-
title: "addService",
|
341
|
-
content: [
|
342
|
-
{ key: "添加数据", value: JSON.stringify(sendData) },
|
343
|
-
{
|
344
|
-
key: "日期",
|
345
|
-
value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
346
|
-
}
|
347
|
-
]
|
348
|
-
});
|
349
|
-
}
|
350
|
-
} catch (error) {
|
351
|
-
}
|
352
|
-
dispatch({
|
353
|
-
type: "setService",
|
354
|
-
payload: {
|
355
|
-
addModal: false,
|
356
|
-
value: _list,
|
357
|
-
edit: true,
|
358
|
-
changeService: false
|
359
|
-
}
|
360
|
-
});
|
361
|
-
} else {
|
362
|
-
dispatch({
|
363
|
-
type: "setService",
|
364
|
-
payload: {
|
365
|
-
editModal: true,
|
366
|
-
cacheItem,
|
367
|
-
addModal: !cacheItem.autoClose,
|
368
|
-
changeService: false
|
369
|
-
}
|
370
|
-
});
|
371
|
-
onEdit == null ? void 0 : onEdit(cacheItem);
|
372
|
-
}
|
373
|
-
}
|
303
|
+
callback
|
374
304
|
});
|
375
305
|
}
|
376
306
|
);
|
377
307
|
const renderList = (0, import_react.useMemo)(() => {
|
378
|
-
|
379
|
-
let _list = ((_a2 = state.service) == null ? void 0 : _a2.services) || [];
|
308
|
+
let _list = products || [];
|
380
309
|
if ((0, import_utils4.isDaysBooking)(state)) {
|
381
310
|
if (!(0, import_utils4.holderId)(state)) {
|
382
311
|
_list = _list.filter(
|
@@ -385,7 +314,7 @@ var AddSerivce = (props) => {
|
|
385
314
|
}
|
386
315
|
}
|
387
316
|
return _list;
|
388
|
-
}, [
|
317
|
+
}, [products, state == null ? void 0 : state.activeCartId]);
|
389
318
|
const currentDate = (0, import_react.useMemo)(() => {
|
390
319
|
return state.date.value.format("YYYY-MM-DD");
|
391
320
|
}, [state.date.value]);
|
@@ -394,7 +323,7 @@ var AddSerivce = (props) => {
|
|
394
323
|
}, [state.date.value]);
|
395
324
|
(0, import_react.useEffect)(() => {
|
396
325
|
if (renderMode === "current" && state.bookingConfig) {
|
397
|
-
|
326
|
+
getProducts({
|
398
327
|
schedule_date: currentDate,
|
399
328
|
customer_id: customerId,
|
400
329
|
menu_list_ids: menuList,
|
@@ -428,7 +357,6 @@ var AddSerivce = (props) => {
|
|
428
357
|
}
|
429
358
|
return null;
|
430
359
|
}, [
|
431
|
-
(_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n.autoClose,
|
432
360
|
state.service.addModal,
|
433
361
|
import_utils.locales,
|
434
362
|
renderList,
|
@@ -0,0 +1,173 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/components/ticketBooking/components/addServiceVariant/utils.ts
|
20
|
+
var utils_exports = {};
|
21
|
+
__export(utils_exports, {
|
22
|
+
createCacheItem: () => createCacheItem,
|
23
|
+
formatVariantGroupTitle: () => formatVariantGroupTitle,
|
24
|
+
genValues: () => genValues,
|
25
|
+
getHandleSetService: () => getHandleSetService,
|
26
|
+
isBundle: () => isBundle,
|
27
|
+
isOption: () => isOption,
|
28
|
+
isVariant: () => isVariant,
|
29
|
+
setHandleSetService: () => setHandleSetService
|
30
|
+
});
|
31
|
+
module.exports = __toCommonJS(utils_exports);
|
32
|
+
var import_utils = require("@pisell/utils");
|
33
|
+
var import_utils2 = require("../../../booking/utils");
|
34
|
+
var import_utils3 = require("../../../booking/info2/service/addService/utils");
|
35
|
+
var formatVariantGroupTitle = (title, variant_group = []) => {
|
36
|
+
try {
|
37
|
+
const formattedTitle = variant_group == null ? void 0 : variant_group.map((item) => {
|
38
|
+
const value = title[item == null ? void 0 : item.position_id];
|
39
|
+
if (value) {
|
40
|
+
return `${(item == null ? void 0 : item.name) || "-"}: ${value}`;
|
41
|
+
}
|
42
|
+
return "";
|
43
|
+
}).filter(Boolean);
|
44
|
+
return formattedTitle == null ? void 0 : formattedTitle.join(", ");
|
45
|
+
} catch (error) {
|
46
|
+
console.log(error);
|
47
|
+
}
|
48
|
+
};
|
49
|
+
var createCacheItem = (detail, values, state) => {
|
50
|
+
let cacheItem = {
|
51
|
+
...detail,
|
52
|
+
product_id: detail.id,
|
53
|
+
_id: (0, import_utils.getUniqueId)(),
|
54
|
+
_key: values.key,
|
55
|
+
_extend: {
|
56
|
+
start_date: state.date.value,
|
57
|
+
quantity: (values == null ? void 0 : values.quantity) || 1,
|
58
|
+
price: detail.price,
|
59
|
+
product_name: detail.title,
|
60
|
+
other: values
|
61
|
+
},
|
62
|
+
new: 1
|
63
|
+
};
|
64
|
+
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
65
|
+
cacheItem._extend.total = _total;
|
66
|
+
cacheItem._extend.origin_total = _total;
|
67
|
+
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
68
|
+
cacheItem = (0, import_utils3.getProductExtend)({
|
69
|
+
cacheItem,
|
70
|
+
state,
|
71
|
+
isDisabledTime: true
|
72
|
+
});
|
73
|
+
return cacheItem;
|
74
|
+
};
|
75
|
+
var formatDataKey = (data) => {
|
76
|
+
var _a, _b, _c, _d;
|
77
|
+
const _data = {
|
78
|
+
...data
|
79
|
+
};
|
80
|
+
let key = `${_data.product_id}`;
|
81
|
+
let rowKey = key;
|
82
|
+
if (_data.product_variant_id) {
|
83
|
+
let str = `_${_data.product_variant_id}`;
|
84
|
+
key += str;
|
85
|
+
rowKey += str;
|
86
|
+
}
|
87
|
+
if ((_a = _data == null ? void 0 : _data.option) == null ? void 0 : _a.length) {
|
88
|
+
for (const item of _data.option) {
|
89
|
+
let str = `_${item.option_group_id}_${item.product_option_item_id}`;
|
90
|
+
key += str;
|
91
|
+
rowKey += `${str}_${item.quantity || item.num}`;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
if ((_b = _data == null ? void 0 : _data.bundle) == null ? void 0 : _b.length) {
|
95
|
+
for (const item of _data.bundle) {
|
96
|
+
let str = `_${item.group_id}_${item.bundle_product_id}`;
|
97
|
+
key += str;
|
98
|
+
rowKey += `${str}_${item.quantity || item.num}`;
|
99
|
+
if (item == null ? void 0 : item.option) {
|
100
|
+
for (const opt of item.option) {
|
101
|
+
let str2 = `_${opt.option_group_id}_${opt.product_option_item_id}`;
|
102
|
+
key += str2;
|
103
|
+
rowKey += `${str2}_${opt.quantity || opt.num}`;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
if (_data == null ? void 0 : _data.session) {
|
109
|
+
let str = `_${(_c = _data == null ? void 0 : _data.session) == null ? void 0 : _c.key}`;
|
110
|
+
key += str;
|
111
|
+
rowKey += str;
|
112
|
+
}
|
113
|
+
if (_data == null ? void 0 : _data.schedule) {
|
114
|
+
let str = `_${(_d = _data == null ? void 0 : _data.schedule) == null ? void 0 : _d.key}`;
|
115
|
+
key += str;
|
116
|
+
rowKey += str;
|
117
|
+
}
|
118
|
+
_data.key = key;
|
119
|
+
_data.rowKey = rowKey;
|
120
|
+
return _data;
|
121
|
+
};
|
122
|
+
var isVariant = (item) => {
|
123
|
+
return (item == null ? void 0 : item.variant_group_count) > 0 && (item == null ? void 0 : item.option_group_count) === 0;
|
124
|
+
};
|
125
|
+
var isOption = (item) => {
|
126
|
+
return (item == null ? void 0 : item.option_group_count) > 0;
|
127
|
+
};
|
128
|
+
var isBundle = (item) => {
|
129
|
+
return (item == null ? void 0 : item.bundle_group_count) > 0;
|
130
|
+
};
|
131
|
+
var genValues = (item, code) => {
|
132
|
+
var _a, _b;
|
133
|
+
let params = {
|
134
|
+
bundle: [],
|
135
|
+
option: [],
|
136
|
+
// price,
|
137
|
+
product_id: item.id,
|
138
|
+
product_variant_id: 0,
|
139
|
+
// product_option_string,
|
140
|
+
quantity: 1,
|
141
|
+
rowKey: "",
|
142
|
+
session: null
|
143
|
+
};
|
144
|
+
if (((_a = item == null ? void 0 : item.variant_group) == null ? void 0 : _a.length) || ((_b = item == null ? void 0 : item.option_group) == null ? void 0 : _b.length)) {
|
145
|
+
const variantItem = item.variant.find((item2) => item2.code === code || item2.barcode === code);
|
146
|
+
const variant_group_title = formatVariantGroupTitle(
|
147
|
+
variantItem == null ? void 0 : variantItem.title,
|
148
|
+
(item == null ? void 0 : item.variant_group) || []
|
149
|
+
);
|
150
|
+
params.price = Number((variantItem == null ? void 0 : variantItem.price) || 0);
|
151
|
+
params.product_variant_id = variantItem.id;
|
152
|
+
params.product_option_string = variant_group_title;
|
153
|
+
}
|
154
|
+
return formatDataKey(params);
|
155
|
+
};
|
156
|
+
var handleSetService = null;
|
157
|
+
var setHandleSetService = (fn) => {
|
158
|
+
handleSetService = fn;
|
159
|
+
};
|
160
|
+
var getHandleSetService = () => {
|
161
|
+
return handleSetService;
|
162
|
+
};
|
163
|
+
// Annotate the CommonJS export names for ESM import in node:
|
164
|
+
0 && (module.exports = {
|
165
|
+
createCacheItem,
|
166
|
+
formatVariantGroupTitle,
|
167
|
+
genValues,
|
168
|
+
getHandleSetService,
|
169
|
+
isBundle,
|
170
|
+
isOption,
|
171
|
+
isVariant,
|
172
|
+
setHandleSetService
|
173
|
+
});
|