Added Payment QR Code model Close Funtionalies
This commit is contained in:
parent
c642de367f
commit
287522776e
|
|
@ -109,6 +109,7 @@ import {
|
|||
GlobalUnpaidListData,
|
||||
PaymentGatewayGetdetail,
|
||||
PostBookingData,
|
||||
PostCancelPayment,
|
||||
PostPaymentdevice,
|
||||
PreferenceData,
|
||||
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 () => {
|
||||
if (OtherServicesPrintDetails?.length > 0) {
|
||||
const style = await PrintStyleFunction('OtherServices1');
|
||||
|
|
@ -4191,6 +4201,7 @@ const StandardTablePayment = () => {
|
|||
handleCancel={() => setShowCancelConfirm(true)}
|
||||
footer={false}
|
||||
width={600}
|
||||
destroyOnClose={true}
|
||||
className={'ModalPaymentGatewayEmbedded'}
|
||||
children={
|
||||
<>
|
||||
|
|
@ -4209,15 +4220,28 @@ const StandardTablePayment = () => {
|
|||
}
|
||||
/>
|
||||
{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
|
||||
open={showCancelConfirm}
|
||||
title="Cancel Payment"
|
||||
onOk={() => {
|
||||
paymentGatewayRef.current?.clearPolling();
|
||||
setBusinessUPI(false);
|
||||
setShowCancelConfirm(false);
|
||||
ClearAllGlobalStateDatas();
|
||||
CustomerDisplay();
|
||||
CancelPayment()
|
||||
}}
|
||||
onCancel={() => setShowCancelConfirm(false)}
|
||||
okText="Yes"
|
||||
|
|
|
|||
Loading…
Reference in New Issue