fixed few issues with the frontend

This commit is contained in:
Hari Krishna
2024-03-05 07:29:22 +00:00
parent 4a3d956023
commit c581618817
+25 -18
View File
@@ -206,8 +206,12 @@ const Admin = (props) => {
}, [isDropzone]);
useEffect(() => {
if (userdata.orgs !== undefined && userdata.orgs !== null && userdata.orgs.length > 0) {
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";
@@ -4771,8 +4775,8 @@ const handleClickChangeOrg = (orgId) => {
{subOrgs.length > 0 ? (
<span>
<div style={{ backgroundColor: '#1f2023', textAlign: 'center', width: '100%', padding: '10px' }}>
<h3 style={{ margin: 0 }}>Your Sub Organizations of the Current Organization</h3>
<div style={{textAlign: 'center', width: '100%', padding: '10px', marginTop: 20 }}>
<h3 style={{ margin: 0, fontSize: '1.2rem', fontWeight: 'bold', letterSpacing: '1px' }}>Sub Organizations of the Current Organization</h3>
</div>
<Divider
@@ -4816,8 +4820,8 @@ const handleClickChangeOrg = (orgId) => {
<ListItemText primary={data.name} style={{ minWidth: 250, maxWidth: 250 }} />
<ListItemText primary={data.role} style={{ minWidth: 150, maxWidth: 150 }} />
<ListItemText primary={data.id} style={{ minWidth: 400, maxWidth: 400 }} />
<Button
style={{}}
variant="contained"
color="primary"
disabled={userdata.admin !== "true"}
@@ -4825,36 +4829,39 @@ const handleClickChangeOrg = (orgId) => {
>
Switch Organization
</Button>
</ListItem>
);
})}
</span>
</List>
<Divider
style={{
marginTop: 20,
marginBottom: 20,
backgroundColor: theme.palette.inputColor,
}}
/>
</span>
) : (
<ListItem>
No Sub-Organizations available.
</ListItem>
<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>
)}
<div style={{ backgroundColor: '#1f2023', textAlign: 'center', width: '100%', padding: '10px' }}>
<h3 style={{ margin: 0 }}>All Tenants</h3>
</div>
<Divider
<Divider
style={{
marginTop: 20,
marginBottom: 20,
backgroundColor: theme.palette.inputColor,
}}
/>
<div style={{textAlign: 'center', width: '100%', padding: '10px', marginTop: 20 }}>
<h3 style={{ margin: 0, fontSize: '1.2rem', fontWeight: 'bold', letterSpacing: '1px' }}>All Tenants</h3>
</div>
<Divider
style={{
marginTop: 20,
marginBottom: 20,
backgroundColor: theme.palette.inputColor,
}}
/>
<List>
<ListItem>
<ListItemText