@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,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.tsx
|
|
30
|
+
var InformationOptionsModal_exports = {};
|
|
31
|
+
__export(InformationOptionsModal_exports, {
|
|
32
|
+
default: () => InformationOptionsModal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(InformationOptionsModal_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var GuestOptionsModal = (props) => {
|
|
39
|
+
const { open, onCancel, options, onClick, holderItem } = props;
|
|
40
|
+
const lists = (0, import_react.useMemo)(() => {
|
|
41
|
+
let _options = [...options];
|
|
42
|
+
if (!(holderItem == null ? void 0 : holderItem.isGuest)) {
|
|
43
|
+
_options = _options.filter((option) => option.key !== "remove");
|
|
44
|
+
}
|
|
45
|
+
return _options;
|
|
46
|
+
}, [options]);
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
import_materials.PisellModal,
|
|
49
|
+
{
|
|
50
|
+
open,
|
|
51
|
+
platform: "h5",
|
|
52
|
+
closable: true,
|
|
53
|
+
bodyStyle: { padding: "0 24px" },
|
|
54
|
+
destroyOnClose: true,
|
|
55
|
+
footer: null,
|
|
56
|
+
onCancel,
|
|
57
|
+
mobileModalHeight: "auto",
|
|
58
|
+
className: "guest-option-modal",
|
|
59
|
+
headerDivider: false
|
|
60
|
+
},
|
|
61
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "guest-options-wrap" }, lists.map((item) => {
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
key: item.key,
|
|
66
|
+
className: `guest-options-wrap-item ${item.key === "remove" ? "remove" : ""}`,
|
|
67
|
+
onClick: () => onClick(item)
|
|
68
|
+
},
|
|
69
|
+
item.label
|
|
70
|
+
);
|
|
71
|
+
}))
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
var InformationOptionsModal_default = GuestOptionsModal;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.guest-options-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
.guest-options-wrap-item {
|
|
6
|
+
color: var(--Gray-900, #101828);
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
line-height: 24px;
|
|
10
|
+
display: flex;
|
|
11
|
+
padding: 9px 10px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex: 1 0 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.remove {
|
|
17
|
+
color: var(--Error-700, #b42318);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.guest-option-modal {
|
|
22
|
+
.pisell-lowcode-modal-header {
|
|
23
|
+
border: none;
|
|
24
|
+
}
|
|
25
|
+
.pisell-lowcode-modal-body {
|
|
26
|
+
height: max-content;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -36,14 +36,14 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
-
var
|
|
39
|
+
var import_InformationOptionsModal = __toESM(require("./components/InformationOptionsModal"));
|
|
40
40
|
var import_context = require("../../context");
|
|
41
|
+
var import_hooks = require("../../hooks");
|
|
41
42
|
var import_utils2 = require("../../utils");
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var Guest = () => {
|
|
44
45
|
const [openOption, setOpenOption] = (0, import_react.useState)(false);
|
|
45
46
|
const [holderItem, setHolderItem] = (0, import_react.useState)(null);
|
|
46
|
-
const [removeOpen, setRemoveOpen] = (0, import_react.useState)(false);
|
|
47
47
|
const { carts, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
48
48
|
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
49
49
|
const lists = (0, import_react.useMemo)(() => {
|
|
@@ -61,6 +61,7 @@ var Guest = () => {
|
|
|
61
61
|
}
|
|
62
62
|
];
|
|
63
63
|
const handleClick = ({ key }, item) => {
|
|
64
|
+
console.log(key, item, "wh978967");
|
|
64
65
|
if (key === "edit") {
|
|
65
66
|
appointmentBooking.setActiveAccount(item.id);
|
|
66
67
|
appointmentBooking.back();
|
|
@@ -98,12 +99,17 @@ var Guest = () => {
|
|
|
98
99
|
}
|
|
99
100
|
},
|
|
100
101
|
placement: "bottomRight",
|
|
101
|
-
overlayClassName: "
|
|
102
|
+
overlayClassName: "appointment-guest-custom-dropdown-menu"
|
|
102
103
|
},
|
|
103
104
|
/* @__PURE__ */ import_react.default.createElement(import_materials.Button, null, import_utils.locales.getText("pisell2.event.option"))
|
|
104
105
|
);
|
|
105
106
|
};
|
|
106
107
|
const handleAddGuest = () => {
|
|
108
|
+
if (accountLists.length >= 6) {
|
|
109
|
+
return (0, import_materials.PisellToast)({
|
|
110
|
+
content: import_utils.locales.getText("pisell2.appointment.max.guest")
|
|
111
|
+
});
|
|
112
|
+
}
|
|
107
113
|
const guest = {
|
|
108
114
|
id: (0, import_utils.getUniqueId)(),
|
|
109
115
|
username: `Guest${accountLists.length + 1}`,
|
|
@@ -113,7 +119,7 @@ var Guest = () => {
|
|
|
113
119
|
appointmentBooking.setActiveAccount(guest.id);
|
|
114
120
|
appointmentBooking.back();
|
|
115
121
|
};
|
|
116
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "
|
|
122
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-guest-wrap" }, lists == null ? void 0 : lists.map((item) => {
|
|
117
123
|
var _a;
|
|
118
124
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
119
125
|
import_materials.PisellCard,
|
|
@@ -133,10 +139,22 @@ var Guest = () => {
|
|
|
133
139
|
size: "large",
|
|
134
140
|
style: { width: "max-content" },
|
|
135
141
|
onClick: handleAddGuest,
|
|
136
|
-
className: "
|
|
142
|
+
className: "appointment-guest-add-button"
|
|
137
143
|
},
|
|
138
144
|
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-plus", style: { fontSize: "20px" } }),
|
|
139
145
|
import_utils.locales.getText("pisell2.appointment.add.guest")
|
|
140
|
-
))
|
|
146
|
+
)), openOption ? /* @__PURE__ */ import_react.default.createElement(
|
|
147
|
+
import_InformationOptionsModal.default,
|
|
148
|
+
{
|
|
149
|
+
options,
|
|
150
|
+
open: openOption,
|
|
151
|
+
holderItem,
|
|
152
|
+
onCancel: () => setOpenOption(false),
|
|
153
|
+
onClick: (e) => {
|
|
154
|
+
handleClick(e, holderItem);
|
|
155
|
+
setOpenOption(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
) : null);
|
|
141
159
|
};
|
|
142
160
|
var Guest_default = Guest;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.appointment-guest-wrap {
|
|
2
2
|
padding: 16px;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
margin-top: 16px;
|
|
8
8
|
width: 100%;
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.appointment-guest-add-button {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
.pisell-lowcode-image-mask-info {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.
|
|
67
|
+
.appointment-guest-custom-dropdown-menu {
|
|
68
68
|
.pisell-lowcode-dropdown-menu {
|
|
69
69
|
padding: 6px;
|
|
70
70
|
border-bottom: 1px solid var(--Gray-200, #eaecf0);
|
|
@@ -33,23 +33,50 @@ __export(Header_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Header_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
36
37
|
var import_progressBar = __toESM(require("../../../eventBooking/components/progressBar"));
|
|
37
38
|
var import_context = require("../../context");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
38
40
|
var import_index = require("./index.less");
|
|
39
41
|
var Header = () => {
|
|
40
42
|
var _a, _b;
|
|
41
|
-
const { currentStep, appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
43
|
+
const { currentStep, appointmentBooking, resources } = (0, import_context.useAppointmentBookingContext)();
|
|
44
|
+
const context = (0, import_useEngineContext.default)();
|
|
45
|
+
const stepName = (0, import_react.useMemo)(() => {
|
|
46
|
+
var _a2, _b2, _c, _d, _e;
|
|
47
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
48
|
+
if (key === "select-resource") {
|
|
49
|
+
const name = ((_d = (_c = (_b2 = resources == null ? void 0 : resources[0]) == null ? void 0 : _b2.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.title) || "";
|
|
50
|
+
return import_utils.locales.getText("pisell2.event.select.category")(name);
|
|
51
|
+
}
|
|
52
|
+
return (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description;
|
|
53
|
+
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
|
|
42
54
|
const handleBack = () => {
|
|
55
|
+
var _a2;
|
|
56
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
57
|
+
const types = {
|
|
58
|
+
"select-time": "time",
|
|
59
|
+
"select-resource": "resource"
|
|
60
|
+
};
|
|
61
|
+
if (types[key]) {
|
|
62
|
+
appointmentBooking.deleteCartItemInfo(types[key]);
|
|
63
|
+
}
|
|
64
|
+
if (key === "select-date") {
|
|
65
|
+
appointmentBooking.clearDateRange();
|
|
66
|
+
}
|
|
43
67
|
appointmentBooking.back();
|
|
44
68
|
};
|
|
45
69
|
const handleClose = () => {
|
|
46
|
-
|
|
70
|
+
var _a2;
|
|
71
|
+
const utils = context.appHelper.utils || {};
|
|
72
|
+
(_a2 = utils == null ? void 0 : utils.history) == null ? void 0 : _a2.replace("/");
|
|
73
|
+
appointmentBooking.destroy();
|
|
47
74
|
};
|
|
48
75
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
49
76
|
import_progressBar.default,
|
|
50
77
|
{
|
|
51
|
-
title: (
|
|
52
|
-
description:
|
|
78
|
+
title: (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.title,
|
|
79
|
+
description: stepName,
|
|
53
80
|
showBack: (currentStep == null ? void 0 : currentStep.index) > 0,
|
|
54
81
|
onBack: () => handleBack(),
|
|
55
82
|
onClose: () => handleClose()
|
|
@@ -38,40 +38,37 @@ var import_resourceDisplay = __toESM(require("../../../eventBooking/components/r
|
|
|
38
38
|
var import_materials = require("@pisell/materials");
|
|
39
39
|
var import_hooks = require("../../hooks");
|
|
40
40
|
var import_context = require("../../context");
|
|
41
|
+
var import_guests = __toESM(require("../../assets/guests.svg"));
|
|
41
42
|
var import_utils = require("@pisell/utils");
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
|
-
var Resource = (
|
|
44
|
+
var Resource = () => {
|
|
44
45
|
const [selectedResource, setSelectedResource] = (0, import_react.useState)(0);
|
|
45
46
|
const { appointmentBooking, resources, carts, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
46
|
-
const {
|
|
47
|
-
getResourceList,
|
|
48
|
-
getResourceTimeSlot,
|
|
49
|
-
autoSelectAllProductResources
|
|
50
|
-
} = (0, import_hooks.useAppointmentBookingResource)();
|
|
51
|
-
console.log(resources, carts, appointmentBooking, "lists, products");
|
|
47
|
+
const { getResourceList, autoSelectAllProductResources } = (0, import_hooks.useAppointmentBookingResource)();
|
|
52
48
|
(0, import_react.useEffect)(() => {
|
|
53
49
|
const _resources = getResourceList();
|
|
54
|
-
autoSelectAllProductResources(
|
|
50
|
+
autoSelectAllProductResources();
|
|
51
|
+
getResourceList();
|
|
55
52
|
}, []);
|
|
56
53
|
(0, import_react.useEffect)(() => {
|
|
57
54
|
var _a;
|
|
58
|
-
console.log(resourceOtherParams == null ? void 0 : resourceOtherParams.errorList, "errorListerrorListerrorList");
|
|
59
55
|
if (((_a = resourceOtherParams == null ? void 0 : resourceOtherParams.errorList) == null ? void 0 : _a.length) > 0) {
|
|
60
|
-
return
|
|
56
|
+
return (0, import_materials.PisellToast)({
|
|
57
|
+
content: import_utils.locales.getText("pisell2.appointment.no.available.time")
|
|
58
|
+
});
|
|
61
59
|
}
|
|
62
60
|
}, [resourceOtherParams == null ? void 0 : resourceOtherParams.errorList]);
|
|
63
61
|
const anyResource = [
|
|
64
62
|
{
|
|
65
63
|
id: 0,
|
|
66
|
-
image:
|
|
67
|
-
title: "
|
|
68
|
-
subtitle: "for
|
|
64
|
+
image: import_guests.default,
|
|
65
|
+
title: import_utils.locales.getText("pisell2.appointment.any.professional"),
|
|
66
|
+
subtitle: import_utils.locales.getText("pisell2.appointment.for.maximum.availability")
|
|
69
67
|
}
|
|
70
68
|
];
|
|
71
69
|
const currentResource = (0, import_react.useMemo)(() => {
|
|
72
70
|
var _a, _b;
|
|
73
71
|
if (resources.length && carts.length) {
|
|
74
|
-
console.log(resources, carts, "lists, products");
|
|
75
72
|
if (carts.length === 1) {
|
|
76
73
|
return (_b = (_a = resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[0];
|
|
77
74
|
} else {
|
|
@@ -82,18 +79,15 @@ var Resource = ({ onChange }) => {
|
|
|
82
79
|
}
|
|
83
80
|
}, [resources, carts]);
|
|
84
81
|
const resourcesResult = (0, import_react.useMemo)(() => {
|
|
85
|
-
console.log(currentResource, resources, "wh98765756");
|
|
86
82
|
return anyResource.concat((currentResource == null ? void 0 : currentResource.renderList) || []);
|
|
87
83
|
}, [currentResource]);
|
|
88
84
|
const onClick = (e) => {
|
|
89
85
|
var _a;
|
|
90
86
|
setSelectedResource(e.id);
|
|
91
|
-
console.log(currentResource, e, "whcurrentResourcecurrentResource");
|
|
92
87
|
if (e.id) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
resources:
|
|
96
|
-
currentResourceId: e.id
|
|
88
|
+
return appointmentBooking.updateCart({
|
|
89
|
+
_id: (_a = carts == null ? void 0 : carts[0]) == null ? void 0 : _a._id,
|
|
90
|
+
resources: [e]
|
|
97
91
|
});
|
|
98
92
|
}
|
|
99
93
|
};
|
|
@@ -111,7 +105,8 @@ var Resource = ({ onChange }) => {
|
|
|
111
105
|
dataSource: item,
|
|
112
106
|
direction: "vertical",
|
|
113
107
|
children: !(item == null ? void 0 : item.image) ? (_a = item == null ? void 0 : item.title) == null ? void 0 : _a.charAt(0).toUpperCase() : null,
|
|
114
|
-
selected: selectedResource === (item == null ? void 0 : item.id)
|
|
108
|
+
selected: selectedResource === (item == null ? void 0 : item.id),
|
|
109
|
+
className: !item.id ? "appointment-resource-guest-card" : ""
|
|
115
110
|
}
|
|
116
111
|
);
|
|
117
112
|
},
|
|
@@ -33,21 +33,23 @@ __export(Services_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Services_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
36
37
|
var import_SearchLg = __toESM(require("@pisell/icon/es/SearchLg"));
|
|
37
38
|
var import_utils = require("@pisell/utils");
|
|
38
39
|
var import_materials = require("@pisell/materials");
|
|
39
|
-
var import_antd = require("antd");
|
|
40
40
|
var import_TabProduct = __toESM(require("../../../booking/components/TabProduct"));
|
|
41
41
|
var import_utils2 = require("../../../booking/utils");
|
|
42
42
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
43
43
|
var import_context = require("../../context");
|
|
44
|
+
var import_hooks = require("../../hooks");
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var Services = () => {
|
|
46
47
|
const searchRef = (0, import_react.useRef)();
|
|
47
48
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
48
49
|
const context = (0, import_useEngineContext.default)();
|
|
49
50
|
const { utils } = context.appHelper || {};
|
|
50
|
-
const
|
|
51
|
+
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
52
|
+
const { products, setProducts } = (0, import_context.useAppointmentBookingContext)();
|
|
51
53
|
(0, import_react.useEffect)(() => {
|
|
52
54
|
const { productModuleParams } = appointmentBooking.otherParams || {};
|
|
53
55
|
appointmentBooking.loadProducts(productModuleParams).then((res) => {
|
|
@@ -65,6 +67,11 @@ var Services = () => {
|
|
|
65
67
|
const resources = ((_b = (_a = data == null ? void 0 : data.origin) == null ? void 0 : _a.product_resource) == null ? void 0 : _b.resources) || [];
|
|
66
68
|
const activeStatus = resources.find((item2) => item2.status === 1);
|
|
67
69
|
if (!activeStatus) {
|
|
70
|
+
return (0, import_materials.PisellToast)({
|
|
71
|
+
content: import_utils.locales.getText(
|
|
72
|
+
"pisell2.appointment.no.available.service"
|
|
73
|
+
)
|
|
74
|
+
});
|
|
68
75
|
}
|
|
69
76
|
const product = {
|
|
70
77
|
...data,
|
|
@@ -34,34 +34,39 @@ __export(TimeSlicing_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(TimeSlicing_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
37
38
|
var import_context = require("../../context");
|
|
39
|
+
var import_hooks = require("../../hooks");
|
|
38
40
|
var import_index = require("./index.less");
|
|
39
|
-
var Resource = (
|
|
41
|
+
var Resource = () => {
|
|
40
42
|
const [selectedResource, setSelectedResource] = (0, import_react.useState)("");
|
|
41
|
-
const { times,
|
|
42
|
-
|
|
43
|
+
const { times, appointmentBooking, setSelectedTime, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
44
|
+
const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
getResourceTimeSlot();
|
|
47
|
+
}, []);
|
|
48
|
+
const getAutoSelect = async (val) => {
|
|
49
|
+
setSelectedTime(val);
|
|
50
|
+
const { resourceCodes } = getResourceList();
|
|
51
|
+
const { errorList } = await appointmentBooking.autoSelectAllProductResources(
|
|
52
|
+
resourceCodes == null ? void 0 : resourceCodes[1],
|
|
53
|
+
val
|
|
54
|
+
);
|
|
55
|
+
const result = await appointmentBooking.submitTimeSlot(val);
|
|
56
|
+
console.log(errorList, result, "wh9896788");
|
|
57
|
+
};
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
var _a;
|
|
60
|
+
if ((times == null ? void 0 : times.length) > 0) {
|
|
61
|
+
setSelectedResource((_a = times == null ? void 0 : times[0]) == null ? void 0 : _a.start_time);
|
|
62
|
+
getAutoSelect(times == null ? void 0 : times[0]);
|
|
63
|
+
}
|
|
64
|
+
}, [times]);
|
|
43
65
|
const onClick = async (e) => {
|
|
44
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
45
66
|
setSelectedResource(e == null ? void 0 : e.start_time);
|
|
46
|
-
|
|
47
|
-
resourceProductData: resources == null ? void 0 : resources[0],
|
|
48
|
-
resources: (_c = (_b = (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[1]) == null ? void 0 : _c.renderList,
|
|
49
|
-
timeSlots: e
|
|
50
|
-
});
|
|
51
|
-
if (data) {
|
|
52
|
-
const _resources = [
|
|
53
|
-
(_g = (_f = (_e = (_d = resources == null ? void 0 : resources[0]) == null ? void 0 : _d.resources) == null ? void 0 : _e[0]) == null ? void 0 : _f.renderList) == null ? void 0 : _g[0],
|
|
54
|
-
(_k = (_j = (_i = (_h = resources == null ? void 0 : resources[0]) == null ? void 0 : _h.resources) == null ? void 0 : _i[1]) == null ? void 0 : _j.renderList) == null ? void 0 : _k[0]
|
|
55
|
-
];
|
|
56
|
-
const aa = await appointmentBooking.submitTimeSlot({
|
|
57
|
-
resourceProductData: resources == null ? void 0 : resources[0],
|
|
58
|
-
selectedResources: _resources,
|
|
59
|
-
timeSlots: e
|
|
60
|
-
});
|
|
61
|
-
console.log(data, _resources, aa, "wh9879676");
|
|
62
|
-
}
|
|
67
|
+
getAutoSelect(e);
|
|
63
68
|
};
|
|
64
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
|
|
69
|
+
return (times == null ? void 0 : times.length) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
|
|
65
70
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
71
|
"div",
|
|
67
72
|
{
|
|
@@ -72,6 +77,11 @@ var Resource = ({ params }) => {
|
|
|
72
77
|
/* @__PURE__ */ import_react.default.createElement("span", null, item == null ? void 0 : item.start_time),
|
|
73
78
|
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-chevron-right", className: `icon` })
|
|
74
79
|
);
|
|
75
|
-
}))
|
|
80
|
+
})) : /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
import_materials.PisellEmpty,
|
|
82
|
+
{
|
|
83
|
+
description: import_utils.locales.getText("pisell2.appointment.booking.empty.time")
|
|
84
|
+
}
|
|
85
|
+
);
|
|
76
86
|
};
|
|
77
87
|
var TimeSlicing_default = Resource;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.appointment-time-slicing-wrap {
|
|
2
|
+
padding-top: 20px;
|
|
2
3
|
.item {
|
|
3
4
|
cursor: pointer;
|
|
4
5
|
padding: 25px 20px;
|
|
@@ -18,6 +19,10 @@
|
|
|
18
19
|
|
|
19
20
|
&:hover {
|
|
20
21
|
background-color: #f1f1f1;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
&.active {
|
|
25
|
+
background-color: #f1f1f1;
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
}
|
|
@@ -40,8 +40,8 @@ var import_antd = require("antd");
|
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
42
42
|
var import_materials = require("@pisell/materials");
|
|
43
|
-
var import_icons = require("@ant-design/icons");
|
|
44
43
|
var import_hooks = require("../../hooks");
|
|
44
|
+
var import_utils2 = require("../../utils");
|
|
45
45
|
var import_voucher = require("../../../booking/components/voucher/index.less");
|
|
46
46
|
var import_index = require("./index.less");
|
|
47
47
|
var ShopDiscountHooks = {
|
|
@@ -65,6 +65,8 @@ var VoucherCard = (props) => {
|
|
|
65
65
|
const [code, setCode] = (0, import_react.useState)("");
|
|
66
66
|
const [discountList, setDisCountList] = (0, import_react.useState)([]);
|
|
67
67
|
const productRef = (0, import_react.useRef)(products);
|
|
68
|
+
const { openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
69
|
+
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
68
70
|
const cart = (_b = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _b.cart;
|
|
69
71
|
const isUserLoggedIn = (0, import_react.useMemo)(() => {
|
|
70
72
|
var _a2, _b2;
|
|
@@ -79,29 +81,30 @@ var VoucherCard = (props) => {
|
|
|
79
81
|
});
|
|
80
82
|
}, [discountList]);
|
|
81
83
|
(0, import_react.useEffect)(() => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
if (isUserLoggedIn) {
|
|
85
|
+
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
86
|
+
shopDiscount2.setCustomer(currentUser);
|
|
87
|
+
}
|
|
88
|
+
}, [currentUser.id, isUserLoggedIn]);
|
|
85
89
|
(0, import_react.useEffect)(() => {
|
|
86
90
|
shopDiscount.setProductList(products);
|
|
87
91
|
}, [products]);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
const val = shopDiscount.calcDiscount(products);
|
|
93
|
-
console.log("input: ", products);
|
|
94
|
-
console.log("output: ", val);
|
|
95
|
-
productRef.current = val.productList;
|
|
92
|
+
const onCartChange = () => {
|
|
93
|
+
const products2 = cart == null ? void 0 : cart.getItems();
|
|
94
|
+
const val = shopDiscount.calcDiscount(products2);
|
|
96
95
|
cart == null ? void 0 : cart.batchSetItems(val.productList);
|
|
97
|
-
}
|
|
96
|
+
};
|
|
98
97
|
(0, import_react.useEffect)(() => {
|
|
98
|
+
const val = shopDiscount.getDiscountList();
|
|
99
|
+
setDisCountList(val);
|
|
99
100
|
pisellos.effects.on(
|
|
100
101
|
ShopDiscountHooks.onLoadPrepareCalcResult,
|
|
101
102
|
(result) => {
|
|
102
103
|
cart == null ? void 0 : cart.batchSetItems(result.productList);
|
|
103
104
|
}
|
|
104
105
|
);
|
|
106
|
+
pisellos.effects.on("appointmentBooking_cart:onAddItem", onCartChange);
|
|
107
|
+
pisellos.effects.on("appointmentBooking_cart:onRemoveItem", onCartChange);
|
|
105
108
|
pisellos.effects.on(
|
|
106
109
|
ShopDiscountHooks.onDiscountListChange,
|
|
107
110
|
(discount) => {
|
|
@@ -114,6 +117,7 @@ var VoucherCard = (props) => {
|
|
|
114
117
|
const val = await shopDiscount.scanCode(code);
|
|
115
118
|
if (val == null ? void 0 : val.isAvailable) {
|
|
116
119
|
cart == null ? void 0 : cart.batchSetItems(val.productList);
|
|
120
|
+
setCode("");
|
|
117
121
|
} else {
|
|
118
122
|
(0, import_materials.PisellToast)({
|
|
119
123
|
content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
|
|
@@ -127,11 +131,17 @@ var VoucherCard = (props) => {
|
|
|
127
131
|
className: "login-btn",
|
|
128
132
|
onClick: () => {
|
|
129
133
|
if (!action) return;
|
|
130
|
-
|
|
131
|
-
type: "pisell1.login",
|
|
132
|
-
data: {},
|
|
134
|
+
openLoginModal({
|
|
133
135
|
callback: (status) => {
|
|
136
|
+
var _a2, _b2, _c;
|
|
137
|
+
const user = (_c = (_b2 = (_a2 = utils.store) == null ? void 0 : _a2.getState()) == null ? void 0 : _b2.global) == null ? void 0 : _c.userInfo;
|
|
138
|
+
const currentUser2 = (0, import_utils2.formatCustomer)(user);
|
|
139
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
134
140
|
if (status === "success") {
|
|
141
|
+
appointmentBooking.setLoginAccount(
|
|
142
|
+
meAccount == null ? void 0 : meAccount.id,
|
|
143
|
+
currentUser2
|
|
144
|
+
);
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
});
|
|
@@ -178,7 +188,9 @@ var VoucherCard = (props) => {
|
|
|
178
188
|
discountId: val.id,
|
|
179
189
|
isSelected: val.isSelected
|
|
180
190
|
});
|
|
181
|
-
(_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.cart) == null ? void 0 : _b2.batchSetItems(
|
|
191
|
+
(_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.cart) == null ? void 0 : _b2.batchSetItems(
|
|
192
|
+
detail.productList
|
|
193
|
+
);
|
|
182
194
|
}
|
|
183
195
|
}
|
|
184
196
|
) : null,
|
|
@@ -193,13 +205,7 @@ var VoucherCard = (props) => {
|
|
|
193
205
|
size: "small",
|
|
194
206
|
placeholder: import_utils.locales.getText(
|
|
195
207
|
"pisell2.text.goodpass.enter-code"
|
|
196
|
-
)
|
|
197
|
-
suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
|
|
198
|
-
import_icons.QuestionCircleOutlined,
|
|
199
|
-
{
|
|
200
|
-
style: { color: "rgba(0,0,0,.45)" }
|
|
201
|
-
}
|
|
202
|
-
))
|
|
208
|
+
)
|
|
203
209
|
}
|
|
204
210
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
|
205
211
|
));
|
|
@@ -19,6 +19,8 @@ interface AppointmentBookingContextType {
|
|
|
19
19
|
symbolic?: any;
|
|
20
20
|
resourceOtherParams?: any;
|
|
21
21
|
setResourceOtherParams: (val: any) => void;
|
|
22
|
+
selectedTime: any;
|
|
23
|
+
setSelectedTime: (val: any) => void;
|
|
22
24
|
}
|
|
23
25
|
export declare const AppointmentBookingProvider: ({ children, }: {
|
|
24
26
|
children: ReactNode;
|
|
@@ -52,6 +52,7 @@ var AppointmentBookingProvider = ({
|
|
|
52
52
|
const [isLastStep, setIsLastStep] = (0, import_react.useState)(false);
|
|
53
53
|
const [carts, setCarts] = (0, import_react.useState)([]);
|
|
54
54
|
const [resourceOtherParams, setResourceOtherParams] = (0, import_react.useState)({});
|
|
55
|
+
const [selectedTime, setSelectedTime] = (0, import_react.useState)(null);
|
|
55
56
|
const { appHelper } = (0, import_useEngineContext.default)();
|
|
56
57
|
const symbolic = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.getSymbolic();
|
|
57
58
|
console.log(3234234, times, resources);
|
|
@@ -74,7 +75,9 @@ var AppointmentBookingProvider = ({
|
|
|
74
75
|
appHelper,
|
|
75
76
|
symbolic,
|
|
76
77
|
resourceOtherParams,
|
|
77
|
-
setResourceOtherParams
|
|
78
|
+
setResourceOtherParams,
|
|
79
|
+
selectedTime,
|
|
80
|
+
setSelectedTime
|
|
78
81
|
};
|
|
79
82
|
return /* @__PURE__ */ import_react.default.createElement(AppointmentBookingContext.Provider, { value }, children);
|
|
80
83
|
};
|