diff options
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java | 2 | ||||
-rw-r--r-- | ufund-ui/src/app/components/need-page/need-page.component.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java index bf3d917..36ae341 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java @@ -50,7 +50,7 @@ public class CupboardController { public ResponseEntity<Need> createNeed(@RequestBody Map<String, Object> params) { System.out.println(params); String name = (String) params.get("name"); - int maxGoal = (int) params.get("maxGoal"); + double maxGoal = (double) params.get("maxGoal"); Need.GoalType goalType = GoalType.valueOf((String) params.get("type")); try { 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 21f0771..90fd459 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 @@ -19,4 +19,4 @@ <p>Goal: {{need?.maxGoal}}</p> <p>Current: {{need?.current}}</p> -<p>This goal is <strong>{{((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)}}%</strong> complete!</p>
\ No newline at end of file +<p>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</p>
\ No newline at end of file |