diff options
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>-->  | 
