aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/dashboard/dashboard.component.html
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
commit9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6 (patch)
tree8af111a538a8d6361e1cf07467b9c31568284921 /ufund-ui/src/app/components/dashboard/dashboard.component.html
parent1ac878b4aaa19ab889c7a98b7dab6acd57c778b3 (diff)
parent04cb51b2e7891785c956c5faa73fb88cc04e82e0 (diff)
downloadJellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.gz
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.bz2
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.zip
Merge branch 'main' into light-mode
# Conflicts: # ufund-ui/src/app/app.component.html # ufund-ui/src/app/components/funding-basket/funding-basket.component.html # ufund-ui/src/app/components/need-list/need-list.component.html # ufund-ui/src/app/components/need-page/need-page.component.css
Diffstat (limited to 'ufund-ui/src/app/components/dashboard/dashboard.component.html')
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.html37
1 files changed, 28 insertions, 9 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html
index 2d7b4c3..233096a 100644
--- a/ufund-ui/src/app/components/dashboard/dashboard.component.html
+++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html
@@ -1,10 +1,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>
-<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>_ Needs with overflow</span>
-<span>_ Needs in peoples baskets</span>
-<span>_ Total monetary contributions</span>
-<span>_ </span>
+ <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>