diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-04-04 20:56:02 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-04-04 20:56:02 -0400 |
commit | feba88fed855d1694d292e401a4cb336e0ff9d69 (patch) | |
tree | 4d5527043fbc80268ddd3754c588ceaa23403b62 /ufund-ui/src/app/components/cupboard/cupboard.component.html | |
parent | 47a4326827a4123792e3a1165843344c8a9c7b0d (diff) | |
download | JellySolutions-feba88fed855d1694d292e401a4cb336e0ff9d69.tar.gz JellySolutions-feba88fed855d1694d292e401a4cb336e0ff9d69.tar.bz2 JellySolutions-feba88fed855d1694d292e401a4cb336e0ff9d69.zip |
Fix create-need dialog
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.html')
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.html | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 5e88582..3873719 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -1,7 +1,10 @@ <div id="box"> <div id="header"> <h1> Cupboard </h1> - <button *ngIf="isManager()" class="button2" (click)="this.selectForm('create')"><span class="icon">add</span>Create Need</button> + <ng-template #create> + <app-need-edit [mode]="'Create'" (refreshNeedList)="refresh()"></app-need-edit> + </ng-template> + <button *ngIf="isManager()" class="button2" (click)="modalService.showModal(create)"><span class="icon">add</span>Create Need</button> </div> <div id="header2"> @@ -34,7 +37,7 @@ <span class="icon">{{inBasket(usersService.getBasket() | async, need)? "check": "add" }}</span>Add To Basket </button> <ng-template #edit> - <app-need-edit *ngIf="need" [selectedNeed]="need" (refreshNeedList)="refresh()"></app-need-edit> + <app-need-edit *ngIf="need" [mode]="'Edit'" [need]="need" (refreshNeedList)="refresh()"></app-need-edit> </ng-template> <button *ngIf="isManager()" (click)="modalService.showModal(edit)"> <span class="icon">edit</span>Edit Need @@ -45,32 +48,3 @@ </ng-template> <app-need-list [actionArea]="NLActions" *ngIf="searchResults.length > 0" [needs]="searchResults" [itemsPerPage]="itemsPerPage" #needList/> </div> - -<!--<div>--> -<!-- <div>--> -<!-- <div id="create-form" *ngIf="selectedForm === 'create'">--> -<!-- <h1> Create Need </h1>--> -<!-- <form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">--> -<!-- <label>Name:</label><br>--> -<!-- <input type="text" name="name" ngModel><br>--> -<!-- <label>Image:</label><br>--> -<!-- <input type="text" name="image" ngModel><br>--> -<!-- <label>Location:</label><br>--> -<!-- <input type="text" name="location" ngModel><br>--> -<!-- <label>Max Goal:</label><br>--> -<!-- <input type="number" name="maxGoal" ngModel><br>--> -<!-- <label>Type</label><br>--> -<!-- <input type="radio" name="type" value="MONETARY" ngModel>--> -<!-- <label>Monetary</label><br>--> -<!-- <input type="radio" name="type" value="PHYSICAL" ngModel>--> -<!-- <label>Physical</label><br>--> -<!-- <input type="checkbox" name="urgent" value="false" ngModel>--> -<!-- <label>Urgent</label><br>--> -<!-- <label>Description</label><br>--> -<!-- <textarea name="description"></textarea><br>--> -<!-- <input type="submit" value="Submit">--> - -<!-- </form>--> -<!-- </div>--> -<!-- </div>--> -<!--</div>--> |