@pisell/private-materials 3.3.76 → 3.3.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/Sales/index.js +37 -4
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +7 -0
- package/es/components/Sales/Resource/serve.js +10 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Date/index.js +24 -14
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.js +8 -14
- package/es/components/appointmentBooking/components/Services/index.js +38 -36
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +13 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +6 -7
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.js +3 -3
- package/es/components/booking/addons/index.js +12 -3
- package/es/components/booking/addons/model.js +5 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +3 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +2 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +9 -3
- package/es/components/booking/components/footer/utils.js +74 -36
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +110 -66
- package/es/components/booking/components/voucher/utils.d.ts +4 -0
- package/es/components/booking/components/voucher/utils.js +15 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.js +16 -1
- package/es/components/booking/info/client/index.js +12 -3
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +3 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +6 -2
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +9 -4
- package/es/components/booking/info2/serve.d.ts +1 -1
- package/es/components/booking/info2/serve.js +12 -8
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +5 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +5 -2
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/utils.d.ts +1 -1
- package/es/components/booking/info2/utils.js +3 -2
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/es/components/booking/info2/utilsByBooking.js +5 -3
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- 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/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +4 -0
- 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 +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- 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/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/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- 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.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/stepController/components/Content/index.d.ts +7 -0
- package/es/components/stepController/components/Content/index.js +9 -0
- package/es/components/stepController/components/Content/index.less +8 -0
- package/es/components/stepController/components/Footer/index.d.ts +8 -0
- package/es/components/stepController/components/Footer/index.js +15 -0
- package/es/components/stepController/components/Footer/index.less +39 -0
- package/es/components/stepController/components/Header/index.d.ts +20 -0
- package/es/components/stepController/components/Header/index.js +97 -0
- package/es/components/stepController/components/Header/index.less +21 -0
- package/es/components/stepController/index.d.ts +5 -0
- package/es/components/stepController/index.js +64 -0
- package/es/components/stepController/index.less +11 -0
- package/es/components/stepController/locales.d.ts +27 -0
- package/es/components/stepController/locales.js +32 -0
- package/es/components/stepController/types.d.ts +23 -0
- package/es/components/stepController/types.js +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -8
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +124 -3
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +58 -6
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +7 -0
- package/lib/components/Sales/Resource/serve.js +9 -2
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -4
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Date/index.js +12 -5
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.js +2 -3
- package/lib/components/appointmentBooking/components/Services/index.js +19 -18
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +9 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.js +3 -3
- package/lib/components/booking/addons/index.js +12 -2
- package/lib/components/booking/addons/model.js +3 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.js +5 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
- package/lib/components/booking/components/footer/amount.js +2 -1
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +10 -5
- package/lib/components/booking/components/footer/utils.js +48 -12
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +111 -67
- package/lib/components/booking/components/voucher/utils.d.ts +4 -0
- package/lib/components/booking/components/voucher/utils.js +43 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.js +19 -1
- package/lib/components/booking/info/client/index.js +10 -3
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +2 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +3 -1
- package/lib/components/booking/info/utils.js +1 -3
- package/lib/components/booking/info2/index.js +9 -9
- package/lib/components/booking/info2/serve.d.ts +1 -1
- package/lib/components/booking/info2/serve.js +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +4 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +5 -2
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/utils.d.ts +1 -1
- package/lib/components/booking/info2/utils.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/lib/components/booking/info2/utilsByBooking.js +3 -2
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +6 -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 +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/stepController/components/Content/index.js +40 -0
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/stepController/components/Footer/index.js +49 -0
- package/lib/components/stepController/components/Footer/index.less +39 -0
- package/lib/components/stepController/components/Header/index.d.ts +20 -0
- package/lib/components/stepController/components/Header/index.js +104 -0
- package/lib/components/stepController/components/Header/index.less +21 -0
- package/lib/components/stepController/index.d.ts +5 -0
- package/lib/components/stepController/index.js +89 -0
- package/lib/components/stepController/index.less +11 -0
- package/lib/components/stepController/locales.d.ts +27 -0
- package/lib/components/stepController/locales.js +50 -0
- package/lib/components/stepController/types.d.ts +23 -0
- package/lib/components/stepController/types.js +17 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +42 -5
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +124 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +48 -5
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +2 -2
|
@@ -7,6 +7,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
14
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
16
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -22,7 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
22
26
|
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
23
27
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
24
28
|
import "./index.less";
|
|
25
|
-
import { useMemoizedFn, useDebounceFn } from 'ahooks';
|
|
29
|
+
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
30
|
+
import { getServiceAddons } from "./utils";
|
|
26
31
|
var ShopDiscountHooks = {
|
|
27
32
|
onInited: 'shopDiscount:onInited',
|
|
28
33
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -35,10 +40,11 @@ var ShopDiscountHooks = {
|
|
|
35
40
|
};
|
|
36
41
|
var services = {};
|
|
37
42
|
var VoucherCard = function VoucherCard(props) {
|
|
38
|
-
var _context$appHelper, _state$client$value;
|
|
43
|
+
var _context$appHelper, _state$client$value, _state$service2;
|
|
39
44
|
var context = useEngineContext();
|
|
40
45
|
var state = props.state,
|
|
41
|
-
dispatch = props.dispatch
|
|
46
|
+
dispatch = props.dispatch,
|
|
47
|
+
source = props.source;
|
|
42
48
|
var _useState = useState(false),
|
|
43
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
50
|
showDetail = _useState2[0],
|
|
@@ -53,35 +59,27 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
53
59
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
54
60
|
discountList = _useState6[0],
|
|
55
61
|
setDisCountList = _useState6[1];
|
|
56
|
-
var
|
|
62
|
+
var serviceValueRef = useRef(state.service.value);
|
|
63
|
+
var addonsValueRef = useRef(state.addons.value);
|
|
57
64
|
var isBooking4Shop = useIsBooking4Shop(state);
|
|
58
65
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
59
66
|
services = state.service;
|
|
60
|
-
var availableData = useMemo(function () {
|
|
61
|
-
if (!isBooking4Shop) return [];
|
|
62
|
-
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
63
|
-
return discountList.filter(function (item) {
|
|
64
|
-
return !!item.isAvailable;
|
|
65
|
-
}).map(function (discount) {
|
|
66
|
-
return _objectSpread(_objectSpread({}, discount), {}, {
|
|
67
|
-
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}, [discountList, isBooking4Shop]);
|
|
71
67
|
|
|
72
68
|
// 设置client
|
|
73
|
-
|
|
69
|
+
useDebounceEffect(function () {
|
|
74
70
|
if (isBooking4Shop) {
|
|
75
71
|
shopDiscount.setCustomer(state.client.value);
|
|
76
72
|
}
|
|
77
|
-
}, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop]
|
|
73
|
+
}, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop], {
|
|
74
|
+
wait: 200
|
|
75
|
+
});
|
|
78
76
|
|
|
79
77
|
// 设置productList
|
|
80
78
|
useEffect(function () {
|
|
81
79
|
if (isBooking4Shop) {
|
|
82
|
-
shopDiscount.setProductList(state.service.value);
|
|
80
|
+
shopDiscount.setProductList([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
|
|
83
81
|
}
|
|
84
|
-
}, [state.service.value, isBooking4Shop]);
|
|
82
|
+
}, [state.service.value, state.addons.value, isBooking4Shop]);
|
|
85
83
|
var serviceMemo = useMemo(function () {
|
|
86
84
|
var _ref;
|
|
87
85
|
var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
|
|
@@ -89,7 +87,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
89
87
|
return {
|
|
90
88
|
booking_id: value.booking_id,
|
|
91
89
|
id: value.id,
|
|
92
|
-
_id: value._id,
|
|
93
90
|
price: value.price,
|
|
94
91
|
total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
|
|
95
92
|
discount_list: value.discount_list,
|
|
@@ -98,24 +95,43 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
98
95
|
});
|
|
99
96
|
return val;
|
|
100
97
|
}, [state.service.value]);
|
|
98
|
+
var addonsMemo = useMemo(function () {
|
|
99
|
+
var _ref2;
|
|
100
|
+
var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
|
|
101
|
+
var _value$_extend3, _value$_extend4;
|
|
102
|
+
return {
|
|
103
|
+
booking_id: value.booking_id,
|
|
104
|
+
id: value.id,
|
|
105
|
+
_id: value._id,
|
|
106
|
+
price: value.price,
|
|
107
|
+
total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
|
|
108
|
+
discount_list: value.discount_list,
|
|
109
|
+
_key: value._key,
|
|
110
|
+
num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
return val;
|
|
114
|
+
}, [state.addons.value]);
|
|
115
|
+
var disabled = useMemo(function () {
|
|
116
|
+
var _state$bookingDetail;
|
|
117
|
+
if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
|
|
118
|
+
return item.booking_id;
|
|
119
|
+
})) {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
return false;
|
|
123
|
+
}, [state, addonsMemo, serviceMemo]);
|
|
101
124
|
var _useDebounceFn = useDebounceFn(function () {
|
|
102
125
|
var _state$service;
|
|
103
126
|
// console.log('state.service.value1', state.service.value);
|
|
104
|
-
if (
|
|
127
|
+
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
|
|
105
128
|
return;
|
|
106
129
|
}
|
|
107
130
|
if (isBooking4Shop) {
|
|
108
|
-
var val = shopDiscount.calcDiscount(state.service.value);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
// console.log('val.productList', val.productList);
|
|
113
|
-
dispatch({
|
|
114
|
-
type: 'setService',
|
|
115
|
-
payload: _objectSpread(_objectSpread({}, services), {}, {
|
|
116
|
-
value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
|
|
117
|
-
})
|
|
118
|
-
});
|
|
131
|
+
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
|
|
132
|
+
console.log('input: ', state.service.value);
|
|
133
|
+
console.log('output: ', val);
|
|
134
|
+
productListToValue(val.productList);
|
|
119
135
|
}
|
|
120
136
|
}, {
|
|
121
137
|
wait: 500
|
|
@@ -125,7 +141,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
125
141
|
// 更新productList
|
|
126
142
|
useEffect(function () {
|
|
127
143
|
run();
|
|
128
|
-
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
144
|
+
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
|
|
129
145
|
var fn = useMemoizedFn(function (result) {
|
|
130
146
|
var _result$productList;
|
|
131
147
|
if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
|
|
@@ -133,18 +149,13 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
133
149
|
})) {
|
|
134
150
|
return;
|
|
135
151
|
}
|
|
136
|
-
|
|
137
|
-
type: 'setService',
|
|
138
|
-
payload: _objectSpread(_objectSpread({}, services), {}, {
|
|
139
|
-
value: result.productList
|
|
140
|
-
})
|
|
141
|
-
});
|
|
152
|
+
productListToValue(result.productList);
|
|
142
153
|
});
|
|
143
154
|
|
|
144
155
|
// 监听customer变化
|
|
145
156
|
useEffect(function () {
|
|
146
157
|
if (!isBooking4Shop) return;
|
|
147
|
-
|
|
158
|
+
var onScanCustomerChange = function onScanCustomerChange(customer) {
|
|
148
159
|
// 更新客户
|
|
149
160
|
dispatch({
|
|
150
161
|
type: 'setClient',
|
|
@@ -152,22 +163,49 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
152
163
|
value: customer
|
|
153
164
|
}
|
|
154
165
|
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
|
|
166
|
+
};
|
|
167
|
+
var onDiscountListChange = function onDiscountListChange(discount) {
|
|
158
168
|
setDisCountList(discount);
|
|
159
|
-
}
|
|
169
|
+
};
|
|
170
|
+
pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, onScanCustomerChange);
|
|
171
|
+
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
|
|
172
|
+
pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
|
|
160
173
|
return function () {
|
|
161
174
|
shopDiscount.clear();
|
|
162
|
-
pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
|
|
163
|
-
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
|
|
164
|
-
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
|
|
175
|
+
pisellos.effects.off(ShopDiscountHooks.onCustomerChange, onScanCustomerChange);
|
|
176
|
+
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
|
|
177
|
+
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
|
|
165
178
|
};
|
|
166
179
|
}, [state.bookingId, isBooking4Shop, fn]);
|
|
180
|
+
var productListToValue = useMemoizedFn(function (list, edit) {
|
|
181
|
+
var _getServiceAddons = getServiceAddons(list),
|
|
182
|
+
serviceList = _getServiceAddons.serviceList,
|
|
183
|
+
addonsList = _getServiceAddons.addonsList;
|
|
184
|
+
serviceValueRef.current = serviceList;
|
|
185
|
+
addonsValueRef.current = addonsList;
|
|
186
|
+
var other = {};
|
|
187
|
+
if (edit) {
|
|
188
|
+
other = {
|
|
189
|
+
edit: true
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
dispatch({
|
|
193
|
+
type: 'setService',
|
|
194
|
+
payload: _objectSpread({
|
|
195
|
+
value: serviceList
|
|
196
|
+
}, other)
|
|
197
|
+
});
|
|
198
|
+
dispatch({
|
|
199
|
+
type: 'setAddons',
|
|
200
|
+
payload: _objectSpread({
|
|
201
|
+
value: addonsList
|
|
202
|
+
}, other)
|
|
203
|
+
});
|
|
204
|
+
});
|
|
167
205
|
|
|
168
206
|
// apply code
|
|
169
207
|
var onScanCode = /*#__PURE__*/function () {
|
|
170
|
-
var
|
|
208
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
171
209
|
var val;
|
|
172
210
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
173
211
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -178,18 +216,11 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
178
216
|
val = _context.sent;
|
|
179
217
|
console.log(val);
|
|
180
218
|
if (val !== null && val !== void 0 && val.isAvailable) {
|
|
181
|
-
|
|
182
|
-
dispatch({
|
|
183
|
-
type: 'setService',
|
|
184
|
-
payload: {
|
|
185
|
-
value: val.productList,
|
|
186
|
-
edit: true
|
|
187
|
-
}
|
|
188
|
-
});
|
|
219
|
+
productListToValue(val.productList, true);
|
|
189
220
|
setCode('');
|
|
190
221
|
} else {
|
|
191
222
|
PisellToast({
|
|
192
|
-
content: locales.getText('pisell2.text.goodpass.code-invalid')
|
|
223
|
+
content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
|
|
193
224
|
});
|
|
194
225
|
}
|
|
195
226
|
case 5:
|
|
@@ -199,10 +230,27 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
199
230
|
}, _callee);
|
|
200
231
|
}));
|
|
201
232
|
return function onScanCode() {
|
|
202
|
-
return
|
|
233
|
+
return _ref3.apply(this, arguments);
|
|
203
234
|
};
|
|
204
235
|
}();
|
|
236
|
+
var availableData = useMemo(function () {
|
|
237
|
+
if (!isBooking4Shop) return [];
|
|
238
|
+
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
239
|
+
return discountList.filter(function (item) {
|
|
240
|
+
return !!item.isAvailable;
|
|
241
|
+
}).map(function (discount) {
|
|
242
|
+
return _objectSpread(_objectSpread({}, discount), {}, {
|
|
243
|
+
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
|
|
244
|
+
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
}, [discountList, isBooking4Shop, disabled]);
|
|
205
248
|
if (!isBooking4Shop) return null;
|
|
249
|
+
var mixedSort = function mixedSort(val) {
|
|
250
|
+
return _toConsumableArray(val).sort(function (a, b) {
|
|
251
|
+
return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
|
|
252
|
+
});
|
|
253
|
+
};
|
|
206
254
|
return /*#__PURE__*/React.createElement("div", {
|
|
207
255
|
className: "pisell-lowcode__booking-footer-voucher-container"
|
|
208
256
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -227,7 +275,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
227
275
|
style: {
|
|
228
276
|
width: '100%'
|
|
229
277
|
},
|
|
230
|
-
dataSource: availableData,
|
|
278
|
+
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
279
|
+
mixedSort: mixedSort,
|
|
231
280
|
onChange: function onChange(val) {
|
|
232
281
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
233
282
|
var detail = shopDiscount.setDiscountSelected({
|
|
@@ -235,13 +284,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
235
284
|
isSelected: val.isSelected
|
|
236
285
|
});
|
|
237
286
|
console.log('setDiscountSelected:', detail);
|
|
238
|
-
|
|
239
|
-
type: 'setService',
|
|
240
|
-
payload: {
|
|
241
|
-
edit: true,
|
|
242
|
-
value: detail.productList
|
|
243
|
-
}
|
|
244
|
-
});
|
|
287
|
+
productListToValue(detail.productList, true);
|
|
245
288
|
}
|
|
246
289
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
247
290
|
className: "voucher-code-input-wrapper"
|
|
@@ -258,6 +301,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
258
301
|
setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
259
302
|
},
|
|
260
303
|
size: "small",
|
|
304
|
+
allowClear: true,
|
|
261
305
|
placeholder: locales.getText('pisell2.text.goodpass.enter-code')
|
|
262
306
|
// suffix={
|
|
263
307
|
// <PisellTooltip title="">
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export var getServiceAddons = function getServiceAddons(list) {
|
|
2
|
+
var serviceList = [];
|
|
3
|
+
var addonsList = [];
|
|
4
|
+
list.forEach(function (item) {
|
|
5
|
+
if (item.isAddons) {
|
|
6
|
+
addonsList.push(item);
|
|
7
|
+
} else {
|
|
8
|
+
serviceList.push(item);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
serviceList: serviceList,
|
|
13
|
+
addonsList: addonsList
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|
|
@@ -19,6 +19,7 @@ import useEngineContext from "../../../../es/hooks/useEngineContext";
|
|
|
19
19
|
import { locales } from "@pisell/utils";
|
|
20
20
|
import { PisellModal } from "@pisell/materials";
|
|
21
21
|
import { getProductPrice } from "../info/service/serve";
|
|
22
|
+
import Decimal from 'decimal.js';
|
|
22
23
|
var formatBundleItemMap = function formatBundleItemMap(product) {
|
|
23
24
|
return product.bundle_group.reduce(function (pre, cur) {
|
|
24
25
|
var curObj = {};
|
|
@@ -28,6 +29,13 @@ var formatBundleItemMap = function formatBundleItemMap(product) {
|
|
|
28
29
|
return _objectSpread(_objectSpread({}, pre), curObj);
|
|
29
30
|
}, {});
|
|
30
31
|
};
|
|
32
|
+
export var calculateTotalPrice = function calculateTotalPrice(data) {
|
|
33
|
+
var _price = data.reduce(function (total, item) {
|
|
34
|
+
var _price = (item === null || item === void 0 ? void 0 : item.price) || (item === null || item === void 0 ? void 0 : item.add_price);
|
|
35
|
+
return total + _price * item.num;
|
|
36
|
+
}, 0);
|
|
37
|
+
return parseFloat(_price);
|
|
38
|
+
};
|
|
31
39
|
var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
|
|
32
40
|
if (!newProducts.length) {
|
|
33
41
|
return {
|
|
@@ -70,9 +78,16 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
|
|
|
70
78
|
isChangePrice = true;
|
|
71
79
|
isBundleChange = true;
|
|
72
80
|
}
|
|
81
|
+
if (bundleItemMap[bundle.id].price_type === 'markdown') {
|
|
82
|
+
bundleItemMap[bundle.id].price = new Decimal(bundleItemMap[bundle.id].price || 0).mul(-1).toNumber();
|
|
83
|
+
}
|
|
84
|
+
var selectBundleInfo = item._extend.other.bundle.find(function (item) {
|
|
85
|
+
return item.id === bundle.id;
|
|
86
|
+
});
|
|
87
|
+
var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
|
|
73
88
|
return _objectSpread(_objectSpread({}, bundle), {}, {
|
|
74
89
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
75
|
-
price: bundleItemMap[bundle.id].price
|
|
90
|
+
price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
76
91
|
// product_price: bundleItemMap[item.id].product_price,
|
|
77
92
|
});
|
|
78
93
|
});
|
|
@@ -33,6 +33,7 @@ import { isWalkIn as getIsWalkIn } from "../../utils";
|
|
|
33
33
|
import { getFranchiseeCustomerInfo, getFranchiseeCustomerList } from "./serve";
|
|
34
34
|
import { useMemoizedFn } from 'ahooks';
|
|
35
35
|
import { getWaiverTitle } from "../clientVariant/utils";
|
|
36
|
+
import useGetHolderList from "../hooks/useGetHolderList";
|
|
36
37
|
var isLoadClient = false;
|
|
37
38
|
var Client = function Client() {
|
|
38
39
|
var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
|
|
@@ -52,6 +53,7 @@ var Client = function Client() {
|
|
|
52
53
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
53
54
|
franchiseeLoading = _useState6[0],
|
|
54
55
|
setFranchiseeLoading = _useState6[1];
|
|
56
|
+
var getHolders = useGetHolderList(state, dispatch);
|
|
55
57
|
var _useState7 = useState({
|
|
56
58
|
skip: 1,
|
|
57
59
|
num: 10,
|
|
@@ -281,6 +283,7 @@ var Client = function Client() {
|
|
|
281
283
|
if (data) {
|
|
282
284
|
handleSelectClient([data]);
|
|
283
285
|
}
|
|
286
|
+
getHolders();
|
|
284
287
|
getClients(_objectSpread(_objectSpread({}, state.client.clientsParams), {}, {
|
|
285
288
|
search: '',
|
|
286
289
|
customer_id: data === null || data === void 0 ? void 0 : data.id,
|
|
@@ -298,14 +301,20 @@ var Client = function Client() {
|
|
|
298
301
|
showAcceptsMarketing: false
|
|
299
302
|
},
|
|
300
303
|
callback: function callback(customer_id, params) {
|
|
301
|
-
var _params$, _params$2, _state$
|
|
304
|
+
var _state$client2, _state$client2$map, _params$, _params$2, _state$client3;
|
|
305
|
+
var waiverForm = ((_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.clients) === null || _state$client2 === void 0 || (_state$client2 = _state$client2[0].waiver_form) === null || _state$client2 === void 0 || (_state$client2$map = _state$client2.map) === null || _state$client2$map === void 0 ? void 0 : _state$client2$map.call(_state$client2, function (item) {
|
|
306
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
307
|
+
is_filled: 0
|
|
308
|
+
});
|
|
309
|
+
})) || [];
|
|
302
310
|
// 创建后本地数据处理到数组
|
|
303
311
|
dispatch({
|
|
304
312
|
type: 'setClient',
|
|
305
313
|
payload: {
|
|
306
314
|
clients: [].concat(_toConsumableArray(params !== null && params !== void 0 && (_params$ = params[0]) !== null && _params$ !== void 0 && _params$.customer ? [_objectSpread(_objectSpread({}, params === null || params === void 0 || (_params$2 = params[0]) === null || _params$2 === void 0 ? void 0 : _params$2.customer), {}, {
|
|
307
|
-
id: customer_id
|
|
308
|
-
|
|
315
|
+
id: customer_id,
|
|
316
|
+
waiver_form: waiverForm
|
|
317
|
+
})] : []), _toConsumableArray(((_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.clients) || []))
|
|
309
318
|
}
|
|
310
319
|
});
|
|
311
320
|
}
|
|
@@ -92,7 +92,7 @@ var Lists = function Lists(_ref) {
|
|
|
92
92
|
isShowChangeHolder: isShowChangeHolder,
|
|
93
93
|
isShowChangeResource: true,
|
|
94
94
|
isShowAddHolderButton: true,
|
|
95
|
-
isShowEditProduct:
|
|
95
|
+
isShowEditProduct: !state.isBookingCreatePage
|
|
96
96
|
};
|
|
97
97
|
}, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
|
|
98
98
|
return /*#__PURE__*/React.createElement(CartContext.Provider, {
|
|
@@ -28,7 +28,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
|
28
28
|
import TabProduct from "../../../components/TabProduct";
|
|
29
29
|
import AddButton from "../../../components/addButton";
|
|
30
30
|
import Drawer from "../../../components/drawer";
|
|
31
|
-
import { formatProductListByCategory, getIsEject, isSessionProduct, request } from "../../../utils";
|
|
31
|
+
import { formatProductListByCategory, getIsEject, getIsOnlySession, isSessionProduct, request } from "../../../utils";
|
|
32
32
|
import DateRange from "../../dateRange";
|
|
33
33
|
import { Context } from "../../model";
|
|
34
34
|
import { appointmentTypes, inputDateCol } from "../../service2/status";
|
|
@@ -311,6 +311,7 @@ var Info = function Info(props) {
|
|
|
311
311
|
var isSession = isSessionProduct(item);
|
|
312
312
|
// 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
|
|
313
313
|
var isEject = getIsEject(item, type);
|
|
314
|
+
var isOnlySession = getIsOnlySession(item);
|
|
314
315
|
|
|
315
316
|
// 跨日预约开启单规格 组合规格 套餐
|
|
316
317
|
if (isDay) {
|
|
@@ -328,6 +329,7 @@ var Info = function Info(props) {
|
|
|
328
329
|
package: true
|
|
329
330
|
},
|
|
330
331
|
is_eject: isEject ? 1 : 0,
|
|
332
|
+
isOnlySession: isOnlySession,
|
|
331
333
|
customer_id: customerId,
|
|
332
334
|
isOS: isSession
|
|
333
335
|
},
|
|
@@ -19,7 +19,7 @@ var Like = function Like(_ref) {
|
|
|
19
19
|
}
|
|
20
20
|
e.preventDefault();
|
|
21
21
|
e.stopPropagation();
|
|
22
|
-
onChange === null || onChange === void 0
|
|
22
|
+
onChange === null || onChange === void 0 || onChange(status === "like" ? "common" : "like");
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
};
|
|
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
21
|
import { getNoResource } from "../../mock";
|
|
22
22
|
import { getErrorList, getProductTotalPrice } from "../../utils";
|
|
23
|
-
import { locales } from '@pisell/utils';
|
|
23
|
+
import { isArr, locales } from '@pisell/utils';
|
|
24
24
|
import dayjs from 'dayjs';
|
|
25
25
|
import { appointmentTypes, openingTime } from "./status";
|
|
26
26
|
import { postMultiDay } from "../service/serve";
|
|
@@ -199,7 +199,9 @@ export var handleChangeHolder = function handleChangeHolder(products, currentIte
|
|
|
199
199
|
if (item._id === currentItem._id) {
|
|
200
200
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
201
201
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
202
|
-
holder_id: other.
|
|
202
|
+
holder_id: isArr(other) ? other.map(function (item) {
|
|
203
|
+
return item.id;
|
|
204
|
+
}) : item._extend.quantity > 1 ? [other.id] : other.id
|
|
203
205
|
})
|
|
204
206
|
});
|
|
205
207
|
}
|
|
@@ -610,6 +612,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
610
612
|
actionText: locales.getText('page.booking.text.add-time'),
|
|
611
613
|
isMultipleResource: true,
|
|
612
614
|
multiResources: multiResources,
|
|
615
|
+
holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
|
|
616
|
+
holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
|
|
613
617
|
isErrorHolder: getIsSubjectRequire(state),
|
|
614
618
|
addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
|
|
615
619
|
holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
|
|
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
|
95
95
|
if (renderType === 'eventBooking') {
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
|
-
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988
|
|
98
|
+
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
|
|
99
99
|
return booking4Shops.includes(shopId);
|
|
100
100
|
};
|
|
101
101
|
function generateDateRange(start, end) {
|
|
@@ -31,6 +31,7 @@ import { Skeleton } from 'antd';
|
|
|
31
31
|
import classNames from 'classnames';
|
|
32
32
|
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
33
33
|
import { getLocale } from "../../../utils/locales";
|
|
34
|
+
import { useDebounceEffect } from "ahooks";
|
|
34
35
|
var defaultModules = {
|
|
35
36
|
client: 1,
|
|
36
37
|
date: 1,
|
|
@@ -164,7 +165,7 @@ var Info = Provider(function (props) {
|
|
|
164
165
|
try {
|
|
165
166
|
// 同步最新数据用, 增加延迟为了不和getProduct接口冲突
|
|
166
167
|
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
167
|
-
var _stateRef$current;
|
|
168
|
+
var _stateRef$current, _stateRef$current$map;
|
|
168
169
|
var data;
|
|
169
170
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
170
171
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -172,7 +173,9 @@ var Info = Provider(function (props) {
|
|
|
172
173
|
_context.next = 2;
|
|
173
174
|
return getResourceList({
|
|
174
175
|
date: currentDate
|
|
175
|
-
}, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.
|
|
176
|
+
}, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.service) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.value) === null || _stateRef$current === void 0 || (_stateRef$current$map = _stateRef$current.map) === null || _stateRef$current$map === void 0 ? void 0 : _stateRef$current$map.call(_stateRef$current, function (item) {
|
|
177
|
+
return item === null || item === void 0 ? void 0 : item.booking_id;
|
|
178
|
+
}));
|
|
176
179
|
case 2:
|
|
177
180
|
data = _context.sent;
|
|
178
181
|
data.date = currentDate;
|
|
@@ -203,13 +206,15 @@ var Info = Provider(function (props) {
|
|
|
203
206
|
return _ref.apply(this, arguments);
|
|
204
207
|
};
|
|
205
208
|
}();
|
|
206
|
-
|
|
209
|
+
useDebounceEffect(function () {
|
|
207
210
|
// setTimeout(() => {
|
|
208
211
|
if (currentDate) {
|
|
209
212
|
getResourcesData();
|
|
210
213
|
}
|
|
211
214
|
// }, 20);
|
|
212
|
-
}, [currentDate]
|
|
215
|
+
}, [currentDate], {
|
|
216
|
+
wait: 300
|
|
217
|
+
});
|
|
213
218
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, _defineProperty(_defineProperty({
|
|
214
219
|
style: style,
|
|
215
220
|
header: header,
|