Merge latest changes
This commit is contained in:
commit
b34a17004b
57 files changed
+1242
-844
No files matched your search
@@ -25,7 +25,11 @@ const Account = ({ open = "profile" }) => {
|
||||
|
||||
let tabList = ["Profile", "Password", "Team"];
|
||||
const { user } = useSelector((state) => state.auth);
|
||||
if (!user.role.includes("admin")) tabList = ["Profile", "Password"];
|
||||
const requiredRoles = ["superadmin", "admin"];
|
||||
const hideTeams = !requiredRoles.some((role) => user.role.includes(role));
|
||||
if (hideTeams) {
|
||||
tabList = ["Profile", "Password"];
|
||||
}
|
||||
|
||||
return (
|
||||
<Box
|
||||
@@ -71,7 +75,7 @@ const Account = ({ open = "profile" }) => {
|
||||
</Box>
|
||||
<ProfilePanel />
|
||||
<PasswordPanel />
|
||||
{user.role.includes("admin") && <TeamPanel />}
|
||||
{!hideTeams && <TeamPanel />}
|
||||
</TabContext>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user