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.
This commit is contained in:
parent
29aa6acdc5
commit
8b489fcdc0
@ -62,6 +62,8 @@
|
||||
</span>
|
||||
<br *ngIf="user.groups && user.structure_level" />
|
||||
<span *ngIf="user.structure_level"> <mat-icon>flag</mat-icon>{{ user.structure_level }}</span>
|
||||
<br *ngIf="user.number" />
|
||||
<span *ngIf="user.number"> <mat-icon>perm_identity</mat-icon>{{ user.number }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</mat-cell>
|
||||
@ -110,6 +112,7 @@
|
||||
[ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''"
|
||||
*matRowDef="let row; columns: getColumnDefinition()"
|
||||
(click)="selectItem(row, $event)"
|
||||
class="lg"
|
||||
>
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
@ -253,6 +256,14 @@
|
||||
<mat-option *ngFor="let gender of genderList" [value]="gender">{{ gender | translate }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="{{ 'Structure level' | translate }}"
|
||||
[(ngModel)]="infoDialog.structure_level"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input
|
||||
type="text"
|
||||
@ -270,7 +281,8 @@
|
||||
[mat-dialog-close]="{
|
||||
groups_id: infoDialog.groups_id,
|
||||
gender: infoDialog.gender,
|
||||
number: infoDialog.number
|
||||
number: infoDialog.number,
|
||||
structure_level: infoDialog.structure_level
|
||||
}"
|
||||
>
|
||||
<span translate>Save</span>
|
||||
|
@ -13,6 +13,10 @@
|
||||
flex: 2 0 60px;
|
||||
|
||||
.groupsCell {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
mat-icon {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
@ -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<ViewUser, User> 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<ViewUser, User> imp
|
||||
name: user.username,
|
||||
groups_id: user.groups_id,
|
||||
gender: user.gender,
|
||||
structure_level: user.structure_level,
|
||||
number: user.number
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user