aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/dashboard
diff options
context:
space:
mode:
authorHayden Hartman <haydenhartman10@gmail.com>2025-03-18 17:17:23 -0400
committerGitHub <noreply@github.com>2025-03-18 17:17:23 -0400
commitdb9e4a8c26dc5252cfe0974843bc391c57edd07d (patch)
tree0c8aba41ae378fe04e8312ab9eff48656732c9c8 /ufund-ui/src/app/components/dashboard
parentc7c4e037d655762cc6b394a460effbcd8816d175 (diff)
parent7a5396b65fcde8153c8eeae565bfecb7de37b23f (diff)
downloadJellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.tar.gz
JellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.tar.bz2
JellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.zip
Merge pull request #14 from RIT-SWEN-261-02/funding_basketv2.1
funding-basket merge
Diffstat (limited to 'ufund-ui/src/app/components/dashboard')
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.html3
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.ts14
2 files changed, 11 insertions, 6 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html
index fc8baf0..a1151b7 100644
--- a/ufund-ui/src/app/components/dashboard/dashboard.component.html
+++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html
@@ -1,5 +1,4 @@
<h1>Dashboard</h1>
-<input type="button" value="Back to Login" (click)="back()">
<app-cupboard></app-cupboard>
-<app-funding-basket></app-funding-basket> \ No newline at end of file
+<app-funding-basket *ngIf="!isManager()"></app-funding-basket> \ No newline at end of file
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.ts b/ufund-ui/src/app/components/dashboard/dashboard.component.ts
index 48c5894..b9faefa 100644
--- a/ufund-ui/src/app/components/dashboard/dashboard.component.ts
+++ b/ufund-ui/src/app/components/dashboard/dashboard.component.ts
@@ -1,4 +1,6 @@
import { Component } from '@angular/core';
+import { UsersService } from '../../services/users.service';
+import { userType } from '../../models/User';
@Component({
selector: 'app-dashboard',
@@ -7,9 +9,13 @@ import { Component } from '@angular/core';
styleUrl: './dashboard.component.css'
})
export class DashboardComponent {
- constructor() {}
+ constructor(
+ protected usersService: UsersService,
+ ) {}
+
+ isManager() {
+ const type = this.usersService.getCurrentUser()?.type;
+ return type === ("MANAGER" as unknown as userType);
+ }
- back() {
- window.history.back();
- }
}