#328656 Add request count to group details screen.

This commit is contained in:
Georgi Prodanov 2017-03-17 16:00:38 +02:00
Родитель 0317e6a7af
Коммит 9f62962b3c
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -23,6 +23,7 @@ export class GroupDetailsComponent extends AndroidBackOverrider implements OnIni
iosPopupOpen: boolean = false; iosPopupOpen: boolean = false;
membershipChanged: boolean = false; membershipChanged: boolean = false;
userApplication: GroupJoinRequest = null; userApplication: GroupJoinRequest = null;
requestCount: number;
private _currentUser: User; private _currentUser: User;
private _disableJoinBtn: boolean = false; private _disableJoinBtn: boolean = false;
@ -45,6 +46,9 @@ export class GroupDetailsComponent extends AndroidBackOverrider implements OnIni
this._activatedRoute.params.subscribe(p => { this._activatedRoute.params.subscribe(p => {
let groupId = p['id']; let groupId = p['id'];
this._groupsService.getUnresolvedRequestsCount(groupId)
.then(count => this.requestCount = count);
let userPrm = this._usersService.currentUser() let userPrm = this._usersService.currentUser()
.then(user => this._currentUser = user); .then(user => this._currentUser = user);

Просмотреть файл

@ -42,6 +42,7 @@
<StackLayout *ngIf="group.RequiresApproval && canEdit()" class="btn" (tap)="onViewRequests()" col="1"> <StackLayout *ngIf="group.RequiresApproval && canEdit()" class="btn" (tap)="onViewRequests()" col="1">
<Label class="btn-icon if" text="&#x6d;"></Label> <Label class="btn-icon if" text="&#x6d;"></Label>
<Label class="btn-text" text="See requests"></Label> <Label class="btn-text" text="See requests"></Label>
<Label *ngIf="requestCount" class="btn-text" [text]="requestCount"></Label>
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>