@pisell/private-materials 6.5.1 → 6.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.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 +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +8 -4
- package/es/components/booking/components/customiseItemModal/index.js +2 -2
- package/es/components/booking/components/footer/index.js +71 -49
- package/es/components/booking/components/voucher/index.js +18 -4
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +33 -20
- package/es/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +726 -442
- package/es/components/checkout/PaymentPlugin.d.ts +1 -0
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/es/components/checkout/components/AdditionalModule/index.js +80 -49
- package/es/components/checkout/components/AdditionalModule/index.less +33 -34
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
- package/es/components/checkout/components/AdditionalModule/locales.js +7 -4
- package/es/components/checkout/components/AmountSummary/index.d.ts +2 -1
- package/es/components/checkout/components/AmountSummary/index.js +69 -31
- package/es/components/checkout/components/AmountSummary/index.less +27 -9
- package/es/components/checkout/components/CashPaymentModule/index.less +0 -2
- package/es/components/checkout/components/PaymentDetailModal/index.js +55 -10
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +40 -25
- package/es/components/checkout/components/PaymentOptionsModule/index.less +11 -6
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +511 -81
- package/es/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +89 -34
- package/es/components/checkout/components/PaymentResultToast/index.less +445 -77
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
- package/es/components/checkout/components/PaymentResultToast/utils.js +81 -2
- package/es/components/checkout/components/SearchAndClientModule/index.js +17 -16
- package/es/components/checkout/components/SearchAndClientModule/index.less +29 -8
- package/es/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +3 -1
- package/es/components/checkout/components/WalletPassModule/index.less +3 -3
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.d.ts +1 -1
- package/es/components/checkout/index.js +1 -1
- package/es/components/checkout/index.less +56 -38
- package/es/components/checkout/locales.d.ts +6 -0
- package/es/components/checkout/locales.js +9 -3
- package/es/components/checkout/payment-modal-utils.js +5 -5
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
- package/es/components/checkout/utils/PaymentResultToastUtils.js +111 -72
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- 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/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/Information/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/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/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/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +91 -58
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +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/pay/toC/model.d.ts +1 -9
- 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/productExtension/fields/Actor/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/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/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 +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +5 -4
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +1 -1
- package/es/components/ticketBooking/components/menuBar/index.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +4 -3
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +4 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/plus/clientCard/index.js +3 -2
- package/es/plus/clientCard/index.less +3 -32
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +9 -12
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.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 +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +6 -3
- package/lib/components/booking/components/customiseItemModal/index.js +2 -2
- package/lib/components/booking/components/footer/index.js +11 -7
- package/lib/components/booking/components/voucher/index.js +15 -3
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +16 -5
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +2 -2
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +241 -111
- package/lib/components/checkout/PaymentPlugin.d.ts +1 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +98 -34
- package/lib/components/checkout/components/AdditionalModule/index.less +33 -34
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +3 -0
- package/lib/components/checkout/components/AdditionalModule/locales.js +7 -4
- package/lib/components/checkout/components/AmountSummary/index.d.ts +2 -1
- package/lib/components/checkout/components/AmountSummary/index.js +103 -47
- package/lib/components/checkout/components/AmountSummary/index.less +27 -9
- package/lib/components/checkout/components/CashPaymentModule/index.less +0 -2
- package/lib/components/checkout/components/PaymentDetailModal/index.js +56 -11
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -8
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +11 -6
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +42 -9
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +278 -72
- package/lib/components/checkout/components/PaymentResultToast/index.d.ts +2 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +68 -21
- package/lib/components/checkout/components/PaymentResultToast/index.less +445 -77
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +3 -3
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +26 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.js +58 -4
- package/lib/components/checkout/components/SearchAndClientModule/index.js +17 -15
- package/lib/components/checkout/components/SearchAndClientModule/index.less +29 -8
- package/lib/components/checkout/components/WalletPassModule/components/WalletPassHeader/index.js +12 -2
- package/lib/components/checkout/components/WalletPassModule/index.less +3 -3
- package/lib/components/checkout/hooks/useWalletPass.js +2 -2
- package/lib/components/checkout/index.d.ts +1 -1
- package/lib/components/checkout/index.js +2 -0
- package/lib/components/checkout/index.less +56 -38
- package/lib/components/checkout/locales.d.ts +6 -0
- package/lib/components/checkout/locales.js +9 -3
- package/lib/components/checkout/payment-modal-utils.js +5 -5
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +3 -3
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +26 -18
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- 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/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/Information/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/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/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/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +25 -10
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +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/pay/toC/model.d.ts +1 -9
- 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/productExtension/fields/Actor/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/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/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 +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +8 -7
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +2 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -3
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +2 -12
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +2 -12
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +5 -13
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/plus/clientCard/index.js +5 -4
- package/lib/plus/clientCard/index.less +3 -32
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +6 -18
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +22 -19
- package/package.json +1 -1
@@ -37,9 +37,9 @@ var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_locales = require("../../utils/locales");
|
38
38
|
var import_ahooks = require("ahooks");
|
39
39
|
var import_react_dom = require("react-dom");
|
40
|
+
var import_react_dom2 = __toESM(require("react-dom"));
|
40
41
|
var import_locales2 = __toESM(require("./locales"));
|
41
42
|
var import_materials = require("@pisell/materials");
|
42
|
-
var import_materials2 = require("@pisell/materials");
|
43
43
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
44
44
|
var import_noteModal = __toESM(require("../../plus/noteModal"));
|
45
45
|
var import_SendPaymentLinkModal = __toESM(require("./components/SendPaymentLinkModal"));
|
@@ -55,9 +55,7 @@ var import_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils");
|
|
55
55
|
var import_icon = require("@pisell/icon");
|
56
56
|
var import_styles = require("./styles");
|
57
57
|
var import_paymentMethods = __toESM(require("../pay/toB/paymentMethods"));
|
58
|
-
var import_components = require("../../pro/comprehensiveSearch/components");
|
59
58
|
var import_SearchAndClientModule = __toESM(require("./components/SearchAndClientModule"));
|
60
|
-
var import_useToast = __toESM(require("../../hooks/useToast"));
|
61
59
|
var import_index = require("./index.less");
|
62
60
|
var import_constants = require("./constants");
|
63
61
|
var import_lodash = require("lodash");
|
@@ -102,7 +100,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
102
100
|
const context = (0, import_useEngineContext.default)();
|
103
101
|
const utils = context.appHelper.utils || {};
|
104
102
|
const { pisellos, getData, pisellosAllModule, interaction } = utils;
|
105
|
-
const Toast = (0,
|
103
|
+
const Toast = (0, import_materials.useToast)();
|
106
104
|
const checkoutRef = (0, import_react.useRef)(null);
|
107
105
|
const savePayLaterHandlerRef = (0, import_react.useRef)(null);
|
108
106
|
const [customAmount, setCustomAmount] = (0, import_react.useState)("");
|
@@ -143,10 +141,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
143
141
|
};
|
144
142
|
}, [paymentMethods]);
|
145
143
|
const handleAddCashPayment = async (result) => {
|
144
|
+
var _a2, _b2;
|
146
145
|
const cashPaymentMethod = paymentMethods.find(
|
147
146
|
(method) => {
|
148
|
-
var
|
149
|
-
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((
|
147
|
+
var _a3;
|
148
|
+
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a3 = method.name) == null ? void 0 : _a3.toLowerCase().includes("cash"));
|
150
149
|
}
|
151
150
|
);
|
152
151
|
await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
|
@@ -163,6 +162,19 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
163
162
|
voucher_id: 0,
|
164
163
|
rounding_amount: result.roundingAmount
|
165
164
|
}));
|
165
|
+
logger == null ? void 0 : logger.addLog({
|
166
|
+
type: "info",
|
167
|
+
title: "open_till",
|
168
|
+
metadata: {}
|
169
|
+
});
|
170
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
171
|
+
module: "till",
|
172
|
+
key: "open_till",
|
173
|
+
data: {
|
174
|
+
type: "cash"
|
175
|
+
// cash 不需要验证钱箱权限
|
176
|
+
}
|
177
|
+
});
|
166
178
|
};
|
167
179
|
const processSurcharge = (surcharge) => {
|
168
180
|
if (typeof surcharge === "string") {
|
@@ -401,8 +413,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
401
413
|
);
|
402
414
|
const orderPaymentAddedUnsubscribe = core.effects.on(
|
403
415
|
CheckoutHooks.OnOrderPaymentAdded,
|
404
|
-
(data) => {
|
405
|
-
var _a2, _b2;
|
416
|
+
async (data) => {
|
406
417
|
console.log("orderPaymentAddedUnsubscribe>>>>", data);
|
407
418
|
const balanceDueAmount2 = checkoutModule.getBalanceDueAmount();
|
408
419
|
if (Number(balanceDueAmount2) > 0) {
|
@@ -411,7 +422,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
411
422
|
false
|
412
423
|
);
|
413
424
|
const orderInfo2 = checkoutModule.getCurrentOrderInfo();
|
414
|
-
(0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
425
|
+
await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
415
426
|
{
|
416
427
|
paymentStatus: "partially_paid",
|
417
428
|
orderTotalAmount: orderInfo2.totalAmount,
|
@@ -431,19 +442,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
431
442
|
}
|
432
443
|
);
|
433
444
|
}
|
434
|
-
const paymentMethodName = data.paymentMethodName || data.name || "";
|
435
|
-
const isCashPayment = data.paymentMethodCode === "CASHMANUAL" || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
436
|
-
if (isCashPayment) {
|
437
|
-
logger == null ? void 0 : logger.addLog({
|
438
|
-
type: "info",
|
439
|
-
title: "open_till",
|
440
|
-
metadata: {}
|
441
|
-
});
|
442
|
-
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
443
|
-
module: "till",
|
444
|
-
key: "open_till"
|
445
|
-
});
|
446
|
-
}
|
447
445
|
}
|
448
446
|
);
|
449
447
|
return () => {
|
@@ -506,7 +504,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
506
504
|
return;
|
507
505
|
}
|
508
506
|
const result = await checkoutModule.manualSyncOrderAsync();
|
509
|
-
showSuccessToast == null ? void 0 : showSuccessToast(result);
|
507
|
+
await (showSuccessToast == null ? void 0 : showSuccessToast(result));
|
510
508
|
if (result.success) {
|
511
509
|
const responseData = (_a2 = result.response) == null ? void 0 : _a2.data;
|
512
510
|
console.log("print_order_onOrderSynced>>>>", result);
|
@@ -528,6 +526,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
528
526
|
} catch (error) {
|
529
527
|
console.error("print_order_onOrderSynced_error>>>>", error);
|
530
528
|
}
|
529
|
+
onPaymentCancel(true);
|
531
530
|
}
|
532
531
|
};
|
533
532
|
const handleSavePayLater = (0, import_react.useCallback)(
|
@@ -545,7 +544,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
545
544
|
const res = await checkoutModule.saveForLaterPaymentAsync();
|
546
545
|
if (res.success) {
|
547
546
|
onPaymentCancel(true);
|
548
|
-
(0, import_PaymentResultToast.closePaymentResultToast)();
|
549
547
|
}
|
550
548
|
}
|
551
549
|
},
|
@@ -786,35 +784,49 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
786
784
|
const res = await checkoutModule.roundAmountAsync(amount);
|
787
785
|
return res;
|
788
786
|
};
|
787
|
+
const handleModalClick = (0, import_react.useCallback)((event) => {
|
788
|
+
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
789
|
+
}, []);
|
789
790
|
return /* @__PURE__ */ import_react.default.createElement(
|
790
791
|
"div",
|
791
792
|
{
|
792
793
|
ref: checkoutRef,
|
794
|
+
...{ onClick: handleModalClick },
|
793
795
|
style: {
|
794
796
|
...import_styles.checkoutStyles.container,
|
795
797
|
maxHeight: dynamicMaxHeight
|
796
798
|
}
|
797
799
|
},
|
798
800
|
/* @__PURE__ */ import_react.default.createElement(
|
799
|
-
|
800
|
-
{
|
801
|
-
onClientChange: () => {
|
802
|
-
clientChangedRef.current = true;
|
803
|
-
},
|
804
|
-
onSearch: handleSearch,
|
805
|
-
...searchAndClientProps
|
806
|
-
}
|
807
|
-
),
|
808
|
-
moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
|
809
|
-
import_WalletPassModule.default,
|
801
|
+
"div",
|
810
802
|
{
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
803
|
+
style: {
|
804
|
+
padding: "12px 16px",
|
805
|
+
border: "1px solid #d0d5dd",
|
806
|
+
borderRadius: 8
|
807
|
+
}
|
808
|
+
},
|
809
|
+
/* @__PURE__ */ import_react.default.createElement(
|
810
|
+
import_SearchAndClientModule.default,
|
811
|
+
{
|
812
|
+
onClientChange: () => {
|
813
|
+
clientChangedRef.current = true;
|
814
|
+
},
|
815
|
+
onSearch: handleSearch,
|
816
|
+
...searchAndClientProps
|
817
|
+
}
|
818
|
+
),
|
819
|
+
moduleConfig.showWalletPass && /* @__PURE__ */ import_react.default.createElement(
|
820
|
+
import_WalletPassModule.default,
|
821
|
+
{
|
822
|
+
clientId: (_b = (_a = state == null ? void 0 : state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id,
|
823
|
+
customAmount,
|
824
|
+
orderInfo: orderInfo || void 0,
|
825
|
+
ref: walletPassRef,
|
826
|
+
paymentItems,
|
827
|
+
onSelectChange: handleSelectWalletChange
|
828
|
+
}
|
829
|
+
)
|
818
830
|
),
|
819
831
|
/* @__PURE__ */ import_react.default.createElement(
|
820
832
|
import_AmountSummary.default,
|
@@ -830,6 +842,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
830
842
|
clientInfo: (_c = state == null ? void 0 : state.client) == null ? void 0 : _c.value,
|
831
843
|
onAmountChange: handleAmountChange,
|
832
844
|
onDepositStatusChange: handleDepositStatusChange,
|
845
|
+
onBalanceDueAmountClick: handleButtonClick,
|
833
846
|
onConfirm: handleWalletPassConfirmPay,
|
834
847
|
totalAmount
|
835
848
|
}
|
@@ -879,7 +892,8 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
879
892
|
paymentMethods,
|
880
893
|
customAmount,
|
881
894
|
title: paymentOptionsTitle,
|
882
|
-
disabled: isOrderFree
|
895
|
+
disabled: isOrderFree,
|
896
|
+
showCashPayment
|
883
897
|
}
|
884
898
|
)
|
885
899
|
),
|
@@ -945,7 +959,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
945
959
|
) || "Close price adjustment modal"
|
946
960
|
}
|
947
961
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-price-adjust-container" }, /* @__PURE__ */ import_react.default.createElement(
|
948
|
-
|
962
|
+
import_materials.PisellAdjustPrice,
|
949
963
|
{
|
950
964
|
selectType: "dark",
|
951
965
|
originValue: currentTotalPrice,
|
@@ -993,7 +1007,7 @@ var PaymentModal = ({
|
|
993
1007
|
const [actualShowCashPayment, setActualShowCashPayment] = (0, import_react.useState)(true);
|
994
1008
|
const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
|
995
1009
|
const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
|
996
|
-
const Toast = (0,
|
1010
|
+
const Toast = (0, import_materials.useToast)();
|
997
1011
|
const { nativePrint } = (0, import_printer.default)();
|
998
1012
|
const handleRetry = async () => {
|
999
1013
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
@@ -1001,7 +1015,7 @@ var PaymentModal = ({
|
|
1001
1015
|
console.log(res);
|
1002
1016
|
if (res.success) {
|
1003
1017
|
setShowRetryModal(false);
|
1004
|
-
showSuccessToast == null ? void 0 : showSuccessToast(res);
|
1018
|
+
await (showSuccessToast == null ? void 0 : showSuccessToast(res));
|
1005
1019
|
}
|
1006
1020
|
};
|
1007
1021
|
(0, import_react.useEffect)(() => {
|
@@ -1018,6 +1032,29 @@ var PaymentModal = ({
|
|
1018
1032
|
window.removeEventListener("orientationchange", updateHeight);
|
1019
1033
|
};
|
1020
1034
|
}, []);
|
1035
|
+
(0, import_react.useEffect)(() => {
|
1036
|
+
var _a2;
|
1037
|
+
const initTillButtonData = async () => {
|
1038
|
+
var _a3, _b2;
|
1039
|
+
console.log("准备获取tillButton数据");
|
1040
|
+
try {
|
1041
|
+
const tillButtonData = await ((_b2 = (_a3 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a3.asyncDataManager) == null ? void 0 : _b2.call(_a3, {
|
1042
|
+
module: "get",
|
1043
|
+
key: "till_button"
|
1044
|
+
}));
|
1045
|
+
console.log("获取tillButton数据成功", tillButtonData);
|
1046
|
+
if (tillButtonData) {
|
1047
|
+
(0, import_PaymentResultToast.setTillButton)(tillButtonData);
|
1048
|
+
console.log("PaymentModal: tillButton data set successfully", tillButtonData);
|
1049
|
+
}
|
1050
|
+
} catch (error) {
|
1051
|
+
console.error("PaymentModal: Failed to get till_button from asyncDataManager:", error);
|
1052
|
+
}
|
1053
|
+
};
|
1054
|
+
if ((_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.asyncDataManager) {
|
1055
|
+
initTillButtonData();
|
1056
|
+
}
|
1057
|
+
}, [interaction]);
|
1021
1058
|
const dynamicMaxHeight = (0, import_react.useMemo)(() => {
|
1022
1059
|
if (windowHeight === 0) return "600px";
|
1023
1060
|
const bodyTransform = getComputedStyle(document.body).transform;
|
@@ -1119,8 +1156,112 @@ var PaymentModal = ({
|
|
1119
1156
|
const currentPaymentResultRef = import_react.default.useRef(null);
|
1120
1157
|
const paymentContentRef = import_react.default.useRef(null);
|
1121
1158
|
const handleOrderNoteClickFromToast = () => {
|
1122
|
-
|
1123
|
-
|
1159
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
1160
|
+
const modalContainer = document.createElement("div");
|
1161
|
+
document.body.appendChild(modalContainer);
|
1162
|
+
const showToast = (type, message) => {
|
1163
|
+
if (Toast && Toast[type]) {
|
1164
|
+
Toast[type](message);
|
1165
|
+
} else {
|
1166
|
+
if (type === "success") {
|
1167
|
+
console.log("✅ Success:", message);
|
1168
|
+
} else {
|
1169
|
+
console.error("❌ Error:", message);
|
1170
|
+
}
|
1171
|
+
}
|
1172
|
+
};
|
1173
|
+
const handleNoteConfirm2 = async (noteValue) => {
|
1174
|
+
var _a3;
|
1175
|
+
try {
|
1176
|
+
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1177
|
+
const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
|
1178
|
+
if (checkoutModule && orderId) {
|
1179
|
+
await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, noteValue));
|
1180
|
+
setOrderNote(noteValue);
|
1181
|
+
showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.updated-successfully"));
|
1182
|
+
}
|
1183
|
+
} catch (error) {
|
1184
|
+
console.error("Failed to update order note:", error);
|
1185
|
+
showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.update-failed"));
|
1186
|
+
}
|
1187
|
+
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1188
|
+
if (document.body.contains(modalContainer)) {
|
1189
|
+
document.body.removeChild(modalContainer);
|
1190
|
+
}
|
1191
|
+
};
|
1192
|
+
const handleNoteDelete2 = async () => {
|
1193
|
+
var _a3;
|
1194
|
+
try {
|
1195
|
+
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1196
|
+
const orderId = checkoutModule == null ? void 0 : checkoutModule.getCurrentOrderId();
|
1197
|
+
if (checkoutModule && orderId) {
|
1198
|
+
await ((_a3 = checkoutModule.editOrderNoteByOrderIdAsync) == null ? void 0 : _a3.call(checkoutModule, orderId, ""));
|
1199
|
+
setOrderNote("");
|
1200
|
+
showToast("success", import_utils.locales.getText("pisell2.checkout.order-note.deleted-successfully"));
|
1201
|
+
}
|
1202
|
+
} catch (error) {
|
1203
|
+
console.error("Failed to delete order note:", error);
|
1204
|
+
showToast("error", import_utils.locales.getText("pisell2.checkout.order-note.delete-failed"));
|
1205
|
+
}
|
1206
|
+
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1207
|
+
if (document.body.contains(modalContainer)) {
|
1208
|
+
document.body.removeChild(modalContainer);
|
1209
|
+
}
|
1210
|
+
};
|
1211
|
+
const handleNoteCancel2 = () => {
|
1212
|
+
import_react_dom2.default.unmountComponentAtNode(modalContainer);
|
1213
|
+
if (document.body.contains(modalContainer)) {
|
1214
|
+
document.body.removeChild(modalContainer);
|
1215
|
+
}
|
1216
|
+
};
|
1217
|
+
const currentLocale = ((_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils) == null ? void 0 : _a2.getApp) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.locales) == null ? void 0 : _d2.getLocale) == null ? void 0 : _e2.call(_d2)) || ((_g2 = (_f2 = context.appHelper.utils) == null ? void 0 : _f2.storage) == null ? void 0 : _g2.get("umi_locale")) || "en";
|
1218
|
+
const EngineContextProvider = ({ children }) => {
|
1219
|
+
var _a3;
|
1220
|
+
const tempEngineContext = {
|
1221
|
+
...context,
|
1222
|
+
engine: {
|
1223
|
+
...context.engine,
|
1224
|
+
props: {
|
1225
|
+
...(_a3 = context.engine) == null ? void 0 : _a3.props,
|
1226
|
+
locale: currentLocale
|
1227
|
+
}
|
1228
|
+
}
|
1229
|
+
};
|
1230
|
+
const TempContext = import_react.default.createContext(tempEngineContext);
|
1231
|
+
const originalContext = window.__injectedContext;
|
1232
|
+
window.__injectedContext = tempEngineContext;
|
1233
|
+
import_react.default.useEffect(() => {
|
1234
|
+
return () => {
|
1235
|
+
window.__injectedContext = originalContext;
|
1236
|
+
};
|
1237
|
+
}, []);
|
1238
|
+
return /* @__PURE__ */ import_react.default.createElement(TempContext.Provider, { value: tempEngineContext }, children);
|
1239
|
+
};
|
1240
|
+
let orderNote2 = "";
|
1241
|
+
try {
|
1242
|
+
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1243
|
+
orderNote2 = checkoutModule.getOrderNote();
|
1244
|
+
} catch (error) {
|
1245
|
+
console.warn("Failed to get initial custom amount:", error);
|
1246
|
+
}
|
1247
|
+
import_react_dom2.default.render(
|
1248
|
+
/* @__PURE__ */ import_react.default.createElement(EngineContextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_materials.ConfigProvider, { prefixCls: "pisell-lowcode", theme: {
|
1249
|
+
token: {
|
1250
|
+
colorPrimary: "#7F56DA"
|
1251
|
+
}
|
1252
|
+
} }, /* @__PURE__ */ import_react.default.createElement(
|
1253
|
+
import_noteModal.default,
|
1254
|
+
{
|
1255
|
+
open: true,
|
1256
|
+
title: import_utils.locales.getText("pisell2.text.add-order-notes"),
|
1257
|
+
value: orderNote2,
|
1258
|
+
onConfirm: handleNoteConfirm2,
|
1259
|
+
onDelete: handleNoteDelete2,
|
1260
|
+
onCancel: handleNoteCancel2
|
1261
|
+
}
|
1262
|
+
))),
|
1263
|
+
modalContainer
|
1264
|
+
);
|
1124
1265
|
};
|
1125
1266
|
const translation = (key, fallback) => {
|
1126
1267
|
const umiLocale = (0, import_locales.getLocale)();
|
@@ -1143,11 +1284,14 @@ var PaymentModal = ({
|
|
1143
1284
|
};
|
1144
1285
|
const handleToastClose = () => {
|
1145
1286
|
console.log(
|
1146
|
-
"PaymentModal - Toast closed, executing
|
1287
|
+
"PaymentModal - Toast closed, executing payment completion callback"
|
1147
1288
|
);
|
1148
1289
|
if (currentPaymentResultRef.current) {
|
1149
1290
|
callback == null ? void 0 : callback(currentPaymentResultRef.current);
|
1150
1291
|
}
|
1292
|
+
};
|
1293
|
+
const handleModalClose = () => {
|
1294
|
+
console.log("PaymentModal - Modal closing independently");
|
1151
1295
|
onClose == null ? void 0 : onClose(true);
|
1152
1296
|
};
|
1153
1297
|
const handlePaymentCancel = (reset) => {
|
@@ -1157,43 +1301,30 @@ var PaymentModal = ({
|
|
1157
1301
|
checkout.cancelCurrentOrderAsync();
|
1158
1302
|
onClose == null ? void 0 : onClose(reset || false);
|
1159
1303
|
};
|
1160
|
-
const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement(
|
1161
|
-
|
1304
|
+
const CustomHeader = () => /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-modal-custom-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "header__left" }, /* @__PURE__ */ import_react.default.createElement(
|
1305
|
+
import_antd.Button,
|
1162
1306
|
{
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1307
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "pisell2-arrow-left", size: 24 }),
|
1308
|
+
size: "small",
|
1309
|
+
type: "text",
|
1310
|
+
onClick: () => {
|
1311
|
+
const checkout = pisellos.getModule("checkout");
|
1312
|
+
if (checkout.isCurrentOrderSynced()) {
|
1313
|
+
handlePaymentCancel(true);
|
1314
|
+
} else {
|
1315
|
+
handlePaymentCancel(false);
|
1316
|
+
}
|
1168
1317
|
}
|
1318
|
+
}
|
1319
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__center" }, translation("order.total"), ":", (0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)), /* @__PURE__ */ import_react.default.createElement("div", { className: "header__right" }, /* @__PURE__ */ import_react.default.createElement(
|
1320
|
+
import_antd.Button,
|
1321
|
+
{
|
1322
|
+
size: "small",
|
1323
|
+
type: "link",
|
1324
|
+
onClick: () => handlePaymentCancel(true)
|
1169
1325
|
},
|
1170
|
-
|
1171
|
-
|
1172
|
-
{
|
1173
|
-
style: {
|
1174
|
-
display: "flex",
|
1175
|
-
alignItems: "center",
|
1176
|
-
gap: "12px",
|
1177
|
-
flex: "0 0 auto"
|
1178
|
-
}
|
1179
|
-
},
|
1180
|
-
/* @__PURE__ */ import_react.default.createElement(import_components.DeviceIconGroup, null)
|
1181
|
-
),
|
1182
|
-
/* @__PURE__ */ import_react.default.createElement(
|
1183
|
-
"div",
|
1184
|
-
{
|
1185
|
-
style: {
|
1186
|
-
position: "absolute",
|
1187
|
-
left: "50%",
|
1188
|
-
transform: "translateX(-50%)",
|
1189
|
-
fontWeight: "500"
|
1190
|
-
}
|
1191
|
-
},
|
1192
|
-
translation("order.total"),
|
1193
|
-
":",
|
1194
|
-
(0, import_PaymentResultToastUtils.formatCurrency)(totalAmount, state == null ? void 0 : state.amountSymbol)
|
1195
|
-
)
|
1196
|
-
);
|
1326
|
+
import_utils.locales.getText("order.start-new-order")
|
1327
|
+
)));
|
1197
1328
|
(0, import_react.useEffect)(() => {
|
1198
1329
|
var _a2;
|
1199
1330
|
if ((_a2 = data == null ? void 0 : data.order_info) == null ? void 0 : _a2.order_note) {
|
@@ -1223,7 +1354,6 @@ var PaymentModal = ({
|
|
1223
1354
|
order_rounding_setting: getData("order_rounding_setting"),
|
1224
1355
|
shop_wallet_pass_id
|
1225
1356
|
});
|
1226
|
-
console.time("initCheckoutData");
|
1227
1357
|
const newData = (0, import_lodash.cloneDeep)(data);
|
1228
1358
|
await checkout.createLocalOrderAsync({
|
1229
1359
|
orderData: newData.order_info,
|
@@ -1231,7 +1361,6 @@ var PaymentModal = ({
|
|
1231
1361
|
autoPayment: true,
|
1232
1362
|
totalInfo: newData.subtotal_info
|
1233
1363
|
});
|
1234
|
-
console.timeEnd("initCheckoutData");
|
1235
1364
|
const orderInfo2 = checkout.getCurrentOrderInfo();
|
1236
1365
|
if (orderInfo2 && orderInfo2.totalAmount) {
|
1237
1366
|
setTotalAmount(orderInfo2.totalAmount);
|
@@ -1248,8 +1377,8 @@ var PaymentModal = ({
|
|
1248
1377
|
}
|
1249
1378
|
unsubscribeRef.current = checkout.core.effects.on(
|
1250
1379
|
"checkout:onOrderSynced",
|
1251
|
-
(data2) => {
|
1252
|
-
var _a3, _b3, _c2;
|
1380
|
+
async (data2) => {
|
1381
|
+
var _a3, _b3, _c2, _d2, _e2;
|
1253
1382
|
const responseData = (_a3 = data2.response) == null ? void 0 : _a3.data;
|
1254
1383
|
const paymentStatus = responseData == null ? void 0 : responseData.payment_status;
|
1255
1384
|
if (data2.isManual) return;
|
@@ -1316,17 +1445,24 @@ var PaymentModal = ({
|
|
1316
1445
|
paymentStatus,
|
1317
1446
|
!!currentChangeGivenAmount
|
1318
1447
|
);
|
1319
|
-
(0
|
1448
|
+
const enabledAutoPrint = await ((_e2 = (_d2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _d2.asyncDataManager) == null ? void 0 : _e2.call(_d2, {
|
1449
|
+
module: "get",
|
1450
|
+
key: "auto_print_receipt"
|
1451
|
+
}));
|
1452
|
+
await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
|
1320
1453
|
{
|
1321
1454
|
paymentStatus,
|
1322
1455
|
orderTotalAmount,
|
1323
1456
|
gapAmount: paymentStatus === "partially_paid" ? gapAmount : currentChangeGivenAmount,
|
1324
1457
|
failureReason,
|
1325
1458
|
autoCloseConfig,
|
1326
|
-
actionButtons: generateActionButtons(paymentStatus)
|
1459
|
+
actionButtons: generateActionButtons(paymentStatus, enabledAutoPrint)
|
1327
1460
|
},
|
1328
1461
|
paymentResultToastConfig
|
1329
1462
|
);
|
1463
|
+
if (paymentStatus === "paid") {
|
1464
|
+
handleModalClose();
|
1465
|
+
}
|
1330
1466
|
const paymentResult = {
|
1331
1467
|
...data2,
|
1332
1468
|
toastInfo: {
|
@@ -1394,13 +1530,12 @@ var PaymentModal = ({
|
|
1394
1530
|
state,
|
1395
1531
|
onToastClose: handleToastClose
|
1396
1532
|
};
|
1397
|
-
const generateActionButtons = (paymentStatus) => {
|
1533
|
+
const generateActionButtons = (paymentStatus, enabledAutoPrint) => {
|
1398
1534
|
const getClassName = (suffix) => `payment-result-toast-${suffix}`;
|
1399
1535
|
const handleDetailsClick = async () => {
|
1400
1536
|
var _a2;
|
1401
1537
|
setTimeout(() => {
|
1402
1538
|
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1403
|
-
handleToastClose();
|
1404
1539
|
}, 0);
|
1405
1540
|
const { isTerminal, isWebPos } = (_a2 = context.appHelper) == null ? void 0 : _a2.utils;
|
1406
1541
|
if (isTerminal == null ? void 0 : isTerminal()) {
|
@@ -1417,6 +1552,9 @@ var PaymentModal = ({
|
|
1417
1552
|
}
|
1418
1553
|
};
|
1419
1554
|
const handlePrintReceiptClick = async () => {
|
1555
|
+
setTimeout(() => {
|
1556
|
+
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1557
|
+
}, 0);
|
1420
1558
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1421
1559
|
if (!checkoutModule) return;
|
1422
1560
|
let data2;
|
@@ -1465,6 +1603,9 @@ var PaymentModal = ({
|
|
1465
1603
|
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1466
1604
|
};
|
1467
1605
|
const handleOrderNoteClick = () => {
|
1606
|
+
setTimeout(() => {
|
1607
|
+
(0, import_PaymentResultToast.closePaymentResultToast)();
|
1608
|
+
}, 0);
|
1468
1609
|
console.log(import_utils.locales.getText("payment.result.actions.orderNoteClicked"));
|
1469
1610
|
if (handleOrderNoteClickFromToast) {
|
1470
1611
|
handleOrderNoteClickFromToast();
|
@@ -1477,7 +1618,7 @@ var PaymentModal = ({
|
|
1477
1618
|
case "paid":
|
1478
1619
|
return [
|
1479
1620
|
[
|
1480
|
-
{
|
1621
|
+
enabledAutoPrint ? {
|
1481
1622
|
id: "details",
|
1482
1623
|
buttonProps: {
|
1483
1624
|
className: getClassName("action-button"),
|
@@ -1485,8 +1626,7 @@ var PaymentModal = ({
|
|
1485
1626
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1486
1627
|
children: import_utils.locales.getText("payment.result.details")
|
1487
1628
|
}
|
1488
|
-
}
|
1489
|
-
{
|
1629
|
+
} : {
|
1490
1630
|
id: "print",
|
1491
1631
|
buttonProps: {
|
1492
1632
|
className: getClassName("action-button"),
|
@@ -1522,21 +1662,12 @@ var PaymentModal = ({
|
|
1522
1662
|
return [
|
1523
1663
|
[
|
1524
1664
|
{
|
1525
|
-
id: "
|
1526
|
-
buttonProps: {
|
1527
|
-
className: getClassName("action-button"),
|
1528
|
-
onClick: handleSaveAsPartialPaidClick,
|
1529
|
-
children: import_utils.locales.getText("payment.result.saveAsPartialPaid")
|
1530
|
-
}
|
1531
|
-
},
|
1532
|
-
{
|
1533
|
-
id: "continuePayment",
|
1665
|
+
id: "details",
|
1534
1666
|
buttonProps: {
|
1535
1667
|
className: getClassName("action-button"),
|
1536
|
-
onClick:
|
1537
|
-
|
1538
|
-
|
1539
|
-
children: import_utils.locales.getText("payment.result.continuePayment")
|
1668
|
+
onClick: handleDetailsClick,
|
1669
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1670
|
+
children: import_utils.locales.getText("payment.result.details")
|
1540
1671
|
}
|
1541
1672
|
},
|
1542
1673
|
{
|
@@ -1680,7 +1811,7 @@ var PaymentModal = ({
|
|
1680
1811
|
paymentResultToastConfig,
|
1681
1812
|
generateActionButtons
|
1682
1813
|
);
|
1683
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
1814
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
1684
1815
|
import_materials.PisellContainer,
|
1685
1816
|
{
|
1686
1817
|
renderType: "modal",
|
@@ -1694,10 +1825,9 @@ var PaymentModal = ({
|
|
1694
1825
|
destroyOnClose: false,
|
1695
1826
|
maskClosable: false,
|
1696
1827
|
footer: null,
|
1697
|
-
closeIcon:
|
1828
|
+
closeIcon: false,
|
1698
1829
|
wrapClassName: `payment-modal-wrapper ${!actualShowCashPayment ? "no-cash-payment" : ""}`,
|
1699
1830
|
size: "large",
|
1700
|
-
headerDivider: false,
|
1701
1831
|
style: {
|
1702
1832
|
height: "auto"
|
1703
1833
|
},
|
@@ -1705,7 +1835,7 @@ var PaymentModal = ({
|
|
1705
1835
|
maxHeight: "100%",
|
1706
1836
|
// 使用100%基于父元素,而不是视口的90%
|
1707
1837
|
overflowY: "auto",
|
1708
|
-
padding:
|
1838
|
+
padding: 16,
|
1709
1839
|
display: "flex",
|
1710
1840
|
flexDirection: "column"
|
1711
1841
|
}
|