@pisell/private-materials 3.2.22 → 3.2.25
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 +8 -8
- package/es/components/appointmentBooking/assets/guests.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +134 -105
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +43 -21
- package/es/components/appointmentBooking/components/Cart/Item/index.less +14 -9
- package/es/components/appointmentBooking/components/Cart/index.js +3 -2
- package/es/components/appointmentBooking/components/Cart/index.less +1 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +25 -13
- package/es/components/appointmentBooking/components/Content/index.less +15 -0
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +50 -33
- package/es/components/appointmentBooking/components/Date/index.less +11 -0
- package/es/components/appointmentBooking/components/Footer/index.js +7 -2
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/es/components/appointmentBooking/components/Guest/index.js +25 -18
- package/es/components/appointmentBooking/components/Guest/index.less +3 -3
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +50 -8
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +19 -29
- package/es/components/appointmentBooking/components/Resource/index.less +5 -1
- package/es/components/appointmentBooking/components/Services/index.js +7 -9
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +55 -35
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +38 -28
- package/es/components/appointmentBooking/context.d.ts +2 -0
- package/es/components/appointmentBooking/context.js +7 -1
- package/es/components/appointmentBooking/hooks.d.ts +49 -10
- package/es/components/appointmentBooking/hooks.js +191 -134
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +12 -8
- package/es/components/appointmentBooking/locales.d.ts +36 -0
- package/es/components/appointmentBooking/locales.js +36 -0
- package/es/components/appointmentBooking/utils.d.ts +28 -0
- package/es/components/appointmentBooking/utils.js +86 -2
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +15 -15
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.d.ts +1 -1
- package/es/components/booking/components/voucher/index.js +39 -37
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +0 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +3 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/assets/guests.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +68 -32
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +36 -13
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +14 -9
- package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
- package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +11 -7
- package/lib/components/appointmentBooking/components/Content/index.less +15 -0
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +80 -68
- package/lib/components/appointmentBooking/components/Date/index.less +11 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +24 -6
- package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -4
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +16 -21
- package/lib/components/appointmentBooking/components/Resource/index.less +5 -1
- package/lib/components/appointmentBooking/components/Services/index.js +9 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +33 -23
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +5 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +30 -24
- package/lib/components/appointmentBooking/context.d.ts +2 -0
- package/lib/components/appointmentBooking/context.js +4 -1
- package/lib/components/appointmentBooking/hooks.d.ts +49 -10
- package/lib/components/appointmentBooking/hooks.js +49 -50
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +11 -7
- package/lib/components/appointmentBooking/locales.d.ts +36 -0
- package/lib/components/appointmentBooking/locales.js +36 -0
- package/lib/components/appointmentBooking/utils.d.ts +28 -0
- package/lib/components/appointmentBooking/utils.js +48 -2
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +1 -15
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +1 -1
- package/lib/components/booking/components/voucher/index.js +31 -25
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +0 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -35,69 +35,109 @@ module.exports = __toCommonJS(ContinueButton_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
|
-
var import_utils2 = require("../../../../Sales/Checkout/utils");
|
|
39
38
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
40
39
|
var import_hooks = require("../../../hooks");
|
|
41
40
|
var import_context = require("../../../context");
|
|
41
|
+
var import_utils2 = require("../../../utils");
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
43
|
var ContinueButton = () => {
|
|
44
|
+
var _a;
|
|
44
45
|
const context = (0, import_useEngineContext.default)();
|
|
45
46
|
const utils = context.appHelper.utils || {};
|
|
46
47
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
47
48
|
const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
48
|
-
const {
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
50
|
+
const shopDiscount = (0, import_hooks.useShopDiscount)();
|
|
51
|
+
const {
|
|
52
|
+
currentStep,
|
|
53
|
+
isLastStep,
|
|
54
|
+
carts,
|
|
55
|
+
appointmentBooking,
|
|
56
|
+
resourceOtherParams,
|
|
57
|
+
summary
|
|
58
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
59
|
+
const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
60
|
+
const disabled = (0, import_react.useMemo)(() => {
|
|
61
|
+
var _a2;
|
|
62
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
63
|
+
if (!carts.length) return true;
|
|
64
|
+
return false;
|
|
65
|
+
}, [
|
|
66
|
+
(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
|
|
67
|
+
carts,
|
|
68
|
+
accountLists,
|
|
69
|
+
resourceOtherParams == null ? void 0 : resourceOtherParams.errorList
|
|
70
|
+
]);
|
|
71
|
+
const clearData = () => {
|
|
72
|
+
appointmentBooking.destroy();
|
|
73
|
+
shopDiscount.destroy();
|
|
66
74
|
};
|
|
67
75
|
const handleNextStep = async () => {
|
|
76
|
+
var _a2, _b, _c, _d, _e;
|
|
68
77
|
if (isLastStep) {
|
|
69
78
|
setLoading(true);
|
|
70
79
|
try {
|
|
71
80
|
const res = await appointmentBooking.submitOrder();
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
if ((summary == null ? void 0 : summary.total) > 0) {
|
|
82
|
+
utils.action({
|
|
83
|
+
type: "pisell1.payment",
|
|
84
|
+
data: res == null ? void 0 : res.data
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
const { order_id, total_amount } = (res == null ? void 0 : res.data) || {};
|
|
88
|
+
const freeResult = await appointmentBooking.getFreeProduct(order_id);
|
|
89
|
+
console.log(freeResult, "freeResult");
|
|
90
|
+
if ((_a2 = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _a2.status) {
|
|
91
|
+
const url = `/payment-finish/success?order_id=${order_id}&amount=${Number(
|
|
92
|
+
total_amount
|
|
93
|
+
)}`;
|
|
94
|
+
(_b = utils == null ? void 0 : utils.history) == null ? void 0 : _b.replace(url);
|
|
95
|
+
} else {
|
|
96
|
+
(0, import_materials.PisellToast)({
|
|
97
|
+
content: (_c = freeResult == null ? void 0 : freeResult.data) == null ? void 0 : _c.message
|
|
98
|
+
});
|
|
78
99
|
}
|
|
79
|
-
}
|
|
100
|
+
}
|
|
101
|
+
clearData();
|
|
80
102
|
setLoading(false);
|
|
81
103
|
} catch (error) {
|
|
82
|
-
console.log(isLastStep, isLogin, error, "wh9896788");
|
|
83
104
|
setLoading(false);
|
|
84
105
|
}
|
|
85
106
|
return;
|
|
86
107
|
}
|
|
108
|
+
if (((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-resource") {
|
|
109
|
+
getResourceTimeSlot();
|
|
110
|
+
}
|
|
111
|
+
if (((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) === "select-time") {
|
|
112
|
+
}
|
|
87
113
|
return appointmentBooking.next();
|
|
88
114
|
};
|
|
89
115
|
const handleContinue = async () => {
|
|
116
|
+
var _a2;
|
|
117
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
118
|
+
console.log(currentStep, isLastStep, isLogin, "wh9896788222");
|
|
90
119
|
if (isLastStep) {
|
|
91
120
|
if (!isLogin) {
|
|
92
121
|
return openLoginModal({
|
|
93
122
|
callback: (status) => {
|
|
123
|
+
var _a3, _b, _c;
|
|
124
|
+
const user = (_c = (_b = (_a3 = utils.store) == null ? void 0 : _a3.getState()) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
|
|
125
|
+
const currentUser = (0, import_utils2.formatCustomer)(user);
|
|
126
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
94
127
|
if (status === "success") {
|
|
128
|
+
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
95
129
|
handleNextStep();
|
|
96
130
|
}
|
|
97
131
|
}
|
|
98
132
|
});
|
|
99
133
|
}
|
|
100
134
|
}
|
|
135
|
+
if (key === "select-resource" && (0, import_utils2.isEmptyCartsResourceId)(carts)) {
|
|
136
|
+
(0, import_materials.PisellToast)({
|
|
137
|
+
content: import_utils.locales.getText("pisell2.appointment.no.available.time")
|
|
138
|
+
});
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
101
141
|
handleNextStep();
|
|
102
142
|
};
|
|
103
143
|
const continueText = (0, import_react.useMemo)(() => {
|
|
@@ -107,14 +147,10 @@ var ContinueButton = () => {
|
|
|
107
147
|
return import_utils.locales.getText("pisell2.event.close.continue");
|
|
108
148
|
}
|
|
109
149
|
}, [isLastStep]);
|
|
110
|
-
const confirmLoading = (0, import_react.useMemo)(() => {
|
|
111
|
-
if (!isLastStep) return false;
|
|
112
|
-
return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading);
|
|
113
|
-
}, [isLastStep, createBooking == null ? void 0 : createBooking.loading, checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading]);
|
|
114
150
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
115
151
|
import_materials.Button,
|
|
116
152
|
{
|
|
117
|
-
disabled
|
|
153
|
+
disabled,
|
|
118
154
|
size: "large",
|
|
119
155
|
type: "primary",
|
|
120
156
|
onClick: () => handleContinue(),
|
|
@@ -41,7 +41,8 @@ var import_context = require("../../../context");
|
|
|
41
41
|
var Total = ({ className, isFooter }) => {
|
|
42
42
|
const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
|
|
43
43
|
const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = summary;
|
|
44
|
-
|
|
44
|
+
console.log(summary, "summarysummary");
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `appointment-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
45
46
|
"div",
|
|
46
47
|
{
|
|
47
48
|
className: (0, import_classnames.default)("event-total", {
|
|
@@ -38,38 +38,59 @@ var import_shoppingCart = __toESM(require("../../../../shoppingCart"));
|
|
|
38
38
|
var import_ContinueButton = __toESM(require("../ContinueButton"));
|
|
39
39
|
var import_hooks = require("../../../hooks");
|
|
40
40
|
var import_context = require("../../../context");
|
|
41
|
-
var
|
|
41
|
+
var import_hooks2 = require("../../../hooks");
|
|
42
42
|
var import_utils2 = require("../../../utils");
|
|
43
43
|
var import_Voucher = __toESM(require("../../Voucher"));
|
|
44
|
+
var import_Total = __toESM(require("./Total"));
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
|
-
var CartItem = () => {
|
|
46
|
+
var CartItem = ({ onConfirm }) => {
|
|
46
47
|
var _a, _b;
|
|
47
48
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
const {
|
|
50
|
+
carts,
|
|
51
|
+
isLastStep,
|
|
52
|
+
currentStep,
|
|
53
|
+
resources,
|
|
54
|
+
setResourceOtherParams,
|
|
55
|
+
resourceOtherParams
|
|
56
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
57
|
+
const { accountLists } = (0, import_hooks2.useAppointmentBookingAccount)();
|
|
58
|
+
const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
|
|
59
|
+
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
52
60
|
const holderIds = (0, import_react.useMemo)(() => {
|
|
53
61
|
return accountLists.map((item) => item.id);
|
|
54
62
|
}, [accountLists]);
|
|
55
63
|
const holders = (0, import_react.useMemo)(() => {
|
|
56
64
|
return (0, import_utils2.formatHolder)(accountLists);
|
|
57
65
|
}, [accountLists]);
|
|
58
|
-
const handleClickCard = (e, type,
|
|
59
|
-
console.log(e, type, key, "wh9988767");
|
|
66
|
+
const handleClickCard = (e, type, val) => {
|
|
60
67
|
if (type === "note") {
|
|
61
|
-
return appointmentBooking.updateCart(
|
|
68
|
+
return appointmentBooking.updateCart({
|
|
69
|
+
_id: e == null ? void 0 : e._id,
|
|
70
|
+
...val
|
|
71
|
+
});
|
|
62
72
|
}
|
|
63
73
|
if (type === "delete") {
|
|
74
|
+
return appointmentBooking.deleteCart(e == null ? void 0 : e._id);
|
|
64
75
|
}
|
|
65
76
|
if (type === "delete_holders") {
|
|
66
|
-
return appointmentBooking.removeAccount(
|
|
77
|
+
return appointmentBooking.removeAccount(val);
|
|
78
|
+
}
|
|
79
|
+
if (type === "change_resource") {
|
|
80
|
+
setResourceOtherParams({
|
|
81
|
+
...resourceOtherParams,
|
|
82
|
+
errorList: null
|
|
83
|
+
});
|
|
84
|
+
return appointmentBooking.updateCart({
|
|
85
|
+
_id: e == null ? void 0 : e._id,
|
|
86
|
+
resources: [val]
|
|
87
|
+
});
|
|
67
88
|
}
|
|
68
89
|
};
|
|
69
90
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
70
91
|
"div",
|
|
71
92
|
{
|
|
72
|
-
className: `cart-item-wrap ${(0, import_utils.isMobile)() ? "cart-mobile-item-wrap" : ""}`
|
|
93
|
+
className: `appointment-cart-item-wrap ${(0, import_utils.isMobile)() ? "appointment-cart-mobile-item-wrap" : ""}`
|
|
73
94
|
},
|
|
74
95
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "content" }, /* @__PURE__ */ import_react.default.createElement(
|
|
75
96
|
import_shoppingCart.default,
|
|
@@ -80,7 +101,8 @@ var CartItem = () => {
|
|
|
80
101
|
holders,
|
|
81
102
|
disabledEdit: isLastStep,
|
|
82
103
|
isShowChangeResource: ((_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key) === "select-resource",
|
|
83
|
-
isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.
|
|
104
|
+
isShowDelete: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-service",
|
|
105
|
+
isShowPackageNote: false
|
|
84
106
|
},
|
|
85
107
|
collapseParams: {
|
|
86
108
|
activeKey: holderIds,
|
|
@@ -89,10 +111,11 @@ var CartItem = () => {
|
|
|
89
111
|
platform: "h5",
|
|
90
112
|
emptyText: import_utils.locales.getText("pisell2.event.empty.service"),
|
|
91
113
|
isOpenGroup: !!(holderIds == null ? void 0 : holderIds.length),
|
|
114
|
+
isHideClearCart: true,
|
|
92
115
|
onChange: (e, type, key) => handleClickCard(e, type, key)
|
|
93
116
|
}
|
|
94
117
|
)),
|
|
95
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "
|
|
118
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
|
|
96
119
|
));
|
|
97
120
|
};
|
|
98
121
|
var Item_default = CartItem;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
.cart-item-wrap {
|
|
2
|
-
height:
|
|
1
|
+
.appointment-cart-item-wrap {
|
|
2
|
+
height: calc(100vh - 100px);
|
|
3
3
|
.content {
|
|
4
4
|
background: #fff;
|
|
5
|
-
padding:
|
|
5
|
+
padding: 0 16px;
|
|
6
|
+
max-height: calc(100% - 240px);
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
|
|
6
9
|
.pisell-lowcode__shopping-cart-content {
|
|
7
10
|
.ant-card-body {
|
|
8
11
|
padding: 0;
|
|
@@ -10,9 +13,9 @@
|
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
.
|
|
16
|
+
.appointment-footer {
|
|
14
17
|
background: #fff;
|
|
15
|
-
padding:
|
|
18
|
+
padding: 10px 16px 0;
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
21
|
gap: 14px;
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
.
|
|
26
|
+
.appointment-total-wrap {
|
|
24
27
|
color: var(--Text-Text_1, #1b1b1b);
|
|
25
28
|
font-size: 20px;
|
|
26
29
|
font-weight: 600;
|
|
@@ -64,17 +67,19 @@
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
.cart-mobile-item-wrap {
|
|
70
|
+
.appointment-cart-mobile-item-wrap {
|
|
68
71
|
display: flex;
|
|
69
72
|
flex-direction: column;
|
|
70
73
|
position: relative;
|
|
74
|
+
height: 100%;
|
|
71
75
|
|
|
72
76
|
.content {
|
|
73
77
|
flex: 1;
|
|
74
78
|
overflow-y: auto;
|
|
75
|
-
padding: 0 0
|
|
79
|
+
padding: 0 0 210px;
|
|
80
|
+
max-height: 100%;
|
|
76
81
|
}
|
|
77
|
-
.
|
|
82
|
+
.appointment-footer {
|
|
78
83
|
z-index: 10;
|
|
79
84
|
position: fixed;
|
|
80
85
|
bottom: 0;
|
|
@@ -50,8 +50,9 @@ var Cart = ({ open, onCancel }) => {
|
|
|
50
50
|
padding: "20px"
|
|
51
51
|
},
|
|
52
52
|
destroyOnClose: true,
|
|
53
|
-
className: `
|
|
54
|
-
footer: null
|
|
53
|
+
className: `appointment-cart-modal`,
|
|
54
|
+
footer: null,
|
|
55
|
+
forceRender: true
|
|
55
56
|
},
|
|
56
57
|
/* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflowY: "auto" } }, /* @__PURE__ */ import_react.default.createElement(import_Item.default, null))
|
|
57
58
|
);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.
|
|
1
|
+
.appointment-cart-modal {
|
|
2
2
|
}
|
|
@@ -42,18 +42,20 @@ var import_Date = __toESM(require("../Date"));
|
|
|
42
42
|
var import_Resource = __toESM(require("../Resource"));
|
|
43
43
|
var import_TimeSlicing = __toESM(require("../TimeSlicing"));
|
|
44
44
|
var import_Guest = __toESM(require("../Guest"));
|
|
45
|
-
var import_hooks = require("../../hooks");
|
|
46
45
|
var import_context = require("../../context");
|
|
46
|
+
var import_hooks = require("../../hooks");
|
|
47
47
|
var import_index = require("./index.less");
|
|
48
48
|
var Layout = () => {
|
|
49
49
|
var _a, _b, _c;
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const { currentStep, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
51
|
+
(0, import_hooks.useAppointmentBookingCart)();
|
|
52
|
+
(0, import_hooks.useAppointmentBookingStep)();
|
|
53
53
|
const [params, setParams] = (0, import_react.useState)({});
|
|
54
54
|
(0, import_react.useEffect)(() => {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
setResourceOtherParams({
|
|
56
|
+
...resourceOtherParams,
|
|
57
|
+
errorList: null
|
|
58
|
+
});
|
|
57
59
|
window.scrollTo({
|
|
58
60
|
top: 0,
|
|
59
61
|
behavior: "smooth"
|
|
@@ -83,7 +85,9 @@ var Layout = () => {
|
|
|
83
85
|
if ((0, import_utils.isMobile)()) {
|
|
84
86
|
const header = document.querySelector(".event-progress-bar");
|
|
85
87
|
const footer = document.querySelector(".pisell-section-footers-wrapper");
|
|
86
|
-
const content = document.querySelector(
|
|
88
|
+
const content = document.querySelector(
|
|
89
|
+
".parallel-content-mobile-wrap"
|
|
90
|
+
);
|
|
87
91
|
const headerHeight = ((_a2 = header == null ? void 0 : header.getBoundingClientRect()) == null ? void 0 : _a2.height) || 0;
|
|
88
92
|
const footerHeight = ((_b2 = footer == null ? void 0 : footer.getBoundingClientRect()) == null ? void 0 : _b2.height) || 0;
|
|
89
93
|
const windowHeight = window.innerHeight;
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
width: 634px;
|
|
11
11
|
// padding: 16px 0;
|
|
12
12
|
|
|
13
|
+
.appointment-resource-wrap {
|
|
14
|
+
padding: 16px 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.booking-tab-product {
|
|
14
18
|
.booking-tabs-wrap {
|
|
15
19
|
top: 77px !important;
|
|
@@ -38,7 +42,18 @@
|
|
|
38
42
|
flex: none;
|
|
39
43
|
// padding: 16px 16px 0;
|
|
40
44
|
|
|
45
|
+
.calendar-date-box {
|
|
46
|
+
padding: 0 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.appointment-resource-wrap {
|
|
50
|
+
padding: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
.booking-tab-product {
|
|
54
|
+
.booking-tabs-wrap {
|
|
55
|
+
top: 0 !important;
|
|
56
|
+
}
|
|
42
57
|
.booking-category-list {
|
|
43
58
|
padding: 0 20px;
|
|
44
59
|
}
|
|
@@ -36,19 +36,29 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
38
38
|
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
|
|
39
|
-
var import_state = require("./state");
|
|
40
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_icons = require("@ant-design/icons");
|
|
42
42
|
var import_context = require("../../context");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
import_dayjs.default.extend(import_isSameOrBefore.default);
|
|
45
45
|
var CalendarDate = (props) => {
|
|
46
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
46
47
|
const [currentDate, setCurrentDate] = (0, import_react.useState)();
|
|
47
48
|
const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
|
|
48
49
|
const [currentMonth, setCurrentMonth] = (0, import_react.useState)(() => {
|
|
49
50
|
return (0, import_dayjs.default)();
|
|
50
51
|
});
|
|
51
52
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
53
|
+
const weekListText = [
|
|
54
|
+
import_utils.locales.getText("pisell2.appointment.sunday"),
|
|
55
|
+
import_utils.locales.getText("pisell2.appointment.monday"),
|
|
56
|
+
import_utils.locales.getText("pisell2.appointment.tuesday"),
|
|
57
|
+
import_utils.locales.getText("pisell2.appointment.wednesday"),
|
|
58
|
+
import_utils.locales.getText("pisell2.appointment.thursday"),
|
|
59
|
+
import_utils.locales.getText("pisell2.appointment.friday"),
|
|
60
|
+
import_utils.locales.getText("pisell2.appointment.saturday")
|
|
61
|
+
];
|
|
52
62
|
const startingColumn = 0 % 7;
|
|
53
63
|
const columns = Array.from(
|
|
54
64
|
{ length: 7 },
|
|
@@ -80,40 +90,44 @@ var CalendarDate = (props) => {
|
|
|
80
90
|
return lastDate.isBefore((0, import_dayjs.default)(), "month");
|
|
81
91
|
};
|
|
82
92
|
const getDates = async (date) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
appointmentBooking.setDateRange([firstAvailableDate]);
|
|
103
|
-
}
|
|
104
|
-
const baseMonthData = getMonthData(date.format("YYYY-MM"));
|
|
105
|
-
const updatedDates = baseMonthData.map((day) => {
|
|
106
|
-
const matchedDay = data.find((d) => d.date === day.date);
|
|
107
|
-
if (matchedDay) {
|
|
108
|
-
return {
|
|
109
|
-
...day,
|
|
110
|
-
...matchedDay,
|
|
111
|
-
disabled: matchedDay.status === "unavailable"
|
|
112
|
-
};
|
|
93
|
+
try {
|
|
94
|
+
const startDate = (0, import_dayjs.default)(date).startOf("month").format("YYYY-MM-DD");
|
|
95
|
+
const endDate = (0, import_dayjs.default)(date).endOf("month").format("YYYY-MM-DD");
|
|
96
|
+
const params = {
|
|
97
|
+
startDate,
|
|
98
|
+
endDate
|
|
99
|
+
};
|
|
100
|
+
const data = await appointmentBooking.getAvailableDate(params);
|
|
101
|
+
const selected = await appointmentBooking.getDateRange();
|
|
102
|
+
if ((selected == null ? void 0 : selected.length) > 0) {
|
|
103
|
+
setCurrentDate(selected[0].date);
|
|
104
|
+
} else {
|
|
105
|
+
if (date.format("YYYY-MM") === (0, import_dayjs.default)().format("YYYY-MM")) {
|
|
106
|
+
const firstAvailableDate = data.find(
|
|
107
|
+
(d) => d.status === "available"
|
|
108
|
+
);
|
|
109
|
+
setCurrentDate(firstAvailableDate == null ? void 0 : firstAvailableDate.date);
|
|
110
|
+
appointmentBooking.setDateRange([firstAvailableDate]);
|
|
111
|
+
}
|
|
113
112
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
const baseMonthData = getMonthData(date.format("YYYY-MM"));
|
|
114
|
+
const updatedDates = baseMonthData.map((day) => {
|
|
115
|
+
const matchedDay = data.find((d) => d.date === day.date);
|
|
116
|
+
if (matchedDay) {
|
|
117
|
+
return {
|
|
118
|
+
...day,
|
|
119
|
+
...matchedDay,
|
|
120
|
+
disabled: matchedDay.status === "unavailable"
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return day;
|
|
124
|
+
});
|
|
125
|
+
setLoading(false);
|
|
126
|
+
setDateMonthList(updatedDates);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
setLoading(false);
|
|
129
|
+
console.log(error, "wh978968234234");
|
|
130
|
+
}
|
|
117
131
|
};
|
|
118
132
|
(0, import_react.useEffect)(() => {
|
|
119
133
|
getDates(currentMonth);
|
|
@@ -127,52 +141,50 @@ var CalendarDate = (props) => {
|
|
|
127
141
|
let currentMonthText = currentMonth.format("YYYY-MM");
|
|
128
142
|
let newNextMonth = (0, import_dayjs.default)(currentMonthText).add(1, "month");
|
|
129
143
|
setCurrentMonth(newNextMonth);
|
|
144
|
+
setLoading(true);
|
|
130
145
|
};
|
|
131
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
146
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
132
147
|
"div",
|
|
133
148
|
{
|
|
134
|
-
className: (0,
|
|
135
|
-
["last-month-disabled"]: lastMonthDisable()
|
|
136
|
-
}),
|
|
137
|
-
onClick: () => {
|
|
138
|
-
if (lastMonthDisable()) return;
|
|
139
|
-
lastMonth();
|
|
140
|
-
}
|
|
149
|
+
className: `calendar-date-box ${(0, import_utils.isMobile)() ? "calendar-date-mobile-box" : ""}`
|
|
141
150
|
},
|
|
142
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
143
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, import_state.weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
|
|
144
|
-
const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
|
|
145
|
-
const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
|
|
146
|
-
currentMonth,
|
|
147
|
-
"month"
|
|
148
|
-
);
|
|
149
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
151
|
+
!dateMonthList.length ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, style: { paddingTop: "16px" } }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ import_react.default.createElement(
|
|
150
152
|
"div",
|
|
151
153
|
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
["disabledDate"]: day == null ? void 0 : day.disabled,
|
|
155
|
-
// ['disabledSelect']: status === 'sold_out',
|
|
156
|
-
["selectDate"]: currentDate === date,
|
|
157
|
-
["other-month-days"]: !isCurrentMonth
|
|
154
|
+
className: (0, import_classnames.default)("calendar-last-month", {
|
|
155
|
+
["last-month-disabled"]: lastMonthDisable()
|
|
158
156
|
}),
|
|
159
157
|
onClick: () => {
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
setCurrentDate(date);
|
|
163
|
-
appointmentBooking.setDateRange([day]);
|
|
158
|
+
if (lastMonthDisable()) return;
|
|
159
|
+
lastMonth();
|
|
164
160
|
}
|
|
165
161
|
},
|
|
166
|
-
|
|
162
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.CaretLeftOutlined, null)
|
|
163
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-current-month" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-next-month", onClick: nextMonth }, /* @__PURE__ */ import_react.default.createElement(import_icons.CaretRightOutlined, null))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-weeks" }, columns.map((col) => /* @__PURE__ */ import_react.default.createElement("div", { key: col, className: "calendar-weeks-items" }, weekListText[Number(col)]))), /* @__PURE__ */ import_react.default.createElement("div", { className: "calendar-days" }, dateMonthList.map((day, index) => {
|
|
164
|
+
const date = (0, import_dayjs.default)(day.date).format("YYYY-MM-DD");
|
|
165
|
+
const isCurrentMonth = (0, import_dayjs.default)(day.date).isSame(
|
|
166
|
+
currentMonth,
|
|
167
|
+
"month"
|
|
168
|
+
);
|
|
169
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
167
170
|
"div",
|
|
168
171
|
{
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
key: index,
|
|
173
|
+
className: (0, import_classnames.default)("calendar-days-items", {
|
|
174
|
+
["disabledDate"]: day == null ? void 0 : day.disabled,
|
|
175
|
+
["selectDate"]: currentDate === date,
|
|
176
|
+
["other-month-days"]: !isCurrentMonth,
|
|
177
|
+
["loading-item"]: loading
|
|
178
|
+
}),
|
|
179
|
+
onClick: () => {
|
|
180
|
+
if (day == null ? void 0 : day.disabled) return;
|
|
181
|
+
setCurrentDate(date);
|
|
182
|
+
appointmentBooking.setDateRange([day]);
|
|
183
|
+
}
|
|
172
184
|
},
|
|
173
|
-
(0, import_dayjs.default)(day.date).format("D")
|
|
174
|
-
)
|
|
175
|
-
)
|
|
176
|
-
|
|
185
|
+
isCurrentMonth && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("day-text") }, (0, import_dayjs.default)(day.date).format("D"))
|
|
186
|
+
);
|
|
187
|
+
}))))
|
|
188
|
+
);
|
|
177
189
|
};
|
|
178
190
|
var Date_default = CalendarDate;
|
|
@@ -42,8 +42,12 @@ var import_Cart = __toESM(require("../Cart"));
|
|
|
42
42
|
var import_Total = __toESM(require("../Cart/Item/Total"));
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var Footer = () => {
|
|
45
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
const { carts, currentStep } = (0, import_context.useAppointmentBookingContext)();
|
|
46
47
|
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
setOpen(false);
|
|
50
|
+
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
|
|
47
51
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
48
52
|
import_materials.SectionFooters,
|
|
49
53
|
{
|