@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
|
@@ -104,25 +104,36 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
|
104
104
|
|
|
105
105
|
// 是相同的商品
|
|
106
106
|
var isSameProduct = function isSameProduct(a, b) {
|
|
107
|
-
var _a$
|
|
108
|
-
|
|
107
|
+
var _a$_extend2, _b$_extend2;
|
|
108
|
+
if (isNormalProductByDurationSchedule(a) && isNormalProductByDurationSchedule(b)) {
|
|
109
|
+
var _a$_extend, _b$_extend;
|
|
110
|
+
return ((_a$_extend = a._extend) === null || _a$_extend === void 0 || (_a$_extend = _a$_extend.other) === null || _a$_extend === void 0 ? void 0 : _a$_extend.rowKey) === ((_b$_extend = b._extend) === null || _b$_extend === void 0 || (_b$_extend = _b$_extend.other) === null || _b$_extend === void 0 ? void 0 : _b$_extend.rowKey);
|
|
111
|
+
}
|
|
112
|
+
return ((_a$_extend2 = a._extend) === null || _a$_extend2 === void 0 || (_a$_extend2 = _a$_extend2.other) === null || _a$_extend2 === void 0 ? void 0 : _a$_extend2.rowKey) === ((_b$_extend2 = b._extend) === null || _b$_extend2 === void 0 || (_b$_extend2 = _b$_extend2.other) === null || _b$_extend2 === void 0 ? void 0 : _b$_extend2.rowKey) && a._serviceKey === b._serviceKey;
|
|
109
113
|
};
|
|
110
|
-
export var addService = function addService(list, addItem) {
|
|
114
|
+
export var addService = function addService(list, addItem, state) {
|
|
111
115
|
var value = list;
|
|
112
116
|
var count;
|
|
113
|
-
//
|
|
114
|
-
if (!isNormalProductByDurationSchedule(addItem)) {
|
|
117
|
+
// 预约商品 并且配置商品卡片不叠加 直接添加
|
|
118
|
+
if (!isNormalProductByDurationSchedule(addItem) && !getIsOverlayProduct(addItem, state)) {
|
|
115
119
|
value.push(addItem);
|
|
116
120
|
count = addItem._extend.quantity;
|
|
117
121
|
} else {
|
|
118
122
|
// 非预约商品判断是否相同,相同合并
|
|
119
123
|
var isNotSame = true;
|
|
124
|
+
// 是否设置过 只追加到第一个中
|
|
125
|
+
var isSetCount = false;
|
|
120
126
|
value = list.map(function (item) {
|
|
121
|
-
|
|
127
|
+
// 是否商品券折扣的商品
|
|
128
|
+
var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
|
|
129
|
+
return item.type === 'good_pass';
|
|
130
|
+
});
|
|
131
|
+
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct) {
|
|
122
132
|
var _item$_extend, _addItem$_extend, _item$_extend2;
|
|
123
133
|
isNotSame = false;
|
|
124
134
|
var quantity = ((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
|
|
125
135
|
count = quantity;
|
|
136
|
+
isSetCount = true;
|
|
126
137
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
127
138
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
128
139
|
quantity: quantity,
|
|
@@ -164,4 +175,45 @@ export var addServiceScroll = function addServiceScroll(rowKey, cacheItem) {
|
|
|
164
175
|
}, 100);
|
|
165
176
|
}
|
|
166
177
|
});
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// 获取购物车商品覆盖规则
|
|
181
|
+
export var getCartProductOverlay = function getCartProductOverlay(state) {
|
|
182
|
+
var _state$bookingConfig;
|
|
183
|
+
return (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.cart_product_overlay) || {
|
|
184
|
+
type: "product_all"
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// 获取购物车商品是否覆盖
|
|
189
|
+
export var getIsOverlayProduct = function getIsOverlayProduct(item, state) {
|
|
190
|
+
var _getCartProductOverla = getCartProductOverlay(state),
|
|
191
|
+
type = _getCartProductOverla.type,
|
|
192
|
+
product_ids = _getCartProductOverla.product_ids;
|
|
193
|
+
if (type === 'product_all') {
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
return product_ids.includes(item.product_id || item.id);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// 获取购物车商品是否显示数量
|
|
200
|
+
export var getIsShowNumber = function getIsShowNumber(item, state) {
|
|
201
|
+
var isBookingTicket2 = state.isBookingTicket2;
|
|
202
|
+
return isNormalProductByDurationSchedule(item) || isBookingTicket2 && getIsOverlayProduct(item, state);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// 生成服务key
|
|
206
|
+
export var genServiceKey = function genServiceKey(item) {
|
|
207
|
+
var _item$_extend3, _item$_extend4, _item$_extend5;
|
|
208
|
+
var product_id = item.product_id;
|
|
209
|
+
var durationKey = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.duration;
|
|
210
|
+
var start_time = (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.start_time;
|
|
211
|
+
var total = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.total;
|
|
212
|
+
var resourceKey = '';
|
|
213
|
+
Object.values(item._extend.resource).forEach(function (resources) {
|
|
214
|
+
resources.forEach(function (resource) {
|
|
215
|
+
resourceKey += "".concat(resource.relation_id);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
return "".concat(product_id, "-").concat(durationKey, "-").concat(resourceKey, "-").concat(start_time, "-").concat(total);
|
|
167
219
|
};
|
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
|
8
8
|
var _utils$getComponents;
|
|
9
9
|
var _ref = appHelper || {},
|
|
10
10
|
utils = _ref.utils;
|
|
11
|
-
return (utils === null || utils === void 0
|
|
11
|
+
return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
|
12
12
|
}, [components]);
|
|
13
13
|
return Cpt;
|
|
14
14
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
export var useWindowSize = function useWindowSize() {
|
|
3
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4
|
+
var _options$debounceMs = options.debounceMs,
|
|
5
|
+
debounceMs = _options$debounceMs === void 0 ? 100 : _options$debounceMs;
|
|
6
|
+
useEffect(function () {
|
|
7
|
+
var timeoutId;
|
|
8
|
+
var setRealVH = function setRealVH() {
|
|
9
|
+
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
10
|
+
var vh = window.innerHeight * 0.01;
|
|
11
|
+
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
12
|
+
};
|
|
13
|
+
var debouncedHandleResize = function debouncedHandleResize() {
|
|
14
|
+
clearTimeout(timeoutId);
|
|
15
|
+
timeoutId = setTimeout(setRealVH, debounceMs);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// 页面加载和窗口大小变化时都重新计算
|
|
19
|
+
debouncedHandleResize();
|
|
20
|
+
window.addEventListener('resize', debouncedHandleResize);
|
|
21
|
+
return function () {
|
|
22
|
+
window.removeEventListener('resize', debouncedHandleResize);
|
|
23
|
+
clearTimeout(timeoutId);
|
|
24
|
+
};
|
|
25
|
+
}, [debounceMs]);
|
|
26
|
+
};
|
package/es/index.d.ts
CHANGED
|
@@ -43,3 +43,4 @@ export { default as AppointmentBooking } from './components/appointmentBooking';
|
|
|
43
43
|
export { default as AppointmentDeposit } from './components/appointmentBooking/deposit';
|
|
44
44
|
export { default as TicketBooking } from './components/ticketBooking';
|
|
45
45
|
export { default as SubTotal } from './components/subTotal';
|
|
46
|
+
export { default as StepController } from './components/stepController';
|
package/es/index.js
CHANGED
|
@@ -46,4 +46,5 @@ export { default as ShoppingCart } from "./components/shoppingCart";
|
|
|
46
46
|
export { default as AppointmentBooking } from "./components/appointmentBooking";
|
|
47
47
|
export { default as AppointmentDeposit } from "./components/appointmentBooking/deposit";
|
|
48
48
|
export { default as TicketBooking } from "./components/ticketBooking";
|
|
49
|
-
export { default as SubTotal } from "./components/subTotal";
|
|
49
|
+
export { default as SubTotal } from "./components/subTotal";
|
|
50
|
+
export { default as StepController } from "./components/stepController";
|
package/es/utils/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
|
20
20
|
destroy: () => void;
|
|
21
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
|
+
update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
|
|
22
22
|
}>;
|
|
23
23
|
export { modal };
|
|
@@ -35,6 +35,7 @@ __export(Sales_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(Sales_exports);
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
38
39
|
var defaultData = {};
|
|
39
40
|
var SALES_MODEL_SESSION_STORAGE_KEY = "shop_h5_sales_model_data";
|
|
40
41
|
var SalesContext = (0, import_react.createContext)(
|
|
@@ -45,14 +46,13 @@ var SalesProvider = (props) => {
|
|
|
45
46
|
const dataRef = (0, import_react.useRef)({});
|
|
46
47
|
const [data, setData] = (0, import_react.useState)(defaultData);
|
|
47
48
|
const [hooks, setHooks] = (0, import_react.useState)(props.hooks);
|
|
49
|
+
const context = (0, import_useEngineContext.default)();
|
|
50
|
+
const utils = context.appHelper.utils || {};
|
|
48
51
|
const _setData = (newData) => {
|
|
49
52
|
dataRef.current = { ...dataRef.current, ...newData };
|
|
50
53
|
console.log("sales_model_newData", dataRef.current);
|
|
51
54
|
if (config == null ? void 0 : config.useSessionStorage) {
|
|
52
|
-
|
|
53
|
-
SALES_MODEL_SESSION_STORAGE_KEY,
|
|
54
|
-
JSON.stringify(dataRef.current || {})
|
|
55
|
-
);
|
|
55
|
+
setSessionStorage();
|
|
56
56
|
}
|
|
57
57
|
setData({ ...dataRef.current });
|
|
58
58
|
};
|
|
@@ -60,14 +60,28 @@ var SalesProvider = (props) => {
|
|
|
60
60
|
return dataRef.current;
|
|
61
61
|
};
|
|
62
62
|
const setSessionStorage = () => {
|
|
63
|
+
var _a, _b, _c;
|
|
64
|
+
const history = ((_a = utils == null ? void 0 : utils.getHistory) == null ? void 0 : _a.call(utils)) || {};
|
|
65
|
+
const cacheId = ((_c = (_b = history == null ? void 0 : history.location) == null ? void 0 : _b.query) == null ? void 0 : _c.cacheId) || "";
|
|
66
|
+
const sessionData = { ...dataRef.current || {}, cacheId };
|
|
63
67
|
sessionStorage.setItem(
|
|
64
|
-
SALES_MODEL_SESSION_STORAGE_KEY
|
|
65
|
-
JSON.stringify(
|
|
68
|
+
`${SALES_MODEL_SESSION_STORAGE_KEY}`,
|
|
69
|
+
JSON.stringify(sessionData || {})
|
|
66
70
|
);
|
|
67
71
|
};
|
|
68
72
|
const getSessionStorage = () => {
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
var _a, _b, _c;
|
|
74
|
+
const history = ((_a = utils == null ? void 0 : utils.getHistory) == null ? void 0 : _a.call(utils)) || {};
|
|
75
|
+
const strResult = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
76
|
+
const result = strResult ? JSON.parse(strResult || "{}") : {};
|
|
77
|
+
const cacheId = ((_c = (_b = history == null ? void 0 : history.location) == null ? void 0 : _b.query) == null ? void 0 : _c.cacheId) || "";
|
|
78
|
+
if (!cacheId && !(result == null ? void 0 : result.cacheId)) {
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
if (cacheId && (result == null ? void 0 : result.cacheId) === cacheId) {
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
return {};
|
|
71
85
|
};
|
|
72
86
|
const removeSessionStorage = () => {
|
|
73
87
|
sessionStorage.removeItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
@@ -90,7 +90,7 @@ var ResourceProvider = ({
|
|
|
90
90
|
resourceMap.forEach((v) => renderData.push(v));
|
|
91
91
|
return renderData;
|
|
92
92
|
};
|
|
93
|
-
const getResourceList = (0, import_ahooks.useRequest)(import_serve.
|
|
93
|
+
const getResourceList = (0, import_ahooks.useRequest)(import_serve.getSpecialResourceListApi, {
|
|
94
94
|
manual: true,
|
|
95
95
|
onSuccess: (res) => {
|
|
96
96
|
const formatData = formatResourceList(res);
|
|
@@ -3,3 +3,10 @@ export declare const getResourceListApi: (params: {
|
|
|
3
3
|
shop_id: string;
|
|
4
4
|
form_data_status: string;
|
|
5
5
|
}) => Promise<any>;
|
|
6
|
+
/**
|
|
7
|
+
* @title: 获取特殊资源列表
|
|
8
|
+
* @Author: xiangfeng.xue
|
|
9
|
+
*/
|
|
10
|
+
export declare const getSpecialResourceListApi: (params: {
|
|
11
|
+
event_item_ids?: string | number[];
|
|
12
|
+
}) => Promise<any>;
|
|
@@ -19,14 +19,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/Sales/Resource/serve.ts
|
|
20
20
|
var serve_exports = {};
|
|
21
21
|
__export(serve_exports, {
|
|
22
|
-
getResourceListApi: () => getResourceListApi
|
|
22
|
+
getResourceListApi: () => getResourceListApi,
|
|
23
|
+
getSpecialResourceListApi: () => getSpecialResourceListApi
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(serve_exports);
|
|
25
26
|
var import_utils = require("../../../utils");
|
|
26
27
|
var getResourceListApi = (params) => {
|
|
27
28
|
return import_utils.request.getRequest().get("/h5/form/data/v1", params, { useCache: true });
|
|
28
29
|
};
|
|
30
|
+
var getSpecialResourceListApi = (params) => {
|
|
31
|
+
return import_utils.request.getRequest().get("/h5/eventbookingv2/item/specify-resources", params, {
|
|
32
|
+
useCache: true
|
|
33
|
+
});
|
|
34
|
+
};
|
|
29
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
36
|
0 && (module.exports = {
|
|
31
|
-
getResourceListApi
|
|
37
|
+
getResourceListApi,
|
|
38
|
+
getSpecialResourceListApi
|
|
32
39
|
});
|
|
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
25
25
|
* @return {*}
|
|
26
26
|
* @Author: xiangfeng.xue
|
|
27
27
|
*/
|
|
28
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
28
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
29
29
|
/**
|
|
30
30
|
* 计算所有价格明细
|
|
31
31
|
* @param items - 购物车商品数组
|
|
@@ -46,7 +46,7 @@ var import_Deposit = __toESM(require("../../Deposit"));
|
|
|
46
46
|
var import_utils3 = require("../utils");
|
|
47
47
|
var import_index = require("./index.less");
|
|
48
48
|
var CartItem = ({ onNext }) => {
|
|
49
|
-
var _a, _b, _c, _d;
|
|
49
|
+
var _a, _b, _c, _d, _e;
|
|
50
50
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
51
51
|
const {
|
|
52
52
|
carts,
|
|
@@ -78,6 +78,7 @@ var CartItem = ({ onNext }) => {
|
|
|
78
78
|
return (0, import_utils2.formatHolder)(accountLists);
|
|
79
79
|
}, [accountLists, isFormSubject]);
|
|
80
80
|
const hasGoodPassApp = !!((_a = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a.call(businessUtils, "goodpass"));
|
|
81
|
+
const hasDiscountCardApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "discountcard"));
|
|
81
82
|
const handleClickCard = (e, type, val) => {
|
|
82
83
|
console.log(e, type, val, "handleClickCard");
|
|
83
84
|
if (type === "note") {
|
|
@@ -187,8 +188,8 @@ var CartItem = ({ onNext }) => {
|
|
|
187
188
|
hideAddBtn: false,
|
|
188
189
|
holders,
|
|
189
190
|
disabledEdit: isLastStep,
|
|
190
|
-
isShowChangeResource: (
|
|
191
|
-
isShowDelete: ((
|
|
191
|
+
isShowChangeResource: (_d = (_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) == null ? void 0 : _d.startsWith("select-resource"),
|
|
192
|
+
isShowDelete: ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-service",
|
|
192
193
|
isShowPackageNote: false,
|
|
193
194
|
isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
|
|
194
195
|
isShowHolder: isFormSubject,
|
|
@@ -205,7 +206,7 @@ var CartItem = ({ onNext }) => {
|
|
|
205
206
|
onChange: (e, type, key) => handleClickCard(e, type, key)
|
|
206
207
|
}
|
|
207
208
|
)),
|
|
208
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, hasGoodPassApp ? /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }) : null, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), (carts == null ? void 0 : carts.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, null) : null, /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, { onNext }))
|
|
209
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, hasGoodPassApp || hasDiscountCardApp ? /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }) : null, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), (carts == null ? void 0 : carts.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, null) : null, /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, { onNext }))
|
|
209
210
|
));
|
|
210
211
|
};
|
|
211
212
|
var Item_default = CartItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.appointment-cart-item-wrap {
|
|
2
|
-
height: calc(
|
|
2
|
+
height: calc(var(--vh, 1vh) * 100 - 100px);
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
align-items: start;
|
|
41
41
|
|
|
42
|
-
>div {
|
|
42
|
+
> div {
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
flex: none;
|
|
106
106
|
z-index: 10;
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
@@ -48,6 +48,7 @@ var import_index = require("./index.less");
|
|
|
48
48
|
import_dayjs.default.extend(import_isSameOrBefore.default);
|
|
49
49
|
var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
50
50
|
var _a, _b, _c;
|
|
51
|
+
const isFetchingDates = (0, import_react.useRef)(false);
|
|
51
52
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
52
53
|
const [currentDate, setCurrentDate] = (0, import_react.useState)();
|
|
53
54
|
const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
|
|
@@ -139,15 +140,22 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
139
140
|
endDate
|
|
140
141
|
};
|
|
141
142
|
const data = await getDateData(params);
|
|
143
|
+
const firstAvailableDate = (data || []).find(
|
|
144
|
+
(d) => d.status === "available"
|
|
145
|
+
);
|
|
146
|
+
if (!firstAvailableDate && !isFetchingDates.current) {
|
|
147
|
+
isFetchingDates.current = true;
|
|
148
|
+
const nextMonthDate = (0, import_dayjs.default)(date).add(1, "month");
|
|
149
|
+
setCurrentMonth(nextMonthDate);
|
|
150
|
+
setLoading(true);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
142
153
|
const selected = await appointmentBooking.getDateRange();
|
|
143
154
|
console.log(data, selected, customPageId, "getDates");
|
|
144
155
|
if ((selected == null ? void 0 : selected.length) > 0) {
|
|
145
156
|
setCurrentDate((_a2 = selected == null ? void 0 : selected[0]) == null ? void 0 : _a2.date);
|
|
146
157
|
} else if (!isDateSelectedFirst) {
|
|
147
|
-
if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
|
|
148
|
-
const firstAvailableDate = (data || []).find(
|
|
149
|
-
(d) => d.status === "available"
|
|
150
|
-
);
|
|
158
|
+
if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM") || isFetchingDates.current) {
|
|
151
159
|
if (firstAvailableDate) {
|
|
152
160
|
setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
|
|
153
161
|
appointmentBooking.setDateRange([firstAvailableDate]);
|
|
@@ -171,7 +179,6 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
|
|
|
171
179
|
} catch (error) {
|
|
172
180
|
setLoading(false);
|
|
173
181
|
setDateMonthList([]);
|
|
174
|
-
console.log(error, "wh978968234234");
|
|
175
182
|
}
|
|
176
183
|
};
|
|
177
184
|
(0, import_react.useEffect)(() => {
|
|
@@ -74,7 +74,7 @@ var Header = () => {
|
|
|
74
74
|
return ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.description) || "";
|
|
75
75
|
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, currentSelectedResources]);
|
|
76
76
|
const handleBack = async () => {
|
|
77
|
-
var _a2
|
|
77
|
+
var _a2;
|
|
78
78
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
79
79
|
const types = {
|
|
80
80
|
"select-time": "time",
|
|
@@ -89,8 +89,7 @@ var Header = () => {
|
|
|
89
89
|
}
|
|
90
90
|
if (key === "select-service") {
|
|
91
91
|
appointmentBooking.clearCart();
|
|
92
|
-
|
|
93
|
-
if (type === "duration") {
|
|
92
|
+
if (appointmentBooking.isCartHasDurationProduct()) {
|
|
94
93
|
appointmentBooking.deleteCartItemInfo("time");
|
|
95
94
|
}
|
|
96
95
|
}
|
|
@@ -74,9 +74,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
74
74
|
let type = "";
|
|
75
75
|
if (!isRetailTemplate) {
|
|
76
76
|
type = await checkProductType(item == null ? void 0 : item.id);
|
|
77
|
-
|
|
78
|
-
appointmentBooking.openProductDetail(item.id);
|
|
79
|
-
}
|
|
77
|
+
appointmentBooking.openProductDetail(item.id);
|
|
80
78
|
}
|
|
81
79
|
utils == null ? void 0 : utils.action({
|
|
82
80
|
type: "pisell1.productDetail",
|
|
@@ -86,6 +84,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
86
84
|
},
|
|
87
85
|
callback: async (data) => {
|
|
88
86
|
var _a, _b;
|
|
87
|
+
if (data.isCancel) {
|
|
88
|
+
appointmentBooking.closeProductDetail();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
89
91
|
const product = {
|
|
90
92
|
...data,
|
|
91
93
|
options: (data == null ? void 0 : data.option) || []
|
|
@@ -96,13 +98,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
96
98
|
appointmentBooking.storeProduct(product);
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
|
-
if (data == null ? void 0 : data.isCancel) {
|
|
100
|
-
if (type === "session") {
|
|
101
|
-
appointmentBooking.closeProductDetail();
|
|
102
|
-
appointmentBooking.getAvailableDate();
|
|
103
|
-
}
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
101
|
const session = data == null ? void 0 : data.session;
|
|
107
102
|
if (session) {
|
|
108
103
|
const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
|
|
@@ -114,7 +109,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
114
109
|
endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
|
|
115
110
|
}
|
|
116
111
|
});
|
|
117
|
-
appointmentBooking.closeProductDetail();
|
|
118
112
|
await appointmentBooking.getAvailableDate({
|
|
119
113
|
startDate,
|
|
120
114
|
endDate
|
|
@@ -132,16 +126,23 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
132
126
|
await appointmentBooking.getAvailableDate();
|
|
133
127
|
}
|
|
134
128
|
}
|
|
129
|
+
appointmentBooking.closeProductDetail();
|
|
135
130
|
if (isDateSelectedFirst) {
|
|
136
131
|
const index = (currentStep == null ? void 0 : currentStep.index) + 2;
|
|
137
|
-
if (type === "duration") {
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
appointmentBooking.addStep(
|
|
142
|
-
{ index, key: "select-time", description },
|
|
143
|
-
"select-resource"
|
|
132
|
+
if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
|
|
133
|
+
const { stepList } = (0, import_hooks.useAppointmentBookingStep)();
|
|
134
|
+
const hasResourceStep = stepList == null ? void 0 : stepList.find(
|
|
135
|
+
(item2) => (item2 == null ? void 0 : item2.key) === "select-resource"
|
|
144
136
|
);
|
|
137
|
+
if (hasResourceStep) {
|
|
138
|
+
const description = import_utils.locales.getText(
|
|
139
|
+
"pisell2.appointment.select.time"
|
|
140
|
+
);
|
|
141
|
+
appointmentBooking.addStep(
|
|
142
|
+
{ index, key: "select-time", description },
|
|
143
|
+
"select-resource"
|
|
144
|
+
);
|
|
145
|
+
}
|
|
145
146
|
} else {
|
|
146
147
|
removeStep("select-time");
|
|
147
148
|
}
|
|
@@ -76,6 +76,7 @@ var VoucherCard = (props) => {
|
|
|
76
76
|
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
77
77
|
return {
|
|
78
78
|
...discount,
|
|
79
|
+
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed,
|
|
79
80
|
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
80
81
|
};
|
|
81
82
|
});
|
|
@@ -122,6 +123,7 @@ var VoucherCard = (props) => {
|
|
|
122
123
|
);
|
|
123
124
|
pisellos.effects.on("appointmentBooking_cart:onAddItem", onCartChange);
|
|
124
125
|
pisellos.effects.on("appointmentBooking_cart:onUpdateQuotationPrice", onCartChange);
|
|
126
|
+
pisellos.effects.on("appointmentBooking_cart:onUpdateCartItemNums", onCartChange);
|
|
125
127
|
pisellos.effects.on("appointmentBooking_cart:onRemoveItem", onCartChange);
|
|
126
128
|
pisellos.effects.on(
|
|
127
129
|
ShopDiscountHooks.onDiscountListChange,
|
|
@@ -169,6 +171,11 @@ var VoucherCard = (props) => {
|
|
|
169
171
|
import_utils.locales.getText("pisell2.text.goodpass.login")
|
|
170
172
|
), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.goodpass.login-tip"))));
|
|
171
173
|
};
|
|
174
|
+
const mixedSort = (val) => {
|
|
175
|
+
return [...val].sort((a, b) => {
|
|
176
|
+
return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
|
|
177
|
+
});
|
|
178
|
+
};
|
|
172
179
|
const renderVoucherInfo = () => {
|
|
173
180
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
|
|
174
181
|
"span",
|
|
@@ -201,6 +208,7 @@ var VoucherCard = (props) => {
|
|
|
201
208
|
{
|
|
202
209
|
style: { width: "100%" },
|
|
203
210
|
dataSource: availableData,
|
|
211
|
+
mixedSort,
|
|
204
212
|
onChange: (val) => {
|
|
205
213
|
const detail = shopDiscount.setDiscountSelected({
|
|
206
214
|
discountId: val.id,
|
|
@@ -215,6 +223,7 @@ var VoucherCard = (props) => {
|
|
|
215
223
|
import_materials.PisellInput,
|
|
216
224
|
{
|
|
217
225
|
value: code,
|
|
226
|
+
allowClear: true,
|
|
218
227
|
onChange: (e) => {
|
|
219
228
|
var _a2;
|
|
220
229
|
setCode((_a2 = e.target) == null ? void 0 : _a2.value);
|
|
@@ -58,6 +58,17 @@ var AppointmentBooking = () => {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}, []);
|
|
61
|
+
(0, import_react.useEffect)(() => {
|
|
62
|
+
const setRealVH = () => {
|
|
63
|
+
const vh = window.innerHeight * 0.01;
|
|
64
|
+
document.documentElement.style.setProperty("--vh", `${vh}px`);
|
|
65
|
+
};
|
|
66
|
+
setRealVH();
|
|
67
|
+
window.addEventListener("resize", setRealVH);
|
|
68
|
+
return () => {
|
|
69
|
+
window.removeEventListener("resize", setRealVH);
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
61
72
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
73
|
"div",
|
|
63
74
|
{
|