From 7de909de2778633660afe5d68f848d1e618b8470 Mon Sep 17 00:00:00 2001 From: Akash Keshav <112591754+domesticchores@users.noreply.github.com> Date: Mon, 17 Mar 2025 22:43:44 -0400 Subject: please work fixed paths?? -ak --- ufund-api/src/main/resources/application.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ufund-api/src/main/resources/application.properties b/ufund-api/src/main/resources/application.properties index 2679f88..70cb171 100644 --- a/ufund-api/src/main/resources/application.properties +++ b/ufund-api/src/main/resources/application.properties @@ -1,9 +1,9 @@ # rename to application.properties server.error.include-message=always -cupboard.file=ufund-api/data/cupboard.json -users.file=ufund-api/data/users.json -authKeys.file=ufund-api/data/userAuths.json +cupboard.file=data/cupboard.json +users.file=data/users.json +authKeys.file=data/userAuths.json spring.jackson.mapper.auto-detect-getters=false spring.jackson.mapper.auto-detect-setters=false -- cgit v1.2.3 From b5797b53eddf5a52ea9bbd8f3c638edd678407ab Mon Sep 17 00:00:00 2001 From: Akash Keshav <112591754+domesticchores@users.noreply.github.com> Date: Mon, 17 Mar 2025 22:56:19 -0400 Subject: please work, i backmerged and everything. -ak --- ufund-api/data/cupboard.json | 2 +- .../java/com/ufund/api/ufundapi/model/Need.java | 2 +- .../components/need-page/need-page.component.html | 29 ++++++++++++++++------ .../components/need-page/need-page.component.ts | 7 ++++-- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ufund-api/data/cupboard.json b/ufund-api/data/cupboard.json index cc85335..abc2293 100644 --- a/ufund-api/data/cupboard.json +++ b/ufund-api/data/cupboard.json @@ -1 +1 @@ -[{"name":"Jellyfish Hats","id":26,"maxGoal":10.0,"type":"MONETARY","filterAttributes":[],"Current":0.0},{"name":"Pollution Re-Filtering","id":27,"maxGoal":1.0E7,"type":"MONETARY","filterAttributes":[],"Current":0.0},{"name":"Coral re-re-habilitation","id":28,"maxGoal":10000.0,"type":"MONETARY","filterAttributes":[],"Current":0.0}] \ No newline at end of file +[{"name":"Jellyfish Hats","id":26,"maxGoal":10.0,"type":"MONETARY","filterAttributes":["#savethejellyfish","Clothing","Storefront"],"current":0.0},{"name":"Pollution Re-Filtering","id":27,"maxGoal":1.0E7,"type":"MONETARY","filterAttributes":["Cleanup","Donations","Third-Party"],"current":0.0},{"name":"Coral re-re-habilitation","id":28,"maxGoal":10000.0,"type":"MONETARY","filterAttributes":["Preservation","#savethecoral","#helloPhil"],"current":0.0}] \ No newline at end of file diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java index 9ca097a..c0e9214 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java @@ -14,7 +14,7 @@ public class Need { @JsonProperty("filterAttributes") private String[] filterAttributes; @JsonProperty("type") final private GoalType type; @JsonProperty("maxGoal") private double maxGoal; - @JsonProperty("Current") private double current; + @JsonProperty("current") private double current; /** * Create a new need diff --git a/ufund-ui/src/app/components/need-page/need-page.component.html b/ufund-ui/src/app/components/need-page/need-page.component.html index 4bb001e..8234ac7 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.html +++ b/ufund-ui/src/app/components/need-page/need-page.component.html @@ -1,8 +1,21 @@ - -

Need page

-

id: {{need?.id}}

-

name: {{need?.name}}

-

filterAttributes: {{need?.filterAttributes}}

-

type: {{need?.type}}

-

max goal: {{need?.maxGoal}}

-

current: {{need?.maxGoal}}

\ No newline at end of file +

Viewing Need: {{need?.name}}

+internal id: {{need?.id}} +
+

Looking for

+

{{need?.type}}

+

Donations.

+
+
+

Tags:

+ +
+ +
+ +

Goal: {{need?.maxGoal}}

+

Current: {{need?.current}}

+

This goal is {{((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)}}% complete!

\ No newline at end of file diff --git a/ufund-ui/src/app/components/need-page/need-page.component.ts b/ufund-ui/src/app/components/need-page/need-page.component.ts index 0673f86..597d0e0 100644 --- a/ufund-ui/src/app/components/need-page/need-page.component.ts +++ b/ufund-ui/src/app/components/need-page/need-page.component.ts @@ -1,7 +1,8 @@ import {Component, Input} from '@angular/core'; -import {Need} from '../../models/Need'; +import {GoalType, Need} from '../../models/Need'; import {ActivatedRoute} from "@angular/router"; import {CupboardService} from "../../services/cupboard.service"; +import { NgFor } from '@angular/common'; @Component({ selector: 'app-need-page', @@ -15,6 +16,8 @@ export class NeedPageComponent { private cupboardService: CupboardService, ) {} + public GoalType = GoalType; + @Input() need?: Need; ngOnInit(): void { @@ -25,4 +28,4 @@ export class NeedPageComponent { back() { window.history.back(); } -} +} \ No newline at end of file -- cgit v1.2.3