From 8b489fcdc098146752f346c3f9588287bd6c20e9 Mon Sep 17 00:00:00 2001 From: GabrielMeyer Date: Mon, 29 Apr 2019 10:30:27 +0200 Subject: [PATCH] Adds the `structure-level` to the `user-list` - The dialog shows the structure level of one user - In the list-view the structure level and the participant number are displayed. --- .../components/user-list/user-list.component.html | 14 +++++++++++++- .../components/user-list/user-list.component.scss | 4 ++++ .../components/user-list/user-list.component.ts | 10 +++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/users/components/user-list/user-list.component.html b/client/src/app/site/users/components/user-list/user-list.component.html index fc9198ebe..1af1136c2 100644 --- a/client/src/app/site/users/components/user-list/user-list.component.html +++ b/client/src/app/site/users/components/user-list/user-list.component.html @@ -62,6 +62,8 @@
flag{{ user.structure_level }} +
+ perm_identity{{ user.number }} @@ -110,6 +112,7 @@ [ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''" *matRowDef="let row; columns: getColumnDefinition()" (click)="selectItem(row, $event)" + class="lg" > @@ -253,6 +256,14 @@ {{ gender | translate }} + + + Save diff --git a/client/src/app/site/users/components/user-list/user-list.component.scss b/client/src/app/site/users/components/user-list/user-list.component.scss index 1fd7b68cd..c073436ba 100644 --- a/client/src/app/site/users/components/user-list/user-list.component.scss +++ b/client/src/app/site/users/components/user-list/user-list.component.scss @@ -13,6 +13,10 @@ flex: 2 0 60px; .groupsCell { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + mat-icon { font-size: 80%; } diff --git a/client/src/app/site/users/components/user-list/user-list.component.ts b/client/src/app/site/users/components/user-list/user-list.component.ts index 3a9d38b16..3f14fde3b 100644 --- a/client/src/app/site/users/components/user-list/user-list.component.ts +++ b/client/src/app/site/users/components/user-list/user-list.component.ts @@ -46,6 +46,11 @@ interface InfoDialog { * The participant number of the user. */ number: string; + + /** + * Structure level for one user. + */ + structure_level: string; } /** @@ -169,7 +174,9 @@ export class UserListComponent extends ListViewBaseComponent imp // Initialize the groups this.groups = this.groupRepo.getSortedViewModelList().filter(group => group.id !== 1); - this.groupRepo.getViewModelListObservable().subscribe(groups => (this.groups = groups)); + this.groupRepo + .getViewModelListObservable() + .subscribe(groups => (this.groups = groups.filter(group => group.id !== 1))); } /** @@ -203,6 +210,7 @@ export class UserListComponent extends ListViewBaseComponent imp name: user.username, groups_id: user.groups_id, gender: user.gender, + structure_level: user.structure_level, number: user.number };