@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.6 18.8a1 1 0 0 1-1.4-.2A6.45 6.45 0 0 0 24 16a1 1 0 0 1 0-2 3 3 0 1 0-2.905-3.75 1 1 0 0 1-1.937-.5 5 5 0 1 1 8.217 4.939 8.5 8.5 0 0 1 3.429 2.71A1 1 0 0 1 30.6 18.8m-6.735 7.7a1 1 0 1 1-1.73 1 7.125 7.125 0 0 0-12.27 0 1 1 0 1 1-1.73-1 9 9 0 0 1 4.217-3.74 6 6 0 1 1 7.296 0 9 9 0 0 1 4.217 3.74M16 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8m-7-7a1 1 0 0 0-1-1 3 3 0 1 1 2.905-3.75 1 1 0 0 0 1.938-.5 5 5 0 1 0-8.218 4.939 8.5 8.5 0 0 0-3.425 2.71A1 1 0 1 0 2.8 18.6 6.45 6.45 0 0 1 8 16a1 1 0 0 0 1-1"></path></svg>
|
|
@@ -11,22 +11,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
import React, { useMemo, useState } from 'react';
|
|
12
12
|
import { locales } from '@pisell/utils';
|
|
13
13
|
import { Button, PisellToast } from '@pisell/materials';
|
|
14
|
-
// import {
|
|
15
|
-
// useCart,
|
|
16
|
-
// useHolder,
|
|
17
|
-
// useStep,
|
|
18
|
-
// useCheckout,
|
|
19
|
-
// useSales,
|
|
20
|
-
// useCustomer,
|
|
21
|
-
// } from '../../../../../Sales';
|
|
22
|
-
import { formatValues } from "../../../../Sales/Checkout/utils";
|
|
23
|
-
// import OrderProductModal from '../../OrderProductModal/index';
|
|
24
|
-
// import EmptyHolderModal from '../../EmptyHolderModal';
|
|
25
14
|
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
26
|
-
import { useAppointmentBookingLogin } from "../../../hooks";
|
|
15
|
+
import { useAppointmentBookingLogin, useAppointmentBookingResource, useAppointmentBookingAccount, useShopDiscount } from "../../../hooks";
|
|
27
16
|
import { useAppointmentBookingContext } from "../../../context";
|
|
17
|
+
import { formatCustomer, isEmptyCartsResourceId } from "../../../utils";
|
|
28
18
|
import "./index.less";
|
|
29
19
|
var ContinueButton = function ContinueButton() {
|
|
20
|
+
var _currentStep$step2;
|
|
30
21
|
var context = useEngineContext();
|
|
31
22
|
var utils = context.appHelper.utils || {};
|
|
32
23
|
var _useState = useState(false),
|
|
@@ -36,54 +27,51 @@ var ContinueButton = function ContinueButton() {
|
|
|
36
27
|
var _useAppointmentBookin = useAppointmentBookingLogin(),
|
|
37
28
|
isLogin = _useAppointmentBookin.isLogin,
|
|
38
29
|
openLoginModal = _useAppointmentBookin.openLoginModal;
|
|
39
|
-
var _useAppointmentBookin2 =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
var _useAppointmentBookin2 = useAppointmentBookingAccount(),
|
|
31
|
+
accountLists = _useAppointmentBookin2.accountLists;
|
|
32
|
+
var shopDiscount = useShopDiscount();
|
|
33
|
+
var _useAppointmentBookin3 = useAppointmentBookingContext(),
|
|
34
|
+
currentStep = _useAppointmentBookin3.currentStep,
|
|
35
|
+
isLastStep = _useAppointmentBookin3.isLastStep,
|
|
36
|
+
carts = _useAppointmentBookin3.carts,
|
|
37
|
+
appointmentBooking = _useAppointmentBookin3.appointmentBooking,
|
|
38
|
+
resourceOtherParams = _useAppointmentBookin3.resourceOtherParams,
|
|
39
|
+
summary = _useAppointmentBookin3.summary;
|
|
40
|
+
var _useAppointmentBookin4 = useAppointmentBookingResource(),
|
|
41
|
+
getResourceTimeSlot = _useAppointmentBookin4.getResourceTimeSlot,
|
|
42
|
+
getResourceList = _useAppointmentBookin4.getResourceList;
|
|
43
|
+
var disabled = useMemo(function () {
|
|
44
|
+
var _currentStep$step;
|
|
45
|
+
var key = currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key;
|
|
46
|
+
if (!carts.length) return true;
|
|
47
|
+
|
|
48
|
+
// 选择资源部分需要判断是否有不可用的资源
|
|
49
|
+
// if (
|
|
50
|
+
// key === 'select-resource' &&
|
|
51
|
+
// resourceOtherParams?.errorList?.length > 0
|
|
52
|
+
// ) {
|
|
53
|
+
// return true;
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// 如果是选择服务页面,则判断是否账户下有空的购物车
|
|
57
|
+
// if (key === 'select-service' && isEmptyGuest(carts, accountLists)) {
|
|
58
|
+
// return true;
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
return false;
|
|
62
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key, carts, accountLists, resourceOtherParams === null || resourceOtherParams === void 0 ? void 0 : resourceOtherParams.errorList]);
|
|
51
63
|
|
|
52
64
|
/**
|
|
53
|
-
* @title:
|
|
65
|
+
* @title: 清空数据
|
|
54
66
|
* @description:
|
|
55
67
|
* @return {*}
|
|
56
68
|
* @Author: WangHan
|
|
57
|
-
* @Date: 2025-
|
|
69
|
+
* @Date: 2025-04-16 17:55
|
|
58
70
|
*/
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
while (1) switch (_context.prev = _context.next) {
|
|
64
|
-
case 0:
|
|
65
|
-
value = formatValues(data); // 如果检测成功,则直接下单
|
|
66
|
-
// const result = await onCheckout(value);
|
|
67
|
-
result = {
|
|
68
|
-
success: true
|
|
69
|
-
}; // 清空数据
|
|
70
|
-
if (result !== null && result !== void 0 && result.success) {
|
|
71
|
-
// removeSessionStorage();
|
|
72
|
-
} else {
|
|
73
|
-
PisellToast({
|
|
74
|
-
content: (result === null || result === void 0 || (_result$err = result.err) === null || _result$err === void 0 ? void 0 : _result$err.message) || ''
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
case 3:
|
|
78
|
-
case "end":
|
|
79
|
-
return _context.stop();
|
|
80
|
-
}
|
|
81
|
-
}, _callee);
|
|
82
|
-
}));
|
|
83
|
-
return function handleCheckout() {
|
|
84
|
-
return _ref.apply(this, arguments);
|
|
85
|
-
};
|
|
86
|
-
}();
|
|
71
|
+
var clearData = function clearData() {
|
|
72
|
+
appointmentBooking.destroy();
|
|
73
|
+
shopDiscount.destroy();
|
|
74
|
+
};
|
|
87
75
|
|
|
88
76
|
/**
|
|
89
77
|
* @title: 下一步
|
|
@@ -93,50 +81,83 @@ var ContinueButton = function ContinueButton() {
|
|
|
93
81
|
* @Date: 2025-02-08 18:57
|
|
94
82
|
*/
|
|
95
83
|
var handleNextStep = /*#__PURE__*/function () {
|
|
96
|
-
var
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
85
|
+
var _currentStep$step3, _currentStep$step4;
|
|
86
|
+
var res, _freeResult$data, _ref2, order_id, total_amount, freeResult, _utils$history, url, _freeResult$data2;
|
|
87
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
88
|
+
while (1) switch (_context.prev = _context.next) {
|
|
100
89
|
case 0:
|
|
101
90
|
if (!isLastStep) {
|
|
102
|
-
|
|
91
|
+
_context.next = 24;
|
|
103
92
|
break;
|
|
104
93
|
}
|
|
105
94
|
setLoading(true);
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
_context.prev = 2;
|
|
96
|
+
_context.next = 5;
|
|
108
97
|
return appointmentBooking.submitOrder();
|
|
109
98
|
case 5:
|
|
110
|
-
res =
|
|
111
|
-
|
|
99
|
+
res = _context.sent;
|
|
100
|
+
if (!((summary === null || summary === void 0 ? void 0 : summary.total) > 0)) {
|
|
101
|
+
_context.next = 10;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
// 拉起支付弹窗
|
|
112
105
|
utils.action({
|
|
113
106
|
type: 'pisell1.payment',
|
|
114
|
-
data: res === null || res === void 0 ? void 0 : res.data
|
|
115
|
-
callback: function callback(e) {
|
|
116
|
-
console.log(e, 'wh9896788');
|
|
117
|
-
// checkoutCallback.current && checkoutCallback.current(e);
|
|
118
|
-
}
|
|
107
|
+
data: res === null || res === void 0 ? void 0 : res.data
|
|
119
108
|
});
|
|
109
|
+
_context.next = 16;
|
|
110
|
+
break;
|
|
111
|
+
case 10:
|
|
112
|
+
// 免费领取
|
|
113
|
+
_ref2 = (res === null || res === void 0 ? void 0 : res.data) || {}, order_id = _ref2.order_id, total_amount = _ref2.total_amount;
|
|
114
|
+
_context.next = 13;
|
|
115
|
+
return appointmentBooking.getFreeProduct(order_id);
|
|
116
|
+
case 13:
|
|
117
|
+
freeResult = _context.sent;
|
|
118
|
+
console.log(freeResult, 'freeResult');
|
|
119
|
+
if (freeResult !== null && freeResult !== void 0 && (_freeResult$data = freeResult.data) !== null && _freeResult$data !== void 0 && _freeResult$data.status) {
|
|
120
|
+
url = "/payment-finish/success?order_id=".concat(order_id, "&amount=").concat(Number(total_amount));
|
|
121
|
+
utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 || _utils$history.replace(url);
|
|
122
|
+
} else {
|
|
123
|
+
PisellToast({
|
|
124
|
+
content: freeResult === null || freeResult === void 0 || (_freeResult$data2 = freeResult.data) === null || _freeResult$data2 === void 0 ? void 0 : _freeResult$data2.message
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
case 16:
|
|
128
|
+
clearData();
|
|
120
129
|
setLoading(false);
|
|
121
|
-
|
|
130
|
+
_context.next = 23;
|
|
122
131
|
break;
|
|
123
|
-
case
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
console.log(isLastStep, isLogin, _context2.t0, 'wh9896788');
|
|
132
|
+
case 20:
|
|
133
|
+
_context.prev = 20;
|
|
134
|
+
_context.t0 = _context["catch"](2);
|
|
127
135
|
setLoading(false);
|
|
128
|
-
case
|
|
129
|
-
return
|
|
130
|
-
case
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
case 23:
|
|
137
|
+
return _context.abrupt("return");
|
|
138
|
+
case 24:
|
|
139
|
+
if ((currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key) === 'select-resource') {
|
|
140
|
+
getResourceTimeSlot();
|
|
141
|
+
}
|
|
142
|
+
if ((currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key) === 'select-time') {
|
|
143
|
+
// getResourceTimeSlot('resources');
|
|
144
|
+
// const { errorList } =
|
|
145
|
+
// await appointmentBooking.autoSelectAllProductResources(
|
|
146
|
+
// 'sites',
|
|
147
|
+
// selectedTime
|
|
148
|
+
// );
|
|
149
|
+
// const result = await appointmentBooking.submitTimeSlot(selectedTime);
|
|
150
|
+
// console.log(errorList, result, 'wh9896788');
|
|
151
|
+
}
|
|
152
|
+
return _context.abrupt("return", appointmentBooking.next());
|
|
153
|
+
case 27:
|
|
133
154
|
case "end":
|
|
134
|
-
return
|
|
155
|
+
return _context.stop();
|
|
135
156
|
}
|
|
136
|
-
},
|
|
157
|
+
}, _callee, null, [[2, 20]]);
|
|
137
158
|
}));
|
|
138
159
|
return function handleNextStep() {
|
|
139
|
-
return
|
|
160
|
+
return _ref.apply(this, arguments);
|
|
140
161
|
};
|
|
141
162
|
}();
|
|
142
163
|
|
|
@@ -148,32 +169,53 @@ var ContinueButton = function ContinueButton() {
|
|
|
148
169
|
* @Date: 2025-01-16 16:30
|
|
149
170
|
*/
|
|
150
171
|
var handleContinue = /*#__PURE__*/function () {
|
|
151
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
152
|
-
|
|
153
|
-
|
|
172
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
173
|
+
var _currentStep$step5;
|
|
174
|
+
var key;
|
|
175
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
176
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
154
177
|
case 0:
|
|
178
|
+
key = currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key;
|
|
179
|
+
console.log(currentStep, isLastStep, isLogin, 'wh9896788222');
|
|
180
|
+
// 如果当前是确认信息页面,则到结算页面
|
|
155
181
|
if (!isLastStep) {
|
|
156
|
-
|
|
182
|
+
_context2.next = 5;
|
|
157
183
|
break;
|
|
158
184
|
}
|
|
159
185
|
if (isLogin) {
|
|
160
|
-
|
|
186
|
+
_context2.next = 5;
|
|
161
187
|
break;
|
|
162
188
|
}
|
|
163
|
-
return
|
|
189
|
+
return _context2.abrupt("return", openLoginModal({
|
|
164
190
|
callback: function callback(status) {
|
|
191
|
+
var _utils$store;
|
|
192
|
+
var user = (_utils$store = utils.store) === null || _utils$store === void 0 || (_utils$store = _utils$store.getState()) === null || _utils$store === void 0 || (_utils$store = _utils$store.global) === null || _utils$store === void 0 ? void 0 : _utils$store.userInfo;
|
|
193
|
+
var currentUser = formatCustomer(user);
|
|
194
|
+
var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
|
|
195
|
+
return !(d !== null && d !== void 0 && d.isGuest);
|
|
196
|
+
});
|
|
165
197
|
if (status === 'success') {
|
|
198
|
+
appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
|
|
166
199
|
handleNextStep();
|
|
167
200
|
}
|
|
168
201
|
}
|
|
169
202
|
}));
|
|
170
|
-
case
|
|
203
|
+
case 5:
|
|
204
|
+
if (!(key === 'select-resource' && isEmptyCartsResourceId(carts))) {
|
|
205
|
+
_context2.next = 8;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
PisellToast({
|
|
209
|
+
content: locales.getText('pisell2.appointment.no.available.time')
|
|
210
|
+
});
|
|
211
|
+
return _context2.abrupt("return");
|
|
212
|
+
case 8:
|
|
171
213
|
handleNextStep();
|
|
172
|
-
case
|
|
214
|
+
case 9:
|
|
173
215
|
case "end":
|
|
174
|
-
return
|
|
216
|
+
return _context2.stop();
|
|
175
217
|
}
|
|
176
|
-
},
|
|
218
|
+
}, _callee2);
|
|
177
219
|
}));
|
|
178
220
|
return function handleContinue() {
|
|
179
221
|
return _ref3.apply(this, arguments);
|
|
@@ -195,21 +237,8 @@ var ContinueButton = function ContinueButton() {
|
|
|
195
237
|
return locales.getText('pisell2.event.close.continue');
|
|
196
238
|
}
|
|
197
239
|
}, [isLastStep]);
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* @title: 确认按钮loading
|
|
201
|
-
* @description:
|
|
202
|
-
* @param {*} useMemo
|
|
203
|
-
* @return {*}
|
|
204
|
-
* @Author: WangHan
|
|
205
|
-
* @Date: 2025-01-21 23:03
|
|
206
|
-
*/
|
|
207
|
-
var confirmLoading = useMemo(function () {
|
|
208
|
-
if (!isLastStep) return false;
|
|
209
|
-
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
|
|
210
|
-
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
|
|
211
240
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
212
|
-
disabled:
|
|
241
|
+
disabled: disabled,
|
|
213
242
|
size: "large",
|
|
214
243
|
type: "primary",
|
|
215
244
|
onClick: function onClick() {
|
|
@@ -18,8 +18,9 @@ var Total = function Total(_ref) {
|
|
|
18
18
|
totalTaxFee = summary.totalTaxFee,
|
|
19
19
|
isPriceIncludeTax = summary.isPriceIncludeTax,
|
|
20
20
|
total = summary.total;
|
|
21
|
+
console.log(summary, 'summarysummary');
|
|
21
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: "
|
|
23
|
+
className: "appointment-total-wrap ".concat(className)
|
|
23
24
|
}, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
24
25
|
className: "gst-wrap"
|
|
25
26
|
}, /*#__PURE__*/React.createElement("span", null, taxTitle, isFooter ? ': ' : ''), /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
@@ -1,26 +1,36 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import React, { useMemo } from 'react';
|
|
2
8
|
import { isMobile, locales } from '@pisell/utils';
|
|
3
9
|
import ShoppingCart from "../../../../shoppingCart";
|
|
4
10
|
import ContinueButton from "../ContinueButton";
|
|
5
|
-
import {
|
|
11
|
+
import { useAppointmentBooking } from "../../../hooks";
|
|
6
12
|
import { useAppointmentBookingContext } from "../../../context";
|
|
7
|
-
import
|
|
8
|
-
import { formatHolder, formatCarts } from "../../../utils";
|
|
13
|
+
import { useAppointmentBookingAccount, useAppointmentBookingResource } from "../../../hooks";
|
|
14
|
+
import { formatHolder, formatCarts, formatCurrentUser } from "../../../utils";
|
|
9
15
|
import VoucherCard from "../../Voucher";
|
|
16
|
+
import Total from "./Total";
|
|
10
17
|
import "./index.less";
|
|
11
|
-
var CartItem = function CartItem() {
|
|
18
|
+
var CartItem = function CartItem(_ref) {
|
|
12
19
|
var _currentStep$step, _currentStep$step2;
|
|
20
|
+
var onConfirm = _ref.onConfirm;
|
|
13
21
|
var appointmentBooking = useAppointmentBooking();
|
|
14
|
-
var appointmentBookingAccount = useAppointmentBookingAccount();
|
|
15
22
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
16
23
|
carts = _useAppointmentBookin.carts,
|
|
17
|
-
summary = _useAppointmentBookin.summary,
|
|
18
24
|
isLastStep = _useAppointmentBookin.isLastStep,
|
|
19
25
|
currentStep = _useAppointmentBookin.currentStep,
|
|
20
|
-
resources = _useAppointmentBookin.resources
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
resources = _useAppointmentBookin.resources,
|
|
27
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
28
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
|
|
29
|
+
var _useAppointmentBookin2 = useAppointmentBookingAccount(),
|
|
30
|
+
accountLists = _useAppointmentBookin2.accountLists;
|
|
31
|
+
var _useAppointmentBookin3 = useAppointmentBookingResource(),
|
|
32
|
+
getResourceList = _useAppointmentBookin3.getResourceList;
|
|
33
|
+
var currentUser = formatCurrentUser();
|
|
24
34
|
var holderIds = useMemo(function () {
|
|
25
35
|
return accountLists.map(function (item) {
|
|
26
36
|
return item.id;
|
|
@@ -29,28 +39,38 @@ var CartItem = function CartItem() {
|
|
|
29
39
|
var holders = useMemo(function () {
|
|
30
40
|
return formatHolder(accountLists);
|
|
31
41
|
}, [accountLists]);
|
|
32
|
-
var handleClickCard = function handleClickCard(e, type,
|
|
33
|
-
console.log(e, type, key, 'wh9988767');
|
|
34
|
-
|
|
42
|
+
var handleClickCard = function handleClickCard(e, type, val) {
|
|
35
43
|
// 更改备注
|
|
36
44
|
if (type === 'note') {
|
|
37
|
-
return appointmentBooking.updateCart(
|
|
38
|
-
|
|
39
|
-
});
|
|
45
|
+
return appointmentBooking.updateCart(_objectSpread({
|
|
46
|
+
_id: e === null || e === void 0 ? void 0 : e._id
|
|
47
|
+
}, val));
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
// 删除购物车下某个商品
|
|
43
51
|
if (type === 'delete') {
|
|
44
|
-
|
|
52
|
+
return appointmentBooking.deleteCart(e === null || e === void 0 ? void 0 : e._id);
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
// 删除购物车
|
|
48
56
|
if (type === 'delete_holders') {
|
|
49
|
-
return appointmentBooking.removeAccount(
|
|
57
|
+
return appointmentBooking.removeAccount(val);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 更改资源
|
|
61
|
+
if (type === 'change_resource') {
|
|
62
|
+
// 清空资源分配失败数据
|
|
63
|
+
setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
|
|
64
|
+
errorList: null
|
|
65
|
+
}));
|
|
66
|
+
return appointmentBooking.updateCart({
|
|
67
|
+
_id: e === null || e === void 0 ? void 0 : e._id,
|
|
68
|
+
resources: [val]
|
|
69
|
+
});
|
|
50
70
|
}
|
|
51
71
|
};
|
|
52
72
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className: "cart-item-wrap ".concat(isMobile() ? 'cart-mobile-item-wrap' : '')
|
|
73
|
+
className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
|
|
54
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
55
75
|
className: "content"
|
|
56
76
|
}, /*#__PURE__*/React.createElement(ShoppingCart, {
|
|
@@ -60,7 +80,8 @@ var CartItem = function CartItem() {
|
|
|
60
80
|
holders: holders,
|
|
61
81
|
disabledEdit: isLastStep,
|
|
62
82
|
isShowChangeResource: (currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'select-resource',
|
|
63
|
-
isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.
|
|
83
|
+
isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
|
|
84
|
+
isShowPackageNote: false
|
|
64
85
|
},
|
|
65
86
|
collapseParams: {
|
|
66
87
|
activeKey: holderIds,
|
|
@@ -69,11 +90,12 @@ var CartItem = function CartItem() {
|
|
|
69
90
|
platform: "h5",
|
|
70
91
|
emptyText: locales.getText('pisell2.event.empty.service'),
|
|
71
92
|
isOpenGroup: !!(holderIds !== null && holderIds !== void 0 && holderIds.length),
|
|
93
|
+
isHideClearCart: true,
|
|
72
94
|
onChange: function onChange(e, type, key) {
|
|
73
95
|
return handleClickCard(e, type, key);
|
|
74
96
|
}
|
|
75
97
|
})), /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: "
|
|
98
|
+
className: "appointment-footer"
|
|
77
99
|
}, /*#__PURE__*/React.createElement(VoucherCard, {
|
|
78
100
|
currentUser: currentUser,
|
|
79
101
|
products: carts
|
|
@@ -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;
|
|
@@ -18,8 +18,9 @@ var Cart = function Cart(_ref) {
|
|
|
18
18
|
padding: '20px'
|
|
19
19
|
},
|
|
20
20
|
destroyOnClose: true,
|
|
21
|
-
className: "
|
|
22
|
-
footer: null
|
|
21
|
+
className: "appointment-cart-modal",
|
|
22
|
+
footer: null,
|
|
23
|
+
forceRender: true
|
|
23
24
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24
25
|
style: {
|
|
25
26
|
flex: 1,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.
|
|
1
|
+
.appointment-cart-modal {
|
|
2
2
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -14,30 +20,36 @@ import Date from "../Date";
|
|
|
14
20
|
import Resource from "../Resource";
|
|
15
21
|
import TimeSlicing from "../TimeSlicing";
|
|
16
22
|
import Guest from "../Guest";
|
|
17
|
-
import { useAppointmentBookingStep, useAppointmentBookingCart } from "../../hooks";
|
|
18
23
|
import { useAppointmentBookingContext } from "../../context";
|
|
24
|
+
import { useAppointmentBookingCart, useAppointmentBookingStep } from "../../hooks";
|
|
19
25
|
import "./index.less";
|
|
20
26
|
var Layout = function Layout() {
|
|
21
|
-
var _currentStep$
|
|
22
|
-
var appointmentBookingStep = useAppointmentBookingStep();
|
|
23
|
-
var appointmentBookingCart = useAppointmentBookingCart();
|
|
27
|
+
var _currentStep$step, _currentStep$step3, _currentStep$step4;
|
|
24
28
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
25
|
-
currentStep = _useAppointmentBookin.currentStep
|
|
29
|
+
currentStep = _useAppointmentBookin.currentStep,
|
|
30
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
31
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
|
|
32
|
+
|
|
33
|
+
// 不要删除
|
|
34
|
+
useAppointmentBookingCart();
|
|
35
|
+
useAppointmentBookingStep();
|
|
26
36
|
var _useState = useState({}),
|
|
27
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
38
|
params = _useState2[0],
|
|
29
39
|
setParams = _useState2[1];
|
|
30
40
|
useEffect(function () {
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
// 清空资源分配失败数据
|
|
42
|
+
setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
|
|
43
|
+
errorList: null
|
|
44
|
+
}));
|
|
33
45
|
window.scrollTo({
|
|
34
46
|
top: 0,
|
|
35
47
|
behavior: 'smooth'
|
|
36
48
|
});
|
|
37
|
-
}, [currentStep === null || currentStep === void 0 || (_currentStep$
|
|
49
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
|
|
38
50
|
var Com = useMemo(function () {
|
|
39
|
-
var _currentStep$
|
|
40
|
-
var key = currentStep === null || currentStep === void 0 || (_currentStep$
|
|
51
|
+
var _currentStep$step2;
|
|
52
|
+
var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
|
|
41
53
|
if (!key) return null;
|
|
42
54
|
var components = {
|
|
43
55
|
// 选择服务
|
|
@@ -56,7 +68,7 @@ var Layout = function Layout() {
|
|
|
56
68
|
onChange: setParams,
|
|
57
69
|
params: params
|
|
58
70
|
});
|
|
59
|
-
}, [currentStep === null || currentStep === void 0 || (_currentStep$
|
|
71
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
|
|
60
72
|
|
|
61
73
|
/**
|
|
62
74
|
* @title: 动态计算中间内容区域的高度
|
|
@@ -70,7 +82,7 @@ var Layout = function Layout() {
|
|
|
70
82
|
var _header$getBoundingCl, _footer$getBoundingCl;
|
|
71
83
|
var header = document.querySelector('.event-progress-bar');
|
|
72
84
|
var footer = document.querySelector('.pisell-section-footers-wrapper');
|
|
73
|
-
var content = document.querySelector('.
|
|
85
|
+
var content = document.querySelector('.parallel-content-mobile-wrap');
|
|
74
86
|
var headerHeight = (header === null || header === void 0 || (_header$getBoundingCl = header.getBoundingClientRect()) === null || _header$getBoundingCl === void 0 ? void 0 : _header$getBoundingCl.height) || 0;
|
|
75
87
|
var footerHeight = (footer === null || footer === void 0 || (_footer$getBoundingCl = footer.getBoundingClientRect()) === null || _footer$getBoundingCl === void 0 ? void 0 : _footer$getBoundingCl.height) || 0;
|
|
76
88
|
var windowHeight = window.innerHeight;
|
|
@@ -80,7 +92,7 @@ var Layout = function Layout() {
|
|
|
80
92
|
content.style.overflowY = 'auto';
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
|
-
}, [currentStep === null || currentStep === void 0 || (_currentStep$
|
|
95
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key]);
|
|
84
96
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement("div", {
|
|
85
97
|
className: "parallel-content-wrap ".concat(isMobile() ? 'parallel-content-mobile-wrap' : '')
|
|
86
98
|
}, /*#__PURE__*/React.createElement("div", {
|