aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/dashboard/dashboard.component.html
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-04 23:14:14 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-04 23:14:14 -0400
commit7c49fcd788692a898e985cb156dd9fd910c05790 (patch)
treefad3944da55014731cf0455ea416df72c16ebb4c /ufund-ui/src/app/components/dashboard/dashboard.component.html
parentf70e86470f7083cda1949ff97556d9e39578ce1d (diff)
downloadJellySolutions-7c49fcd788692a898e985cb156dd9fd910c05790.tar.gz
JellySolutions-7c49fcd788692a898e985cb156dd9fd910c05790.tar.bz2
JellySolutions-7c49fcd788692a898e985cb156dd9fd910c05790.zip
Add new authentication to dashboard, cleanup
Diffstat (limited to 'ufund-ui/src/app/components/dashboard/dashboard.component.html')
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.html31
1 files changed, 17 insertions, 14 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html
index 2af467c..074ca76 100644
--- a/ufund-ui/src/app/components/dashboard/dashboard.component.html
+++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html
@@ -1,14 +1,17 @@
-
-<h1>Admin Dashboard</h1>
-<!--<app-mini-need-list [needList]="topNeeds" jtitle="Top needs" url="/cupboard"/>-->
-<!--<app-mini-need-list [needList]="almostThere" jtitle="Almost there" url="/cupboard"/>-->
-<!--<app-mini-need-list [needList]="inBasket" jtitle="In your basket" url="/basket"/>-->
-<span>_ Registered users</span>
-<span *ngIf="count"> {{count | async}} </span>
-<span>_ Fulfilled needs</span>
-<app-mini-need-list [needList]="fulfilledNeeds.getValue()" jtitle="Fulfilled needs"> </app-mini-need-list>
-<span>_ Most fulfilled needs</span>
-<app-mini-need-list [needList]="mostFulfilledNeeds.getValue()" jtitle="Most fulfilled"> </app-mini-need-list>
-<span>_ Total monetary contributions</span>
-<span *ngIf="totalDonations">${{totalDonations | async}} </span>
-<span>_ </span>
+<div id="box">
+ @if ((authService.getCurrentUserSubject() | async)?.type === userType.MANAGER) {
+ <h1>Admin Dashboard</h1>
+ <span>_ Registered users</span>
+ <span *ngIf="count"> {{count | async}} </span>
+ <span>_ Fulfilled needs</span>
+ <app-mini-need-list [needList]="fulfilledNeeds.getValue()" label="Fulfilled needs"> </app-mini-need-list>
+ <span>_ Most fulfilled needs</span>
+ <app-mini-need-list [needList]="mostFulfilledNeeds.getValue()" label="Most fulfilled"> </app-mini-need-list>
+ <span>_ Total monetary contributions</span>
+ <span *ngIf="totalDonations">${{totalDonations | async}} </span>
+ <span>_ </span>
+ } @else {
+ <h1>Unauthorized</h1>
+ <span>This page requires you to be logged in as an admin! <a routerLink="/login">Log In</a></span>
+ }
+</div>