From 8273c77351aa576b00d5d9997571a4ca3f259382 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Tue, 5 May 2020 19:08:10 -0400 Subject: [PATCH 1/4] Add logic to store cooling plan and age in case of minisplit --- src/App.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/App.js b/src/App.js index e88f1ed07..818a4a320 100644 --- a/src/App.js +++ b/src/App.js @@ -816,6 +816,26 @@ class App extends React.Component { buildingId: this.props.building.data.buildingId, userId: this.props.building.data.userId, }); + // Store heating system plan answer in cooling system plan + if(question==='heatingSystemPlan') { + this.props.onSubmitAnswer({ + questionId: ["66"], + answerId: [value], + surveyId: this.props.building.data.surveyId, + buildingId: this.props.building.data.buildingId, + userId: this.props.building.data.userId, + }); + } + // Store heating system age answer in cooling system age + if(question==='heatingSystemAge') { + this.props.onSubmitAnswer({ + questionId: ["65"], + answerId: [value], + surveyId: this.props.building.data.surveyId, + buildingId: this.props.building.data.buildingId, + userId: this.props.building.data.userId, + }); + } questions['heatingSystemPlan'].next = 'buildingPastImprovement'; questions['buildingPastImprovement'].prev = 'heatingSystemPlan'; } else { -- GitLab From 1341b070062e3ec7142ad3668563114591c33d06 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Wed, 6 May 2020 10:56:48 -0400 Subject: [PATCH 2/4] Update the builsing heating and cooling IDs --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 818a4a320..a3b449f65 100644 --- a/src/App.js +++ b/src/App.js @@ -797,7 +797,7 @@ class App extends React.Component { questions['feedback'].prev = 'buildingFutureImprovement'; } // If the cooling system type is 'I don't have' or 'I don't know' we will skip Cooling sys age and replacement plan. - if (this.props.building.data.surveyId === 1 && question === 'buildingCoolingSystem' && (value === 107 || value === 33)){ + if (this.props.building.data.surveyId === 1 && question === 'buildingCoolingSystem' && ([107,33,12].includes(value))){ questions['buildingCoolingSystem'].next = 'buildingPastImprovement'; questions['buildingPastImprovement'].prev = 'buildingCoolingSystem'; } @@ -852,7 +852,7 @@ class App extends React.Component { } if (this.props.building.data.surveyId === 1 && question === 'buildingHeatingSystem' && questions['buildingTypes']['value'] === 32){ // If the heating system type is 'I don't know' or 'I don't have' we will skip next 3 heating sys related questions. - if ([101,33,7].includes(value)) { + if ([101,33,12].includes(value)) { questions['buildingHeatingSystem'].next = 'buildingCoolingSystem'; questions['buildingCoolingSystem'].prev = 'buildingHeatingSystem'; } -- GitLab From cf5d979d433f35c9bfa19e8925bead3a61e32ace Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Wed, 6 May 2020 13:25:24 -0400 Subject: [PATCH 3/4] Update the answers for heating and cooling systems in the past and future improvements --- src/App.js | 4 ++-- src/BuildingFutureImprovement.js | 31 ++++++++++++++++--------------- src/BuildingPastImprovement.js | 31 ++++++++++++++++--------------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/App.js b/src/App.js index a3b449f65..126060b9a 100644 --- a/src/App.js +++ b/src/App.js @@ -403,7 +403,7 @@ class App extends React.Component { title: 'Install a new cooling system', answer: 2, value: '', - answerIds: [102, 103, 104, 105, 106, 108, 33, 12], + answerIds: [102, 103, 104, 105, 106, 108, 113, 33, 12], checked: false, }, { @@ -563,7 +563,7 @@ class App extends React.Component { title: 'Install a new cooling system', answer: 2, value: '', - answerIds: [102, 103, 104, 105, 106, 108, 33, 12], + answerIds: [102, 103, 104, 105, 106, 108, 113, 33, 12], checked: false, }, { diff --git a/src/BuildingFutureImprovement.js b/src/BuildingFutureImprovement.js index 4abb1a012..cdb001dc7 100644 --- a/src/BuildingFutureImprovement.js +++ b/src/BuildingFutureImprovement.js @@ -37,23 +37,24 @@ export default class BuildingFutureImprovement extends React.Component { }; this.heatingSystemNames = [ - 'Central steam system', - 'Central hydronic (hot water) system', - 'Central forced-air system', - 'Electric baseboard', - 'Individual heat pumps', - 'Other', - 'I\'m not sure', + 'Central steam system', + 'Central hydronic (hot water) system', + 'Central forced-air system', + 'Electric baseboard', + 'Minisplit heat pump system', + 'Other', + 'I\'m not sure', ]; this.coolingSystemNames = [ - 'Window A/C units', - 'PTAC units', - 'Rooftop air conditioning units', - 'Central chiller plant and fan coil units', - 'Mini split heat pump systems', - 'VRF', - 'Other', - 'I\'m not sure', + 'Window A/C units', + 'PTAC units', + 'Rooftop air conditioning units', + 'Central chiller plant and fan coil units', + 'Minisplit heat pump system', + 'VRF', + 'Central Air Conditioning System', + 'Other', + 'I\'m not sure', ]; this.nameMapping = { diff --git a/src/BuildingPastImprovement.js b/src/BuildingPastImprovement.js index bba1b6d2f..ea14db4d7 100644 --- a/src/BuildingPastImprovement.js +++ b/src/BuildingPastImprovement.js @@ -37,23 +37,24 @@ export default class BuildingPastImprovement extends React.Component { }; this.heatingSystemNames = [ - 'Central steam system', - 'Central hydronic (hot water) system', - 'Central forced-air system', - 'Electric baseboard', - 'Individual heat pumps', - 'Other', - 'I\'m not sure', + 'Central steam system', + 'Central hydronic (hot water) system', + 'Central forced-air system', + 'Electric baseboard', + 'Minisplit heat pump system', + 'Other', + 'I\'m not sure', ]; this.coolingSystemNames = [ - 'Window A/C units', - 'PTAC units', - 'Rooftop air conditioning units', - 'Central chiller plant and fan coil units', - 'Mini split heat pump systems', - 'VRF', - 'Other', - 'I\'m not sure', + 'Window A/C units', + 'PTAC units', + 'Rooftop air conditioning units', + 'Central chiller plant and fan coil units', + 'Minisplit heat pump system', + 'VRF', + 'Central Air Conditioning System', + 'Other', + 'I\'m not sure', ]; this.nameMapping = { -- GitLab From d2ad9e1e59eef2cee0c372c67c18991c90d5d880 Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Wed, 6 May 2020 15:29:53 -0400 Subject: [PATCH 4/4] Check the condition before setting minisplit as true --- src/BuildingHeatingSystem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BuildingHeatingSystem.js b/src/BuildingHeatingSystem.js index ef399925d..2e67a786d 100644 --- a/src/BuildingHeatingSystem.js +++ b/src/BuildingHeatingSystem.js @@ -41,7 +41,9 @@ export default class BuildingHeatingSystem extends React.Component { label: "building-heating-system" }); } - this.props.setMiniSplitforCooling(this.state.miniSplitCheckBox); + if(this.state.answer===100) { + this.props.setMiniSplitforCooling(this.state.miniSplitCheckBox); + } this.props.nextQuestion( 'buildingHeatingSystem', this.names[this.props.answerIds.indexOf(this.state.answer)], -- GitLab