From b6bc0e5e9be234c58ad5d8554f6614d22e2738f8 Mon Sep 17 00:00:00 2001 From: Tyler Ferrari <69283684+Sowgro@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:09:49 -0400 Subject: Fix update need bug The current would reset to 0 --- ufund-ui/src/app/components/need-edit/need-edit.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ufund-ui/src/app/components/need-edit/need-edit.component.ts b/ufund-ui/src/app/components/need-edit/need-edit.component.ts index abfa543..b63d9c1 100644 --- a/ufund-ui/src/app/components/need-edit/need-edit.component.ts +++ b/ufund-ui/src/app/components/need-edit/need-edit.component.ts @@ -53,6 +53,7 @@ export class NeedEditComponent implements OnChanges { } updateNeed(need: Need) { + need.current = this.need?.current ?? 0 this.cupboardService.updateNeed(need.id, need) .pipe(catchError((ex, _) => { if (ex.status == 500) { -- cgit v1.2.3