WEB-601 Create env var for hidding client data information (#3010)
This commit is contained in:
@@ -50,7 +50,9 @@
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="displayName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']">{{ row.displayName }}</td>
|
||||
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']">
|
||||
{{ hideClientData ? maskName(row.displayName) : row.displayName }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Account no Column -->
|
||||
|
||||
@@ -67,6 +67,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
export class ClientsComponent implements OnInit {
|
||||
private clientService = inject(ClientsService);
|
||||
|
||||
/** Returns true if client data masking is enabled */
|
||||
get hideClientData(): boolean {
|
||||
return environment.complianceHideClientData;
|
||||
}
|
||||
|
||||
/** Mask a client name */
|
||||
maskName(name: string): string {
|
||||
if (!name) return '';
|
||||
return name
|
||||
.split(' ')
|
||||
.map((part) => (part.length > 1 ? part[0] + '*'.repeat(part.length - 1) : part))
|
||||
.join(' ');
|
||||
}
|
||||
|
||||
@ViewChild('showClosedAccounts') showClosedAccounts: MatCheckbox;
|
||||
|
||||
displayedColumns = [
|
||||
|
||||
Reference in New Issue
Block a user