Added Payment QR Code model Close Funtionalies
This commit is contained in:
parent
287522776e
commit
fea68be6fe
|
|
@ -128,6 +128,7 @@ import {
|
|||
changePreviousOrderOfferDetail,
|
||||
GlobalPaymentTrigger,
|
||||
changeSearchedData,
|
||||
PostCancelPayment,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { PrintStyleFunction } from '../../../paymentpdfPage/PrintStyleFunction.js';
|
||||
import {
|
||||
|
|
@ -1294,6 +1295,16 @@ const BSC1Payment = (props) => {
|
|||
}
|
||||
};
|
||||
|
||||
// PostCancelPayment
|
||||
const CancelPayment = async () => {
|
||||
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
|
||||
if (response?.data?.statusCode) {
|
||||
ClearAllGlobalStateDatas();
|
||||
CustomerDisplay();
|
||||
setBusinessUPI(false);
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyPress = (event) => {
|
||||
if (event.key === 'F4' && isButtonActive() && !isF4Pressed.current) {
|
||||
|
|
@ -4993,6 +5004,7 @@ const BSC1Payment = (props) => {
|
|||
handleCancel={() => setShowCancelConfirm(true)}
|
||||
footer={false}
|
||||
width={500}
|
||||
destroyOnClose={true}
|
||||
children={
|
||||
<>
|
||||
<PaymentGatewayEmbedded
|
||||
|
|
@ -5009,21 +5021,34 @@ const BSC1Payment = (props) => {
|
|||
}
|
||||
/>
|
||||
{showCancelConfirm && (
|
||||
// <Modal
|
||||
// open={showCancelConfirm}
|
||||
// title="Cancel Payment"
|
||||
// onOk={() => {
|
||||
// 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={() => {
|
||||
setBusinessUPI(false);
|
||||
setShowCancelConfirm(false);
|
||||
ClearAllGlobalStateDatas();
|
||||
CustomerDisplay();
|
||||
}}
|
||||
onCancel={() => setShowCancelConfirm(false)}
|
||||
okText="Yes"
|
||||
cancelText="No"
|
||||
>
|
||||
Do you want to cancel the payment?
|
||||
</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 && (
|
||||
|
|
|
|||
Loading…
Reference in New Issue