Fix widget user page not showing team member custom roles

This commit is contained in:
Kalle
2026-06-15 14:38:42 +03:00
parent 2b17bdbb22
commit 7f38ee5f12
2 changed files with 4 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ export function findAllMemberOfByUserId(userId: number) {
"Team.name",
"Team.mapModePreferences",
"TeamMemberWithSecondary.role",
"TeamMemberWithSecondary.customRole",
"TeamMemberWithSecondary.isOwner",
"TeamMemberWithSecondary.isManager",
concatUserSubmittedImagePrefix(eb.ref("UserSubmittedImage.url")).as(

View File

@@ -92,7 +92,9 @@ export function Widget({
url: teamPage(team.customUrl),
name: team.name,
logoUrl: team.logoUrl,
roleDisplayName: team.role ? t(`team:roles.${team.role}`) : null,
roleDisplayName:
team.customRole ??
(team.role ? t(`team:roles.${team.role}`) : null),
}))}
/>
);