@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
|
@@ -82,6 +82,7 @@ export default {
|
|
|
82
82
|
'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
|
|
83
83
|
'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
|
|
84
84
|
'pisell2.appointment.booking.empty.service': 'No service',
|
|
85
|
+
'pisell2.appointment.booking.empty.time': 'No time',
|
|
85
86
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
86
87
|
return "".concat(val, " ").concat(val > 1 ? 'services' : 'service');
|
|
87
88
|
},
|
|
@@ -89,6 +90,17 @@ export default {
|
|
|
89
90
|
'pisell2.appointment.edit.service': "Edit services",
|
|
90
91
|
'pisell2.appointment.remove.guest': "Remove guest",
|
|
91
92
|
'pisell2.appointment.no.available.service': "No available times for this service. Please choose another.",
|
|
93
|
+
'pisell2.appointment.max.guest': "Book a group appointment for up to 6 guests",
|
|
94
|
+
'pisell2.appointment.no.available.time': "No availability Try booking different time",
|
|
95
|
+
'pisell2.appointment.monday': 'Mon',
|
|
96
|
+
'pisell2.appointment.tuesday': 'Tue',
|
|
97
|
+
'pisell2.appointment.wednesday': 'Wed',
|
|
98
|
+
'pisell2.appointment.thursday': 'Thu',
|
|
99
|
+
'pisell2.appointment.friday': 'Fri',
|
|
100
|
+
'pisell2.appointment.saturday': 'Sat',
|
|
101
|
+
'pisell2.appointment.sunday': 'Sun',
|
|
102
|
+
'pisell2.appointment.any.professional': 'Any professional',
|
|
103
|
+
'pisell2.appointment.for.maximum.availability': 'for maximum availability',
|
|
92
104
|
'pisell2.text.apply': 'Apply',
|
|
93
105
|
'pisell2.text.goodpass': "GoodPass",
|
|
94
106
|
'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
|
|
@@ -182,6 +194,7 @@ export default {
|
|
|
182
194
|
'pisell2.event.capacity.limit.reached.title': '活动名额已满',
|
|
183
195
|
'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
|
|
184
196
|
'pisell2.appointment.booking.empty.service': '暂无服务',
|
|
197
|
+
'pisell2.appointment.booking.empty.time': '暂无时间',
|
|
185
198
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
186
199
|
return "".concat(val, "\u4E2A\u670D\u52A1");
|
|
187
200
|
},
|
|
@@ -189,6 +202,17 @@ export default {
|
|
|
189
202
|
'pisell2.appointment.edit.service': "编辑服务",
|
|
190
203
|
'pisell2.appointment.remove.guest': "移除预约人",
|
|
191
204
|
'pisell2.appointment.no.available.service': "此服务无可用时间,请选择其他服务。",
|
|
205
|
+
'pisell2.appointment.max.guest': "最多为6人预约",
|
|
206
|
+
'pisell2.appointment.no.available.time': "无可用 请选择其他时间",
|
|
207
|
+
'pisell2.appointment.monday': '周一',
|
|
208
|
+
'pisell2.appointment.tuesday': '周二',
|
|
209
|
+
'pisell2.appointment.wednesday': '周三',
|
|
210
|
+
'pisell2.appointment.thursday': '周四',
|
|
211
|
+
'pisell2.appointment.friday': '周五',
|
|
212
|
+
'pisell2.appointment.saturday': '周六',
|
|
213
|
+
'pisell2.appointment.sunday': '周日',
|
|
214
|
+
'pisell2.appointment.any.professional': '随机分配',
|
|
215
|
+
'pisell2.appointment.for.maximum.availability': '立即匹配',
|
|
192
216
|
'pisell2.text.apply': '应用',
|
|
193
217
|
'pisell2.text.goodpass': "商品券",
|
|
194
218
|
'pisell2.text.goodpass.product-vouchers': "商品兑换券",
|
|
@@ -282,6 +306,7 @@ export default {
|
|
|
282
306
|
'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
|
|
283
307
|
'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
|
|
284
308
|
'pisell2.appointment.booking.empty.service': '暫無服務',
|
|
309
|
+
'pisell2.appointment.booking.empty.time': '暫無時間',
|
|
285
310
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
286
311
|
return "".concat(val, "\u4E2A\u670D\u52D9");
|
|
287
312
|
},
|
|
@@ -289,6 +314,17 @@ export default {
|
|
|
289
314
|
'pisell2.appointment.edit.service': "編輯服務",
|
|
290
315
|
'pisell2.appointment.remove.guest': "移除預約人",
|
|
291
316
|
'pisell2.appointment.no.available.service': "此服务无可用时间,请选择其他服务。",
|
|
317
|
+
'pisell2.appointment.max.guest': "最多为6人预约",
|
|
318
|
+
'pisell2.appointment.no.available.time': "無可用 請選擇其他時間",
|
|
319
|
+
'pisell2.appointment.monday': '周壹',
|
|
320
|
+
'pisell2.appointment.tuesday': '周二',
|
|
321
|
+
'pisell2.appointment.wednesday': '周三',
|
|
322
|
+
'pisell2.appointment.thursday': '周四',
|
|
323
|
+
'pisell2.appointment.friday': '周五',
|
|
324
|
+
'pisell2.appointment.saturday': '周六',
|
|
325
|
+
'pisell2.appointment.sunday': '周日',
|
|
326
|
+
'pisell2.appointment.any.professional': '隨機分配',
|
|
327
|
+
'pisell2.appointment.for.maximum.availability': '立即匹配',
|
|
292
328
|
'pisell2.text.apply': '應用',
|
|
293
329
|
'pisell2.text.goodpass': "商品券",
|
|
294
330
|
'pisell2.text.goodpass.product-vouchers': "商品兌換券",
|
|
@@ -56,3 +56,31 @@ export declare const formatCarts: (data: any[], resources: any[]) => any[];
|
|
|
56
56
|
* @Date: 2025-04-14 11:16
|
|
57
57
|
*/
|
|
58
58
|
export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
|
|
59
|
+
export declare const getMeAccount: (val: any[]) => any;
|
|
60
|
+
export declare const formatCustomer: (val: any) => {
|
|
61
|
+
id: any;
|
|
62
|
+
username: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const formatCurrentUser: () => {
|
|
65
|
+
id: any;
|
|
66
|
+
username: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @title: 检查是否有空的账户
|
|
70
|
+
* @description:
|
|
71
|
+
* @param {any} carts
|
|
72
|
+
* @param {any} accounts
|
|
73
|
+
* @return {*}
|
|
74
|
+
* @Author: WangHan
|
|
75
|
+
* @Date: 2025-04-15 17:05
|
|
76
|
+
*/
|
|
77
|
+
export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @title: 购物车中是否有空的资源数据
|
|
80
|
+
* @description:
|
|
81
|
+
* @param {any} carts
|
|
82
|
+
* @return {*}
|
|
83
|
+
* @Author: WangHan
|
|
84
|
+
* @Date: 2025-04-15 21:51
|
|
85
|
+
*/
|
|
86
|
+
export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
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 _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
2
5
|
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
6
|
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
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
10
|
import dayjs from 'dayjs';
|
|
11
|
+
import { getUniqueId } from "@pisell/utils";
|
|
8
12
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
9
13
|
|
|
10
14
|
/**
|
|
@@ -134,7 +138,7 @@ export var formatCarts = function formatCarts(data, resources) {
|
|
|
134
138
|
var utils = context.appHelper.utils || {};
|
|
135
139
|
var locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
|
|
136
140
|
var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
|
|
137
|
-
console.log(
|
|
141
|
+
console.log(data, resources, 'formatCartsformatCarts');
|
|
138
142
|
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
139
143
|
var _currentResource$reso, _currentResources;
|
|
140
144
|
var currentResource = resources.find(function (r) {
|
|
@@ -143,7 +147,7 @@ export var formatCarts = function formatCarts(data, resources) {
|
|
|
143
147
|
var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
|
|
144
148
|
currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
|
|
145
149
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
146
|
-
label: d === null || d === void 0 ? void 0 : d.main_field
|
|
150
|
+
label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
|
|
147
151
|
});
|
|
148
152
|
});
|
|
149
153
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -196,4 +200,84 @@ export var sortResources = function sortResources(resources, resourceSort) {
|
|
|
196
200
|
} catch (error) {
|
|
197
201
|
console.log(error, 'wh2222');
|
|
198
202
|
}
|
|
203
|
+
};
|
|
204
|
+
export var getMeAccount = function getMeAccount(val) {
|
|
205
|
+
return val === null || val === void 0 ? void 0 : val.find(function (d) {
|
|
206
|
+
return !(d !== null && d !== void 0 && d.isGuest);
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
export var formatCustomer = function formatCustomer(val) {
|
|
210
|
+
var currentUserName = "".concat((val === null || val === void 0 ? void 0 : val.first_name) || '').concat(val !== null && val !== void 0 && val.last_name ? " ".concat(val === null || val === void 0 ? void 0 : val.last_name) : '');
|
|
211
|
+
currentUserName = currentUserName || (val === null || val === void 0 ? void 0 : val.nickname) || 'Me';
|
|
212
|
+
return {
|
|
213
|
+
id: (val === null || val === void 0 ? void 0 : val.id) || getUniqueId(),
|
|
214
|
+
username: currentUserName
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
export var formatCurrentUser = function formatCurrentUser() {
|
|
218
|
+
var _utils$getStore$getSt, _userInfo;
|
|
219
|
+
var context = useEngineContext();
|
|
220
|
+
var utils = context.appHelper.utils || {};
|
|
221
|
+
var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
|
|
222
|
+
var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
|
|
223
|
+
userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
|
|
224
|
+
var customer = formatCustomer(userInfo);
|
|
225
|
+
return customer;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @title: 检查是否有空的账户
|
|
230
|
+
* @description:
|
|
231
|
+
* @param {any} carts
|
|
232
|
+
* @param {any} accounts
|
|
233
|
+
* @return {*}
|
|
234
|
+
* @Author: WangHan
|
|
235
|
+
* @Date: 2025-04-15 17:05
|
|
236
|
+
*/
|
|
237
|
+
export var isEmptyGuest = function isEmptyGuest(carts, accounts) {
|
|
238
|
+
// 遍历账户列表
|
|
239
|
+
var _iterator = _createForOfIteratorHelper(accounts),
|
|
240
|
+
_step;
|
|
241
|
+
try {
|
|
242
|
+
var _loop = function _loop() {
|
|
243
|
+
var item = _step.value;
|
|
244
|
+
// 检查商品数据是否有匹配的holder_id
|
|
245
|
+
var hasMatch = carts.some(function (firstItem) {
|
|
246
|
+
return firstItem.holder_id === item.id;
|
|
247
|
+
});
|
|
248
|
+
// 如果没有找到匹配的,直接返回true
|
|
249
|
+
if (!hasMatch) {
|
|
250
|
+
return {
|
|
251
|
+
v: true
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
_ret;
|
|
256
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
257
|
+
_ret = _loop();
|
|
258
|
+
if (_ret) return _ret.v;
|
|
259
|
+
}
|
|
260
|
+
// 所有元素都找到了匹配,返回false
|
|
261
|
+
} catch (err) {
|
|
262
|
+
_iterator.e(err);
|
|
263
|
+
} finally {
|
|
264
|
+
_iterator.f();
|
|
265
|
+
}
|
|
266
|
+
return false;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @title: 购物车中是否有空的资源数据
|
|
271
|
+
* @description:
|
|
272
|
+
* @param {any} carts
|
|
273
|
+
* @return {*}
|
|
274
|
+
* @Author: WangHan
|
|
275
|
+
* @Date: 2025-04-15 21:51
|
|
276
|
+
*/
|
|
277
|
+
export var isEmptyCartsResourceId = function isEmptyCartsResourceId(carts) {
|
|
278
|
+
var isEmptyResourceId = carts === null || carts === void 0 ? void 0 : carts.some(function (d) {
|
|
279
|
+
return !(d !== null && d !== void 0 && d.resource_id);
|
|
280
|
+
});
|
|
281
|
+
console.log(isEmptyResourceId, 'isEmptyResourceId');
|
|
282
|
+
return isEmptyResourceId;
|
|
199
283
|
};
|
|
@@ -222,20 +222,20 @@ var formatMetaData = function formatMetaData(item) {
|
|
|
222
222
|
}
|
|
223
223
|
return metadata;
|
|
224
224
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
225
|
+
|
|
226
|
+
// const formatDiscountList = (list: any[]) => {
|
|
227
|
+
// return list.map(item => {
|
|
228
|
+
// return {
|
|
229
|
+
// amount: item.amount,
|
|
230
|
+
// product_id: item.product_id || item.discount?.product_id,
|
|
231
|
+
// resource_id: item.resource_id || item.discount?.resource_id,
|
|
232
|
+
// title: item.title || item.discount?.title,
|
|
233
|
+
// original_amount: item.original_amount || item.discount?.original_amount,
|
|
234
|
+
// id: item.id,
|
|
235
|
+
// type: item.type,
|
|
236
|
+
// }
|
|
237
|
+
// })
|
|
238
|
+
// }
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* @title: 格式化商品数据
|
|
@@ -250,7 +250,7 @@ var formatProducts = function formatProducts(item) {
|
|
|
250
250
|
var total = Number(item._extend.total);
|
|
251
251
|
var origin_total = Number(item._extend.origin_total);
|
|
252
252
|
var discount_amount = origin_total - total;
|
|
253
|
-
var discount_list =
|
|
253
|
+
var discount_list = (item === null || item === void 0 ? void 0 : item.discount_list) || [];
|
|
254
254
|
|
|
255
255
|
// 加价时type使用change_price
|
|
256
256
|
var discount_type = discount_amount < 0 ? 'change_price' : 'discount';
|
|
@@ -19,8 +19,8 @@ import classNames from 'classnames';
|
|
|
19
19
|
import { Button } from 'antd';
|
|
20
20
|
import { locales } from '@pisell/utils';
|
|
21
21
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
22
|
-
import { PisellInput,
|
|
23
|
-
import {
|
|
22
|
+
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
23
|
+
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
24
24
|
import "./index.less";
|
|
25
25
|
var ShopDiscountHooks = {
|
|
26
26
|
onInited: 'shopDiscount:onInited',
|
|
@@ -51,8 +51,10 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
51
51
|
discountList = _useState6[0],
|
|
52
52
|
setDisCountList = _useState6[1];
|
|
53
53
|
var productRef = useRef(state.service.value);
|
|
54
|
+
var isBooking4Shop = useIsBooking4Shop(state);
|
|
54
55
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
55
56
|
var availableData = useMemo(function () {
|
|
57
|
+
if (!isBooking4Shop) return [];
|
|
56
58
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
57
59
|
return discountList.filter(function (item) {
|
|
58
60
|
return !!item.isAvailable;
|
|
@@ -61,37 +63,44 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
61
63
|
savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
|
|
62
64
|
});
|
|
63
65
|
});
|
|
64
|
-
}, [discountList]);
|
|
66
|
+
}, [discountList, isBooking4Shop]);
|
|
65
67
|
|
|
66
68
|
// 设置client
|
|
67
69
|
useEffect(function () {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
if (isBooking4Shop) {
|
|
71
|
+
shopDiscount.setCustomer(state.client.value);
|
|
72
|
+
}
|
|
73
|
+
}, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop]);
|
|
70
74
|
|
|
71
75
|
// 设置productList
|
|
72
76
|
useEffect(function () {
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
if (isBooking4Shop) {
|
|
78
|
+
shopDiscount.setProductList(state.service.value);
|
|
79
|
+
}
|
|
80
|
+
}, [state.service.value, isBooking4Shop]);
|
|
75
81
|
|
|
76
82
|
// 更新productList
|
|
77
83
|
useEffect(function () {
|
|
78
84
|
if (productRef.current === state.service.value) {
|
|
79
85
|
return;
|
|
80
86
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
if (isBooking4Shop) {
|
|
88
|
+
var val = shopDiscount.calcDiscount(state.service.value);
|
|
89
|
+
console.log('input: ', state.service.value);
|
|
90
|
+
console.log('output: ', val);
|
|
91
|
+
productRef.current = val.productList;
|
|
92
|
+
dispatch({
|
|
93
|
+
type: 'setService',
|
|
94
|
+
payload: {
|
|
95
|
+
value: val.productList
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}, [state.service.value, isBooking4Shop]);
|
|
92
100
|
|
|
93
101
|
// 监听customer变化
|
|
94
102
|
useEffect(function () {
|
|
103
|
+
if (!isBooking4Shop) return;
|
|
95
104
|
pisellos.effects.on(ShopDiscountHooks.onCustomerChange, function (customer) {
|
|
96
105
|
console.log(customer, 'customerChange');
|
|
97
106
|
// 更新客户
|
|
@@ -120,7 +129,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
120
129
|
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
|
|
121
130
|
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
|
|
122
131
|
};
|
|
123
|
-
}, [state.bookingId]);
|
|
132
|
+
}, [state.bookingId, isBooking4Shop]);
|
|
124
133
|
|
|
125
134
|
// apply code
|
|
126
135
|
var onScanCode = /*#__PURE__*/function () {
|
|
@@ -141,6 +150,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
141
150
|
value: val.productList
|
|
142
151
|
}
|
|
143
152
|
});
|
|
153
|
+
setCode('');
|
|
144
154
|
} else {
|
|
145
155
|
PisellToast({
|
|
146
156
|
content: locales.getText('pisell2.text.goodpass.code-invalid')
|
|
@@ -156,16 +166,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
156
166
|
return _ref.apply(this, arguments);
|
|
157
167
|
};
|
|
158
168
|
}();
|
|
159
|
-
|
|
160
|
-
// if (
|
|
161
|
-
// !isBooking4Shop(
|
|
162
|
-
// context.appHelper.utils.store?.getState?.()?.global?.globalConfig?.id,
|
|
163
|
-
// state.renderType
|
|
164
|
-
// )
|
|
165
|
-
// ) {
|
|
166
|
-
// return null;
|
|
167
|
-
// }
|
|
168
|
-
|
|
169
|
+
if (!isBooking4Shop) return null;
|
|
169
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
170
171
|
className: "pisell-lowcode__booking-footer-voucher-container"
|
|
171
172
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -201,6 +202,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
201
202
|
dispatch({
|
|
202
203
|
type: 'setService',
|
|
203
204
|
payload: {
|
|
205
|
+
edit: true,
|
|
204
206
|
value: detail.productList
|
|
205
207
|
}
|
|
206
208
|
});
|
|
@@ -220,14 +222,14 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
220
222
|
setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
221
223
|
},
|
|
222
224
|
size: "small",
|
|
223
|
-
placeholder: locales.getText('pisell2.text.goodpass.enter-code')
|
|
224
|
-
suffix
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
225
|
+
placeholder: locales.getText('pisell2.text.goodpass.enter-code')
|
|
226
|
+
// suffix={
|
|
227
|
+
// <PisellTooltip title="">
|
|
228
|
+
// <QuestionCircleOutlined
|
|
229
|
+
// style={{ color: 'rgba(0,0,0,.45)' }}
|
|
230
|
+
// />
|
|
231
|
+
// </PisellTooltip>
|
|
232
|
+
// }
|
|
231
233
|
})), /*#__PURE__*/React.createElement(Button, {
|
|
232
234
|
size: "small",
|
|
233
235
|
onClick: onScanCode,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsBooking4Shop: (state: any) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
3
|
+
import { isBooking4Shop } from "../info/utils";
|
|
4
|
+
export var useIsBooking4Shop = function useIsBooking4Shop(state) {
|
|
5
|
+
var context = useEngineContext();
|
|
6
|
+
return useMemo(function () {
|
|
7
|
+
var _context$appHelper$ut, _context$appHelper$ut2;
|
|
8
|
+
return isBooking4Shop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id, state.renderType);
|
|
9
|
+
}, [state.renderType]);
|
|
10
|
+
};
|
|
@@ -237,4 +237,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
237
237
|
* @Author: WangHan
|
|
238
238
|
* @Date: 2024-12-24 11:32
|
|
239
239
|
*/
|
|
240
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
240
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|