diff options
Diffstat (limited to 'ufund-ui/src/app/components')
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.html | 1 | ||||
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.ts | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 4b76f25..d54eed9 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -29,7 +29,6 @@ <h1> Update Need </h1> <label>Needs:</label><br> <form #updateForm="ngForm" (ngSubmit)="update(updateForm.value)"> - <label>Currently Editing : need.name</label><br> <input type="text" name="name" [(ngModel)]="selectedNeed.name"><br> <label>Max Goal:</label><br> <input type="number" name="maxGoal" [(ngModel)]="selectedNeed.maxGoal"><br> 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) { |