This commit is contained in:
Malai Raja
2023-12-04 19:05:28 +05:30
parent 2d7eb690a1
commit 743cae09b8
13 changed files with 4795 additions and 1179 deletions

View File

@@ -14,6 +14,7 @@ import {
Avatar,
} from '@mui/material';
import { enqueueSnackbar } from 'notistack';
import LinearWithLabel from 'components/@extended/progress/LinearWithLabel';
// import { PatternFormat } from 'react-number-format';
import axios from 'axios';
@@ -21,11 +22,12 @@ import axios from 'axios';
import MainCard from 'components/MainCard';
import { AimOutlined, EnvironmentOutlined, MailOutlined, PhoneOutlined } from '@ant-design/icons';
import { useEffect ,useState} from 'react';
import Loader from 'components/Loader';
const Accountsettings = () => {
const matchDownMD = useMediaQuery((theme) => theme.breakpoints.down('md'));
const [info, setInfo] = useState({})
const [info, setInfo] = useState({});
const [loading,setLoading]=useState(false)
useEffect(() => {
if (localStorage.getItem('tenantid')) {
@@ -35,20 +37,32 @@ const Accountsettings = () => {
}, []);
const fetchaccount = async (tid) => {
setLoading(true)
await axios.get(`${process.env.REACT_APP_URL}/tenants/gettenantinfo/?tenantid=${tid}`)
.then((res) => {
console.log(res)
if (res.data.status) {
setInfo(res.data.details);
}
setLoading(false)
}).catch((err) => {
console.log(err)
enqueueSnackbar(err.message, {
variant: 'error', anchorOrigin: { vertical: 'top', horizontal: 'right' },
autoHideDuration: 2000
})
setLoading(false)
})
}
return <>
{loading &&
<Loader />
}
<Grid container rowSpacing={4.5} columnSpacing={2.75}>
<Grid item xs={12} sx={{ mb: -2.25 }}>
<Stack direction={{ xs: 'column', md: 'row' }} justifyContent='space-between' alignItems='center' spacing={2}>