aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/cupboard/cupboard.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.html')
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.html12
1 files changed, 5 insertions, 7 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html
index 4577844..41bb4a7 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.html
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html
@@ -5,10 +5,10 @@
<div *ngIf="isManager()" >
<h2 > Admin View </h2>
<div id="menu">
- <button (click)="opencreate()">Create new Need</button>
- <button (click)="openupdate()">Update existing Need</button>
+ <button (click)="selectForm('create')">Create new Need</button>
+ <button (click)="selectForm('update')">Update existing Need</button>
</div>
- <div id="create-form">
+ <div id="create-form" *ngIf="selectedForm === 'create'">
<h1> Create a new need </h1>
<form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">
<label>Name:</label><br>
@@ -22,11 +22,10 @@
<label>Physical</label><br>
<input type="submit" value="Submit">
</form>
- <button (click)="back()">Close</button>
- <span *ngIf="statusText">‼️{{statusText | async}}</span>
+ <span *ngIf="statusText">{{statusText | async}}</span>
</div>
- <div id="update-form">
+ <div id="update-form" *ngIf="selectedForm === 'update'">
<h1> Update a need </h1>
<label>Needs:</label><br>
<form #updateForm="ngForm" (ngSubmit)="update(updateForm.value)">
@@ -46,7 +45,6 @@
<label>Physical</label><br>
<input type="submit" value="Submit">
</form>
- <button (click)="back()">Close</button>
<span *ngIf="statusText">{{statusText | async}}</span>
</div>