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 <[email protected]>
This commit is contained in:
Ramon
2026-03-10 13:47:13 +00:00
committed by GitHub
co-authored by Copilot
parent 057fb8dff2
commit 689b90d9d9
2 changed files with 4 additions and 2 deletions
@@ -107,8 +107,8 @@
<ng-container matColumnDef="org">
<th mat-header-cell *matHeaderCellDef>{{ 'PROJECT.GRANT.ORG' | translate }}</th>
<td mat-cell *matCellDef="let grant">
{{ grant.grantedOrgName }}
<td mat-cell *cnslCellDef="let grant; dataSource: dataSource">
{{ 'grantedOrgName' in grant && grant.grantedOrgName ? grant.grantedOrgName : grant.orgName }}
</td>
</ng-container>
@@ -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],
})