From d4dd348e81d3aef4cc62335f1dad5a02452dfadd Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 31 Mar 2025 10:16:03 -0400 Subject: frontend model support for description --- ufund-ui/src/app/components/cupboard/cupboard.component.ts | 6 ++++-- ufund-ui/src/app/models/Need.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'ufund-ui/src') diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts index 85ffd17..feb39e0 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -91,7 +91,8 @@ export class CupboardComponent implements OnInit { type: GoalType[form.type as keyof typeof GoalType], urgent: form.urgent, filterAttributes: [], - current: 0 + current: 0, + description: form.description }; this.cupboardService.updateNeed(need.id, need) @@ -127,7 +128,8 @@ export class CupboardComponent implements OnInit { type: form.type, urgent: form.urgent ? true : false, filterAttributes: [], - current: 0 + current: 0, + description: form.description }; console.log("need:", need); console.log("form submitted. creating need: ", need); diff --git a/ufund-ui/src/app/models/Need.ts b/ufund-ui/src/app/models/Need.ts index 1451cad..2a2800c 100644 --- a/ufund-ui/src/app/models/Need.ts +++ b/ufund-ui/src/app/models/Need.ts @@ -7,6 +7,7 @@ export interface Need { maxGoal: number; current: number; urgent: boolean; + description: string; } export enum GoalType { -- cgit v1.2.3