@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
|
@@ -39,10 +39,8 @@ var import_materials = require("@pisell/materials");
|
|
|
39
39
|
var import_hooks = require("../../hooks");
|
|
40
40
|
var import_context = require("../../context");
|
|
41
41
|
var import_utils = require("../../utils");
|
|
42
|
-
var import_utils2 = require("../../components/Cart/utils");
|
|
43
|
-
var import_utils3 = require("./utils");
|
|
44
42
|
var import_guests = __toESM(require("../../assets/guests.svg"));
|
|
45
|
-
var
|
|
43
|
+
var import_utils2 = require("@pisell/utils");
|
|
46
44
|
var import_index = require("./index.less");
|
|
47
45
|
var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
48
46
|
const [selectedResource, setSelectedResource] = (0, import_react.useState)(0);
|
|
@@ -50,17 +48,12 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
50
48
|
appointmentBooking,
|
|
51
49
|
carts,
|
|
52
50
|
resourceOtherParams,
|
|
53
|
-
setCarts,
|
|
54
51
|
currentStep,
|
|
55
52
|
setResourceOtherParams,
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
setPolicyIds,
|
|
54
|
+
currentStepParams
|
|
58
55
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
59
|
-
const {
|
|
60
|
-
getResourceList,
|
|
61
|
-
autoSelectAllProductResources,
|
|
62
|
-
getResourceTimeSlot
|
|
63
|
-
} = (0, import_hooks.useAppointmentBookingResource)();
|
|
56
|
+
const { getResourceList, getResourceTimeSlot } = (0, import_hooks.useAppointmentBookingResource)();
|
|
64
57
|
const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
|
|
65
58
|
const { updateStep, nextStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
66
59
|
const { openLoginModal, isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
@@ -70,42 +63,13 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
70
63
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
71
64
|
next: async () => {
|
|
72
65
|
var _a, _b, _c;
|
|
73
|
-
const result = (0, import_utils2.checkResource)({ carts, resources });
|
|
74
|
-
if (result) {
|
|
75
|
-
setCarts(result);
|
|
76
|
-
}
|
|
77
|
-
setIsErrorHolder(!!result);
|
|
78
|
-
if (!!result) {
|
|
79
|
-
(0, import_utils3.scrollToFirstErrorCard)();
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
66
|
const resultCarts = (0, import_utils.formatCartsResources)(carts, resources, setPolicyIds);
|
|
83
67
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
84
68
|
const accountLists = await appointmentBooking.getAccounts();
|
|
85
|
-
const checkResult = (0, import_utils.checkHasFormStep)({
|
|
86
|
-
nextStep,
|
|
87
|
-
hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0,
|
|
88
|
-
currentStep,
|
|
89
|
-
stepList,
|
|
90
|
-
appointmentBooking,
|
|
91
|
-
locales: import_utils4.locales,
|
|
92
|
-
openLoginModal,
|
|
93
|
-
utils,
|
|
94
|
-
accountLists,
|
|
95
|
-
getHolders,
|
|
96
|
-
checkHolder: import_utils2.checkHolder,
|
|
97
|
-
checkAccount,
|
|
98
|
-
setCarts,
|
|
99
|
-
carts,
|
|
100
|
-
isFormSubject,
|
|
101
|
-
isLogin
|
|
102
|
-
});
|
|
103
|
-
if (checkResult) return;
|
|
104
69
|
setResourceOtherParams({
|
|
105
70
|
...resourceOtherParams,
|
|
106
71
|
errorList: null
|
|
107
72
|
});
|
|
108
|
-
getResourceTimeSlot();
|
|
109
73
|
nextStep();
|
|
110
74
|
}
|
|
111
75
|
}));
|
|
@@ -118,8 +82,6 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
118
82
|
var _a;
|
|
119
83
|
try {
|
|
120
84
|
const _resources = getResourceList();
|
|
121
|
-
await autoSelectAllProductResources();
|
|
122
|
-
getResourceList();
|
|
123
85
|
const skipResourceStep = await checkSkipResourceStep();
|
|
124
86
|
const key = (_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key;
|
|
125
87
|
updateStep(key, {
|
|
@@ -139,32 +101,52 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
139
101
|
{
|
|
140
102
|
id: 0,
|
|
141
103
|
image: import_guests.default,
|
|
142
|
-
title:
|
|
143
|
-
subtitle:
|
|
104
|
+
title: import_utils2.locales.getText("pisell2.appointment.any.professional"),
|
|
105
|
+
subtitle: import_utils2.locales.getText("pisell2.appointment.for.maximum.availability")
|
|
144
106
|
}
|
|
145
107
|
];
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
108
|
+
const appointmentBoard = (0, import_react.useMemo)(() => {
|
|
109
|
+
return (0, import_utils.currentAppointmentBoard)(
|
|
110
|
+
currentStepParams.key,
|
|
111
|
+
resources,
|
|
112
|
+
appointmentBooking
|
|
113
|
+
);
|
|
114
|
+
}, [currentStepParams.key, resources]);
|
|
115
|
+
const renderLists = (0, import_react.useMemo)(() => {
|
|
116
|
+
return (0, import_utils.currentRenderLists)(resources, appointmentBoard == null ? void 0 : appointmentBoard.form_code);
|
|
117
|
+
}, [resources, appointmentBoard == null ? void 0 : appointmentBoard.form_code]);
|
|
118
|
+
(0, import_react.useEffect)(() => {
|
|
119
|
+
const autoSelectResources = async () => {
|
|
120
|
+
if ((appointmentBoard == null ? void 0 : appointmentBoard.isRequired) || !(appointmentBoard == null ? void 0 : appointmentBoard.form_code)) {
|
|
121
|
+
return;
|
|
155
122
|
}
|
|
156
|
-
|
|
157
|
-
|
|
123
|
+
const res = await appointmentBooking.autoSelectAllProductResources(
|
|
124
|
+
appointmentBoard == null ? void 0 : appointmentBoard.form_code
|
|
125
|
+
);
|
|
126
|
+
setResourceOtherParams({
|
|
127
|
+
...resourceOtherParams,
|
|
128
|
+
...res
|
|
129
|
+
});
|
|
130
|
+
getResourceList();
|
|
131
|
+
const cartItem = carts == null ? void 0 : carts[0];
|
|
132
|
+
appointmentBooking.updateCart({
|
|
133
|
+
_id: cartItem == null ? void 0 : cartItem._id,
|
|
134
|
+
...cartItem
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
autoSelectResources();
|
|
138
|
+
}, [appointmentBoard]);
|
|
158
139
|
const resourcesResult = (0, import_react.useMemo)(() => {
|
|
159
|
-
|
|
160
|
-
|
|
140
|
+
let _anyResource = (appointmentBoard == null ? void 0 : appointmentBoard.isRequired) ? [] : [...anyResource];
|
|
141
|
+
return _anyResource.concat(renderLists || []);
|
|
142
|
+
}, [renderLists, appointmentBoard]);
|
|
161
143
|
const onClick = (e) => {
|
|
162
144
|
var _a;
|
|
163
145
|
setSelectedResource(e.id);
|
|
164
146
|
if (e.id) {
|
|
165
147
|
return appointmentBooking.updateCart({
|
|
166
148
|
_id: (_a = carts == null ? void 0 : carts[0]) == null ? void 0 : _a._id,
|
|
167
|
-
resources: [e
|
|
149
|
+
resources: (0, import_utils.updateCartResources)(carts == null ? void 0 : carts[0], e)
|
|
168
150
|
});
|
|
169
151
|
}
|
|
170
152
|
};
|
|
@@ -187,7 +169,7 @@ var Resource = (0, import_react.forwardRef)((props, ref) => {
|
|
|
187
169
|
}
|
|
188
170
|
);
|
|
189
171
|
},
|
|
190
|
-
columns: (0,
|
|
172
|
+
columns: (0, import_utils2.isMobile)() ? 2 : 3,
|
|
191
173
|
horizontalGap: 16,
|
|
192
174
|
verticalGap: 16,
|
|
193
175
|
onClick: (e) => onClick && onClick(e)
|
|
@@ -65,13 +65,7 @@ var TimeSlicing = (0, import_react.forwardRef)((props, ref) => {
|
|
|
65
65
|
}, []);
|
|
66
66
|
const getAutoSelect = async (val) => {
|
|
67
67
|
setSelectedTime(val);
|
|
68
|
-
const { resourceCodes } = getResourceList();
|
|
69
|
-
const { errorList } = await appointmentBooking.autoSelectAllProductResources(
|
|
70
|
-
resourceCodes == null ? void 0 : resourceCodes[1],
|
|
71
|
-
val
|
|
72
|
-
);
|
|
73
68
|
const result = await appointmentBooking.submitTimeSlot(val);
|
|
74
|
-
console.log(errorList, result, "wh9896788");
|
|
75
69
|
};
|
|
76
70
|
(0, import_react.useEffect)(() => {
|
|
77
71
|
var _a, _b, _c;
|
|
@@ -81,7 +75,7 @@ var TimeSlicing = (0, import_react.forwardRef)((props, ref) => {
|
|
|
81
75
|
if ((_c = carts == null ? void 0 : carts[0]) == null ? void 0 : _c.start_time) return;
|
|
82
76
|
getAutoSelect(times == null ? void 0 : times[0]);
|
|
83
77
|
}
|
|
84
|
-
}, [times]);
|
|
78
|
+
}, [times, carts]);
|
|
85
79
|
const onClick = async (e) => {
|
|
86
80
|
setSelectedResource(e == null ? void 0 : e.start_time);
|
|
87
81
|
getAutoSelect(e);
|
|
@@ -37,11 +37,13 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_hooks = require("./hooks");
|
|
38
38
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
39
39
|
var import_tasks = require("../../utils/tasks");
|
|
40
|
+
var import_utils = require("./utils");
|
|
40
41
|
var AppointmentBookingContext = (0, import_react.createContext)(void 0);
|
|
41
42
|
var AppointmentBookingProvider = ({
|
|
42
43
|
children
|
|
43
44
|
}) => {
|
|
44
|
-
var _a, _b, _c, _d, _e;
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
46
|
+
const currentSelectedResourcesRef = (0, import_react.useRef)(null);
|
|
45
47
|
const policyIdsRef = (0, import_react.useRef)([]);
|
|
46
48
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
47
49
|
const [summary, setSummary] = (0, import_react.useState)({});
|
|
@@ -75,14 +77,54 @@ var AppointmentBookingProvider = ({
|
|
|
75
77
|
policyParams.callback();
|
|
76
78
|
}
|
|
77
79
|
};
|
|
80
|
+
const stepLists = (0, import_react.useMemo)(() => {
|
|
81
|
+
var _a2, _b2, _c2;
|
|
82
|
+
return ((_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList) || [];
|
|
83
|
+
}, [(_d = (_c = (_b = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _b.step) == null ? void 0 : _c.store) == null ? void 0 : _d.stepList]);
|
|
78
84
|
const isLastStep = (0, import_react.useMemo)(() => {
|
|
79
85
|
var _a2;
|
|
80
86
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
81
87
|
return key === "confirm-information";
|
|
82
88
|
}, [
|
|
83
|
-
(
|
|
84
|
-
(
|
|
89
|
+
(_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key,
|
|
90
|
+
(_h = (_g = (_f = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _f.step) == null ? void 0 : _g.store) == null ? void 0 : _h.stepList
|
|
85
91
|
]);
|
|
92
|
+
const currentStepParams = (0, import_react.useMemo)(() => {
|
|
93
|
+
var _a2;
|
|
94
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
95
|
+
const index = stepLists.findIndex((item) => item.key === key);
|
|
96
|
+
return {
|
|
97
|
+
key,
|
|
98
|
+
index,
|
|
99
|
+
stepLists
|
|
100
|
+
};
|
|
101
|
+
}, [(_i = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _i.key, stepLists]);
|
|
102
|
+
(0, import_react.useEffect)(() => {
|
|
103
|
+
var _a2;
|
|
104
|
+
if ((_a2 = currentStepParams == null ? void 0 : currentStepParams.key) == null ? void 0 : _a2.startsWith("select-resource")) {
|
|
105
|
+
const currentSelectedResources = carts.map((item) => {
|
|
106
|
+
return {
|
|
107
|
+
_id: item == null ? void 0 : item._id,
|
|
108
|
+
currentSelectedResource: (0, import_utils.getCartCurrentResourceData)(
|
|
109
|
+
item,
|
|
110
|
+
currentStepParams == null ? void 0 : currentStepParams.key,
|
|
111
|
+
resources
|
|
112
|
+
)
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
currentSelectedResourcesRef.current = currentSelectedResources;
|
|
116
|
+
appointmentBooking.setOtherData(
|
|
117
|
+
"current_selected_resources",
|
|
118
|
+
currentSelectedResources
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}, [currentStepParams == null ? void 0 : currentStepParams.key, resources, carts]);
|
|
122
|
+
(0, import_react.useEffect)(() => {
|
|
123
|
+
const currentSelectedResources = appointmentBooking.getOtherData(
|
|
124
|
+
"current_selected_resources"
|
|
125
|
+
);
|
|
126
|
+
currentSelectedResourcesRef.current = currentSelectedResources || [];
|
|
127
|
+
}, []);
|
|
86
128
|
const value = {
|
|
87
129
|
appointmentBooking,
|
|
88
130
|
times,
|
|
@@ -116,7 +158,9 @@ var AppointmentBookingProvider = ({
|
|
|
116
158
|
policyIdsRef,
|
|
117
159
|
setPolicyIds,
|
|
118
160
|
openPolicy,
|
|
119
|
-
closePolicy
|
|
161
|
+
closePolicy,
|
|
162
|
+
currentStepParams,
|
|
163
|
+
currentSelectedResourcesRef
|
|
120
164
|
};
|
|
121
165
|
return /* @__PURE__ */ import_react.default.createElement(AppointmentBookingContext.Provider, { value }, children);
|
|
122
166
|
};
|
|
@@ -14,7 +14,7 @@ export declare const useAppointmentBookingStep: () => {
|
|
|
14
14
|
removeStep: (key: string) => any;
|
|
15
15
|
addStep: (props: any, stepKey?: string) => any;
|
|
16
16
|
updateStep: (key: string, step: any) => void;
|
|
17
|
-
nextStep: () =>
|
|
17
|
+
nextStep: () => any;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* @title: 获取商品数据
|
|
@@ -75,7 +75,6 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
75
75
|
resources: any;
|
|
76
76
|
resourceCodes: any;
|
|
77
77
|
};
|
|
78
|
-
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
79
78
|
};
|
|
80
79
|
/**
|
|
81
80
|
* @title: 是否跳过资源选择步骤
|
|
@@ -85,7 +84,7 @@ export declare const useAppointmentBookingResource: () => {
|
|
|
85
84
|
* @Date: 2025-04-21 11:47
|
|
86
85
|
*/
|
|
87
86
|
export declare const useIsSkipResourceStep: () => {
|
|
88
|
-
checkSkipResourceStep: (
|
|
87
|
+
checkSkipResourceStep: () => Promise<boolean>;
|
|
89
88
|
};
|
|
90
89
|
/**
|
|
91
90
|
* @title: 获取预约配置
|
|
@@ -48,7 +48,7 @@ var import_useEngineContext = require("../../hooks/useEngineContext");
|
|
|
48
48
|
var import_useEngineContext2 = __toESM(require("../../hooks/useEngineContext"));
|
|
49
49
|
var import_utils2 = require("./utils");
|
|
50
50
|
var import_context = require("./context");
|
|
51
|
-
var import_utils3 = require("./components/
|
|
51
|
+
var import_utils3 = require("./components/Resource/utils");
|
|
52
52
|
var useAppointmentBooking = () => {
|
|
53
53
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
54
54
|
return pisellOS.getModule("appointmentBooking");
|
|
@@ -66,8 +66,13 @@ var contextUtils = () => {
|
|
|
66
66
|
var useAppointmentBookingStep = () => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
69
|
-
const { appointmentBooking, setCurrentStep,
|
|
69
|
+
const { appointmentBooking, setCurrentStep, carts, openPolicy, setCarts, setLoading, currentSelectedResourcesRef, currentStepParams, setIsErrorHolder } = (0, import_context.useAppointmentBookingContext)();
|
|
70
70
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
71
|
+
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
72
|
+
const { isFormSubject } = useAppointmentBookingSetting();
|
|
73
|
+
const { accountLists, getHolders, checkAccount } = useAppointmentBookingAccount();
|
|
74
|
+
const { getResourceList } = useAppointmentBookingResource();
|
|
75
|
+
const utils = contextUtils();
|
|
71
76
|
const getCurrentAndLastStep = () => {
|
|
72
77
|
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
73
78
|
setCurrentStep(currentStep);
|
|
@@ -114,34 +119,113 @@ var useAppointmentBookingStep = () => {
|
|
|
114
119
|
});
|
|
115
120
|
};
|
|
116
121
|
const nextStep = () => {
|
|
117
|
-
var _a2, _b2, _c2, _d;
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (idx < policyIdsRef.current.length) {
|
|
125
|
-
openPolicy({ id: policyIdsRef.current[idx] }, () => {
|
|
126
|
-
idx++;
|
|
127
|
-
showNextPolicy();
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
appointmentBooking.next();
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
showNextPolicy();
|
|
122
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
123
|
+
let stepList2 = (currentStepParams == null ? void 0 : currentStepParams.stepLists) || [];
|
|
124
|
+
const currentKey = currentStepParams == null ? void 0 : currentStepParams.key;
|
|
125
|
+
if (currentKey == null ? void 0 : currentKey.startsWith("select-resource")) {
|
|
126
|
+
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)((currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) || [], appointmentBooking, utils);
|
|
127
|
+
if (hasError) {
|
|
128
|
+
(0, import_utils3.scrollToFirstErrorCard)();
|
|
134
129
|
return;
|
|
135
130
|
}
|
|
131
|
+
(_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.forEach((cart) => {
|
|
132
|
+
var _a3, _b3;
|
|
133
|
+
const selectedResource2 = cart == null ? void 0 : cart.currentSelectedResource;
|
|
134
|
+
const resourceItem = (selectedResource2 == null ? void 0 : selectedResource2.resourceItem) || {};
|
|
135
|
+
const formId = (_a3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _a3.resource_form_id;
|
|
136
|
+
const policyId = (_b3 = selectedResource2 == null ? void 0 : selectedResource2.renderItem) == null ? void 0 : _b3.policy_id;
|
|
137
|
+
const formKey = `fill-form_@${resourceItem == null ? void 0 : resourceItem.form_id}-${resourceItem == null ? void 0 : resourceItem.code}-${cart == null ? void 0 : cart._id}-${formId}-${policyId}`;
|
|
138
|
+
if (formId) {
|
|
139
|
+
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
140
|
+
const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
|
|
141
|
+
appointmentBooking.addStep({ key: formKey, description }, beforeKey);
|
|
142
|
+
} else {
|
|
143
|
+
appointmentBooking.removeStep(formKey);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const selectedResource = (_c2 = (_b2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.currentSelectedResource;
|
|
147
|
+
if (selectedResource) {
|
|
148
|
+
const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
|
|
149
|
+
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex((item) => {
|
|
150
|
+
var _a3;
|
|
151
|
+
return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
|
|
152
|
+
});
|
|
153
|
+
const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
|
|
154
|
+
const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
|
|
155
|
+
if (nextResource) {
|
|
156
|
+
const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
|
|
157
|
+
appointmentBooking.addStep({ key: resourceKey, description: "" }, beforeKey);
|
|
158
|
+
} else {
|
|
159
|
+
appointmentBooking.removeStep(resourceKey);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const nextStep2 = stepList2[(currentStepParams == null ? void 0 : currentStepParams.index) + 1];
|
|
164
|
+
if (((_f = nextStep2 == null ? void 0 : nextStep2.key) == null ? void 0 : _f.startsWith("select-resource_")) || (nextStep2 == null ? void 0 : nextStep2.key) === "confirm-information") {
|
|
165
|
+
const selectedResource = (_h = (_g = currentSelectedResourcesRef.current) == null ? void 0 : _g[0]) == null ? void 0 : _h.currentSelectedResource;
|
|
166
|
+
const renderItem = (selectedResource == null ? void 0 : selectedResource.renderItem) || {};
|
|
167
|
+
const checkHolder = () => {
|
|
168
|
+
setLoading(false);
|
|
169
|
+
const { hasError, updatedCartList } = (0, import_utils2.checkAndGoNext)(isFormSubject, checkAccount, carts);
|
|
170
|
+
if (hasError) {
|
|
171
|
+
setIsErrorHolder(hasError);
|
|
172
|
+
setCarts(updatedCartList);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
|
|
176
|
+
openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
|
|
177
|
+
return appointmentBooking.next();
|
|
178
|
+
});
|
|
179
|
+
} else {
|
|
180
|
+
return appointmentBooking.next();
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const checkLogin = () => {
|
|
184
|
+
if (!isLogin) {
|
|
185
|
+
return openLoginModal({
|
|
186
|
+
callback: (status) => {
|
|
187
|
+
var _a3;
|
|
188
|
+
if (status === "success") {
|
|
189
|
+
if (!isFormSubject) {
|
|
190
|
+
const user = JSON.parse(((_a3 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a3.get("customer")) || "{}");
|
|
191
|
+
const currentUser = (0, import_utils2.formatCustomer)(user);
|
|
192
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
193
|
+
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
194
|
+
} else {
|
|
195
|
+
getHolders();
|
|
196
|
+
}
|
|
197
|
+
checkHolder();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
} else {
|
|
202
|
+
return checkHolder();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
if ((nextStep2 == null ? void 0 : nextStep2.key) !== "confirm-information") {
|
|
206
|
+
if (!(renderItem == null ? void 0 : renderItem.policy_id)) {
|
|
207
|
+
return appointmentBooking.next();
|
|
208
|
+
}
|
|
209
|
+
return openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
|
|
210
|
+
const cartItem = carts == null ? void 0 : carts[0];
|
|
211
|
+
appointmentBooking.updateCart({
|
|
212
|
+
_id: cartItem == null ? void 0 : cartItem._id,
|
|
213
|
+
...cartItem
|
|
214
|
+
});
|
|
215
|
+
appointmentBooking.next();
|
|
216
|
+
});
|
|
217
|
+
} else {
|
|
218
|
+
return checkLogin();
|
|
219
|
+
}
|
|
136
220
|
}
|
|
137
221
|
appointmentBooking.next();
|
|
138
222
|
};
|
|
139
223
|
return { getStepIndex, stepList, removeStep, addStep, updateStep, nextStep };
|
|
140
224
|
};
|
|
141
225
|
var useAppointmentBookingProduct = () => {
|
|
142
|
-
const { appointmentBooking
|
|
226
|
+
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
143
227
|
const { productModuleParams } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
144
|
-
const { bookingProcess
|
|
228
|
+
const { bookingProcess } = productModuleParams || {};
|
|
145
229
|
const getProducts = async () => {
|
|
146
230
|
var _a;
|
|
147
231
|
if (bookingProcess === "date_first") {
|
|
@@ -170,14 +254,29 @@ var useAppointmentBookingCart = () => {
|
|
|
170
254
|
var _a;
|
|
171
255
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
172
256
|
const utils = contextUtils();
|
|
173
|
-
const { appointmentBooking, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
257
|
+
const { appointmentBooking, isErrorHolder, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
|
|
174
258
|
const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
175
259
|
const getCartAndSummary = async () => {
|
|
260
|
+
var _a2;
|
|
261
|
+
const locale = ((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("umi_locale")) || "en-US";
|
|
262
|
+
const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
|
|
176
263
|
const carts = await appointmentBooking.getCart();
|
|
264
|
+
const accountLists = await appointmentBooking.getAccounts();
|
|
177
265
|
const newCarts = carts == null ? void 0 : carts.map((item) => {
|
|
266
|
+
var _a3;
|
|
178
267
|
return {
|
|
179
268
|
...item,
|
|
180
|
-
addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name)
|
|
269
|
+
addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name),
|
|
270
|
+
format: ["HH:mm", "HH:mm"],
|
|
271
|
+
show_time: true,
|
|
272
|
+
duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
|
|
273
|
+
locale,
|
|
274
|
+
symbol,
|
|
275
|
+
holders: (0, import_utils2.formatHolder)(accountLists),
|
|
276
|
+
allowClearHolder: true,
|
|
277
|
+
allowClearResource: true,
|
|
278
|
+
isErrorHolder: isErrorHolder || false,
|
|
279
|
+
isMultipleResource: true
|
|
181
280
|
};
|
|
182
281
|
});
|
|
183
282
|
setCarts(newCarts || []);
|
|
@@ -270,7 +369,7 @@ var useAppointmentBookingAccount = () => {
|
|
|
270
369
|
return { accountLists, getHolders, form_id, addAccount, checkAccount };
|
|
271
370
|
};
|
|
272
371
|
var useAppointmentBookingResource = () => {
|
|
273
|
-
const { appointmentBooking, setResources, setTimes
|
|
372
|
+
const { appointmentBooking, setResources, setTimes } = (0, import_context.useAppointmentBookingContext)();
|
|
274
373
|
const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
275
374
|
const getResourceList = () => {
|
|
276
375
|
var _a;
|
|
@@ -292,53 +391,40 @@ var useAppointmentBookingResource = () => {
|
|
|
292
391
|
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
293
392
|
setTimes(data || []);
|
|
294
393
|
};
|
|
295
|
-
|
|
296
|
-
const { resourceCodes } = getResourceList();
|
|
297
|
-
const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
|
|
298
|
-
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
299
|
-
let res = await appointmentBooking.autoSelectAllProductResources(code);
|
|
300
|
-
setResourceOtherParams({
|
|
301
|
-
...resourceOtherParams,
|
|
302
|
-
...res,
|
|
303
|
-
resourceCodes
|
|
304
|
-
});
|
|
305
|
-
return res;
|
|
306
|
-
};
|
|
307
|
-
return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
|
|
394
|
+
return { getResourceTimeSlot, getResourceList };
|
|
308
395
|
};
|
|
309
396
|
var useIsSkipResourceStep = () => {
|
|
310
|
-
|
|
311
|
-
const {
|
|
312
|
-
const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
|
|
397
|
+
const { currentStepParams } = (0, import_context.useAppointmentBookingContext)();
|
|
398
|
+
const { getResourceList } = useAppointmentBookingResource();
|
|
313
399
|
const { isFormSubject } = useAppointmentBookingSetting();
|
|
314
400
|
const appointmentBooking = useAppointmentBooking();
|
|
315
|
-
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
316
|
-
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
317
|
-
const { getHolders, checkAccount } = useAppointmentBookingAccount();
|
|
318
401
|
const { nextStep } = useAppointmentBookingStep();
|
|
319
|
-
const
|
|
320
|
-
const checkSkipResourceStep = async (isSkipUpdateFormStep) => {
|
|
321
|
-
var _a2, _b2, _c2, _d, _e;
|
|
402
|
+
const checkSkipResourceStep = async () => {
|
|
322
403
|
try {
|
|
404
|
+
const { resources } = getResourceList();
|
|
323
405
|
const accountLists = await appointmentBooking.getAccounts();
|
|
324
|
-
const
|
|
406
|
+
const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(currentStepParams.key, resources, appointmentBooking);
|
|
407
|
+
if (isSystem) {
|
|
408
|
+
nextStep();
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
325
411
|
if ((accountLists == null ? void 0 : accountLists.length) === 1 || isFormSubject) {
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
if (
|
|
329
|
-
|
|
330
|
-
const resultCarts = (0, import_utils2.formatCartsResources)(carts, resources, setPolicyIds);
|
|
331
|
-
(0, import_utils2.checkHasFormStep)({ nextStep, isSkip: true, openLoginModal, utils, accountLists, getHolders, checkHolder: import_utils3.checkHolder, setCarts, checkAccount, carts, isFormSubject, hasResourceFormId: (resultCarts == null ? void 0 : resultCarts.length) > 0, currentStep, stepList, appointmentBooking, locales: import_utils.locales, isLogin });
|
|
332
|
-
}
|
|
333
|
-
return true;
|
|
412
|
+
const renderLists = (0, import_utils2.currentRenderLists)(resources, form_code);
|
|
413
|
+
let _isSkip = false;
|
|
414
|
+
if ((renderLists == null ? void 0 : renderLists.length) === 1) {
|
|
415
|
+
_isSkip = isSkip || false;
|
|
334
416
|
} else {
|
|
335
|
-
|
|
417
|
+
_isSkip = false;
|
|
418
|
+
}
|
|
419
|
+
if (_isSkip) {
|
|
420
|
+
nextStep();
|
|
421
|
+
return true;
|
|
336
422
|
}
|
|
423
|
+
return _isSkip;
|
|
337
424
|
} else {
|
|
338
425
|
return false;
|
|
339
426
|
}
|
|
340
427
|
} catch (error) {
|
|
341
|
-
console.log(error, "checkSkipResourceStep33");
|
|
342
428
|
return false;
|
|
343
429
|
}
|
|
344
430
|
};
|