aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-page/need-page.component.html
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-03-31 23:37:00 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-03-31 23:37:00 -0400
commit896e1219526a19400c7143b274193f8b818d6156 (patch)
treeae794d7dff944dbdb61a558804c8530f2d7013af /ufund-ui/src/app/components/need-page/need-page.component.html
parent469678629e456a792e5f0c328e7c6786064279cb (diff)
downloadJellySolutions-896e1219526a19400c7143b274193f8b818d6156.tar.gz
JellySolutions-896e1219526a19400c7143b274193f8b818d6156.tar.bz2
JellySolutions-896e1219526a19400c7143b274193f8b818d6156.zip
Commit half working changes to move to my laptop
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.html41
1 files changed, 37 insertions, 4 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..a8479fd 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
@@ -13,14 +13,47 @@
</div>
<hr>
+ <span>{{need?.description}}</span>
+ <img *ngIf="need?.image" alt="Need image" [src]="need?.image"/>
<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 [routerLink]="'/need/' + need.id" class="clickable">
+ <div class="split">
+ <div class="left">
+ <span class="needName">{{need.name}}</span>
+ <span class="needType">{{need.type}}</span>
+ </div>
+
+ <div class="right">
+ <span *ngIf="need.urgent" class="urgent">URGENT</span>
+ <span *ngIf="need.location"><span class="icon">location_on</span>{{need.location}}</span>
+ </div>
+ </div>
+
+ <br>
+
+ <div class="prog">
+ <span id="hover-status-label-{{need.id}}"> </span>
+ <span>{{need.current}}/{{need.maxGoal}} ({{((need.current / need.maxGoal) * 100).toFixed(0)}}%)</span>
+ <progress [value]="need.current" [max]="need.maxGoal"></progress>
+ </div>
+
</div>
+
+<!-- <app-need-edit id="editor" [selectedNeed]="need!"></app-need-edit>-->
</div>