blob: 233096aa0a81e99d37261661b2df52ffb5d488ec (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 | <div id="box">
    @if ((authService.getCurrentUserSubject() | async)?.type === userType.MANAGER) {
        <h1>Admin Dashboard</h1>
        <div id="stats">
            <div class="card">
                <span>Registered users</span>
                <h1 class="content" *ngIf="count"> {{count | async}} </h1>
            </div>
            <div class="card">
                <span>Total monetary contributions</span>
                <h1 class="content" *ngIf="totalDonations"> ${{totalDonations | async}} </h1>
            </div>
        </div>
        <div class="listCard">
            <span>Fulfilled needs</span>
            <app-mini-need-list [needList]="fulfilledNeeds.getValue()" label="Fulfilled needs"> </app-mini-need-list>
        </div>
        <div class="listCard">
            <span>Most fulfilled needs</span>
            <app-mini-need-list [needList]="mostFulfilledNeeds.getValue()" label="Most fulfilled"> </app-mini-need-list>
        </div>
    } @else {
        <h1>Unauthorized</h1>
        <span>This page requires you to be logged in as an admin! <a routerLink="/login">Log In</a></span>
    }
</div>
 |