fixed few issues with the frontend
This commit is contained in:
@@ -206,8 +206,12 @@ const Admin = (props) => {
|
|||||||
}, [isDropzone]);
|
}, [isDropzone]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (userdata.orgs !== undefined && userdata.orgs !== null && userdata.orgs.length > 0) {
|
||||||
handleGetSubOrgs(userdata.active_org.id);
|
handleGetSubOrgs(userdata.active_org.id);
|
||||||
}, []);
|
}
|
||||||
|
else console.log("error in user data")
|
||||||
|
}, [userdata]);
|
||||||
|
|
||||||
|
|
||||||
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
|
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
|
||||||
|
|
||||||
@@ -4771,8 +4775,8 @@ const handleClickChangeOrg = (orgId) => {
|
|||||||
|
|
||||||
{subOrgs.length > 0 ? (
|
{subOrgs.length > 0 ? (
|
||||||
<span>
|
<span>
|
||||||
<div style={{ backgroundColor: '#1f2023', textAlign: 'center', width: '100%', padding: '10px' }}>
|
<div style={{textAlign: 'center', width: '100%', padding: '10px', marginTop: 20 }}>
|
||||||
<h3 style={{ margin: 0 }}>Your Sub Organizations of the Current Organization</h3>
|
<h3 style={{ margin: 0, fontSize: '1.2rem', fontWeight: 'bold', letterSpacing: '1px' }}>Sub Organizations of the Current Organization</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Divider
|
<Divider
|
||||||
@@ -4816,8 +4820,8 @@ const handleClickChangeOrg = (orgId) => {
|
|||||||
<ListItemText primary={data.name} style={{ minWidth: 250, maxWidth: 250 }} />
|
<ListItemText primary={data.name} style={{ minWidth: 250, maxWidth: 250 }} />
|
||||||
<ListItemText primary={data.role} style={{ minWidth: 150, maxWidth: 150 }} />
|
<ListItemText primary={data.role} style={{ minWidth: 150, maxWidth: 150 }} />
|
||||||
<ListItemText primary={data.id} style={{ minWidth: 400, maxWidth: 400 }} />
|
<ListItemText primary={data.id} style={{ minWidth: 400, maxWidth: 400 }} />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style={{}}
|
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
disabled={userdata.admin !== "true"}
|
disabled={userdata.admin !== "true"}
|
||||||
@@ -4825,11 +4829,20 @@ const handleClickChangeOrg = (orgId) => {
|
|||||||
>
|
>
|
||||||
Switch Organization
|
Switch Organization
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<div style={{ textAlign: 'center', marginTop: 20 }}>
|
||||||
|
<h3 style={{ margin: 0, color: '#b0bec5', fontSize: '1rem', fontStyle: 'italic' }}>No Sub-Organizations found for the Current Organization</h3>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<Divider
|
<Divider
|
||||||
style={{
|
style={{
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
@@ -4838,14 +4851,8 @@ const handleClickChangeOrg = (orgId) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</span>
|
<div style={{textAlign: 'center', width: '100%', padding: '10px', marginTop: 20 }}>
|
||||||
) : (
|
<h3 style={{ margin: 0, fontSize: '1.2rem', fontWeight: 'bold', letterSpacing: '1px' }}>All Tenants</h3>
|
||||||
<ListItem>
|
|
||||||
No Sub-Organizations available.
|
|
||||||
</ListItem>
|
|
||||||
)}
|
|
||||||
<div style={{ backgroundColor: '#1f2023', textAlign: 'center', width: '100%', padding: '10px' }}>
|
|
||||||
<h3 style={{ margin: 0 }}>All Tenants</h3>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Divider
|
<Divider
|
||||||
|
|||||||
Reference in New Issue
Block a user