// material-ui
import {
Grid,
Typography,
FormLabel,
Button
} from '@mui/material';
import * as React from "react";
import * as FormatUtils from "utils/FormatUtils";
import * as PaymentStatus from "utils/statusUtils/PaymentStatus";
import Loadable from 'components/Loadable';
const MainCard = Loadable(React.lazy(() => import('components/MainCard')));
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
import DownloadIcon from '@mui/icons-material/Download';
import {FormattedMessage, useIntl} from "react-intl";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
const PaymentDetails = ({ formData,doPrint,onDownload }) => {
const intl = useIntl();
const { locale } = intl;
const [data, setData] = React.useState({});
const [onReady, setOnReady] = React.useState(false);
React.useEffect(() => {
if (formData != null && formData != undefined && Object.keys(formData).length > 0) {
setData(formData);
}
}, [formData]);
React.useEffect(() => {
if (formData != null && formData != undefined && Object.keys(formData).length > 0) {
setOnReady(data != {});
}
}, [data]);
const getPaymentMethod=()=>{
let paymentmethod = data?.payload?.paymentdetail?.paymentmethod;
if("01" == paymentmethod) return "PPS";
if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card";
if("04" == paymentmethod) return "FPS";
return paymentmethod;
}
return (
!onReady ?
:
);
};
export default PaymentDetails;