Added initial support for "mastercorporate"

This commit is contained in:
Joao Ramos
2024-07-13 17:19:42 +01:00
parent 5cfd6d56a6
commit 5d46d7e453
20 changed files with 719 additions and 182 deletions

View File

@@ -92,7 +92,7 @@ export default function UserList({
const { users, reload } = useUsers();
const { groups } = useGroups(
user && (user?.type === "corporate" || user?.type === "teacher")
user && (['corporate', 'teacher', 'mastercorporate'].includes(user?.type))
? user.id
: undefined
);
@@ -403,7 +403,7 @@ export default function UserList({
}),
columnHelper.accessor(
(x) =>
x.type === "corporate"
x.type === "corporate" || x.type === "mastercorporate"
? x.demographicInformation?.position
: x.demographicInformation?.employment,
{
@@ -706,11 +706,11 @@ export default function UserList({
if (sorter === "employment" || sorter === reverseString("employment")) {
const aSortingItem =
a.type === "corporate"
a.type === "corporate" || a.type === "mastercorporate"
? a.demographicInformation?.position
: a.demographicInformation?.employment;
const bSortingItem =
b.type === "corporate"
b.type === "corporate" || b.type === "mastercorporate"
? b.demographicInformation?.position
: b.demographicInformation?.employment;