From 689b90d9d9b84739479353f3e1076a76ce889f47 Mon Sep 17 00:00:00 2001 From: Ramon Date: Tue, 10 Mar 2026 14:47:13 +0100 Subject: [PATCH] fix(console): organization column display in grants #10822 (#11742) # Which Problems Are Solved - The organization name in the user grants table was not consistently displayed. The `grantedOrgName` property was sometimes missing, resulting in an empty or incorrect value in the 'org' column. # How the Problems Are Solved - Implements a conditional check for the 'org' column in the user grants table. The cell now displays `grantedOrgName` if available, otherwise it falls back to `orgName`. # Additional Changes - Imports and adds `TypeSafeCellDefModule` to the user grants module, providing the `cnslCellDef` directive for more flexible and type-safe cell definitions. # Additional Context - Fixes #10822 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/app/modules/user-grants/user-grants.component.html | 4 ++-- console/src/app/modules/user-grants/user-grants.module.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/console/src/app/modules/user-grants/user-grants.component.html b/console/src/app/modules/user-grants/user-grants.component.html index 6d786294d..f559b6843 100644 --- a/console/src/app/modules/user-grants/user-grants.component.html +++ b/console/src/app/modules/user-grants/user-grants.component.html @@ -107,8 +107,8 @@ {{ 'PROJECT.GRANT.ORG' | translate }} - - {{ grant.grantedOrgName }} + + {{ 'grantedOrgName' in grant && grant.grantedOrgName ? grant.grantedOrgName : grant.orgName }} diff --git a/console/src/app/modules/user-grants/user-grants.module.ts b/console/src/app/modules/user-grants/user-grants.module.ts index d076ec28a..96372c611 100644 --- a/console/src/app/modules/user-grants/user-grants.module.ts +++ b/console/src/app/modules/user-grants/user-grants.module.ts @@ -11,6 +11,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { RouterModule } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { HasRoleModule } from 'src/app/directives/has-role/has-role.module'; +import { TypeSafeCellDefModule } from 'src/app/directives/type-safe-cell-def/type-safe-cell-def.module'; import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module'; import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module'; import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module'; @@ -55,6 +56,7 @@ import { UserGrantsComponent } from './user-grants.component'; LocalizedDatePipeModule, InputModule, WarnDialogModule, + TypeSafeCellDefModule, ], exports: [UserGrantsComponent], })