aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/cupboard/cupboard.component.html
diff options
context:
space:
mode:
authorGunther6070 <haydenhartman10@yahoo.com>2025-04-01 07:45:28 -0400
committerGunther6070 <haydenhartman10@yahoo.com>2025-04-01 07:45:28 -0400
commit726b527af983025a95daae67864122761bcc4e78 (patch)
tree2046e58c146097aac21c9e352771420c31df6589 /ufund-ui/src/app/components/cupboard/cupboard.component.html
parentb544f2617843af29875af81923d3bec539aca704 (diff)
parent0e9c0803e35a23ef2e873dc7ebf224a49a92f207 (diff)
downloadJellySolutions-726b527af983025a95daae67864122761bcc4e78.tar.gz
JellySolutions-726b527af983025a95daae67864122761bcc4e78.tar.bz2
JellySolutions-726b527af983025a95daae67864122761bcc4e78.zip
Merge branch 'css' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b into css
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.html')
-rw-r--r--ufund-ui/src/app/components/cupboard/cupboard.component.html44
1 files changed, 11 insertions, 33 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html
index 6f7799e..37954bb 100644
--- a/ufund-ui/src/app/components/cupboard/cupboard.component.html
+++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html
@@ -1,13 +1,14 @@
<div id="box">
- <h1> Cupboard </h1>
+ <div id="header">
+ <h1> Cupboard </h1>
+ <button *ngIf="isManager()" class="button2" (click)="this.selectForm('create')"><span class="icon">add</span>Create Need</button>
+ </div>
<app-need-list (currentNeed) = populateForm($event) #needList></app-need-list>
</div>
-<div *ngIf="isManager()" >
- <h2 > Admin View </h2>
- <div id="menu">
- <button [ngClass]="selectedForm === 'create' ? 'selected-tab' : 'tab'" (click)="selectForm('create')">Create new Need</button>
- <button [ngClass]="selectedForm === 'update' ? 'selected-tab' : 'tab'" (click)="selectForm('update')">Update existing Need</button>
- </div>
+<ng-template [ngIf]="isManager()" >
+<div>
+ <app-need-edit *ngIf="selectedForm === 'update'" [selectedNeed]="selectedNeed" (refreshNeedList)="needList.refresh()"></app-need-edit>
+ <div>
<div id="create-form" *ngIf="selectedForm === 'create'">
<h1> Create Need </h1>
<form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">
@@ -26,35 +27,12 @@
<label>Physical</label><br>
<input type="checkbox" name="urgent" value="false" ngModel>
<label>Urgent</label><br>
- <label>Description</label>
- <textarea name="description" [(ngModel)]="selectedNeed.description"></textarea><br>
+ <label>Description</label><br>
+ <textarea name="description"></textarea><br>
<input type="submit" value="Submit">
</form>
</div>
- <div id="update-form" *ngIf="selectedForm === 'update'">
- <h1> Update Need </h1>
- <label>Needs:</label><br>
- <form #updateForm="ngForm" (ngSubmit)="update(updateForm.value)">
- <input type="text" name="name" [(ngModel)]="selectedNeed.name"><br>
- <input type="text" name="image" [(ngModel)]="selectedNeed.image"><br>
- <input type="text" name="location" [(ngModel)]="selectedNeed.location"><br>
- <label>Max Goal:</label><br>
- <input type="number" name="maxGoal" [(ngModel)]="selectedNeed.maxGoal"><br>
- <label>Type</label><br>
- <input type="radio" name="type" value="MONETARY" [(ngModel)]="selectedNeed.type">
- <label>Monetary</label><br>
- <input type="radio" name="type" value="PHYSICAL" [(ngModel)]="selectedNeed.type">
- <label>Physical</label><br>
- <input type="checkbox" name="urgent" [(ngModel)]="selectedNeed.urgent">
- <label>Urgent</label> <br>
- <label>Description</label> <br>
- <textarea name="description" [(ngModel)]="selectedNeed.description"></textarea><br>
- <input type="submit" value="Submit">
-
- </form>
-
</div>
- <hr>
-
</div>
+</ng-template>