Total number of organization users added (#489)

This commit is contained in:
brunohunziker 2020-03-10 17:06:25 +01:00 committed by GitHub
parent 5dfeee548d
commit 84dde72990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@
<button type="button" class="btn btn-outline-secondary" [ngClass]="{active: status == null}" <button type="button" class="btn btn-outline-secondary" [ngClass]="{active: status == null}"
(click)="filter(null)"> (click)="filter(null)">
{{'all' | i18n}} {{'all' | i18n}}
<span class="badge badge-pill badge-info" *ngIf="allCount">{{allCount}}</span>
</button> </button>
<button type="button" class="btn btn-outline-secondary" <button type="button" class="btn btn-outline-secondary"
[ngClass]="{active: status == organizationUserStatusType.Invited}" [ngClass]="{active: status == organizationUserStatusType.Invited}"

View File

@ -121,6 +121,10 @@ export class PeopleComponent implements OnInit {
} }
} }
get allCount() {
return this.allUsers.length;
}
get invitedCount() { get invitedCount() {
return this.statusMap.has(OrganizationUserStatusType.Invited) ? return this.statusMap.has(OrganizationUserStatusType.Invited) ?
this.statusMap.get(OrganizationUserStatusType.Invited).length : 0; this.statusMap.get(OrganizationUserStatusType.Invited).length : 0;