11122023
This commit is contained in:
@@ -65,7 +65,10 @@ const Createclient = () => {
|
||||
const [primarycontact,setPrimarycontact]=useState('')
|
||||
const [firstname,setFirstname]=useState('');
|
||||
const [doorno,setDoorno]=useState('');
|
||||
const [landmark,setLandmark]=useState('')
|
||||
const [landmark,setLandmark]=useState('');
|
||||
const [tenantinfo, setTenantinfo] = useState({});
|
||||
|
||||
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -78,7 +81,9 @@ const Createclient = () => {
|
||||
useEffect(() => {
|
||||
// fetchprofiledetails(localStorage.getItem('appuserid'));
|
||||
// fetchprofiledetails(181);
|
||||
|
||||
if(localStorage.getItem('tenantid')){
|
||||
fetchtenantinfo(localStorage.getItem('tenantid'))
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -158,6 +163,21 @@ const Createclient = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const fetchtenantinfo = 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) {
|
||||
setTenantinfo(res.data.details);
|
||||
}
|
||||
setLoading(false)
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
setLoading(false)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedImage) {
|
||||
setAvatar(URL.createObjectURL(selectedImage));
|
||||
@@ -241,7 +261,7 @@ const Createclient = () => {
|
||||
"customerid":0,
|
||||
"configid":1,
|
||||
"firstname":firstname,
|
||||
"applocationid":3,
|
||||
"applocationid":tenantinfo.applolcationid,
|
||||
"profileimage":"",
|
||||
"dialcode":"+91",
|
||||
"contactno":mobilenumber,
|
||||
|
||||
Reference in New Issue
Block a user