diff --git a/src/App.js b/src/App.js index e88f1ed07b900d568e58e4c3612b2c5d44b71697..126060b9a0cc8ec64b620176cb8a4a8318d963a0 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, }, { @@ -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'; } @@ -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 { @@ -832,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'; } diff --git a/src/BuildingFutureImprovement.js b/src/BuildingFutureImprovement.js index 4abb1a012bf495ce2135a982337409dea55e46e3..cdb001dc719967d2e31f59b3e6ba341d1b8bd996 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/BuildingHeatingSystem.js b/src/BuildingHeatingSystem.js index ef399925deca8a64a284c07ca6f2ec70008e13b4..2e67a786df9cc88f7c7cfefbdba9d0ba3d0d6dba 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)], diff --git a/src/BuildingPastImprovement.js b/src/BuildingPastImprovement.js index bba1b6d2f62daaf1737baafb9e25bd36e895b0ab..ea14db4d71778ebb47b17bc5e39d187451074f49 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 = {