diff options
author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-31 12:08:22 -0400 |
---|---|---|
committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-03-31 12:08:22 -0400 |
commit | cb5be32bf0d050cc1fd37d7cc9b4c51e1c51fffe (patch) | |
tree | d6614be9f9162efb5c7c7779cc73d3f5744d4c3a | |
parent | eb09f05ca697a3a6d3587f9278e332056bfd6f66 (diff) | |
download | JellySolutions-cb5be32bf0d050cc1fd37d7cc9b4c51e1c51fffe.tar.gz JellySolutions-cb5be32bf0d050cc1fd37d7cc9b4c51e1c51fffe.tar.bz2 JellySolutions-cb5be32bf0d050cc1fd37d7cc9b4c51e1c51fffe.zip |
Added dynamic error messaging to the cupboard
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts index 85ffd17..88ab46c 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, OnInit, ViewChild} from '@angular/core'; +import {Component, OnInit, ViewChild} from '@angular/core'; import { CupboardService } from '../../services/cupboard.service'; import { Need, GoalType } from '../../models/Need'; import { userType } from '../../models/User'; @@ -99,7 +99,7 @@ export class CupboardComponent implements OnInit { if (ex.status == 500) { this.statusText.next("Fields cannot be blank"); } else if (ex.status == 400) { - this.statusText.next("Goal must be greater than 0"); + this.statusText.next(ex.error); } else { this.statusText.next("Error on creating need"); } @@ -136,7 +136,7 @@ export class CupboardComponent implements OnInit { if (ex.status == 500) { this.statusText.next("Fields cannot be blank"); } else if (ex.status == 400) { - this.statusText.next("Goal must be greater than 0"); + this.statusText.next(ex.error); } else { this.statusText.next("Error on creating need"); } |