From 23592cae5cdfe61f742151204a98334fa693569f Mon Sep 17 00:00:00 2001 From: schencej Date: Wed, 11 Dec 2019 18:15:48 -0500 Subject: added styling to cook pages --- recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css | 1 + recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html | 4 ++-- recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'recipeBuddy/src/app/pre-cook-pop-up') diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css index 809e58b..7c98c34 100644 --- a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css +++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.css @@ -6,6 +6,7 @@ h4 { text-align: center; display:grid; width: 400px; margin: auto; + margin-top: 30px; padding: 10px; border: solid; align-content: center; diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html index c1ef1ef..0f046ad 100644 --- a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html +++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.html @@ -2,7 +2,7 @@

{{cookedRecipe.name}}

- Serving + Serving

Ingredients:

@@ -13,4 +13,4 @@ - + diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts index 208993f..cee624e 100644 --- a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts +++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts @@ -21,14 +21,14 @@ export class PreCookPopUpComponent implements OnInit { constructor(private recipePass: RecipePassService, private backend: BackendService, private router: Router) { } ngOnInit() { - this.backend.getRecipe(15).subscribe(res => + this.backend.getRecipe(20).subscribe(res => { - console.log(res); this.cookedRecipe = res; this.originalSize = this.cookedRecipe.servingSize; for(var _i = 0; _i < this.cookedRecipe.ingredients.length; _i++) { this.originalAmounts[_i] = this.cookedRecipe.ingredients[_i].amount; } + this.recipePass.setRecipe(this.cookedRecipe); }); } -- cgit v1.1 From 47254348140fce18c985e9a0ffb592390b226c80 Mon Sep 17 00:00:00 2001 From: schencej Date: Thu, 12 Dec 2019 11:56:57 -0500 Subject: added main page --- recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'recipeBuddy/src/app/pre-cook-pop-up') diff --git a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts index cee624e..7ec8ef2 100644 --- a/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts +++ b/recipeBuddy/src/app/pre-cook-pop-up/pre-cook-pop-up.component.ts @@ -21,15 +21,16 @@ export class PreCookPopUpComponent implements OnInit { constructor(private recipePass: RecipePassService, private backend: BackendService, private router: Router) { } ngOnInit() { - this.backend.getRecipe(20).subscribe(res => - { - this.cookedRecipe = res; + this.cookedRecipe = this.recipePass.getRecipe(); +// this.backend.getRecipe(20).subscribe(res => +// { +// this.cookedRecipe = res; this.originalSize = this.cookedRecipe.servingSize; for(var _i = 0; _i < this.cookedRecipe.ingredients.length; _i++) { this.originalAmounts[_i] = this.cookedRecipe.ingredients[_i].amount; } this.recipePass.setRecipe(this.cookedRecipe); - }); +// }); } updateRecipe(event: any) { -- cgit v1.1