aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.html2
-rw-r--r--ufund-ui/src/app/components/dashboard/dashboard.component.ts11
2 files changed, 11 insertions, 2 deletions
diff --git a/ufund-ui/src/app/components/dashboard/dashboard.component.html b/ufund-ui/src/app/components/dashboard/dashboard.component.html
index 12ecc8b..a1151b7 100644
--- a/ufund-ui/src/app/components/dashboard/dashboard.component.html
+++ b/ufund-ui/src/app/components/dashboard/dashboard.component.html
@@ -1,4 +1,4 @@
<h1>Dashboard</h1>
<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 d3dc1d8..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,6 +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);
+ }
}