@pisell/private-materials 6.4.6 → 6.4.8
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/checkout/PaymentModal.js +410 -295
- package/es/components/checkout/PaymentPlugin.d.ts +0 -1
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +0 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.js +2 -1
- package/es/components/checkout/utils.d.ts +2 -0
- package/es/components/checkout/utils.js +119 -0
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/es/components/pay/toB/components/Card/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Footer.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/noteModal/AddTempModal.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/pro/pisellPhoneKeyboard/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/checkout/PaymentModal.js +131 -38
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +0 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +2 -1
- package/lib/components/checkout/utils.d.ts +2 -0
- package/lib/components/checkout/utils.js +69 -2
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Card/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Footer.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/noteModal/AddTempModal.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +0 -1
- package/package.json +1 -1
@@ -1,11 +1,11 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
3
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
9
9
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
10
10
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
11
11
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -44,7 +44,7 @@ import useToast from "../../hooks/useToast";
|
|
44
44
|
import "./index.less";
|
45
45
|
import { WALLET_PASS_CODE_ARRAY, WALLET_PASS_CODE_MAP } from "./constants";
|
46
46
|
import { cloneDeep } from 'lodash';
|
47
|
-
import { getShopWalletPassId } from "./utils";
|
47
|
+
import { getShopWalletPassId, reorderPaymentMethodList } from "./utils";
|
48
48
|
import usePaymentLogger from "./hooks/usePaymentLogger";
|
49
49
|
import { Button } from 'antd';
|
50
50
|
|
@@ -54,7 +54,8 @@ var CheckoutHooks = {
|
|
54
54
|
OnBalanceDueAmountChanged: 'checkout:onBalanceDueAmountChanged',
|
55
55
|
OnOrderSubmitStart: 'checkout:onOrderSubmitStart',
|
56
56
|
OnOrderSubmitEnd: 'checkout:onOrderSubmitEnd',
|
57
|
-
OnOrderSyncFailed: 'checkout:onOrderSyncFailed'
|
57
|
+
OnOrderSyncFailed: 'checkout:onOrderSyncFailed',
|
58
|
+
OnOrderPaymentAdded: 'checkout:onPaymentItemAdded'
|
58
59
|
};
|
59
60
|
|
60
61
|
// 从 PaymentOptionsModule 导入扩展支付方法类型
|
@@ -85,7 +86,9 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
85
86
|
showSuccessToast = _ref.showSuccessToast,
|
86
87
|
_ref$dynamicMaxHeight = _ref.dynamicMaxHeight,
|
87
88
|
dynamicMaxHeight = _ref$dynamicMaxHeight === void 0 ? '600px' : _ref$dynamicMaxHeight,
|
88
|
-
onOrderSyncFailed = _ref.onOrderSyncFailed
|
89
|
+
onOrderSyncFailed = _ref.onOrderSyncFailed,
|
90
|
+
generateActionButtons = _ref.generateActionButtons,
|
91
|
+
paymentResultToastConfig = _ref.paymentResultToastConfig;
|
89
92
|
var context = useEngineContext();
|
90
93
|
var utils = context.appHelper.utils || {};
|
91
94
|
var pisellos = utils.pisellos,
|
@@ -209,6 +212,19 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
209
212
|
return _ref2.apply(this, arguments);
|
210
213
|
};
|
211
214
|
}();
|
215
|
+
|
216
|
+
// 处理 surcharge 字符串,去除前面的 $ 符号
|
217
|
+
var processSurcharge = function processSurcharge(surcharge) {
|
218
|
+
if (typeof surcharge === 'string') {
|
219
|
+
// 去除前面的 $ 符号和其他货币符号
|
220
|
+
return surcharge.replace(/^[$¥€£]+/, '');
|
221
|
+
}
|
222
|
+
if (typeof surcharge === 'number') {
|
223
|
+
// 如果是数字,转换为字符串
|
224
|
+
return String(surcharge);
|
225
|
+
}
|
226
|
+
return surcharge;
|
227
|
+
};
|
212
228
|
var onPaymentOptionClick = /*#__PURE__*/function () {
|
213
229
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(method) {
|
214
230
|
var _ref4, id, code, name, type, eftposCodes, mx51Code, payType, _paymentMethodsRef$cu, data, isSynced, orderId, service_charge;
|
@@ -264,7 +280,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
264
280
|
orderId: data.orderId,
|
265
281
|
symbol: getData('shop_symbol'),
|
266
282
|
amount: customAmount,
|
267
|
-
surcharge: method.surcharge
|
283
|
+
surcharge: processSurcharge(method.surcharge)
|
268
284
|
},
|
269
285
|
mode: 'pay'
|
270
286
|
},
|
@@ -377,18 +393,36 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
377
393
|
// setCustomAmount(cartData?.total?.expectAmount || 0);
|
378
394
|
}
|
379
395
|
if (checkoutModule && isModalOpen) {
|
380
|
-
checkoutModule.getPaymentMethodsAsync().then(function (
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
396
|
+
checkoutModule.getPaymentMethodsAsync().then( /*#__PURE__*/function () {
|
397
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(paymentMethods) {
|
398
|
+
var reorderedPaymentMethods, isShowCashPayment;
|
399
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
400
|
+
while (1) switch (_context3.prev = _context3.next) {
|
401
|
+
case 0:
|
402
|
+
_context3.next = 2;
|
403
|
+
return reorderPaymentMethodList(paymentMethods, interaction);
|
404
|
+
case 2:
|
405
|
+
reorderedPaymentMethods = _context3.sent;
|
406
|
+
setPaymentMethods(reorderedPaymentMethods);
|
407
|
+
// TODO: 现金枚举类型需要从os导入
|
408
|
+
isShowCashPayment = paymentMethods.some(function (item) {
|
409
|
+
return item.code === 'CASHMANUAL';
|
410
|
+
});
|
411
|
+
setShowCashPayment(isShowCashPayment);
|
412
|
+
onShowCashPaymentChange === null || onShowCashPaymentChange === void 0 || onShowCashPaymentChange(isShowCashPayment);
|
413
|
+
if (!isShowCashPayment) {
|
414
|
+
setPaymentOptionsTitle(locales.getText('pisell2.checkout.payment.select-payment') || 'Select Payment');
|
415
|
+
}
|
416
|
+
case 8:
|
417
|
+
case "end":
|
418
|
+
return _context3.stop();
|
419
|
+
}
|
420
|
+
}, _callee3);
|
421
|
+
}));
|
422
|
+
return function (_x3) {
|
423
|
+
return _ref6.apply(this, arguments);
|
424
|
+
};
|
425
|
+
}());
|
392
426
|
}
|
393
427
|
}, [checkoutModule, orderInfo]);
|
394
428
|
|
@@ -410,10 +444,10 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
410
444
|
var core = checkoutModule.core;
|
411
445
|
if (core.effects && typeof core.effects.on === 'function') {
|
412
446
|
var unsubscribe = core.effects.on(CheckoutHooks.OnStateAmountChanged, /*#__PURE__*/function () {
|
413
|
-
var
|
447
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
|
414
448
|
var _Toast$success, _Toast$success2, items;
|
415
|
-
return _regeneratorRuntime().wrap(function
|
416
|
-
while (1) switch (
|
449
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
450
|
+
while (1) switch (_context4.prev = _context4.next) {
|
417
451
|
case 0:
|
418
452
|
console.log("Amount changed from ".concat(data.oldAmount, " to ").concat(data.newAmount));
|
419
453
|
if (clientChangedRef.current) {
|
@@ -425,19 +459,19 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
425
459
|
}
|
426
460
|
}
|
427
461
|
setCustomAmount(data.newAmount);
|
428
|
-
|
462
|
+
_context4.next = 5;
|
429
463
|
return checkoutModule.getCurrentOrderPaymentItemsAsync();
|
430
464
|
case 5:
|
431
|
-
items =
|
465
|
+
items = _context4.sent;
|
432
466
|
setPaymentItems(items);
|
433
467
|
case 7:
|
434
468
|
case "end":
|
435
|
-
return
|
469
|
+
return _context4.stop();
|
436
470
|
}
|
437
|
-
},
|
471
|
+
}, _callee4);
|
438
472
|
}));
|
439
|
-
return function (
|
440
|
-
return
|
473
|
+
return function (_x4) {
|
474
|
+
return _ref7.apply(this, arguments);
|
441
475
|
};
|
442
476
|
}());
|
443
477
|
var amountChangedUnsubscribe = core.effects.on(CheckoutHooks.OnBalanceDueAmountChanged, function (data) {
|
@@ -471,7 +505,44 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
471
505
|
// Toast?.fail(locales.getText('pisell2.checkout.order-sync-failed') || 'Order sync failed');
|
472
506
|
// }
|
473
507
|
// );
|
508
|
+
var orderPaymentAddedUnsubscribe = core.effects.on(CheckoutHooks.OnOrderPaymentAdded, function (data) {
|
509
|
+
console.log('orderPaymentAddedUnsubscribe>>>>', data);
|
510
|
+
var balanceDueAmount = checkoutModule.getBalanceDueAmount();
|
511
|
+
if (Number(balanceDueAmount) > 0) {
|
512
|
+
var autoCloseConfig = calculateAutoCloseConfig('partially_paid', false);
|
513
|
+
// 获取订单总金额
|
514
|
+
var _orderInfo = checkoutModule.getCurrentOrderInfo();
|
474
515
|
|
516
|
+
// 根据支付状态展示不同的 toast
|
517
|
+
displayPaymentResultToast({
|
518
|
+
paymentStatus: 'partially_paid',
|
519
|
+
orderTotalAmount: _orderInfo.totalAmount,
|
520
|
+
gapAmount: balanceDueAmount,
|
521
|
+
failureReason: '',
|
522
|
+
autoCloseConfig: autoCloseConfig,
|
523
|
+
actionButtons: generateActionButtons === null || generateActionButtons === void 0 ? void 0 : generateActionButtons('partially_paid')
|
524
|
+
}, _objectSpread(_objectSpread({}, paymentResultToastConfig), {}, {
|
525
|
+
onToastClose: function onToastClose() {
|
526
|
+
closePaymentResultToast();
|
527
|
+
},
|
528
|
+
onCountdownComplete: function onCountdownComplete() {
|
529
|
+
closePaymentResultToast();
|
530
|
+
}
|
531
|
+
}));
|
532
|
+
}
|
533
|
+
// 判断是否为现金支付
|
534
|
+
var paymentMethodName = data.paymentMethodName || data.name || '';
|
535
|
+
var isCashPayment = data.paymentMethodCode === 'cash' || data.paymentMethodCode === 'CASH' || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
536
|
+
if (isCashPayment) {
|
537
|
+
var _interaction$utils, _interaction$utils$as;
|
538
|
+
// handleToastClose();
|
539
|
+
// TODO: 等红阳的方法
|
540
|
+
interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$as = _interaction$utils.asyncDataManager) === null || _interaction$utils$as === void 0 || _interaction$utils$as.call(_interaction$utils, {
|
541
|
+
module: 'till',
|
542
|
+
key: 'open_till'
|
543
|
+
});
|
544
|
+
}
|
545
|
+
});
|
475
546
|
return function () {
|
476
547
|
if (unsubscribe && typeof unsubscribe === 'function') {
|
477
548
|
unsubscribe();
|
@@ -485,6 +556,9 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
485
556
|
if (amountChangedUnsubscribe && typeof amountChangedUnsubscribe === 'function') {
|
486
557
|
amountChangedUnsubscribe();
|
487
558
|
}
|
559
|
+
if (orderPaymentAddedUnsubscribe && typeof orderPaymentAddedUnsubscribe === 'function') {
|
560
|
+
orderPaymentAddedUnsubscribe();
|
561
|
+
}
|
488
562
|
};
|
489
563
|
}
|
490
564
|
} catch (error) {
|
@@ -495,160 +569,186 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
495
569
|
|
496
570
|
// 处理金额修改
|
497
571
|
var handleAmountChange = useCallback( /*#__PURE__*/function () {
|
498
|
-
var
|
499
|
-
return _regeneratorRuntime().wrap(function
|
500
|
-
while (1) switch (
|
572
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newAmount) {
|
573
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
574
|
+
while (1) switch (_context5.prev = _context5.next) {
|
501
575
|
case 0:
|
502
576
|
if (!checkoutModule) {
|
503
|
-
|
577
|
+
_context5.next = 10;
|
504
578
|
break;
|
505
579
|
}
|
506
|
-
|
507
|
-
|
580
|
+
_context5.prev = 1;
|
581
|
+
_context5.next = 4;
|
508
582
|
return checkoutModule.setStateAmountAsync(newAmount);
|
509
583
|
case 4:
|
510
584
|
setCustomAmount(newAmount);
|
511
|
-
|
585
|
+
_context5.next = 10;
|
512
586
|
break;
|
513
587
|
case 7:
|
514
|
-
|
515
|
-
|
516
|
-
console.error('Failed to set custom amount:',
|
588
|
+
_context5.prev = 7;
|
589
|
+
_context5.t0 = _context5["catch"](1);
|
590
|
+
console.error('Failed to set custom amount:', _context5.t0);
|
517
591
|
case 10:
|
518
592
|
case "end":
|
519
|
-
return
|
593
|
+
return _context5.stop();
|
520
594
|
}
|
521
|
-
},
|
595
|
+
}, _callee5, null, [[1, 7]]);
|
522
596
|
}));
|
523
|
-
return function (
|
524
|
-
return
|
597
|
+
return function (_x5) {
|
598
|
+
return _ref8.apply(this, arguments);
|
525
599
|
};
|
526
600
|
}(), [checkoutModule]);
|
527
601
|
|
528
602
|
// 处理押金状态变更
|
529
603
|
var handleDepositStatusChange = useCallback( /*#__PURE__*/function () {
|
530
|
-
var
|
604
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(isDeposit) {
|
531
605
|
var depositStatus;
|
532
|
-
return _regeneratorRuntime().wrap(function
|
533
|
-
while (1) switch (
|
606
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
607
|
+
while (1) switch (_context6.prev = _context6.next) {
|
534
608
|
case 0:
|
535
609
|
if (!checkoutModule) {
|
536
|
-
|
610
|
+
_context6.next = 11;
|
537
611
|
break;
|
538
612
|
}
|
539
|
-
|
613
|
+
_context6.prev = 1;
|
540
614
|
depositStatus = isDeposit ? 1 : 0;
|
541
|
-
|
615
|
+
_context6.next = 5;
|
542
616
|
return checkoutModule.updateOrderDepositStatusAsync(depositStatus);
|
543
617
|
case 5:
|
544
618
|
console.log("Deposit status updated to: ".concat(depositStatus, " (").concat(isDeposit ? 'deposit' : 'regular', ")"));
|
545
|
-
|
619
|
+
_context6.next = 11;
|
546
620
|
break;
|
547
621
|
case 8:
|
548
|
-
|
549
|
-
|
550
|
-
console.error('Failed to update deposit status:',
|
622
|
+
_context6.prev = 8;
|
623
|
+
_context6.t0 = _context6["catch"](1);
|
624
|
+
console.error('Failed to update deposit status:', _context6.t0);
|
551
625
|
case 11:
|
552
626
|
case "end":
|
553
|
-
return
|
627
|
+
return _context6.stop();
|
554
628
|
}
|
555
|
-
},
|
629
|
+
}, _callee6, null, [[1, 8]]);
|
556
630
|
}));
|
557
|
-
return function (
|
558
|
-
return
|
631
|
+
return function (_x6) {
|
632
|
+
return _ref9.apply(this, arguments);
|
559
633
|
};
|
560
634
|
}(), [checkoutModule]);
|
561
635
|
|
562
636
|
// 当 walletpass 直接就满足订单支付时,触发此方法
|
563
637
|
var handleWalletPassConfirmPay = /*#__PURE__*/function () {
|
564
|
-
var
|
565
|
-
var result;
|
566
|
-
return _regeneratorRuntime().wrap(function
|
567
|
-
while (1) switch (
|
638
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(action) {
|
639
|
+
var result, _result$response, responseData, _responseData$payment, _responseData$payment2, params;
|
640
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
641
|
+
while (1) switch (_context7.prev = _context7.next) {
|
568
642
|
case 0:
|
569
643
|
if (!(action === 'save-without-deduct')) {
|
570
|
-
|
644
|
+
_context7.next = 5;
|
571
645
|
break;
|
572
646
|
}
|
573
|
-
|
647
|
+
_context7.next = 3;
|
574
648
|
return checkoutModule.updateVoucherPaymentItemsAsync([]);
|
575
649
|
case 3:
|
576
|
-
|
650
|
+
_context7.next = 7;
|
577
651
|
break;
|
578
652
|
case 5:
|
579
653
|
if (!(action === 'cancel')) {
|
580
|
-
|
654
|
+
_context7.next = 7;
|
581
655
|
break;
|
582
656
|
}
|
583
|
-
return
|
657
|
+
return _context7.abrupt("return");
|
584
658
|
case 7:
|
585
|
-
|
659
|
+
_context7.next = 9;
|
586
660
|
return checkoutModule.manualSyncOrderAsync();
|
587
661
|
case 9:
|
588
|
-
result =
|
662
|
+
result = _context7.sent;
|
589
663
|
showSuccessToast === null || showSuccessToast === void 0 || showSuccessToast(result);
|
664
|
+
if (result.success) {
|
665
|
+
responseData = (_result$response = result.response) === null || _result$response === void 0 ? void 0 : _result$response.data; // 打印订单完整信息
|
666
|
+
console.log('print_order_onOrderSynced>>>>', result);
|
667
|
+
try {
|
668
|
+
params = {
|
669
|
+
type: '99',
|
670
|
+
// 打印订单全部信息
|
671
|
+
data: {
|
672
|
+
order_id: responseData.order_id,
|
673
|
+
machine_code_print_info: responseData === null || responseData === void 0 || (_responseData$payment = responseData.payment_info) === null || _responseData$payment === void 0 ? void 0 : _responseData$payment.machine_code_info,
|
674
|
+
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment2 = responseData.payment_info) === null || _responseData$payment2 === void 0 ? void 0 : _responseData$payment2.small_ticket_data
|
675
|
+
}
|
676
|
+
};
|
677
|
+
console.log('print_order_onOrderSynced_params>>>>', params);
|
678
|
+
webPrint(params, function (res) {
|
679
|
+
console.log('print_order_onOrderSynced_res>>>>', res);
|
680
|
+
});
|
681
|
+
} catch (error) {
|
682
|
+
console.error('print_order_onOrderSynced_error>>>>', error);
|
683
|
+
}
|
684
|
+
}
|
590
685
|
// onPaymentCancel(true);
|
591
|
-
case
|
686
|
+
case 12:
|
592
687
|
case "end":
|
593
|
-
return
|
688
|
+
return _context7.stop();
|
594
689
|
}
|
595
|
-
},
|
690
|
+
}, _callee7);
|
596
691
|
}));
|
597
|
-
return function handleWalletPassConfirmPay(
|
598
|
-
return
|
692
|
+
return function handleWalletPassConfirmPay(_x7) {
|
693
|
+
return _ref10.apply(this, arguments);
|
599
694
|
};
|
600
695
|
}();
|
601
696
|
|
602
697
|
// 处理 Save & Pay Later 的钱包余额确认
|
603
698
|
var handleSavePayLater = useCallback( /*#__PURE__*/function () {
|
604
|
-
var
|
605
|
-
|
606
|
-
|
699
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(action) {
|
700
|
+
var res;
|
701
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
702
|
+
while (1) switch (_context8.prev = _context8.next) {
|
607
703
|
case 0:
|
608
704
|
if (!(action === 'apply-deduct-now')) {
|
609
|
-
|
705
|
+
_context8.next = 4;
|
610
706
|
break;
|
611
707
|
}
|
612
708
|
console.log('立即应用并扣除钱包余额,然后保存稍后付款');
|
613
709
|
// 执行扣除逻辑
|
614
|
-
|
710
|
+
_context8.next = 13;
|
615
711
|
break;
|
616
712
|
case 4:
|
617
713
|
if (!(action === 'save-without-deduct')) {
|
618
|
-
|
714
|
+
_context8.next = 10;
|
619
715
|
break;
|
620
716
|
}
|
621
717
|
console.log('保存但不扣除钱包余额,稍后付款');
|
622
718
|
// 保存但不扣除,先把 os 里 voucher_id 的 payment 删除
|
623
|
-
|
719
|
+
_context8.next = 8;
|
624
720
|
return checkoutModule.updateVoucherPaymentItemsAsync([]);
|
625
721
|
case 8:
|
626
|
-
|
722
|
+
_context8.next = 13;
|
627
723
|
break;
|
628
724
|
case 10:
|
629
725
|
if (!(action === 'cancel')) {
|
630
|
-
|
726
|
+
_context8.next = 13;
|
631
727
|
break;
|
632
728
|
}
|
633
729
|
console.log('取消保存稍后付款');
|
634
|
-
return
|
730
|
+
return _context8.abrupt("return");
|
635
731
|
case 13:
|
636
732
|
if (!checkoutModule) {
|
637
|
-
|
733
|
+
_context8.next = 18;
|
638
734
|
break;
|
639
735
|
}
|
640
|
-
|
736
|
+
_context8.next = 16;
|
641
737
|
return checkoutModule.saveForLaterPaymentAsync();
|
642
738
|
case 16:
|
643
|
-
|
644
|
-
|
739
|
+
res = _context8.sent;
|
740
|
+
if (res.success) {
|
741
|
+
onPaymentCancel(true);
|
742
|
+
closePaymentResultToast();
|
743
|
+
}
|
744
|
+
case 18:
|
645
745
|
case "end":
|
646
|
-
return
|
746
|
+
return _context8.stop();
|
647
747
|
}
|
648
|
-
},
|
748
|
+
}, _callee8);
|
649
749
|
}));
|
650
|
-
return function (
|
651
|
-
return
|
750
|
+
return function (_x8) {
|
751
|
+
return _ref11.apply(this, arguments);
|
652
752
|
};
|
653
753
|
}(), [checkoutModule, onPaymentCancel]);
|
654
754
|
var moduleConfig = {
|
@@ -716,13 +816,13 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
716
816
|
}
|
717
817
|
}, [state, showPriceAdjustModal]);
|
718
818
|
var handleSelectWalletChange = useMemoizedFn( /*#__PURE__*/function () {
|
719
|
-
var
|
819
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(select) {
|
720
820
|
var voucherItems, data;
|
721
|
-
return _regeneratorRuntime().wrap(function
|
722
|
-
while (1) switch (
|
821
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
822
|
+
while (1) switch (_context9.prev = _context9.next) {
|
723
823
|
case 0:
|
724
824
|
if (!walletPassDetail.isShow) {
|
725
|
-
|
825
|
+
_context9.next = 7;
|
726
826
|
break;
|
727
827
|
}
|
728
828
|
voucherItems = [];
|
@@ -751,7 +851,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
751
851
|
title: 'handleSelectWalletChange checkoutModule updateVoucherPaymentItemsAsync',
|
752
852
|
metadata: {}
|
753
853
|
});
|
754
|
-
|
854
|
+
_context9.next = 6;
|
755
855
|
return checkoutModule.updateVoucherPaymentItemsAsync(voucherItems);
|
756
856
|
case 6:
|
757
857
|
// 更新钱包卡券数据
|
@@ -761,21 +861,21 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
761
861
|
}
|
762
862
|
case 7:
|
763
863
|
case "end":
|
764
|
-
return
|
864
|
+
return _context9.stop();
|
765
865
|
}
|
766
|
-
},
|
866
|
+
}, _callee9);
|
767
867
|
}));
|
768
|
-
return function (
|
769
|
-
return
|
868
|
+
return function (_x9) {
|
869
|
+
return _ref12.apply(this, arguments);
|
770
870
|
};
|
771
871
|
}());
|
772
872
|
|
773
873
|
// 手动折扣相关处理函数
|
774
874
|
var handlePriceAdjustConfirm = /*#__PURE__*/function () {
|
775
|
-
var
|
875
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(newPrice) {
|
776
876
|
var ScheduleModule, _getSumTotal2, productAmount, discountAmount;
|
777
|
-
return _regeneratorRuntime().wrap(function
|
778
|
-
while (1) switch (
|
877
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
878
|
+
while (1) switch (_context10.prev = _context10.next) {
|
779
879
|
case 0:
|
780
880
|
try {
|
781
881
|
if (checkoutModule && orderInfo !== null && orderInfo !== void 0 && orderInfo.totalAmount) {
|
@@ -806,51 +906,51 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
806
906
|
setShowPriceAdjustModal(false);
|
807
907
|
case 2:
|
808
908
|
case "end":
|
809
|
-
return
|
909
|
+
return _context10.stop();
|
810
910
|
}
|
811
|
-
},
|
911
|
+
}, _callee10);
|
812
912
|
}));
|
813
|
-
return function handlePriceAdjustConfirm(
|
814
|
-
return
|
913
|
+
return function handlePriceAdjustConfirm(_x10) {
|
914
|
+
return _ref13.apply(this, arguments);
|
815
915
|
};
|
816
916
|
}();
|
817
917
|
var handleButtonClick = /*#__PURE__*/function () {
|
818
|
-
var
|
918
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(key) {
|
819
919
|
var _savePayLaterHandlerR;
|
820
920
|
var data, isSynced, orderId, params, _paymentItems;
|
821
|
-
return _regeneratorRuntime().wrap(function
|
822
|
-
while (1) switch (
|
921
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
922
|
+
while (1) switch (_context11.prev = _context11.next) {
|
823
923
|
case 0:
|
824
924
|
console.log('handleButtonClick', key);
|
825
|
-
|
826
|
-
|
925
|
+
_context11.t0 = key;
|
926
|
+
_context11.next = _context11.t0 === 'order-note' ? 4 : _context11.t0 === 'send-link' ? 6 : _context11.t0 === 'print-receipt' ? 8 : _context11.t0 === 'manual-discount' ? 24 : _context11.t0 === 'save-pay-later' ? 38 : 40;
|
827
927
|
break;
|
828
928
|
case 4:
|
829
929
|
setNoteModalOpen(true);
|
830
|
-
return
|
930
|
+
return _context11.abrupt("break", 40);
|
831
931
|
case 6:
|
832
932
|
setPaymentLinkModalOpen(true);
|
833
|
-
return
|
933
|
+
return _context11.abrupt("break", 40);
|
834
934
|
case 8:
|
835
|
-
|
935
|
+
_context11.next = 10;
|
836
936
|
return checkoutModule.isCurrentOrderSynced();
|
837
937
|
case 10:
|
838
|
-
isSynced =
|
938
|
+
isSynced = _context11.sent;
|
839
939
|
if (isSynced) {
|
840
|
-
|
940
|
+
_context11.next = 17;
|
841
941
|
break;
|
842
942
|
}
|
843
|
-
|
943
|
+
_context11.next = 14;
|
844
944
|
return checkoutModule.manualSyncOrderAsync();
|
845
945
|
case 14:
|
846
|
-
data =
|
847
|
-
|
946
|
+
data = _context11.sent;
|
947
|
+
_context11.next = 21;
|
848
948
|
break;
|
849
949
|
case 17:
|
850
|
-
|
950
|
+
_context11.next = 19;
|
851
951
|
return checkoutModule.getCurrentOrderId();
|
852
952
|
case 19:
|
853
|
-
orderId =
|
953
|
+
orderId = _context11.sent;
|
854
954
|
data = {
|
855
955
|
orderId: orderId
|
856
956
|
};
|
@@ -875,47 +975,47 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
875
975
|
console.error('handleButtonClick_print-receipt_error>>>>', error);
|
876
976
|
}
|
877
977
|
}
|
878
|
-
return
|
978
|
+
return _context11.abrupt("break", 40);
|
879
979
|
case 24:
|
880
980
|
if (orderInfo !== null && orderInfo !== void 0 && orderInfo.totalAmount) {
|
881
|
-
|
981
|
+
_context11.next = 27;
|
882
982
|
break;
|
883
983
|
}
|
884
984
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.no-amount'));
|
885
|
-
return
|
985
|
+
return _context11.abrupt("return");
|
886
986
|
case 27:
|
887
|
-
|
987
|
+
_context11.next = 29;
|
888
988
|
return checkoutModule.getCurrentOrderPaymentItemsAsync();
|
889
989
|
case 29:
|
890
|
-
_paymentItems =
|
990
|
+
_paymentItems = _context11.sent;
|
891
991
|
if (!(_paymentItems !== null && _paymentItems !== void 0 && _paymentItems.length)) {
|
892
|
-
|
992
|
+
_context11.next = 33;
|
893
993
|
break;
|
894
994
|
}
|
895
995
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.has-payment-items'));
|
896
|
-
return
|
996
|
+
return _context11.abrupt("return");
|
897
997
|
case 33:
|
898
998
|
if (!(Number(customAmount) <= 0 && Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) >= 0)) {
|
899
|
-
|
999
|
+
_context11.next = 36;
|
900
1000
|
break;
|
901
1001
|
}
|
902
1002
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.no-amount'));
|
903
|
-
return
|
1003
|
+
return _context11.abrupt("return");
|
904
1004
|
case 36:
|
905
1005
|
setShowPriceAdjustModal(true);
|
906
|
-
return
|
1006
|
+
return _context11.abrupt("break", 40);
|
907
1007
|
case 38:
|
908
1008
|
// 通过 ref 调用 SavePayLaterHandler 的处理方法
|
909
1009
|
(_savePayLaterHandlerR = savePayLaterHandlerRef.current) === null || _savePayLaterHandlerR === void 0 || _savePayLaterHandlerR.handleSavePayLaterClick();
|
910
|
-
return
|
1010
|
+
return _context11.abrupt("break", 40);
|
911
1011
|
case 40:
|
912
1012
|
case "end":
|
913
|
-
return
|
1013
|
+
return _context11.stop();
|
914
1014
|
}
|
915
|
-
},
|
1015
|
+
}, _callee11);
|
916
1016
|
}));
|
917
|
-
return function handleButtonClick(
|
918
|
-
return
|
1017
|
+
return function handleButtonClick(_x11) {
|
1018
|
+
return _ref14.apply(this, arguments);
|
919
1019
|
};
|
920
1020
|
}();
|
921
1021
|
|
@@ -943,27 +1043,27 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
943
1043
|
};
|
944
1044
|
};
|
945
1045
|
var handleSendCustomerPaymentLink = /*#__PURE__*/function () {
|
946
|
-
var
|
1046
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(data) {
|
947
1047
|
var isCurrentOrderSynced, res;
|
948
|
-
return _regeneratorRuntime().wrap(function
|
949
|
-
while (1) switch (
|
1048
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
1049
|
+
while (1) switch (_context12.prev = _context12.next) {
|
950
1050
|
case 0:
|
951
1051
|
// 先检测订单是否同步过,如果没有,需要先手动下单
|
952
1052
|
isCurrentOrderSynced = checkoutModule.isCurrentOrderSynced();
|
953
1053
|
if (isCurrentOrderSynced) {
|
954
|
-
|
1054
|
+
_context12.next = 4;
|
955
1055
|
break;
|
956
1056
|
}
|
957
|
-
|
1057
|
+
_context12.next = 4;
|
958
1058
|
return checkoutModule.manualSyncOrderAsync();
|
959
1059
|
case 4:
|
960
|
-
|
1060
|
+
_context12.next = 6;
|
961
1061
|
return checkoutModule.sendCustomerPayLinkAsync({
|
962
1062
|
emails: data.emails,
|
963
1063
|
order_ids: [checkoutModule.getCurrentOrderId()]
|
964
1064
|
});
|
965
1065
|
case 6:
|
966
|
-
res =
|
1066
|
+
res = _context12.sent;
|
967
1067
|
// 支付链接发送成功 转 toC,这边可以关掉了
|
968
1068
|
if (res.success) {
|
969
1069
|
Toast === null || Toast === void 0 || Toast.success(locales.getText('pisell2.checkout.send-payment-link.success'));
|
@@ -973,12 +1073,12 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
973
1073
|
}
|
974
1074
|
case 8:
|
975
1075
|
case "end":
|
976
|
-
return
|
1076
|
+
return _context12.stop();
|
977
1077
|
}
|
978
|
-
},
|
1078
|
+
}, _callee12);
|
979
1079
|
}));
|
980
|
-
return function handleSendCustomerPaymentLink(
|
981
|
-
return
|
1080
|
+
return function handleSendCustomerPaymentLink(_x12) {
|
1081
|
+
return _ref15.apply(this, arguments);
|
982
1082
|
};
|
983
1083
|
}();
|
984
1084
|
var searchAndClientProps = useMemo(function () {
|
@@ -990,24 +1090,24 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
990
1090
|
return {};
|
991
1091
|
}, [paymentItems]);
|
992
1092
|
var roundingFunction = /*#__PURE__*/function () {
|
993
|
-
var
|
1093
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(amount) {
|
994
1094
|
var res;
|
995
|
-
return _regeneratorRuntime().wrap(function
|
996
|
-
while (1) switch (
|
1095
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
1096
|
+
while (1) switch (_context13.prev = _context13.next) {
|
997
1097
|
case 0:
|
998
|
-
|
1098
|
+
_context13.next = 2;
|
999
1099
|
return checkoutModule.roundAmountAsync(amount);
|
1000
1100
|
case 2:
|
1001
|
-
res =
|
1002
|
-
return
|
1101
|
+
res = _context13.sent;
|
1102
|
+
return _context13.abrupt("return", res);
|
1003
1103
|
case 4:
|
1004
1104
|
case "end":
|
1005
|
-
return
|
1105
|
+
return _context13.stop();
|
1006
1106
|
}
|
1007
|
-
},
|
1107
|
+
}, _callee13);
|
1008
1108
|
}));
|
1009
|
-
return function roundingFunction(
|
1010
|
-
return
|
1109
|
+
return function roundingFunction(_x13) {
|
1110
|
+
return _ref16.apply(this, arguments);
|
1011
1111
|
};
|
1012
1112
|
}();
|
1013
1113
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -1050,6 +1150,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1050
1150
|
gridRow: '1'
|
1051
1151
|
} : {}
|
1052
1152
|
}, /*#__PURE__*/React.createElement(CashPaymentModule, {
|
1153
|
+
isModalOpen: isModalOpen,
|
1053
1154
|
amountSymbol: state.amountSymbol,
|
1054
1155
|
orderInfo: orderInfo || undefined,
|
1055
1156
|
onPaymentComplete: handleAddCashPayment,
|
@@ -1134,20 +1235,20 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1134
1235
|
|
1135
1236
|
// 主要的支付弹窗组件
|
1136
1237
|
|
1137
|
-
var PaymentModal = function PaymentModal(
|
1238
|
+
var PaymentModal = function PaymentModal(_ref17) {
|
1138
1239
|
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper;
|
1139
|
-
var open =
|
1140
|
-
data =
|
1141
|
-
callback =
|
1142
|
-
onClose =
|
1143
|
-
dispatch =
|
1144
|
-
state =
|
1240
|
+
var open = _ref17.open,
|
1241
|
+
data = _ref17.data,
|
1242
|
+
callback = _ref17.callback,
|
1243
|
+
onClose = _ref17.onClose,
|
1244
|
+
dispatch = _ref17.dispatch,
|
1245
|
+
state = _ref17.state;
|
1145
1246
|
var context = useEngineContext();
|
1146
1247
|
locales.init(checkoutLocales, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get('umi_locale')) || 'en');
|
1147
|
-
var
|
1148
|
-
pisellos =
|
1149
|
-
getData =
|
1150
|
-
interaction =
|
1248
|
+
var _ref18 = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
1249
|
+
pisellos = _ref18.pisellos,
|
1250
|
+
getData = _ref18.getData,
|
1251
|
+
interaction = _ref18.interaction;
|
1151
1252
|
var _useState21 = useState(null),
|
1152
1253
|
_useState22 = _slicedToArray(_useState21, 2),
|
1153
1254
|
orderInfo = _useState22[0],
|
@@ -1172,10 +1273,10 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1172
1273
|
|
1173
1274
|
// 重试处理函数(逻辑由用户自己实现)
|
1174
1275
|
var handleRetry = /*#__PURE__*/function () {
|
1175
|
-
var
|
1276
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
1176
1277
|
var checkoutModule, res;
|
1177
|
-
return _regeneratorRuntime().wrap(function
|
1178
|
-
while (1) switch (
|
1278
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
1279
|
+
while (1) switch (_context14.prev = _context14.next) {
|
1179
1280
|
case 0:
|
1180
1281
|
// TODO: 用户在这里实现重试逻辑
|
1181
1282
|
// console.log('重试按钮被点击,请在这里添加重试逻辑');
|
@@ -1187,10 +1288,10 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1187
1288
|
// // 失败保持弹窗打开,允许继续重试
|
1188
1289
|
// }
|
1189
1290
|
checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1190
|
-
|
1291
|
+
_context14.next = 3;
|
1191
1292
|
return checkoutModule === null || checkoutModule === void 0 ? void 0 : checkoutModule.manualSyncOrderAsync();
|
1192
1293
|
case 3:
|
1193
|
-
res =
|
1294
|
+
res = _context14.sent;
|
1194
1295
|
console.log(res);
|
1195
1296
|
if (res.success) {
|
1196
1297
|
setShowRetryModal(false);
|
@@ -1199,12 +1300,12 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1199
1300
|
}
|
1200
1301
|
case 6:
|
1201
1302
|
case "end":
|
1202
|
-
return
|
1303
|
+
return _context14.stop();
|
1203
1304
|
}
|
1204
|
-
},
|
1305
|
+
}, _callee14);
|
1205
1306
|
}));
|
1206
1307
|
return function handleRetry() {
|
1207
|
-
return
|
1308
|
+
return _ref19.apply(this, arguments);
|
1208
1309
|
};
|
1209
1310
|
}();
|
1210
1311
|
|
@@ -1266,13 +1367,13 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1266
1367
|
|
1267
1368
|
// 订单备注相关处理函数
|
1268
1369
|
var handleNoteConfirm = /*#__PURE__*/function () {
|
1269
|
-
var
|
1370
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(noteValue) {
|
1270
1371
|
var checkoutModule, orderId, _checkoutModule$editO, _checkoutModule, _checkoutModule$updat;
|
1271
|
-
return _regeneratorRuntime().wrap(function
|
1272
|
-
while (1) switch (
|
1372
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
1373
|
+
while (1) switch (_context15.prev = _context15.next) {
|
1273
1374
|
case 0:
|
1274
1375
|
if (!(noteModalSource === 'payment-result-toast')) {
|
1275
|
-
|
1376
|
+
_context15.next = 6;
|
1276
1377
|
break;
|
1277
1378
|
}
|
1278
1379
|
checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
@@ -1283,15 +1384,15 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1283
1384
|
Toast === null || Toast === void 0 || Toast.success(locales.getText('pisell2.checkout.order-note.updated-successfully'));
|
1284
1385
|
}
|
1285
1386
|
setNoteModalOpen(false);
|
1286
|
-
return
|
1387
|
+
return _context15.abrupt("return");
|
1287
1388
|
case 6:
|
1288
|
-
|
1389
|
+
_context15.prev = 6;
|
1289
1390
|
_checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1290
1391
|
if (!_checkoutModule) {
|
1291
|
-
|
1392
|
+
_context15.next = 13;
|
1292
1393
|
break;
|
1293
1394
|
}
|
1294
|
-
|
1395
|
+
_context15.next = 11;
|
1295
1396
|
return (_checkoutModule$updat = _checkoutModule.updateOrderNoteAsync) === null || _checkoutModule$updat === void 0 ? void 0 : _checkoutModule$updat.call(_checkoutModule, noteValue);
|
1296
1397
|
case 11:
|
1297
1398
|
setOrderNote(noteValue);
|
@@ -1317,38 +1418,38 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1317
1418
|
console.log('Note added from payment content');
|
1318
1419
|
// 在支付内容中打开的,执行常规处理逻辑
|
1319
1420
|
}
|
1320
|
-
|
1421
|
+
_context15.next = 21;
|
1321
1422
|
break;
|
1322
1423
|
case 17:
|
1323
|
-
|
1324
|
-
|
1325
|
-
console.error('Failed to update order note:',
|
1424
|
+
_context15.prev = 17;
|
1425
|
+
_context15.t0 = _context15["catch"](6);
|
1426
|
+
console.error('Failed to update order note:', _context15.t0);
|
1326
1427
|
Toast === null || Toast === void 0 || Toast.error(locales.getText('pisell2.checkout.order-note.update-failed'));
|
1327
1428
|
case 21:
|
1328
1429
|
setNoteModalOpen(false);
|
1329
1430
|
case 22:
|
1330
1431
|
case "end":
|
1331
|
-
return
|
1432
|
+
return _context15.stop();
|
1332
1433
|
}
|
1333
|
-
},
|
1434
|
+
}, _callee15, null, [[6, 17]]);
|
1334
1435
|
}));
|
1335
|
-
return function handleNoteConfirm(
|
1336
|
-
return
|
1436
|
+
return function handleNoteConfirm(_x14) {
|
1437
|
+
return _ref20.apply(this, arguments);
|
1337
1438
|
};
|
1338
1439
|
}();
|
1339
1440
|
var handleNoteDelete = /*#__PURE__*/function () {
|
1340
|
-
var
|
1441
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
1341
1442
|
var checkoutModule, _checkoutModule$updat2;
|
1342
|
-
return _regeneratorRuntime().wrap(function
|
1343
|
-
while (1) switch (
|
1443
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
1444
|
+
while (1) switch (_context16.prev = _context16.next) {
|
1344
1445
|
case 0:
|
1345
|
-
|
1446
|
+
_context16.prev = 0;
|
1346
1447
|
checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1347
1448
|
if (!checkoutModule) {
|
1348
|
-
|
1449
|
+
_context16.next = 7;
|
1349
1450
|
break;
|
1350
1451
|
}
|
1351
|
-
|
1452
|
+
_context16.next = 5;
|
1352
1453
|
return (_checkoutModule$updat2 = checkoutModule.updateOrderNoteAsync) === null || _checkoutModule$updat2 === void 0 ? void 0 : _checkoutModule$updat2.call(checkoutModule, '');
|
1353
1454
|
case 5:
|
1354
1455
|
setOrderNote('');
|
@@ -1364,23 +1465,23 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1364
1465
|
}
|
1365
1466
|
});
|
1366
1467
|
}
|
1367
|
-
|
1468
|
+
_context16.next = 14;
|
1368
1469
|
break;
|
1369
1470
|
case 10:
|
1370
|
-
|
1371
|
-
|
1372
|
-
console.error('Failed to delete order note:',
|
1471
|
+
_context16.prev = 10;
|
1472
|
+
_context16.t0 = _context16["catch"](0);
|
1473
|
+
console.error('Failed to delete order note:', _context16.t0);
|
1373
1474
|
Toast === null || Toast === void 0 || Toast.error(locales.getText('pisell2.checkout.order-note.delete-failed'));
|
1374
1475
|
case 14:
|
1375
1476
|
setNoteModalOpen(false);
|
1376
1477
|
case 15:
|
1377
1478
|
case "end":
|
1378
|
-
return
|
1479
|
+
return _context16.stop();
|
1379
1480
|
}
|
1380
|
-
},
|
1481
|
+
}, _callee16, null, [[0, 10]]);
|
1381
1482
|
}));
|
1382
1483
|
return function handleNoteDelete() {
|
1383
|
-
return
|
1484
|
+
return _ref21.apply(this, arguments);
|
1384
1485
|
};
|
1385
1486
|
}();
|
1386
1487
|
var handleNoteCancel = function handleNoteCancel() {
|
@@ -1486,27 +1587,28 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1486
1587
|
_useState38 = _slicedToArray(_useState37, 2),
|
1487
1588
|
isLocalOrderCreated = _useState38[0],
|
1488
1589
|
setIsLocalOrderCreated = _useState38[1];
|
1590
|
+
var unsubscribeRef = useRef(undefined);
|
1489
1591
|
|
1490
1592
|
// 初始化checkout数据
|
1491
1593
|
useEffect(function () {
|
1492
1594
|
var initCheckoutData = /*#__PURE__*/function () {
|
1493
|
-
var
|
1494
|
-
var checkout, _newData$subtotal_inf, shop_wallet_pass_id, newData,
|
1495
|
-
return _regeneratorRuntime().wrap(function
|
1496
|
-
while (1) switch (
|
1595
|
+
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
1596
|
+
var checkout, _newData$subtotal_inf, shop_wallet_pass_id, newData, _orderInfo2, _data$subtotal_info, _orderInfo3;
|
1597
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
1598
|
+
while (1) switch (_context17.prev = _context17.next) {
|
1497
1599
|
case 0:
|
1498
|
-
|
1600
|
+
_context17.prev = 0;
|
1499
1601
|
// 获取 checkout 模块并处理订单数据
|
1500
1602
|
checkout = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1501
1603
|
if (!(checkout && data && !isLocalOrderCreated)) {
|
1502
|
-
|
1604
|
+
_context17.next = 19;
|
1503
1605
|
break;
|
1504
1606
|
}
|
1505
1607
|
setIsLocalOrderCreated(true);
|
1506
|
-
|
1608
|
+
_context17.next = 6;
|
1507
1609
|
return getShopWalletPassId(interaction);
|
1508
1610
|
case 6:
|
1509
|
-
shop_wallet_pass_id =
|
1611
|
+
shop_wallet_pass_id = _context17.sent;
|
1510
1612
|
checkout.setOtherParams({
|
1511
1613
|
is_price_include_tax: getData('is_price_include_tax'),
|
1512
1614
|
tax_rate: getData('tax_rate') || '10',
|
@@ -1522,7 +1624,7 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1522
1624
|
console.time('initCheckoutData');
|
1523
1625
|
newData = cloneDeep(data); // setTotalAmount(newData.total.expectAmount);
|
1524
1626
|
// 先往 checkout 解决方案推送一条 local 数据
|
1525
|
-
|
1627
|
+
_context17.next = 12;
|
1526
1628
|
return checkout.createLocalOrderAsync({
|
1527
1629
|
orderData: newData.order_info,
|
1528
1630
|
cartSummary: (_newData$subtotal_inf = newData.subtotal_info) === null || _newData$subtotal_inf === void 0 ? void 0 : _newData$subtotal_inf.subTotalList,
|
@@ -1533,15 +1635,18 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1533
1635
|
console.timeEnd('initCheckoutData');
|
1534
1636
|
|
1535
1637
|
// 获取订单总金额
|
1536
|
-
|
1537
|
-
if (
|
1538
|
-
setTotalAmount(
|
1638
|
+
_orderInfo2 = checkout.getCurrentOrderInfo();
|
1639
|
+
if (_orderInfo2 && _orderInfo2.totalAmount) {
|
1640
|
+
setTotalAmount(_orderInfo2.totalAmount);
|
1539
1641
|
}
|
1540
|
-
setOrderInfo(
|
1642
|
+
setOrderInfo(_orderInfo2);
|
1541
1643
|
// 监听订单同步完成,同步完成后显示订单完成 toast,关闭当前弹窗
|
1542
|
-
checkout.core.effects.on('checkout:onOrderSynced', function (data) {
|
1543
|
-
var _data$response, _responseData$
|
1544
|
-
|
1644
|
+
unsubscribeRef.current = checkout.core.effects.on('checkout:onOrderSynced', function (data) {
|
1645
|
+
var _data$response, _responseData$payment3;
|
1646
|
+
// 获取支付状态和相关信息
|
1647
|
+
var responseData = (_data$response = data.response) === null || _data$response === void 0 ? void 0 : _data$response.data;
|
1648
|
+
// 获取支付状态
|
1649
|
+
var paymentStatus = responseData === null || responseData === void 0 ? void 0 : responseData.payment_status;
|
1545
1650
|
if (data.isManual) return;
|
1546
1651
|
handlePaymentComplete(data);
|
1547
1652
|
// 如果正在显示现金支付 toast,跳过自动关闭逻辑
|
@@ -1549,20 +1654,37 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1549
1654
|
return;
|
1550
1655
|
}
|
1551
1656
|
|
1552
|
-
// 获取支付状态和相关信息
|
1553
|
-
var responseData = (_data$response = data.response) === null || _data$response === void 0 ? void 0 : _data$response.data;
|
1554
|
-
// 获取支付状态
|
1555
|
-
var paymentStatus = responseData === null || responseData === void 0 ? void 0 : responseData.payment_status;
|
1556
1657
|
// 获取订单总金额
|
1557
1658
|
var orderTotalAmount = Number((responseData === null || responseData === void 0 ? void 0 : responseData.total_amount) || 0);
|
1558
|
-
|
1559
|
-
var currentChangeGivenAmount = Number((responseData === null || responseData === void 0 || (_responseData$
|
1659
|
+
var gapAmount = Number((responseData === null || responseData === void 0 ? void 0 : responseData.amount_gap) || 0);
|
1660
|
+
var currentChangeGivenAmount = Number((responseData === null || responseData === void 0 || (_responseData$payment3 = responseData.payment_info) === null || _responseData$payment3 === void 0 ? void 0 : _responseData$payment3.current_change_given_amount) || 0);
|
1560
1661
|
// const changeDue = Number(responseData?.amount_gap || 0);
|
1561
1662
|
// 获取失败原因
|
1562
1663
|
var failureReason = responseData === null || responseData === void 0 ? void 0 : responseData.failure_reason;
|
1563
1664
|
|
1564
1665
|
// 根据支付状态弹出对应的支付结果toast
|
1565
1666
|
if (paymentStatus) {
|
1667
|
+
// 打印订单完整信息
|
1668
|
+
console.log('print_order_onOrderSynced>>>>', responseData);
|
1669
|
+
try {
|
1670
|
+
var _responseData$payment4, _responseData$payment5;
|
1671
|
+
var params = {
|
1672
|
+
type: '99',
|
1673
|
+
// 打印订单全部信息
|
1674
|
+
data: {
|
1675
|
+
order_id: responseData.order_id,
|
1676
|
+
machine_code_print_info: responseData === null || responseData === void 0 || (_responseData$payment4 = responseData.payment_info) === null || _responseData$payment4 === void 0 ? void 0 : _responseData$payment4.machine_code_info,
|
1677
|
+
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment5 = responseData.payment_info) === null || _responseData$payment5 === void 0 ? void 0 : _responseData$payment5.small_ticket_data
|
1678
|
+
}
|
1679
|
+
};
|
1680
|
+
console.log('print_order_onOrderSynced_params>>>>', params);
|
1681
|
+
webPrint(params, function (res) {
|
1682
|
+
console.log('print_order_onOrderSynced_res>>>>', res);
|
1683
|
+
});
|
1684
|
+
} catch (error) {
|
1685
|
+
console.error('print_order_onOrderSynced_error>>>>', error);
|
1686
|
+
}
|
1687
|
+
|
1566
1688
|
// 确定支付状态
|
1567
1689
|
var statusClassName = calculateStatusClassName(paymentStatus);
|
1568
1690
|
var autoCloseConfig = calculateAutoCloseConfig(paymentStatus, !!currentChangeGivenAmount);
|
@@ -1571,7 +1693,7 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1571
1693
|
displayPaymentResultToast({
|
1572
1694
|
paymentStatus: paymentStatus,
|
1573
1695
|
orderTotalAmount: orderTotalAmount,
|
1574
|
-
gapAmount: currentChangeGivenAmount,
|
1696
|
+
gapAmount: paymentStatus === 'partially_paid' ? gapAmount : currentChangeGivenAmount,
|
1575
1697
|
failureReason: failureReason,
|
1576
1698
|
autoCloseConfig: autoCloseConfig,
|
1577
1699
|
actionButtons: generateActionButtons(paymentStatus)
|
@@ -1587,48 +1709,26 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1587
1709
|
}
|
1588
1710
|
});
|
1589
1711
|
handlePaymentComplete(paymentResult);
|
1590
|
-
|
1591
|
-
// 打印订单完整信息
|
1592
|
-
console.log('print_order_onOrderSynced>>>>', responseData);
|
1593
|
-
try {
|
1594
|
-
var _responseData$payment2, _responseData$payment3;
|
1595
|
-
var params = {
|
1596
|
-
type: '99',
|
1597
|
-
// 打印订单全部信息
|
1598
|
-
data: {
|
1599
|
-
order_id: responseData.order_id,
|
1600
|
-
machine_code_print_info: responseData === null || responseData === void 0 || (_responseData$payment2 = responseData.payment_info) === null || _responseData$payment2 === void 0 ? void 0 : _responseData$payment2.machine_code_info,
|
1601
|
-
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment3 = responseData.payment_info) === null || _responseData$payment3 === void 0 ? void 0 : _responseData$payment3.small_ticket_data
|
1602
|
-
}
|
1603
|
-
};
|
1604
|
-
console.log('print_order_onOrderSynced_params>>>>', params);
|
1605
|
-
webPrint(params, function (res) {
|
1606
|
-
console.log('print_order_onOrderSynced_res>>>>', res);
|
1607
|
-
});
|
1608
|
-
} catch (error) {
|
1609
|
-
console.error('print_order_onOrderSynced_error>>>>', error);
|
1610
|
-
}
|
1611
1712
|
} else {
|
1612
1713
|
handlePaymentComplete(data);
|
1613
1714
|
}
|
1614
|
-
|
1615
1715
|
// 可以在这里执行同步完成后的业务逻辑
|
1616
1716
|
// 比如:通知其他系统、更新UI状态等
|
1617
1717
|
});
|
1618
|
-
|
1718
|
+
_context17.next = 30;
|
1619
1719
|
break;
|
1620
1720
|
case 19:
|
1621
1721
|
if (!isLocalOrderCreated) {
|
1622
|
-
|
1722
|
+
_context17.next = 30;
|
1623
1723
|
break;
|
1624
1724
|
}
|
1625
1725
|
// // 如果本地订单已创建,这时候还更新了 data,则需要销毁当前的订单数据,然后更新新的订单数据了
|
1626
1726
|
console.log('🔄 PaymentModal: data changed, updating checkout data...');
|
1627
1727
|
setIsLocalOrderCreated(false);
|
1628
|
-
|
1728
|
+
_context17.next = 24;
|
1629
1729
|
return checkout.cancelCurrentOrderAsync();
|
1630
1730
|
case 24:
|
1631
|
-
|
1731
|
+
_context17.next = 26;
|
1632
1732
|
return checkout.createLocalOrderAsync({
|
1633
1733
|
orderData: data === null || data === void 0 ? void 0 : data.order_info,
|
1634
1734
|
cartSummary: data === null || data === void 0 || (_data$subtotal_info = data.subtotal_info) === null || _data$subtotal_info === void 0 ? void 0 : _data$subtotal_info.subTotalList,
|
@@ -1637,32 +1737,38 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1637
1737
|
});
|
1638
1738
|
case 26:
|
1639
1739
|
// 获取订单总金额
|
1640
|
-
|
1641
|
-
if (
|
1642
|
-
setTotalAmount(
|
1740
|
+
_orderInfo3 = checkout.getCurrentOrderInfo();
|
1741
|
+
if (_orderInfo3 && _orderInfo3.totalAmount) {
|
1742
|
+
setTotalAmount(_orderInfo3.totalAmount);
|
1643
1743
|
}
|
1644
|
-
setOrderInfo(
|
1744
|
+
setOrderInfo(_orderInfo3);
|
1645
1745
|
setIsLocalOrderCreated(true);
|
1646
1746
|
case 30:
|
1647
|
-
|
1747
|
+
_context17.next = 35;
|
1648
1748
|
break;
|
1649
1749
|
case 32:
|
1650
|
-
|
1651
|
-
|
1652
|
-
console.error('Failed to initialize checkout data:',
|
1750
|
+
_context17.prev = 32;
|
1751
|
+
_context17.t0 = _context17["catch"](0);
|
1752
|
+
console.error('Failed to initialize checkout data:', _context17.t0);
|
1653
1753
|
case 35:
|
1654
1754
|
case "end":
|
1655
|
-
return
|
1755
|
+
return _context17.stop();
|
1656
1756
|
}
|
1657
|
-
},
|
1757
|
+
}, _callee17, null, [[0, 32]]);
|
1658
1758
|
}));
|
1659
1759
|
return function initCheckoutData() {
|
1660
|
-
return
|
1760
|
+
return _ref22.apply(this, arguments);
|
1661
1761
|
};
|
1662
1762
|
}();
|
1663
1763
|
if (data && open) {
|
1664
1764
|
initCheckoutData();
|
1665
1765
|
}
|
1766
|
+
return function () {
|
1767
|
+
if (typeof unsubscribeRef.current === 'function') {
|
1768
|
+
var _unsubscribeRef$curre;
|
1769
|
+
(_unsubscribeRef$curre = unsubscribeRef.current) === null || _unsubscribeRef$curre === void 0 || _unsubscribeRef$curre.call(unsubscribeRef);
|
1770
|
+
}
|
1771
|
+
};
|
1666
1772
|
}, [data, open]);
|
1667
1773
|
|
1668
1774
|
// 创建PaymentResultToast配置对象
|
@@ -1684,11 +1790,11 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1684
1790
|
|
1685
1791
|
// 通用回调函数
|
1686
1792
|
var handleDetailsClick = /*#__PURE__*/function () {
|
1687
|
-
var
|
1793
|
+
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
1688
1794
|
var _context$appHelper2;
|
1689
1795
|
var _context$appHelper$ut5, isTerminal, isWebPos, checkout, orderId;
|
1690
|
-
return _regeneratorRuntime().wrap(function
|
1691
|
-
while (1) switch (
|
1796
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
1797
|
+
while (1) switch (_context18.prev = _context18.next) {
|
1692
1798
|
case 0:
|
1693
1799
|
setTimeout(function () {
|
1694
1800
|
// 关闭支付结果toast
|
@@ -1698,15 +1804,15 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1698
1804
|
}, 0);
|
1699
1805
|
_context$appHelper$ut5 = (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils, isTerminal = _context$appHelper$ut5.isTerminal, isWebPos = _context$appHelper$ut5.isWebPos;
|
1700
1806
|
if (!(isTerminal !== null && isTerminal !== void 0 && isTerminal())) {
|
1701
|
-
|
1807
|
+
_context18.next = 8;
|
1702
1808
|
break;
|
1703
1809
|
}
|
1704
1810
|
checkout = pisellos.getModule('checkout');
|
1705
|
-
|
1811
|
+
_context18.next = 6;
|
1706
1812
|
return checkout.getCurrentOrderId();
|
1707
1813
|
case 6:
|
1708
|
-
orderId =
|
1709
|
-
return
|
1814
|
+
orderId = _context18.sent;
|
1815
|
+
return _context18.abrupt("return", interaction.utils.postMessageToApp({
|
1710
1816
|
module: 'booking',
|
1711
1817
|
key: 'view_order',
|
1712
1818
|
data: {
|
@@ -1716,46 +1822,46 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1716
1822
|
}));
|
1717
1823
|
case 8:
|
1718
1824
|
case "end":
|
1719
|
-
return
|
1825
|
+
return _context18.stop();
|
1720
1826
|
}
|
1721
|
-
},
|
1827
|
+
}, _callee18);
|
1722
1828
|
}));
|
1723
1829
|
return function handleDetailsClick() {
|
1724
|
-
return
|
1830
|
+
return _ref23.apply(this, arguments);
|
1725
1831
|
};
|
1726
1832
|
}();
|
1727
1833
|
var handlePrintReceiptClick = /*#__PURE__*/function () {
|
1728
|
-
var
|
1834
|
+
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
1729
1835
|
var checkoutModule, data, isSynced, orderId, params;
|
1730
|
-
return _regeneratorRuntime().wrap(function
|
1731
|
-
while (1) switch (
|
1836
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
1837
|
+
while (1) switch (_context19.prev = _context19.next) {
|
1732
1838
|
case 0:
|
1733
1839
|
checkoutModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1734
1840
|
if (checkoutModule) {
|
1735
|
-
|
1841
|
+
_context19.next = 3;
|
1736
1842
|
break;
|
1737
1843
|
}
|
1738
|
-
return
|
1844
|
+
return _context19.abrupt("return");
|
1739
1845
|
case 3:
|
1740
|
-
|
1846
|
+
_context19.next = 5;
|
1741
1847
|
return checkoutModule.isCurrentOrderSynced();
|
1742
1848
|
case 5:
|
1743
|
-
isSynced =
|
1849
|
+
isSynced = _context19.sent;
|
1744
1850
|
if (isSynced) {
|
1745
|
-
|
1851
|
+
_context19.next = 12;
|
1746
1852
|
break;
|
1747
1853
|
}
|
1748
|
-
|
1854
|
+
_context19.next = 9;
|
1749
1855
|
return checkoutModule.manualSyncOrderAsync();
|
1750
1856
|
case 9:
|
1751
|
-
data =
|
1752
|
-
|
1857
|
+
data = _context19.sent;
|
1858
|
+
_context19.next = 16;
|
1753
1859
|
break;
|
1754
1860
|
case 12:
|
1755
|
-
|
1861
|
+
_context19.next = 14;
|
1756
1862
|
return checkoutModule.getCurrentOrderId();
|
1757
1863
|
case 14:
|
1758
|
-
orderId =
|
1864
|
+
orderId = _context19.sent;
|
1759
1865
|
data = {
|
1760
1866
|
orderId: orderId
|
1761
1867
|
};
|
@@ -1781,12 +1887,12 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1781
1887
|
}
|
1782
1888
|
case 17:
|
1783
1889
|
case "end":
|
1784
|
-
return
|
1890
|
+
return _context19.stop();
|
1785
1891
|
}
|
1786
|
-
},
|
1892
|
+
}, _callee19);
|
1787
1893
|
}));
|
1788
1894
|
return function handlePrintReceiptClick() {
|
1789
|
-
return
|
1895
|
+
return _ref24.apply(this, arguments);
|
1790
1896
|
};
|
1791
1897
|
}();
|
1792
1898
|
var handleRetryClick = function handleRetryClick() {
|
@@ -1798,9 +1904,14 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1798
1904
|
// 这里可以添加更改支付方式的逻辑
|
1799
1905
|
};
|
1800
1906
|
var handleSaveAsPartialPaidClick = function handleSaveAsPartialPaidClick() {
|
1801
|
-
|
1907
|
+
var _paymentContentRef$cu;
|
1908
|
+
// console.log(
|
1909
|
+
// locales.getText('payment.result.actions.saveAsPartialPaidClicked')
|
1910
|
+
// );
|
1911
|
+
// savePayLaterHandlerRef.current?.handleSavePayLaterClick();
|
1802
1912
|
// 直接关闭弹窗
|
1803
|
-
handleToastClose();
|
1913
|
+
// handleToastClose();
|
1914
|
+
(_paymentContentRef$cu = paymentContentRef.current) === null || _paymentContentRef$cu === void 0 || _paymentContentRef$cu.handleButtonClick('save-pay-later');
|
1804
1915
|
};
|
1805
1916
|
var handleContinuePaymentClick = function handleContinuePaymentClick() {
|
1806
1917
|
console.log(locales.getText('payment.result.actions.continuePaymentClicked'));
|
@@ -1862,17 +1973,19 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
1862
1973
|
case 'partially_paid':
|
1863
1974
|
// 部分支付状态
|
1864
1975
|
return [[{
|
1865
|
-
id: '
|
1976
|
+
id: 'saveAsPartialPaid',
|
1866
1977
|
buttonProps: {
|
1867
1978
|
className: getClassName('action-button'),
|
1868
1979
|
onClick: handleSaveAsPartialPaidClick,
|
1869
1980
|
children: locales.getText('payment.result.saveAsPartialPaid')
|
1870
1981
|
}
|
1871
1982
|
}, {
|
1872
|
-
id: '
|
1983
|
+
id: 'continuePayment',
|
1873
1984
|
buttonProps: {
|
1874
1985
|
className: getClassName('action-button'),
|
1875
|
-
onClick:
|
1986
|
+
onClick: function onClick() {
|
1987
|
+
closePaymentResultToast();
|
1988
|
+
},
|
1876
1989
|
children: locales.getText('payment.result.continuePayment')
|
1877
1990
|
}
|
1878
1991
|
}, {
|
@@ -2056,7 +2169,9 @@ var PaymentModal = function PaymentModal(_ref16) {
|
|
2056
2169
|
dynamicMaxHeight: dynamicMaxHeight,
|
2057
2170
|
onOrderSyncFailed: function onOrderSyncFailed() {
|
2058
2171
|
return setShowRetryModal(true);
|
2059
|
-
}
|
2172
|
+
},
|
2173
|
+
generateActionButtons: generateActionButtons,
|
2174
|
+
paymentResultToastConfig: paymentResultToastConfig
|
2060
2175
|
})), noteModalOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NoteModal, {
|
2061
2176
|
open: noteModalOpen,
|
2062
2177
|
title: locales.getText('pisell2.text.add-order-notes'),
|