diff options
| author | benal01 <bja4245@rit.edu> | 2025-03-22 11:58:39 -0400 | 
|---|---|---|
| committer | benal01 <bja4245@rit.edu> | 2025-03-22 11:58:39 -0400 | 
| commit | 2abd4b4ba9171821ac545f8dcb67be1e7d722e01 (patch) | |
| tree | 95c50466a52c3102dc67133821ca03fa3c80ff55 /ufund-ui/src/app | |
| parent | 2b67bd14828c8c0bffe461a66542a2dba6c19f93 (diff) | |
| download | JellySolutions-2abd4b4ba9171821ac545f8dcb67be1e7d722e01.tar.gz JellySolutions-2abd4b4ba9171821ac545f8dcb67be1e7d722e01.tar.bz2 JellySolutions-2abd4b4ba9171821ac545f8dcb67be1e7d722e01.zip  | |
replaced unneccicary methods for form selection with ngIf
Diffstat (limited to 'ufund-ui/src/app')
| -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>  | 
