Added model Close Funtionalies
This commit is contained in:
parent
8025b74ca1
commit
2ad325327b
|
|
@ -141,6 +141,7 @@ import {
|
||||||
changePreviousOrderOfferDetail,
|
changePreviousOrderOfferDetail,
|
||||||
GlobalAllBookingType,
|
GlobalAllBookingType,
|
||||||
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 FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
||||||
|
|
@ -1574,7 +1575,15 @@ const BSBillingTable3Pay = () => {
|
||||||
: AddBookingDetails(BookingType, true);
|
: AddBookingDetails(BookingType, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// PostCancelPayment
|
||||||
|
const CancelPayment = async () => {
|
||||||
|
const response = await dispatch(PostCancelPayment({OrderId: businessUPIOrderId})).unwrap()
|
||||||
|
if (response?.data?.statusCode) {
|
||||||
|
ClearAllGlobalStateDatas();
|
||||||
|
CustomerDisplay();
|
||||||
|
setBusinessUPI(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
const financialYearError = async () => {
|
const financialYearError = async () => {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Financial Year-Based Sales Not Yet Started');
|
setMessageData('Financial Year-Based Sales Not Yet Started');
|
||||||
|
|
@ -4919,6 +4928,7 @@ const BSBillingTable3Pay = () => {
|
||||||
open={businessUPI}
|
open={businessUPI}
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
footer={false}
|
footer={false}
|
||||||
|
destroyOnClose={true}
|
||||||
width={500}
|
width={500}
|
||||||
children={
|
children={
|
||||||
<>
|
<>
|
||||||
|
|
@ -4936,14 +4946,27 @@ const BSBillingTable3Pay = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{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);
|
||||||
ClearAllGlobalStateDatas();
|
CancelPayment()
|
||||||
CustomerDisplay();
|
|
||||||
}}
|
}}
|
||||||
onCancel={() => setShowCancelConfirm(false)}
|
onCancel={() => setShowCancelConfirm(false)}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue