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