display plan user roles as string ui fix

This commit is contained in:
CITE\amentis 2024-10-11 16:49:30 +03:00
parent f8684f996a
commit f50e229b30
1 changed files with 5 additions and 1 deletions

View File

@ -234,7 +234,11 @@ export class EnumUtils {
}
}
toPlanUserRolesString(roles: PlanUserRole[]): string { return roles.map(x => this.toPlanUserRoleString(x)).join(', ') }
toPlanUserRolesString(roles: PlanUserRole[]): string {
const distinctRoles =[...new Set(roles)]
return distinctRoles?.map(x => this.toPlanUserRoleString(x)).join(', ')
}
toPlanUserRoleString(role: PlanUserRole): string {
switch (role) {
case PlanUserRole.Owner: return this.language.instant('TYPES.PLAN-USER-ROLE.OWNER');