Added model Close Funtionalies
This commit is contained in:
parent
8025b74ca1
commit
2ad325327b
|
|
@ -141,6 +141,7 @@ import {
|
|||
changePreviousOrderOfferDetail,
|
||||
GlobalAllBookingType,
|
||||
changeSearchedData,
|
||||
PostCancelPayment,
|
||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { PrintStyleFunction } from '../../../../paymentpdfPage/PrintStyleFunction.js';
|
||||
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
||||
|
|
@ -1574,7 +1575,15 @@ const BSBillingTable3Pay = () => {
|
|||
: 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 () => {
|
||||
setMessageType('error');
|
||||
setMessageData('Financial Year-Based Sales Not Yet Started');
|
||||
|
|
@ -4919,6 +4928,7 @@ const BSBillingTable3Pay = () => {
|
|||
open={businessUPI}
|
||||
handleCancel={() => setShowCancelConfirm(true)}
|
||||
footer={false}
|
||||
destroyOnClose={true}
|
||||
width={500}
|
||||
children={
|
||||
<>
|
||||
|
|
@ -4936,14 +4946,27 @@ const BSBillingTable3Pay = () => {
|
|||
}
|
||||
/>
|
||||
{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();
|
||||
CancelPayment()
|
||||
}}
|
||||
onCancel={() => setShowCancelConfirm(false)}
|
||||
okText="Yes"
|
||||
|
|
|
|||
Loading…
Reference in New Issue