diff options
author | benal01 <bja4245@rit.edu> | 2025-03-26 19:12:52 -0400 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-03-26 19:12:52 -0400 |
commit | d5ae670dbce9e5cabbd594759df490176fd8cecd (patch) | |
tree | 4816ce78bc2c198ecac8a0c99e69cc71b21ca9ab /ufund-ui/src/app/components/cupboard/cupboard.component.ts | |
parent | 959aa5101fbba55f20eda46d02addd27a74cf950 (diff) | |
download | JellySolutions-d5ae670dbce9e5cabbd594759df490176fd8cecd.tar.gz JellySolutions-d5ae670dbce9e5cabbd594759df490176fd8cecd.tar.bz2 JellySolutions-d5ae670dbce9e5cabbd594759df490176fd8cecd.zip |
use selected id for the update form
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.ts')
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.ts | 5 |
1 files changed, 2 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 0d2c1f5..a8b9c14 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -79,14 +79,13 @@ export class CupboardComponent implements OnInit { console.log(form); const need: Need = { name: form.name, - id: form.id, //system will control this + id: this.selectedNeed.id, //system will control this maxGoal: form.maxGoal, type: GoalType[form.type as keyof typeof GoalType], filterAttributes: [], current: 0 }; - console.log("need:", need); - console.log(need.id, need, "need updated"); + this.cupboardService.updateNeed(need.id, need) .pipe(catchError((ex, r) => { if (ex.status == 500) { |