diff options
Diffstat (limited to '')
| -rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.html | 9 | ||||
| -rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.ts | 8 | 
2 files changed, 16 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index d54eed9..bc5ac1c 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -13,6 +13,8 @@          <form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">              <label>Name:</label><br>              <input type="text" name="name" 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> @@ -20,7 +22,10 @@              <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>              <input type="submit" value="Submit"> +                      </form>          <span *ngIf="statusText">{{statusText | async}}</span> @@ -30,6 +35,7 @@          <label>Needs:</label><br>          <form #updateForm="ngForm" (ngSubmit)="update(updateForm.value)">              <input type="text" name="name" [(ngModel)]="selectedNeed.name"><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> @@ -37,7 +43,10 @@              <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>              <input type="submit" value="Submit"> +                     </form>          <span *ngIf="statusText">{{statusText | async}}</span> diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts index a8b9c14..540a058 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -32,9 +32,11 @@ export class CupboardComponent implements OnInit {      selectedNeed: any = {          name: '', +        location:'',          id: null,          maxGoal: null, -        type: '' +        type: '', +        urgent: false      };      selectedNeedId: number | null = null;      searchResults: any[] = []; @@ -79,9 +81,11 @@ export class CupboardComponent implements OnInit {          console.log(form);          const need: Need = {              name: form.name, +            location: form.location,              id: this.selectedNeed.id, //system will control this              maxGoal: form.maxGoal,              type: GoalType[form.type as keyof typeof GoalType], +            urgent: form.urgent,              filterAttributes: [],              current: 0          }; @@ -113,9 +117,11 @@ export class CupboardComponent implements OnInit {      submit(form: any) {          const need: Need = {              name: form.name, +            location: form.location,              id: 0,              maxGoal: form.maxGoal,              type: form.type, +            urgent: form.urgent,              filterAttributes: [],              current: 0          };  | 
