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,15 +4220,28 @@ const StandardTablePayment = () => {
} }
/> />
{showCancelConfirm && ( {showCancelConfirm && (
// <Modal
// open={showCancelConfirm}
// title="Cancel Payment"
// onOk={() => {
// paymentGatewayRef.current?.clearPolling();
// setBusinessUPI(false);
// setShowCancelConfirm(false);
// ClearAllGlobalStateDatas();
// CustomerDisplay();
// }}
// onCancel={() => setShowCancelConfirm(false)}
// okText="Yes"
// cancelText="No"
// >
// Do you want to cancel the payment?
// </Modal>
<Modal <Modal
open={showCancelConfirm} open={showCancelConfirm}
title="Cancel Payment" title="Cancel Payment"
onOk={() => { onOk={() => {
paymentGatewayRef.current?.clearPolling();
setBusinessUPI(false);
setShowCancelConfirm(false); setShowCancelConfirm(false);
ClearAllGlobalStateDatas(); CancelPayment()
CustomerDisplay();
}} }}
onCancel={() => setShowCancelConfirm(false)} onCancel={() => setShowCancelConfirm(false)}
okText="Yes" okText="Yes"