From 680f4cfa95d8ef222e516df4f68fd1f6f979edd9 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 5 Sep 2024 19:55:19 +0100 Subject: [PATCH] Made it so it will show always the corporate --- src/utils/groups.be.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/groups.be.ts b/src/utils/groups.be.ts index b36b8921..0a911581 100644 --- a/src/utils/groups.be.ts +++ b/src/utils/groups.be.ts @@ -40,7 +40,7 @@ export const getUserCorporate = async (id: string) => { const groups = await getParticipantGroups(id); const admins = await Promise.all(groups.map((x) => x.admin).map(getUser)); - const corporates = admins.filter((x) => x.type === "corporate" || x.type === "mastercorporate"); + const corporates = admins.filter((x) => (user.type === "corporate" ? x.type === "mastercorporate" : x.type === "corporate")); if (corporates.length === 0) return undefined; return corporates.shift() as CorporateUser | MasterCorporateUser;