From 9666ac97db02937e85593a1beacd03da8b27aadd Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Thu, 27 Feb 2020 15:03:02 -0500 Subject: [PATCH 1/3] Add condition to set pages if buildingtype is multiFam --- src/App.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index 15567fff5..a93264a2d 100644 --- a/src/App.js +++ b/src/App.js @@ -863,13 +863,18 @@ class App extends React.Component { if (found === false) { const questions = this.state.questions; - questions.buildingTypes.next = 'financeInterest'; + if (this.state.factors.buildingTypes === 21) { + questions.buildingTypes.next = 'utilityBills'; + questions.financeInterest.prev = 'comfortIssues'; + } else { + questions.buildingTypes.next = 'financeInterest'; + questions.financeInterest.prev = 'buildingTypes'; + } questions.financeInterest.next = 'reviewAnswers'; - questions.financeInterest.prev = 'buildingTypes'; questions.reviewAnswers.next = 'thankYou'; questions.contact.next = "reviewAnswers"; this.setState({ questions }, () => { - this.setQuestion('financeInterest'); + this.setQuestion(questions.buildingTypes.next); }); } -- GitLab From 466c75c8b0cc8ff73428f2e90badec4ef573e233 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Fri, 28 Feb 2020 11:25:17 -0500 Subject: [PATCH 2/3] Change unitBreakDown to unitBreakdown --- src/UnitBreakdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UnitBreakdown.js b/src/UnitBreakdown.js index c8506919c..75f8e8d5f 100644 --- a/src/UnitBreakdown.js +++ b/src/UnitBreakdown.js @@ -42,7 +42,7 @@ export default class UnitBreakDown extends React.Component { } prevQuestion = () => { - this.props.prevQuestion('unitBreakDown'); + this.props.prevQuestion('unitBreakdown'); } nextQuestion = () => { -- GitLab From 065399d2beca73a8290d65627b1c5e313dd28ec7 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Fri, 28 Feb 2020 11:31:49 -0500 Subject: [PATCH 3/3] Remove multifamily from the tree --- src/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index 3d378fdbd..fac0d9e98 100644 --- a/src/constants.js +++ b/src/constants.js @@ -89,7 +89,7 @@ const questionTree = [ heatDistribution: [10], heatingSystemAge: [13, 14, 15, 16, 12], heatingSystemPlan: [17, 18, 19, 12], - buildingTypes: [21, 23, 22, 32, 33], + buildingTypes: [23, 22, 32, 33], }, output: { nextQuestion: 'financeInterest', -- GitLab