#328656 Add request count to group details screen.
This commit is contained in:
Родитель
0317e6a7af
Коммит
9f62962b3c
|
@ -23,6 +23,7 @@ export class GroupDetailsComponent extends AndroidBackOverrider implements OnIni
|
|||
iosPopupOpen: boolean = false;
|
||||
membershipChanged: boolean = false;
|
||||
userApplication: GroupJoinRequest = null;
|
||||
requestCount: number;
|
||||
private _currentUser: User;
|
||||
private _disableJoinBtn: boolean = false;
|
||||
|
||||
|
@ -45,6 +46,9 @@ export class GroupDetailsComponent extends AndroidBackOverrider implements OnIni
|
|||
this._activatedRoute.params.subscribe(p => {
|
||||
let groupId = p['id'];
|
||||
|
||||
this._groupsService.getUnresolvedRequestsCount(groupId)
|
||||
.then(count => this.requestCount = count);
|
||||
|
||||
let userPrm = this._usersService.currentUser()
|
||||
.then(user => this._currentUser = user);
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<StackLayout *ngIf="group.RequiresApproval && canEdit()" class="btn" (tap)="onViewRequests()" col="1">
|
||||
<Label class="btn-icon if" text="m"></Label>
|
||||
<Label class="btn-text" text="See requests"></Label>
|
||||
<Label *ngIf="requestCount" class="btn-text" [text]="requestCount"></Label>
|
||||
</StackLayout>
|
||||
</GridLayout>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче