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>
|
</span>
|
||||||
<br *ngIf="user.groups && user.structure_level" />
|
<br *ngIf="user.groups && user.structure_level" />
|
||||||
<span *ngIf="user.structure_level"> <mat-icon>flag</mat-icon>{{ user.structure_level }}</span>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
@ -110,6 +112,7 @@
|
|||||||
[ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''"
|
[ngClass]="selectedRows.indexOf(row) >= 0 ? 'selected' : ''"
|
||||||
*matRowDef="let row; columns: getColumnDefinition()"
|
*matRowDef="let row; columns: getColumnDefinition()"
|
||||||
(click)="selectItem(row, $event)"
|
(click)="selectItem(row, $event)"
|
||||||
|
class="lg"
|
||||||
>
|
>
|
||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
@ -253,6 +256,14 @@
|
|||||||
<mat-option *ngFor="let gender of genderList" [value]="gender">{{ gender | translate }}</mat-option>
|
<mat-option *ngFor="let gender of genderList" [value]="gender">{{ gender | translate }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
matInput
|
||||||
|
placeholder="{{ 'Structure level' | translate }}"
|
||||||
|
[(ngModel)]="infoDialog.structure_level"
|
||||||
|
/>
|
||||||
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@ -270,7 +281,8 @@
|
|||||||
[mat-dialog-close]="{
|
[mat-dialog-close]="{
|
||||||
groups_id: infoDialog.groups_id,
|
groups_id: infoDialog.groups_id,
|
||||||
gender: infoDialog.gender,
|
gender: infoDialog.gender,
|
||||||
number: infoDialog.number
|
number: infoDialog.number,
|
||||||
|
structure_level: infoDialog.structure_level
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<span translate>Save</span>
|
<span translate>Save</span>
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
flex: 2 0 60px;
|
flex: 2 0 60px;
|
||||||
|
|
||||||
.groupsCell {
|
.groupsCell {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
mat-icon {
|
mat-icon {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,11 @@ interface InfoDialog {
|
|||||||
* The participant number of the user.
|
* The participant number of the user.
|
||||||
*/
|
*/
|
||||||
number: string;
|
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
|
// Initialize the groups
|
||||||
this.groups = this.groupRepo.getSortedViewModelList().filter(group => group.id !== 1);
|
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,
|
name: user.username,
|
||||||
groups_id: user.groups_id,
|
groups_id: user.groups_id,
|
||||||
gender: user.gender,
|
gender: user.gender,
|
||||||
|
structure_level: user.structure_level,
|
||||||
number: user.number
|
number: user.number
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user