From bcdf234066ee277b7436428989d5e0dbf58c2f60 Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 31 Mar 2025 10:15:40 -0400 Subject: description textarea for forms --- ufund-ui/src/app/components/cupboard/cupboard.component.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ufund-ui/src') diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 25b88ba..89d8fbe 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -24,6 +24,8 @@

+ +
@@ -46,7 +48,8 @@
- + +
{{statusText | async}} -- cgit v1.2.3 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 From 643afd1d6ffcca3597556d287944eaf487da709c Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 31 Mar 2025 17:42:40 -0400 Subject: frontend description editing and display --- ufund-ui/src/app/components/cupboard/cupboard.component.html | 5 +++-- ufund-ui/src/app/components/need-list/need-list.component.html | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'ufund-ui/src') diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 89d8fbe..f6a2041 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -47,9 +47,10 @@

- - +

+ + {{statusText | async}} diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html index 3a4ca9c..d35f2ed 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.html +++ b/ufund-ui/src/app/components/need-list/need-list.component.html @@ -32,20 +32,24 @@ {{need.name}} {{need.type}} - +
URGENT location_on{{need.location}}
- +
{{need.current}}/{{need.maxGoal}} ({{(need.current / need.maxGoal) * 100}}%)
- +
+ {{need.description}} +
+ +