diff options
author | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-03-18 17:15:42 -0400 |
---|---|---|
committer | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-03-18 17:15:42 -0400 |
commit | 7a5396b65fcde8153c8eeae565bfecb7de37b23f (patch) | |
tree | 9d0e1eb16e1fe2230adb3cf1fcfe0461bb36c190 | |
parent | 28339dd8694a91c9f7d08bc5155fe6765440428a (diff) | |
download | JellySolutions-7a5396b65fcde8153c8eeae565bfecb7de37b23f.tar.gz JellySolutions-7a5396b65fcde8153c8eeae565bfecb7de37b23f.tar.bz2 JellySolutions-7a5396b65fcde8153c8eeae565bfecb7de37b23f.zip |
removed funding basket from admin users. -ak
-rw-r--r-- | ufund-ui/src/app/components/dashboard/dashboard.component.html | 2 | ||||
-rw-r--r-- | ufund-ui/src/app/components/dashboard/dashboard.component.ts | 11 |
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); + } } |