aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/cupboard/cupboard.component.html
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-03 23:11:05 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-03 23:11:05 -0400
commit6a5033afc3c8e0d5d12d709b35b306b6ea1f70e8 (patch)
tree15511941490e8010dacaf20c704f9b314da5634b /ufund-ui/src/app/components/cupboard/cupboard.component.html
parentad651c44ce2515d497c8e5214147c69126e25903 (diff)
downloadJellySolutions-6a5033afc3c8e0d5d12d709b35b306b6ea1f70e8.tar.gz
JellySolutions-6a5033afc3c8e0d5d12d709b35b306b6ea1f70e8.tar.bz2
JellySolutions-6a5033afc3c8e0d5d12d709b35b306b6ea1f70e8.zip
Implemented action buttons with ng-template!!!
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.html')
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html
index 969b232..cd387a3 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.html
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html
@@ -24,13 +24,23 @@
<label>Needs per page: </label>
<input type ="number" [(ngModel)]="itemsPerPage" min="1" max="{{searchResults.length}}">
</div>
- <!--<button (click)="close()">Close</button>-->
</div>
<h2 *ngIf="searchResults.length < needs.length && searchResults.length != 0"> Search Results({{needs.length - searchResults.length}} needs filtered): </h2>
<h2 *ngIf="searchResults.length == needs.length"> All Needs </h2>
<h2 *ngIf="searchResults.length == 0"> No Results Found </h2>
- <app-need-list *ngIf="searchResults.length > 0" [needs]="searchResults" [itemsPerPage]="itemsPerPage" #needList></app-need-list>
+ <ng-template let-need #NLActions>
+ <button *ngIf="isHelper()" (click)="addToBasket(need)">
+ <span class="icon">add</span>Add To Basket
+ </button>
+ <button *ngIf="isManager()" (click)="select(need)">
+ <span class="icon">edit</span>Edit Need
+ </button>
+ <button *ngIf="isManager()" (click)="deleteNeed(need.id)" >
+ <span class="icon">delete</span>Delete Need
+ </button>
+ </ng-template>
+ <app-need-list [actionArea]="NLActions" *ngIf="searchResults.length > 0" [needs]="searchResults" [itemsPerPage]="itemsPerPage" #needList></app-need-list>
</div>
<!--<ng-template [ngIf]="isManager()" >-->