aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-page/need-page.component.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-04 21:55:12 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-04 21:55:12 -0400
commitb578584a1208178100bf90e8b06971772c7fc00f (patch)
tree6c2e5ee5fd3cc7e96e036704ebe3b1ba7cbfc9f5 /ufund-ui/src/app/components/need-page/need-page.component.ts
parent03431245f71385c5d641f66a7f63c1a22ab65210 (diff)
downloadJellySolutions-b578584a1208178100bf90e8b06971772c7fc00f.tar.gz
JellySolutions-b578584a1208178100bf90e8b06971772c7fc00f.tar.bz2
JellySolutions-b578584a1208178100bf90e8b06971772c7fc00f.zip
Fix many bugs and code clean up
Diffstat (limited to 'ufund-ui/src/app/components/need-page/need-page.component.ts')
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.ts13
1 files changed, 1 insertions, 12 deletions
diff --git a/ufund-ui/src/app/components/need-page/need-page.component.ts b/ufund-ui/src/app/components/need-page/need-page.component.ts
index 1c6d8e4..45d6db5 100644
--- a/ufund-ui/src/app/components/need-page/need-page.component.ts
+++ b/ufund-ui/src/app/components/need-page/need-page.component.ts
@@ -2,7 +2,6 @@ import {Component, Input, OnInit} from '@angular/core';
import {Need} from '../../models/Need';
import {ActivatedRoute, Router} from "@angular/router";
import {CupboardService} from "../../services/cupboard.service";
-import {userType} from '../../models/User';
import {AuthService} from '../../services/auth.service';
import {catchError, of} from 'rxjs';
import {ToastsService, ToastType} from '../../services/toasts.service';
@@ -20,7 +19,7 @@ export class NeedPageComponent implements OnInit {
private route: ActivatedRoute,
private cupboardService: CupboardService,
private authService: AuthService,
- private usersService: UsersService,
+ protected usersService: UsersService,
private toastService: ToastsService,
private router: Router,
protected modalService: ModalService
@@ -37,16 +36,6 @@ export class NeedPageComponent implements OnInit {
window.history.back();
}
- isManager() {
- const type = this.authService.getCurrentUser()?.type;
- return type === ("MANAGER" as unknown as userType);
- }
-
- isHelper() {
- const type = this.authService.getCurrentUser()?.type;
- return type === ("HELPER" as unknown as userType);
- }
-
add(need: Need) {
const currentUser = this.authService.getCurrentUser();
//console.log("get current user in angular:", currentUser)