aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-03-17 22:49:37 -0400
committerGunther6070 <haydenhartman10@yahoo.com>2025-03-17 22:49:37 -0400
commite9950afde68bb6e5e659ac182334bf2b18088f90 (patch)
tree865e819a0c5db9d39c6216f103a7b9a6f6ffe9e9
parent99e7a91ff4709532ccdd9b867fda9c90e971e5c5 (diff)
downloadJellySolutions-e9950afde68bb6e5e659ac182334bf2b18088f90.tar.gz
JellySolutions-e9950afde68bb6e5e659ac182334bf2b18088f90.tar.bz2
JellySolutions-e9950afde68bb6e5e659ac182334bf2b18088f90.zip
Added status message when update need fails
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
index 4088ae4..1b6d658 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts
@@ -101,7 +101,12 @@ needs: any;
};
console.log("need:", need);
console.log(need.id, need, "need updated");
- this.cupboardService.updateNeed(need.id, need).subscribe(
+ this.cupboardService.updateNeed(need.id, need)
+ .pipe(catchError((ex, r) => {
+ this.statusText.next("Max goal must be greater than 0 " + friendlyHttpStatus[ex.status])
+ return of()
+ }))
+ .subscribe(
(result) => {
if (result) {
console.log("need updated successfully");