diff options
| author | schencej <schencej@clarkson.edu> | 2019-12-12 10:41:08 -0500 | 
|---|---|---|
| committer | schencej <schencej@clarkson.edu> | 2019-12-12 10:41:08 -0500 | 
| commit | 946512c32a3b94079c9d2aaf48ef16d09fd14e3d (patch) | |
| tree | 39869562d6defa06096dfdb31148ab45948fd3af /recipeBuddy/src/app/add-recipe | |
| parent | 2685a5d6838cf5572998d57eb391f86f4f797199 (diff) | |
| parent | 09aea62746e50d8284dc234692e7641cca03cc42 (diff) | |
merged with master
Diffstat (limited to 'recipeBuddy/src/app/add-recipe')
| -rw-r--r-- | recipeBuddy/src/app/add-recipe/add-recipe.component.html | 2 | ||||
| -rw-r--r-- | recipeBuddy/src/app/add-recipe/add-recipe.component.ts | 10 | 
2 files changed, 6 insertions, 6 deletions
| diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.html b/recipeBuddy/src/app/add-recipe/add-recipe.component.html index 76095f9..11277f9 100644 --- a/recipeBuddy/src/app/add-recipe/add-recipe.component.html +++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.html @@ -59,7 +59,7 @@  				</mat-form-field>  				<mat-form-field class="quarter-width">  					<input matInput placeholder="Units" type="text" -					formControlName="units"> +					formControlName="unit">  				</mat-form-field>  				<button matSuffix mat-mini-fab (click)="rmIngredient(i)"  					type="button" style="margin-left: 10px"> diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts index 5109c34..3c32ae7 100644 --- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts +++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts @@ -29,7 +29,7 @@ export class AddRecipeComponent {        this.fb.group({          ingrName: [''],          amount: ['', Validators.pattern('^[0-9]*(\.[0-9]*)?$')], -        units: [''] +        unit: ['']          })      ]),      steps: this.fb.array([ @@ -61,7 +61,7 @@ export class AddRecipeComponent {      this.fb.group({        ingrName: [''],        amount: ['', Validators.pattern('^[0-9]*(\.[0-9]*)?$')], -      units: [''] +      unit: ['']        })    );    } @@ -93,10 +93,10 @@ export class AddRecipeComponent {      var ingredients = []      var i;      for  (i = 0; i < formData.ingredients.length; i++) { -    var tmp_amount = parseFloat(formData.ingredients[0].amount) -      ingredients.push(new Ingredient(formData.ingredients[0].ingrName, +    var tmp_amount = parseFloat(formData.ingredients[i].amount) +      ingredients.push(new Ingredient(formData.ingredients[i].ingrName,                                        (isNaN(tmp_amount) ? 0 : tmp_amount), -                                      formData.ingredients[0].unit, +                                      formData.ingredients[i].unit,                                        ""                         ));      } | 
