diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-10 19:34:30 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-10 19:34:30 -0500 |
commit | 34ceddd42d6e44f57f4697a254533872c53f4844 (patch) | |
tree | d9e88018342ff635c7a4d999227f83d71dd0502f | |
parent | 10e1f5849fb7f64dd188f08b5e5f682d0b162777 (diff) |
Revert steps.instructions -> step.instruction
For compatibility with backend JSON.
-rw-r--r-- | recipeBuddy/src/app/DataModels/step.ts | 8 | ||||
-rw-r--r-- | recipeBuddy/src/app/cook-page/cook-page.component.ts | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/recipeBuddy/src/app/DataModels/step.ts b/recipeBuddy/src/app/DataModels/step.ts index ef07596..ec33e15 100644 --- a/recipeBuddy/src/app/DataModels/step.ts +++ b/recipeBuddy/src/app/DataModels/step.ts @@ -1,14 +1,14 @@ export class Step { - public instructions: string; + public instruction: string; public timer: number; - public constructor(instructions: string, timer: number) { - this.instructions = instructions; + public constructor(instruction: string, timer: number) { + this.instruction = instruction; this.timer = timer; } public getInstructions(): string { - return this.instructions; + return this.instruction; } public getTimer(): number { diff --git a/recipeBuddy/src/app/cook-page/cook-page.component.ts b/recipeBuddy/src/app/cook-page/cook-page.component.ts index 9dfc605..3def7db 100644 --- a/recipeBuddy/src/app/cook-page/cook-page.component.ts +++ b/recipeBuddy/src/app/cook-page/cook-page.component.ts @@ -37,9 +37,9 @@ export class CookPageComponent implements OnInit { this.steps = recipe.steps; this.servingSize = recipe.servingSize; this.stepNum = 1; - this.currentStep = this.steps[this.stepNum-1].instructions; + this.currentStep = this.steps[this.stepNum-1].instruction; if(this.steps.length > 1) - this.nextStep = this.steps[this.stepNum].instructions; + this.nextStep = this.steps[this.stepNum].instruction; else this.lastStep = true; // this.timeLeft = this.steps[this.stepNum-1].timer; @@ -59,10 +59,10 @@ export class CookPageComponent implements OnInit { if(this.stepNum == this.steps.length) { this.lastStep = true; } else { - this.nextStep = this.steps[this.stepNum].instructions; + this.nextStep = this.steps[this.stepNum].instruction; } - this.previousStep = this.steps[this.stepNum-2].instructions; - this.currentStep = this.steps[this.stepNum-1].instructions; + this.previousStep = this.steps[this.stepNum-2].instruction; + this.currentStep = this.steps[this.stepNum-1].instruction; this.timeLeft = this.steps[this.stepNum-1].timer; } @@ -73,10 +73,10 @@ export class CookPageComponent implements OnInit { if(this.stepNum == 1) { this.firstStep = true; } else { - this.previousStep = this.steps[this.stepNum-2].instructions; + this.previousStep = this.steps[this.stepNum-2].instruction; } - this.currentStep = this.steps[this.stepNum-1].instructions; - this.nextStep = this.steps[this.stepNum].instructions; + this.currentStep = this.steps[this.stepNum-1].instruction; + this.nextStep = this.steps[this.stepNum].instruction; this.timeLeft = this.steps[this.stepNum-1].timer; } |