diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-31 21:54:38 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-31 21:54:38 -0400 |
commit | aef3df6f9eacfe37479046826a9ca14310b72456 (patch) | |
tree | 81ed3c6125d4564f48a0488dbf2611b537bd212f /ufund-ui/src/app/components/need-list/need-list.component.ts | |
parent | 6af14c6089f0fa0924740fb6089affc545f93a81 (diff) | |
download | JellySolutions-aef3df6f9eacfe37479046826a9ca14310b72456.tar.gz JellySolutions-aef3df6f9eacfe37479046826a9ca14310b72456.tar.bz2 JellySolutions-aef3df6f9eacfe37479046826a9ca14310b72456.zip |
Apply css to funding basket
Diffstat (limited to '')
-rw-r--r-- | ufund-ui/src/app/components/need-list/need-list.component.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.ts b/ufund-ui/src/app/components/need-list/need-list.component.ts index 47114c3..7a9d647 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.ts +++ b/ufund-ui/src/app/components/need-list/need-list.component.ts @@ -1,11 +1,11 @@ -import {Component , Output, EventEmitter} from '@angular/core'; -import { NgForm } from '@angular/forms'; +import {Component, EventEmitter, Output} from '@angular/core'; import {Need} from '../../models/Need'; import {CupboardService} from '../../services/cupboard.service'; -import { UsersService } from '../../services/users.service'; -import { userType } from '../../models/User'; +import {UsersService} from '../../services/users.service'; +import {userType} from '../../models/User'; import {AuthService} from '../../services/auth.service'; import {catchError, of} from 'rxjs'; +import {ToastsService, ToastType} from '../../services/toasts.service'; interface sortAlgo { (a: Need,b: Need): number; @@ -84,7 +84,8 @@ export class NeedListComponent { constructor( private cupboardService: CupboardService, private usersService: UsersService, - private authService: AuthService + private authService: AuthService, + private toastService: ToastsService ) {} refresh() { @@ -196,7 +197,7 @@ export class NeedListComponent { this.usersService.refreshBasket(); }); } else { - window.alert("This need is already in your basket!") + this.toastService.sendToast(ToastType.ERROR, "This need is already in your basket!") } |