@pisell/private-materials 3.3.32 → 3.3.33
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +45 -25
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.js +53 -36
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Form/index.js +61 -161
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.js +64 -50
- package/es/components/appointmentBooking/components/Resource/index.js +119 -102
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +5 -12
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/context.js +43 -3
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.d.ts +2 -3
- package/es/components/appointmentBooking/hooks.js +293 -209
- package/es/components/appointmentBooking/utils.d.ts +88 -2
- package/es/components/appointmentBooking/utils.js +325 -63
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +2 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +33 -9
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.js +35 -21
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Form/index.js +54 -98
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.js +39 -20
- package/lib/components/appointmentBooking/components/Resource/index.js +41 -59
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/context.js +48 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.d.ts +2 -3
- package/lib/components/appointmentBooking/hooks.js +143 -57
- package/lib/components/appointmentBooking/utils.d.ts +88 -2
- package/lib/components/appointmentBooking/utils.js +191 -51
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +2 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +2 -2
package/es/utils/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
|
18
18
|
export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
|
|
19
19
|
export declare const saveConfirm: () => Promise<{
|
|
20
20
|
destroy: () => void;
|
|
21
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
|
+
update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
|
|
22
22
|
}>;
|
|
23
23
|
export { modal };
|
|
@@ -86,11 +86,6 @@ var ContinueButton = ({ onNext }) => {
|
|
|
86
86
|
};
|
|
87
87
|
const handleContinue = async () => {
|
|
88
88
|
try {
|
|
89
|
-
if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepList == null ? void 0 : stepList.length)) {
|
|
90
|
-
const loginOk = await handleLoginCheck();
|
|
91
|
-
if (!loginOk) return;
|
|
92
|
-
if (handleCheckAccount()) return;
|
|
93
|
-
}
|
|
94
89
|
return onNext && onNext();
|
|
95
90
|
} catch (error) {
|
|
96
91
|
console.log(error, "handleContinue_error");
|
|
@@ -46,18 +46,19 @@ var import_Deposit = __toESM(require("../../Deposit"));
|
|
|
46
46
|
var import_utils3 = require("../utils");
|
|
47
47
|
var import_index = require("./index.less");
|
|
48
48
|
var CartItem = ({ onNext }) => {
|
|
49
|
-
var _a, _b, _c;
|
|
49
|
+
var _a, _b, _c, _d;
|
|
50
50
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
51
51
|
const {
|
|
52
52
|
carts,
|
|
53
53
|
currentStep,
|
|
54
|
-
resources,
|
|
55
54
|
setResourceOtherParams,
|
|
56
55
|
resourceOtherParams,
|
|
57
56
|
summary,
|
|
58
|
-
isLastStep
|
|
57
|
+
isLastStep,
|
|
58
|
+
currentSelectedResourcesRef,
|
|
59
|
+
currentStepParams
|
|
59
60
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
60
|
-
const { accountLists, getHolders,
|
|
61
|
+
const { accountLists, getHolders, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
|
|
61
62
|
const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
|
|
62
63
|
const { isFormSubject, bookingSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
|
|
63
64
|
const { isLogin } = (0, import_hooks2.useAppointmentBookingLogin)();
|
|
@@ -100,7 +101,7 @@ var CartItem = ({ onNext }) => {
|
|
|
100
101
|
} else {
|
|
101
102
|
appointmentBooking.updateCart({
|
|
102
103
|
_id: e == null ? void 0 : e._id,
|
|
103
|
-
resources: val ?
|
|
104
|
+
resources: val ? (0, import_utils2.updateCartResources)(e, val) : []
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
107
|
getResourceList();
|
|
@@ -150,8 +151,31 @@ var CartItem = ({ onNext }) => {
|
|
|
150
151
|
}
|
|
151
152
|
};
|
|
152
153
|
const products = (0, import_react.useMemo)(() => {
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
var _a2;
|
|
155
|
+
console.log(currentSelectedResourcesRef.current, carts, "wh867865");
|
|
156
|
+
if (!(carts == null ? void 0 : carts.length)) return [];
|
|
157
|
+
if (((_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.length) > 0) {
|
|
158
|
+
const newCarts = carts.map((item) => {
|
|
159
|
+
var _a3;
|
|
160
|
+
const currentResourceData = currentSelectedResourcesRef.current.find(
|
|
161
|
+
(resource) => (resource == null ? void 0 : resource._id) === (item == null ? void 0 : item._id)
|
|
162
|
+
);
|
|
163
|
+
const multiResources = (0, import_utils2.getMultiResources)(
|
|
164
|
+
item,
|
|
165
|
+
(_a3 = currentResourceData == null ? void 0 : currentResourceData.currentSelectedResource) == null ? void 0 : _a3.resourceItem,
|
|
166
|
+
currentStepParams == null ? void 0 : currentStepParams.key
|
|
167
|
+
);
|
|
168
|
+
return {
|
|
169
|
+
...item,
|
|
170
|
+
isMultipleResource: true,
|
|
171
|
+
multiResources
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
return newCarts;
|
|
175
|
+
} else {
|
|
176
|
+
return carts;
|
|
177
|
+
}
|
|
178
|
+
}, [carts, currentSelectedResourcesRef.current, currentStepParams == null ? void 0 : currentStepParams.key]);
|
|
155
179
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
156
180
|
"div",
|
|
157
181
|
{
|
|
@@ -165,8 +189,8 @@ var CartItem = ({ onNext }) => {
|
|
|
165
189
|
hideAddBtn: false,
|
|
166
190
|
holders,
|
|
167
191
|
disabledEdit: isLastStep,
|
|
168
|
-
isShowChangeResource: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key)
|
|
169
|
-
isShowDelete: ((
|
|
192
|
+
isShowChangeResource: (_c = (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) == null ? void 0 : _c.startsWith("select-resource"),
|
|
193
|
+
isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
|
|
170
194
|
isShowPackageNote: false,
|
|
171
195
|
isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
|
|
172
196
|
isShowHolder: isFormSubject,
|
|
@@ -51,7 +51,6 @@ var import_index = require("./index.less");
|
|
|
51
51
|
var Layout = () => {
|
|
52
52
|
var _a, _b, _c, _d, _e;
|
|
53
53
|
const stepRef = (0, import_react.useRef)();
|
|
54
|
-
const formRef = (0, import_react.useRef)();
|
|
55
54
|
const {
|
|
56
55
|
currentStep,
|
|
57
56
|
setResourceOtherParams,
|
|
@@ -60,17 +59,19 @@ var Layout = () => {
|
|
|
60
59
|
appointmentBooking,
|
|
61
60
|
setLoading,
|
|
62
61
|
policyParams,
|
|
63
|
-
closePolicy
|
|
62
|
+
closePolicy,
|
|
63
|
+
currentStepParams
|
|
64
64
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
65
65
|
const { isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
66
66
|
const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
67
67
|
const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
68
|
-
const { removeStep
|
|
68
|
+
const { removeStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
69
69
|
const { shopDiscount } = (0, import_hooks.useShopDiscount)();
|
|
70
70
|
(0, import_hooks.useAppointmentBookingCart)();
|
|
71
71
|
(0, import_hooks.useAppointmentBookingStep)();
|
|
72
72
|
const [params, setParams] = (0, import_react.useState)({});
|
|
73
73
|
(0, import_react.useEffect)(() => {
|
|
74
|
+
appointmentBooking.removeStep("fill-form");
|
|
74
75
|
return () => {
|
|
75
76
|
var _a2;
|
|
76
77
|
setIsAgreeDepositPolicy(false);
|
|
@@ -78,6 +79,16 @@ var Layout = () => {
|
|
|
78
79
|
(_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
|
|
79
80
|
};
|
|
80
81
|
}, []);
|
|
82
|
+
(0, import_react.useEffect)(() => {
|
|
83
|
+
var _a2;
|
|
84
|
+
if ((currentStepParams == null ? void 0 : currentStepParams.index) < 0) return;
|
|
85
|
+
const resourceStepIndex = (_a2 = currentStepParams == null ? void 0 : currentStepParams.stepLists) == null ? void 0 : _a2.findIndex(
|
|
86
|
+
(item) => item.key === "select-resource"
|
|
87
|
+
);
|
|
88
|
+
if ((currentStepParams == null ? void 0 : currentStepParams.index) < resourceStepIndex) {
|
|
89
|
+
appointmentBooking.setOtherData("current_selected_resources", null);
|
|
90
|
+
}
|
|
91
|
+
}, [currentStepParams]);
|
|
81
92
|
(0, import_react.useEffect)(() => {
|
|
82
93
|
try {
|
|
83
94
|
if (isFormSubject) {
|
|
@@ -112,29 +123,32 @@ var Layout = () => {
|
|
|
112
123
|
behavior: "smooth"
|
|
113
124
|
});
|
|
114
125
|
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
|
|
126
|
+
const components = {
|
|
127
|
+
// 选择服务
|
|
128
|
+
"select-service": import_Services.default,
|
|
129
|
+
// 添加客户
|
|
130
|
+
"select-guest": import_Guest.default,
|
|
131
|
+
// 选择时间
|
|
132
|
+
"select-date": import_Date.default,
|
|
133
|
+
// 时间切片
|
|
134
|
+
"select-time": import_TimeSlicing.default,
|
|
135
|
+
// 确认信息
|
|
136
|
+
"confirm-information": import_ConfirmInformation.default
|
|
137
|
+
};
|
|
115
138
|
const Com = (0, import_react.useMemo)(() => {
|
|
116
139
|
var _a2;
|
|
117
140
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
118
141
|
if (!key) return null;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"select-resource": import_Resource.default,
|
|
128
|
-
// 时间切片
|
|
129
|
-
"select-time": import_TimeSlicing.default,
|
|
130
|
-
// 填写表单
|
|
131
|
-
"fill-form": import_Form.default,
|
|
132
|
-
// 确认信息
|
|
133
|
-
"confirm-information": import_ConfirmInformation.default
|
|
134
|
-
};
|
|
135
|
-
let Com2 = components[key];
|
|
142
|
+
let Com2;
|
|
143
|
+
if (key.startsWith("select-resource")) {
|
|
144
|
+
Com2 = import_Resource.default;
|
|
145
|
+
} else if (key.startsWith("fill-form")) {
|
|
146
|
+
Com2 = import_Form.default;
|
|
147
|
+
} else {
|
|
148
|
+
Com2 = components[key];
|
|
149
|
+
}
|
|
136
150
|
return /* @__PURE__ */ import_react.default.createElement(Com2, { onChange: setParams, params, ref: stepRef });
|
|
137
|
-
}, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key
|
|
151
|
+
}, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key]);
|
|
138
152
|
(0, import_react.useEffect)(() => {
|
|
139
153
|
var _a2, _b2;
|
|
140
154
|
if ((0, import_utils.isMobile)()) {
|
|
@@ -37,81 +37,58 @@ var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
|
37
37
|
var import_utils = require("../../utils");
|
|
38
38
|
var import_context = require("../../context");
|
|
39
39
|
var import_hooks = require("../../hooks");
|
|
40
|
-
var import_PolicyModal = __toESM(require("../../deposit/components/PolicyModal"));
|
|
41
40
|
var import_index = require("./index.less");
|
|
42
41
|
var Form = (0, import_react.forwardRef)((props, ref) => {
|
|
43
42
|
const manualRef = (0, import_react.useRef)();
|
|
44
|
-
const [currentFormIndex, setCurrentFormIndex] = (0, import_react.useState)(0);
|
|
45
|
-
const [showAgreement, setShowAgreement] = (0, import_react.useState)(false);
|
|
46
|
-
const [agreementContent, setAgreementContent] = (0, import_react.useState)({});
|
|
47
|
-
const [formStatus, setFormStatus] = (0, import_react.useState)([]);
|
|
48
43
|
const [isClearData, setIsClearData] = (0, import_react.useState)(false);
|
|
49
|
-
const
|
|
50
|
-
|
|
44
|
+
const {
|
|
45
|
+
appointmentBooking,
|
|
46
|
+
setLoading,
|
|
47
|
+
currentStepParams,
|
|
48
|
+
currentSelectedResourcesRef
|
|
49
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
51
50
|
const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
52
51
|
const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
53
52
|
const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
54
|
-
const utils = (0, import_hooks.contextUtils)();
|
|
55
53
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
56
54
|
next: () => {
|
|
57
55
|
var _a, _b;
|
|
56
|
+
debugger;
|
|
58
57
|
setLoading(true);
|
|
59
58
|
(_b = (_a = manualRef.current) == null ? void 0 : _a.submit) == null ? void 0 : _b.call(_a);
|
|
60
59
|
}
|
|
61
60
|
}));
|
|
62
|
-
const key = "booking_form";
|
|
63
|
-
const formStorage = getOtherData("booking_form") || {};
|
|
64
|
-
const resources = (0, import_react.useMemo)(() => {
|
|
65
|
-
const _resource = getResourceList();
|
|
66
|
-
return (_resource == null ? void 0 : _resource.resources) || [];
|
|
67
|
-
}, []);
|
|
68
|
-
const forms = (0, import_react.useMemo)(() => {
|
|
69
|
-
const newCarts = (0, import_utils.formatCarts)(carts, resources, utils);
|
|
70
|
-
if (!(newCarts == null ? void 0 : newCarts.length) || !(resources == null ? void 0 : resources.length)) return [];
|
|
71
|
-
return (0, import_utils.formatForms)(newCarts) || [];
|
|
72
|
-
}, [carts, resources]);
|
|
73
|
-
(0, import_react.useEffect)(() => {
|
|
74
|
-
var _a;
|
|
75
|
-
if (!(forms == null ? void 0 : forms.length)) return;
|
|
76
|
-
setFormId(((_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.form_id) || 0);
|
|
77
|
-
}, [forms, currentFormIndex]);
|
|
78
61
|
const [FormCard] = (0, import_useComponents.default)({
|
|
79
62
|
components: ["FormCard"]
|
|
80
63
|
});
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
} else {
|
|
95
|
-
nextStep();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
64
|
+
const key = "booking_form";
|
|
65
|
+
const formStorage = getOtherData("booking_form") || {};
|
|
66
|
+
const appointmentBoard = (0, import_react.useMemo)(() => {
|
|
67
|
+
const { resources } = getResourceList();
|
|
68
|
+
return (0, import_utils.currentAppointmentBoard)(
|
|
69
|
+
currentStepParams.key,
|
|
70
|
+
resources,
|
|
71
|
+
appointmentBooking
|
|
72
|
+
);
|
|
73
|
+
}, [currentStepParams.key]);
|
|
74
|
+
const formId = (0, import_react.useMemo)(() => {
|
|
75
|
+
return (appointmentBoard == null ? void 0 : appointmentBoard.resource_form_id) || 0;
|
|
76
|
+
}, [appointmentBoard == null ? void 0 : appointmentBoard.resource_form_id]);
|
|
98
77
|
const updateFormStatus = (status) => {
|
|
99
78
|
if (status === "error") {
|
|
100
79
|
setLoading(false);
|
|
101
80
|
}
|
|
102
|
-
const newFormStatus = (0, import_utils.updateLists)(formStatus, "id", formId, {
|
|
103
|
-
status
|
|
104
|
-
});
|
|
105
|
-
setFormStatus(newFormStatus);
|
|
106
81
|
};
|
|
107
82
|
const setFormStorage = (values) => {
|
|
108
|
-
var _a;
|
|
109
|
-
const cart_id = (_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id;
|
|
110
83
|
const oldData = getOtherData(key);
|
|
111
|
-
const newData = (0, import_utils.updateBookingFormStorage)(
|
|
84
|
+
const newData = (0, import_utils.updateBookingFormStorage)(
|
|
85
|
+
oldData,
|
|
86
|
+
currentStepParams == null ? void 0 : currentStepParams.key,
|
|
87
|
+
values
|
|
88
|
+
);
|
|
112
89
|
setOtherData(key, { ...newData });
|
|
113
90
|
appointmentBooking.updateCart({
|
|
114
|
-
_id: cart_id,
|
|
91
|
+
_id: appointmentBoard == null ? void 0 : appointmentBoard.cart_id,
|
|
115
92
|
relationForms: [
|
|
116
93
|
{
|
|
117
94
|
form_id: formId,
|
|
@@ -121,59 +98,38 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
|
|
|
121
98
|
});
|
|
122
99
|
};
|
|
123
100
|
const handleFormFinish = (status, values) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
setAgreementContent({ id: (_b = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _b.policy_id });
|
|
131
|
-
setShowAgreement(true);
|
|
132
|
-
} else {
|
|
133
|
-
goToNextForm();
|
|
101
|
+
try {
|
|
102
|
+
setIsClearData(false);
|
|
103
|
+
updateFormStatus(status);
|
|
104
|
+
if (status === "success") {
|
|
105
|
+
setFormStorage(values);
|
|
106
|
+
nextStep();
|
|
134
107
|
}
|
|
108
|
+
} catch (error) {
|
|
109
|
+
setLoading(false);
|
|
135
110
|
}
|
|
136
111
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
goToNextForm();
|
|
140
|
-
};
|
|
141
|
-
const formCom = (0, import_react.useMemo)(() => {
|
|
142
|
-
var _a;
|
|
143
|
-
if (!formId) return;
|
|
144
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
145
|
-
FormCard,
|
|
146
|
-
{
|
|
147
|
-
id: formId,
|
|
148
|
-
ref: manualRef,
|
|
149
|
-
isGetLastData: false,
|
|
150
|
-
setting: { isHidden: 1 },
|
|
151
|
-
formWrapStyle: { padding: "16px" },
|
|
152
|
-
isV2API: true,
|
|
153
|
-
isShowSkeleton: true,
|
|
154
|
-
onSubmit: (status, values) => {
|
|
155
|
-
handleFormFinish(status, values);
|
|
156
|
-
},
|
|
157
|
-
onFinishFailed: (e) => {
|
|
158
|
-
updateFormStatus("error");
|
|
159
|
-
},
|
|
160
|
-
onFormValueChange: (values) => {
|
|
161
|
-
},
|
|
162
|
-
defaultValues: (formStorage == null ? void 0 : formStorage[(_a = forms == null ? void 0 : forms[currentFormIndex]) == null ? void 0 : _a.cart_id]) || {},
|
|
163
|
-
isClearData: false
|
|
164
|
-
}
|
|
165
|
-
));
|
|
166
|
-
}, [currentFormIndex, formId]);
|
|
167
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formCom, showAgreement ? /* @__PURE__ */ import_react.default.createElement(
|
|
168
|
-
import_PolicyModal.default,
|
|
112
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-form-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
113
|
+
FormCard,
|
|
169
114
|
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
115
|
+
id: formId,
|
|
116
|
+
ref: manualRef,
|
|
117
|
+
isGetLastData: false,
|
|
118
|
+
setting: { isHidden: 1 },
|
|
119
|
+
formWrapStyle: { padding: "16px" },
|
|
120
|
+
isV2API: true,
|
|
121
|
+
isShowSkeleton: true,
|
|
122
|
+
onSubmit: (status, values) => {
|
|
123
|
+
handleFormFinish(status, values);
|
|
124
|
+
},
|
|
125
|
+
onFinishFailed: (e) => {
|
|
126
|
+
updateFormStatus("error");
|
|
127
|
+
},
|
|
128
|
+
onFormValueChange: (values) => {
|
|
129
|
+
},
|
|
130
|
+
defaultValues: (formStorage == null ? void 0 : formStorage[currentStepParams == null ? void 0 : currentStepParams.key]) || {},
|
|
131
|
+
isClearData: false
|
|
176
132
|
}
|
|
177
|
-
)
|
|
133
|
+
)));
|
|
178
134
|
});
|
|
179
135
|
var Form_default = Form;
|
|
@@ -38,26 +38,41 @@ var import_progressBar = __toESM(require("../../../eventBooking/components/progr
|
|
|
38
38
|
var import_context = require("../../context");
|
|
39
39
|
var import_hooks = require("../../hooks");
|
|
40
40
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
41
|
+
var import_utils2 = require("../../utils");
|
|
41
42
|
var import_index = require("./index.less");
|
|
42
43
|
var Header = () => {
|
|
43
44
|
var _a;
|
|
44
|
-
const {
|
|
45
|
+
const {
|
|
46
|
+
currentStep,
|
|
47
|
+
appointmentBooking,
|
|
48
|
+
setTimes,
|
|
49
|
+
carts,
|
|
50
|
+
currentStepParams,
|
|
51
|
+
currentSelectedResourcesRef
|
|
52
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
45
53
|
const shopDiscount = (0, import_hooks.useShopDiscount)();
|
|
46
54
|
const context = (0, import_useEngineContext.default)();
|
|
47
|
-
const {
|
|
48
|
-
const {
|
|
49
|
-
const { setOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
55
|
+
const { stepList, updateStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
56
|
+
const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
50
57
|
const { checkProductType } = (0, import_hooks.useAppointmentBookingProduct)();
|
|
58
|
+
const utils = (0, import_hooks.contextUtils)();
|
|
51
59
|
const stepName = (0, import_react.useMemo)(() => {
|
|
52
|
-
var _a2, _b, _c, _d
|
|
60
|
+
var _a2, _b, _c, _d;
|
|
53
61
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
54
62
|
if (!key) return "";
|
|
55
|
-
if (key
|
|
56
|
-
const
|
|
63
|
+
if (key.startsWith("select-resource")) {
|
|
64
|
+
const currentResource = (_c = (_b = currentSelectedResourcesRef.current) == null ? void 0 : _b[0]) == null ? void 0 : _c.currentSelectedResource;
|
|
65
|
+
const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
|
|
66
|
+
const name = (0, import_utils2.getResourceTitle)(
|
|
67
|
+
appointmentBooking,
|
|
68
|
+
resourceItem == null ? void 0 : resourceItem.code,
|
|
69
|
+
utils,
|
|
70
|
+
resourceItem
|
|
71
|
+
);
|
|
57
72
|
return import_utils.locales.getText("pisell2.event.select.category")(name);
|
|
58
73
|
}
|
|
59
|
-
return ((
|
|
60
|
-
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key,
|
|
74
|
+
return ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.description) || "";
|
|
75
|
+
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, currentSelectedResourcesRef.current]);
|
|
61
76
|
const handleBack = async () => {
|
|
62
77
|
var _a2, _b;
|
|
63
78
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
@@ -82,17 +97,21 @@ var Header = () => {
|
|
|
82
97
|
if (key === "select-time") {
|
|
83
98
|
setTimes([]);
|
|
84
99
|
}
|
|
85
|
-
if (key
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if ((resourceStep == null ? void 0 : resourceStep.isSkip) && (resourceStep == null ? void 0 : resourceStep.key) === "select-resource") {
|
|
90
|
-
appointmentBooking.deleteCartItemInfo("resource");
|
|
100
|
+
if (key.startsWith("fill-form")) {
|
|
101
|
+
const form_key = "booking_form";
|
|
102
|
+
let booking_form = getOtherData(form_key);
|
|
103
|
+
setOtherData(form_key, { ...booking_form, [key]: {} });
|
|
91
104
|
}
|
|
92
105
|
appointmentBooking.back();
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
106
|
+
const prevStepData = stepList[(currentStepParams == null ? void 0 : currentStepParams.index) - 1];
|
|
107
|
+
const currentStepData = stepList[currentStepParams == null ? void 0 : currentStepParams.index];
|
|
108
|
+
debugger;
|
|
109
|
+
if ((currentStepData == null ? void 0 : currentStepData.isSkip) || (prevStepData == null ? void 0 : prevStepData.isSkip)) {
|
|
110
|
+
const key2 = (currentStepData == null ? void 0 : currentStepData.isSkip) ? currentStepData == null ? void 0 : currentStepData.key : prevStepData == null ? void 0 : prevStepData.key;
|
|
111
|
+
if (key2 === "select-resource") {
|
|
112
|
+
appointmentBooking.deleteCartItemInfo("resource");
|
|
113
|
+
}
|
|
114
|
+
updateStep(key2, {
|
|
96
115
|
isSkip: false
|
|
97
116
|
});
|
|
98
117
|
}
|
|
@@ -101,8 +120,8 @@ var Header = () => {
|
|
|
101
120
|
var _a2, _b;
|
|
102
121
|
appointmentBooking.destroy();
|
|
103
122
|
(_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
|
|
104
|
-
const
|
|
105
|
-
(_b =
|
|
123
|
+
const utils2 = context.appHelper.utils || {};
|
|
124
|
+
(_b = utils2 == null ? void 0 : utils2.history) == null ? void 0 : _b.replace("/");
|
|
106
125
|
};
|
|
107
126
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
108
127
|
import_progressBar.default,
|