From ef46ddd082bb91d0262363536d46fe3eb4da47be Mon Sep 17 00:00:00 2001 From: benal01 Date: Tue, 18 Mar 2025 09:42:05 -0400 Subject: back button on need page --- ufund-ui/src/app/components/need-page/need-page.component.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 90fd459..e9c23bd 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,6 +1,5 @@ - +

Viewing Need: {{need?.name}}

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

Looking for

{{need?.type}}

-- cgit v1.2.3 From bc9d3417795d841b4cb3e9fb022f8d61448af946 Mon Sep 17 00:00:00 2001 From: Gunther6070 Date: Tue, 1 Apr 2025 07:47:13 -0400 Subject: Added updated acceptance test plan --- etc/Acceptance Test Plan.xlsx | Bin 30698 -> 71297 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/etc/Acceptance Test Plan.xlsx b/etc/Acceptance Test Plan.xlsx index dd55e20..396cc1c 100644 Binary files a/etc/Acceptance Test Plan.xlsx and b/etc/Acceptance Test Plan.xlsx differ -- cgit v1.2.3 From 095e637a24e609cc21ef3ad446e20e520da12445 Mon Sep 17 00:00:00 2001 From: Akash Keshav <112591754+domesticchores@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:25:19 -0400 Subject: improved "OO Design Principles" section of the Design Doc. -ak --- docs/DesignDoc.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/DesignDoc.md b/docs/DesignDoc.md index 0a92bac..7f1c457 100644 --- a/docs/DesignDoc.md +++ b/docs/DesignDoc.md @@ -167,9 +167,13 @@ In our model tier we have a Need class, a User class, and a UserAuth class. The > _**[Sprint 1]** Name and describe the initial OO Principles that your team has considered in support of your design (and implementation) for this first Sprint._ - Law of Demeter: Classes only talk to nearby classes. + - This principle is used to ensure that unintended behavior is minimal, by making each class only talk to others that make sense in the scope of the application. For example, the `dashboard` component interacts with the `need-list` and `funding-basket` components because they are needed to display needs on the dashboard, but it does not interact with the `login` or `signup` components, as they are not needed in order to ensure the functionality of the dashboard. These are located in the ViewModel and Model Tiers. - Low Coupling: Limit the number of classes connected to each individual class. + - We use Low Coupling principles to ensure that only classes related in function are actually interacting with each other. In our Angular setup, classes interact with their respective services instead of sharing the data with other classes. `NeedService` connects to `need-page`, `need-list`, `funding-basket`, and `cupboard`, but the components themselves do not interact with each other. This is more efficient and prevents one component from stalling if another errors. Because the service exclusively handles CRUD operations, it will not cause the connected components to stall if it encounters an error. These examples are located in the ViewModel Tier. - Pure Fabrication: Using helper functions to split up larger classes into more managable chunks. + - For example, this principle is showcased in our `AuthService`. Instead of having the `UserService` handle user management and user authorization at the same time, we have split the authorization part into a new AuthService class to handle login, while the UserService handles just the CRUD operations pertaining to the user. These classes are located in the ViewModel Tier. - Single Responsibility: Each function should only have one function to prevent unintended errors. + - This principle is used in our `CupboardController`, as it's only functionality is to connect the front-end and back-end through our REST API. This means that cupboard-related operations are not backlogged by any other classes, which is efficient and prevents unintended behavior in the application. This can be seen in the Model Tier. > _**[Sprint 2, 3 & 4]** Will eventually address upto **4 key OO Principles** in your final design. Follow guidance in augmenting those completed in previous Sprints as indicated to you by instructor. Be sure to include any diagrams (or clearly refer to ones elsewhere in your Tier sections above) to support your claims._ -- cgit v1.2.3 From 91e8835b84b00bffc6db350f7cf6641c0d128a93 Mon Sep 17 00:00:00 2001 From: benal01 Date: Wed, 2 Apr 2025 10:27:48 -0400 Subject: negative and large input handling for need page amount --- .../src/app/components/need-list/need-list.component.html | 2 +- ufund-ui/src/app/components/need-list/need-list.component.ts | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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 c0501ba..c166152 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 @@ -16,7 +16,7 @@ {{sortMode === 'Ascending' ? 'arrow_upward': 'arrow_downward'}} - +
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.ts b/ufund-ui/src/app/components/need-list/need-list.component.ts index cd3d9bd..ed14d6a 100644 --- a/ufund-ui/src/app/components/need-list/need-list.component.ts +++ b/ufund-ui/src/app/components/need-list/need-list.component.ts @@ -82,9 +82,14 @@ export class NeedListComponent { this.updateVisibleNeeds(); } - editNeedsPerPage(amount: number) { - this.itemsPerPage = amount; - this.updateVisibleNeeds(); + editNeedsPerPage() { + if (this.itemsPerPage > this.searchResults.length) { + this.itemsPerPage = this.searchResults.length; + } + if (this.itemsPerPage < 1) { + this.itemsPerPage = 1; + } + this.resetVisibleNeeds(); } updateVisibleNeeds() { -- cgit v1.2.3 From 81414e1ce9223801585214d8d7a3bbf51f0ac5a7 Mon Sep 17 00:00:00 2001 From: benal01 Date: Wed, 2 Apr 2025 10:31:11 -0400 Subject: dollar label for monetary needs --- ufund-ui/src/app/components/need-list/need-list.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c166152..0d64c99 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 @@ -44,7 +44,7 @@
- {{need.current}}/{{need.maxGoal}} ({{((need.current / need.maxGoal) * 100).toFixed(0)}}%) + {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.current}}/{{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.maxGoal}} ({{((need.current / need.maxGoal) * 100).toFixed(0)}}%)
-- cgit v1.2.3 From 2b7c42ffacaaf884bc9497e975c0c3274e9f966e Mon Sep 17 00:00:00 2001 From: benal01 Date: Wed, 2 Apr 2025 10:33:13 -0400 Subject: dollar label in need page --- ufund-ui/src/app/components/need-page/need-page.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 958dfa6..12e9b74 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 @@ -11,9 +11,9 @@ This goal is {{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}% complete! - Target Goal: {{need.maxGoal}} + Target Goal: {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.maxGoal}} - Amount Currently Collected: {{need.current}} + Amount Currently Collected: {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.current}} Location: {{need.location}} -- cgit v1.2.3