Added Payment QR Code model Close Funtionalies

This commit is contained in:
Srinath 2026-03-26 11:37:53 +05:30
parent c642de367f
commit 287522776e
1 changed files with 40 additions and 16 deletions

View File

@ -109,6 +109,7 @@ import {
GlobalUnpaidListData, GlobalUnpaidListData,
PaymentGatewayGetdetail, PaymentGatewayGetdetail,
PostBookingData, PostBookingData,
PostCancelPayment,
PostPaymentdevice, PostPaymentdevice,
PreferenceData, PreferenceData,
PutBookingData, PutBookingData,
@ -1214,6 +1215,15 @@ const StandardTablePayment = () => {
} }
}; };
// PostCancelPayment
const CancelPayment = async () => {
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
if (response?.data?.statusCode) {
ClearAllGlobalStateDatas();
CustomerDisplay();
setBusinessUPI(false);
}
}
const Otherserviceprint = async () => { const Otherserviceprint = async () => {
if (OtherServicesPrintDetails?.length > 0) { if (OtherServicesPrintDetails?.length > 0) {
const style = await PrintStyleFunction('OtherServices1'); const style = await PrintStyleFunction('OtherServices1');
@ -4191,6 +4201,7 @@ const StandardTablePayment = () => {
handleCancel={() => setShowCancelConfirm(true)} handleCancel={() => setShowCancelConfirm(true)}
footer={false} footer={false}
width={600} width={600}
destroyOnClose={true}
className={'ModalPaymentGatewayEmbedded'} className={'ModalPaymentGatewayEmbedded'}
children={ children={
<> <>
@ -4209,22 +4220,35 @@ const StandardTablePayment = () => {
} }
/> />
{showCancelConfirm && ( {showCancelConfirm && (
<Modal // <Modal
open={showCancelConfirm} // open={showCancelConfirm}
title="Cancel Payment" // title="Cancel Payment"
onOk={() => { // onOk={() => {
paymentGatewayRef.current?.clearPolling(); // paymentGatewayRef.current?.clearPolling();
setBusinessUPI(false); // setBusinessUPI(false);
setShowCancelConfirm(false); // setShowCancelConfirm(false);
ClearAllGlobalStateDatas(); // ClearAllGlobalStateDatas();
CustomerDisplay(); // CustomerDisplay();
}} // }}
onCancel={() => setShowCancelConfirm(false)} // onCancel={() => setShowCancelConfirm(false)}
okText="Yes" // okText="Yes"
cancelText="No" // cancelText="No"
> // >
Do you want to cancel the payment? // Do you want to cancel the payment?
</Modal> // </Modal>
<Modal
open={showCancelConfirm}
title="Cancel Payment"
onOk={() => {
setShowCancelConfirm(false);
CancelPayment()
}}
onCancel={() => setShowCancelConfirm(false)}
okText="Yes"
cancelText="No"
>
Do you want to cancel the payment?
</Modal>
)} )}
{customerPreviesOrders && ( {customerPreviesOrders && (
<DefaultModal <DefaultModal