aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-page/need-page.component.html
diff options
context:
space:
mode:
authorTyler Ferrari <69283684+Sowgro@users.noreply.github.com>2025-04-05 20:18:10 -0400
committerGitHub <noreply@github.com>2025-04-05 20:18:10 -0400
commit95798c2b81da7f950850a6bb3c5be28e0323d5ba (patch)
tree7c0cf1c24c9177ba77468141e245f2b2f111e50b /ufund-ui/src/app/components/need-page/need-page.component.html
parentef52495d781a3adcec79bfbc9067f70f5ec3c8ab (diff)
parent2f37b1de28399a361dc272b51ad624ac8902a562 (diff)
downloadJellySolutions-95798c2b81da7f950850a6bb3c5be28e0323d5ba.tar.gz
JellySolutions-95798c2b81da7f950850a6bb3c5be28e0323d5ba.tar.bz2
JellySolutions-95798c2b81da7f950850a6bb3c5be28e0323d5ba.zip
Merge pull request #29 from RIT-SWEN-261-02/need-image
local persistence for need list data
Diffstat (limited to 'ufund-ui/src/app/components/need-page/need-page.component.html')
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.html38
1 files changed, 15 insertions, 23 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 ff5990f..2629346 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,5 +1,6 @@
<div id="box">
@if (need) {
+ <img *ngIf="need.image" alt="Need image" class="need-image" [src]="need.image"/>
<h1>{{need.name}}</h1>
<span class="needType">{{need.type}} GOAL</span>
<p>{{need.description}}</p>
@@ -8,35 +9,26 @@
<span>This goal is <strong>{{(((need.current)*100) / (need.maxGoal)).toFixed(0)}}%</strong> complete!</span>
</div>
+ <span><strong>Target Goal:</strong> {{(need.type === GoalType.MONETARY) ? "$" : ""}}{{need.maxGoal}}</span>
- <div class="split">
- <div class="left">
- <span><strong>Target Goal:</strong> {{(need.type === GoalType.MONETARY) ? "$" : ""}}{{need.maxGoal}}</span>
+ <span><strong>Amount Currently Collected:</strong> {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.current}}</span>
- <span><strong>Amount Currently Collected:</strong> {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.current}}</span>
+ <span><strong>Location:</strong> {{need.location}}</span>
- <span><strong>Location:</strong> {{need.location}}</span>
+ <span><strong>Urgency: </strong>
+ <span *ngIf="!need.urgent">Not urgent</span>
+ <span *ngIf="need.urgent" class="urgent">URGENT</span>
+ </span>
- <span><strong>Urgency: </strong>
- <span *ngIf="!need.urgent">Not urgent</span>
- <span *ngIf="need.urgent" class="urgent">URGENT</span>
- </span>
-
- <div *ngIf="need.filterAttributes?.length">
- <strong>Tags:</strong>
- <ul style="display: flex; column-gap: 24px;">
- <li *ngFor="let tag of need?.filterAttributes">
- <p>{{tag}}</p>
- </li>
- </ul>
- </div>
- </div>
- <div class="right">
- <img *ngIf="need.image" alt="Need image" class="need-image" [src]="need.image"/>
- </div>
+ <div *ngIf="need.filterAttributes?.length">
+ <strong>Tags:</strong>
+ <ul style="display: flex; column-gap: 24px;">
+ <li *ngFor="let tag of need?.filterAttributes">
+ <p>{{tag}}</p>
+ </li>
+ </ul>
</div>
-
<div class="actionArea">
<button *ngIf="usersService.isHelper()" (click)="add(need)" [disabled]="usersService.inBasket(usersService.getBasket() | async, need)">
<span class="icon">{{usersService.inBasket(usersService.getBasket() | async, need)? "check": "add" }}</span>Add To Basket