diff options
Diffstat (limited to 'ufund-ui')
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.css | 2 | ||||
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.html | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.css b/ufund-ui/src/app/components/cupboard/cupboard.component.css index 434b136..6c2e5c6 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.css +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.css @@ -12,7 +12,7 @@ #menu { display: flex; - justify-content: space-between; + margin: 10px; * { border: 3px solid #000; 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> |