aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-page/need-page.component.html
diff options
context:
space:
mode:
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.html47
1 files changed, 33 insertions, 14 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 a72167c..958dfa6 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,10 +1,29 @@
<div id="box">
<h1>{{need?.name}}</h1>
- <div>
- <h3>Looking for <u>{{need?.type}}</u> Donations.</h3>
+ <span class="needType">{{need?.type}} GOAL</span>
+
+ <img *ngIf="need.image" alt="Need image" [src]="need?.image"/>
+
+ <p>{{need?.description}}</p>
+ <div class="prog">
+<!-- <span>{{need?.current}} / {{need?.maxGoal}}</span>-->
+ <progress [value]="need?.current" [max]="need?.maxGoal"></progress>
+ <span>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</span>
</div>
- <div *ngIf="need?.filterAttributes">
- <p>Tags:</p>
+
+ <span><strong>Target Goal:</strong> {{need.maxGoal}}</span>
+
+ <span><strong>Amount Currently Collected:</strong> {{need.current}}</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>
+
+ <div *ngIf="need.filterAttributes.length > 0">
+ <strong>Tags:</strong>
<ul style="display: flex; column-gap: 24px;">
<li *ngFor="let tag of need?.filterAttributes">
<p>{{tag}}</p>
@@ -12,15 +31,15 @@
</ul>
</div>
- <hr>
- <p>Location: {{need?.location}}</p>
- <p>Urgent: {{need?.urgent}}</p>
- <span>{{need?.current}} / {{need?.maxGoal}}</span>
- <progress [value]="need?.current" [max]="need?.maxGoal"></progress>
- <span>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</span>
- <div>
- <button>Add to basket</button>
- <button>Edit</button>
- <button>Delete</button>
+ <div class="actionArea">
+ <button *ngIf="isHelper()" (click)="add(need!)">
+ <span class="icon">add</span>Add To Basket
+ </button>
+<!-- <button *ngIf="isManager()" (click)="edit(need!)">-->
+<!-- <span class="icon">edit</span>Edit Need-->
+<!-- </button>-->
+ <button *ngIf="isManager()" (click)="delete(need!.id)" >
+ <span class="icon">delete</span>Delete Need
+ </button>
</div>
</div>