diff --git a/src/components/Questionnaire/BuildingInfo.js b/src/components/Questionnaire/BuildingInfo.js index 2dbd4187496ee65b43c31422503d79b794a8b31a..a4eef9e9faab0a37875c088730cf93513ce536b5 100644 --- a/src/components/Questionnaire/BuildingInfo.js +++ b/src/components/Questionnaire/BuildingInfo.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Table, Input } from 'reactstrap'; +import { Table, Input, Card, CardHeader } from 'reactstrap'; import BuildingUnitDropdown from './BuildingUnitDropdown'; class BuildingInfo extends Component { @@ -13,6 +13,8 @@ class BuildingInfo extends Component { email: props.email, phone: props.phone, address: props.address, + buildingSqFt: props.buildingSqFt, + numberOfFloors: props.numberOfFloors, unitInfo: { studio: props.numOfStudio, oneBedroom: props.numOfOneBedroom, @@ -36,7 +38,6 @@ class BuildingInfo extends Component { }, }, () => { this.props.onChangeEvent('buildingInfo', this.state.form); - console.log('changed!'); // eslint-disable-line }); } @@ -56,7 +57,6 @@ class BuildingInfo extends Component { }, }, () => { this.props.onChangeEvent('buildingInfo', this.state.form); - console.log('changed!'); // eslint-disable-line }); } @@ -72,7 +72,6 @@ class BuildingInfo extends Component { }, }, () => { this.props.onChangeEvent('buildingInfo', this.state.form); - console.log('changed!'); // eslint-disable-line }); } @@ -86,179 +85,217 @@ class BuildingInfo extends Component { }); return (
- - - - - - + +
- Building Intake -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
- Full Name - - this.handleInputChange(e)} - /> - - this.handleInputChange(e)} - /> -
- Email - - this.handleInputChange(e)} - /> -
- Phone No. - - this.handleInputChange(e)} - /> -
- Address - - {address} -
- Apartment Types Breakdown - -
- Number of Studio -
- -
-
- Number of One Bedroom Apartment -
- -
- {' '} - -
- Number of Two Bedroom Apartment -
- -
-
- Number of Three Bedroom Apartment -
- -
- {' '} - -
- Number of Four Bedroom Apartment -
- -
-
- Other -
-
-
- this.handleOtherInputChange(e)} - /> + + +
+
+ Building Intake +
+
+
+ + + - -
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
+ Full Name + + this.handleInputChange(e)} + /> + + this.handleInputChange(e)} + /> +
+ Email + + this.handleInputChange(e)} + /> +
+ Phone No. + + this.handleInputChange(e)} + /> +
+ Address + + {address} +
+ Number of Floors + + this.handleInputChange(e)} + /> +
+ Building Square Feet + + this.handleInputChange(e)} + /> +
+ Apartment Types Breakdown + +
+ Number of Studio
-
- this.handleOtherInputChange(e)} - > - - - - - - - - + +
+
+ Number of One Bedroom Apartment
- -
-
-
+ +
+ {' '} + +
+ Number of Two Bedroom Apartment +
+ +
+
+ Number of Three Bedroom Apartment +
+ +
+ {' '} + +
+ Number of Four Bedroom Apartment +
+ +
+
+ Other +
+
+
+ this.handleOtherInputChange(e)} + /> +
+
+ this.handleOtherInputChange(e)} + > + + + + + + + + +
+
+
+
+
+
); } @@ -272,6 +309,8 @@ BuildingInfo.propTypes = { lastName: PropTypes.string, email: PropTypes.string, phone: PropTypes.string, + buildingSqFt: PropTypes.number, + numberOfFloors: PropTypes.number, numOfStudio: PropTypes.number, numOfOneBedroom: PropTypes.number, numOfTwoBedroom: PropTypes.number, diff --git a/src/components/Questionnaire/BuildingUnitDropdown.js b/src/components/Questionnaire/BuildingUnitDropdown.js index ca2c6df259145a3a1106e86b62d787dae9aa6c8b..3d0d92981d893c7dd3ff0443e08be16500a23e8e 100644 --- a/src/components/Questionnaire/BuildingUnitDropdown.js +++ b/src/components/Questionnaire/BuildingUnitDropdown.js @@ -20,7 +20,6 @@ class BuildingUnitDropdown extends Component { numOfUnit: val, }, () => { this.props.onChange(this.props.inputName, this.state.numOfUnit); - console.log('changed!'); // eslint-disable-line }); } diff --git a/src/components/Questionnaire/FinancialInitial.js b/src/components/Questionnaire/FinancialInitial.js index ac588bb474e5a65296837871c53a8cf9d9cfab95..3746af4a29e1c1b1c88cf48ad37b91b896f2b81b 100644 --- a/src/components/Questionnaire/FinancialInitial.js +++ b/src/components/Questionnaire/FinancialInitial.js @@ -1,18 +1,19 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Table, Input } from 'reactstrap'; - +import { Table, Input, Card, CardHeader } from 'reactstrap'; class FinanacialInitial extends Component { constructor(props) { super(props); this.state = { form: { + legalOwnership: props.legalOwnership, bankruptcyPast: props.bankruptcyPast, currentOnEnergyBills: props.currentOnEnergyBills, currentMortgageBalance: props.currentMortgageBalance, profitable: props.profitable, budgetForDownPayment: props.budgetForDownPayment, + numberOfDobViolations: props.numberOfDobViolations, }, }; } @@ -31,126 +32,167 @@ class FinanacialInitial extends Component { }, }, () => { this.props.onChangeEvent('financialInitials', this.state.form); - console.log('changed!'); // eslint-disable-line }); } render() { return (
- - - - - - - -
- Financial Initial Go/NoGo -
-
- - - - - - - - - - - - - - - - - - - -
- {this.props.bankruptcyPast.question} - - this.handleInputChange(e)} - > - - - - - - - {this.props.currentOnEnergyBills.question} - - this.handleInputChange(e)} - > - - - - - - - - -
- {this.props.currentMortgageBalance.question} - - this.handleInputChange(e)} - > - - - - - - - - - {this.props.profitable.question} - - this.handleInputChange(e)} - > - - - - - -
- {this.props.budgetForDownPayment.question} - - this.handleInputChange(e)} - > - - - - - - {' '} - - {' '} -
+ + +
+
+ Financial Initial Go/NoGo
-
+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ {this.props.legalOwnership.question} + + this.handleInputChange(e)} + > + + + + + + + + {this.props.numberOfDobViolations.question} + + this.handleInputChange(e)} + > + + + + + + + +
+ {this.props.bankruptcyPast.question} + + this.handleInputChange(e)} + > + + + + + + + {this.props.currentOnEnergyBills.question} + + this.handleInputChange(e)} + > + + + + + + + + +
+ {this.props.currentMortgageBalance.question} + + this.handleInputChange(e)} + > + + + + + + + + + {this.props.profitable.question} + + this.handleInputChange(e)} + > + + + + + +
+ {this.props.budgetForDownPayment.question} + + this.handleInputChange(e)} + > + + + + + + {' '} + + {' '} +
+
+
+ ); } @@ -163,6 +205,8 @@ FinanacialInitial.propTypes = { currentMortgageBalance: PropTypes.string, profitable: PropTypes.string, budgetForDownPayment: PropTypes.string, + legalOwnership: PropTypes.string, + numberOfDobViolations: PropTypes.string, onChangeEvent: PropTypes.func, // answers: PropTypes.objectOf, }; diff --git a/src/components/Questionnaire/RemoteSurvey.js b/src/components/Questionnaire/RemoteSurvey.js index 8cf65b7bfb8ad3a9bfe3778032729b0b78d086f3..7576b13890e1fc78a55f8a47746efd7e203fe52e 100644 --- a/src/components/Questionnaire/RemoteSurvey.js +++ b/src/components/Questionnaire/RemoteSurvey.js @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Table, Input } from 'reactstrap'; - +import { Table, Input, Card, CardHeader } from 'reactstrap'; class RemoteSurvey extends Component { constructor(props) { @@ -23,6 +22,7 @@ class RemoteSurvey extends Component { tenantComplaintsComfort: props.tenantComplaintsComfort, tenantComplaintsWindows: props.tenantComplaintsWindows, meteredForElectricity: props.meteredForElectricity, + numberOfHeatingViolations: props.numberOfHeatingViolations, }, }; } @@ -41,329 +41,350 @@ class RemoteSurvey extends Component { }, }, () => { this.props.onChangeEvent('remoteSurvey', this.state.form); - console.log('changed!'); // eslint-disable-line }); } render() { return (
- - - - - - + +
- Remote Survey -
-
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
- {this.props.heatingSystem.question} - - this.handleInputChange(e)} - > - - - - - - - - - {this.props.heatingFuelSource.question} - - this.handleInputChange(e)} - > - - - - - - - -
- {this.props.DHWSameBoiler.question} - - this.handleInputChange(e)} - > - - - - - - - {this.props.ageOfHeatGenerateSystem.question} - - this.handleInputChange(e)} - > - - - - - - - -
- {this.props.planToReplaceHS.question} - - this.handleInputChange(e)} - > - - - - - - - - - {' '} - - {' '} -
- Are the following building areas heated? - -
- Hallways -
-
-
- this.handleInputChange(e)} - > - - - - - + + +
+
+ Remote Survey +
+
+
+ + + - -
+
+ + + + + + + + + + + + + + + + + + + {/* */} + + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - -
+ {this.props.heatingSystem.question} + + this.handleInputChange(e)} + > + + + + + + + + + {this.props.heatingFuelSource.question} + + this.handleInputChange(e)} + > + + + + + + + +
+ {this.props.DHWSameBoiler.question} + + this.handleInputChange(e)} + > + + + + + + + {this.props.ageOfHeatGenerateSystem.question} + + this.handleInputChange(e)} + > + + + + + + + +
+ {this.props.planToReplaceHS.question} + + this.handleInputChange(e)} + > + + + + + + + + + {this.props.numberOfHeatingViolations.question} + + this.handleInputChange(e)} + > + + + + + + + + {' '} +
+ Are the following building areas heated? + +
+ Hallways
- -
-
- Basement -
-
-
- this.handleInputChange(e)} - > - - - - - +
+
+ this.handleInputChange(e)} + > + + + + + +
-
-
- {' '} -
- {' '} - -
- Stairwells -
-
-
- this.handleInputChange(e)} - > - - - - - +
+
+ Basement
- -
-
- Floors -
-
-
- this.handleInputChange(e)} - > - - - - - +
+
+ this.handleInputChange(e)} + > + + + + + +
-
-
- {' '} -
- {this.props.accessibleByStairwell.question} - - this.handleInputChange(e)} - > - - - - - - - {this.props.backFacadeAttached.question} - - this.handleInputChange(e)} - > - - - - - - -
- {this.props.exteriorWallsAttached.question} - - this.handleInputChange(e)} - > - - - - - - - - {this.props.tenantComplaintsComfort.question} - - this.handleInputChange(e)} - > - - - - - -
- {this.props.tenantComplaintsWindows.question} - - this.handleInputChange(e)} - > - - - - - - - - {this.props.meteredForElectricity.question} - - this.handleInputChange(e)} - > - - - - - -
-
-
+
+ {' '} +
+ {' '} + +
+ Stairwells +
+
+
+ this.handleInputChange(e)} + > + + + + + +
+
+
+
+ Floors +
+
+
+ this.handleInputChange(e)} + > + + + + + +
+
+
+ {' '} +
+ {this.props.accessibleByStairwell.question} + + this.handleInputChange(e)} + > + + + + + + + {this.props.backFacadeAttached.question} + + this.handleInputChange(e)} + > + + + + + + +
+ {this.props.exteriorWallsAttached.question} + + this.handleInputChange(e)} + > + + + + + + + + {this.props.tenantComplaintsComfort.question} + + this.handleInputChange(e)} + > + + + + + + +
+ {this.props.tenantComplaintsWindows.question} + + this.handleInputChange(e)} + > + + + + + + + + {this.props.meteredForElectricity.question} + + this.handleInputChange(e)} + > + + + + + +
+
+
+
); } @@ -387,8 +408,8 @@ RemoteSurvey.propTypes = { tenantComplaintsComfort: PropTypes.string, meteredForElectricity: PropTypes.string, ageOfHeatGenerateSystem: PropTypes.string, + numberOfHeatingViolations: PropTypes.string, onChangeEvent: PropTypes.func, - // answers: PropTypes.objectOf, }; export default RemoteSurvey; diff --git a/src/components/Questionnaire/ReviewAnswers/BuildingInfo.js b/src/components/Questionnaire/ReviewAnswers/BuildingInfo.js index 84e9e5bb2cc472fd43b615c3cc828ffb2fe582ec..1116565ef339d76857aaea58b715004f739fa0c1 100644 --- a/src/components/Questionnaire/ReviewAnswers/BuildingInfo.js +++ b/src/components/Questionnaire/ReviewAnswers/BuildingInfo.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Table } from 'reactstrap'; - +import { Table, Card, CardHeader } from 'reactstrap'; const BuildingInfo = (props) => { const cellStyle = { @@ -23,113 +22,140 @@ const BuildingInfo = (props) => { return (
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {props.title} -
-
- First Name -
-
- {props.upperFirstLetter(props.data.firstName)} -
-
-
- Last Name -
-
- {props.upperFirstLetter(props.data.lastName)} -
-
-
- Email -
-
- {props.data.email} -
-
-
- Phone -
-
- {props.data.phone} -
-
-
- Address -
-
- {address} -
-
-
- Number of Studio -
-
- {props.data.unitInfo.studio} -
-
-
- Number of One Bedroom Apartment -
-
- {props.data.unitInfo.oneBedroom} -
-
-
- Number of Two Bedroom Apartment -
-
- {props.data.unitInfo.twoBedroom} -
-
-
- Number of Three Bedroom Apartment -
-
- {props.data.unitInfo.threeBedroom} -
-
-
- Number of Four Bedroom Apartment -
-
- {props.data.unitInfo.fourBedroom} -
-
-
- Other Apartment -
-
- {props.data.unitInfo.other} {props.data.unitInfo.numOfOther} -
-
+ + +
+
+ {props.title} +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ First Name +
+
+ {props.upperFirstLetter(props.data.firstName)} +
+
+
+ Last Name +
+
+ {props.upperFirstLetter(props.data.lastName)} +
+
+
+ Email +
+
+ {props.data.email} +
+
+
+ Phone +
+
+ {props.data.phone} +
+
+
+ Address +
+
+ {address} +
+
+
+ Number of Floors +
+
+ {props.data.numberOfFloors} +
+
+
+ Building Square Feet +
+
+ {props.data.buildingSqFt} +
+
+
+ Number of Studio +
+
+ {props.data.unitInfo.studio} +
+
+
+ Number of One Bedroom Apartment +
+
+ {props.data.unitInfo.oneBedroom} +
+
+
+ Number of Two Bedroom Apartment +
+
+ {props.data.unitInfo.twoBedroom} +
+
+
+ Number of Three Bedroom Apartment +
+
+ {props.data.unitInfo.threeBedroom} +
+
+
+ Number of Four Bedroom Apartment +
+
+ {props.data.unitInfo.fourBedroom} +
+
+
+ Other Apartment +
+
+ {props.data.unitInfo.other} {props.data.unitInfo.numOfOther} +
+
+
); }; diff --git a/src/components/Questionnaire/ReviewAnswers/FinancialInitial.js b/src/components/Questionnaire/ReviewAnswers/FinancialInitial.js index e8e9d3d338a4337f52de81d1a37d678b12ca6444..672c6a8081c16bd9deca4e29c03a1bf0bf28d281 100644 --- a/src/components/Questionnaire/ReviewAnswers/FinancialInitial.js +++ b/src/components/Questionnaire/ReviewAnswers/FinancialInitial.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Table } from 'reactstrap'; - +import { Table, Card, CardHeader } from 'reactstrap'; const FinancialInitial = (props) => { const cellStyle = { @@ -12,83 +11,118 @@ const FinancialInitial = (props) => { return (
- - - - - - - - - - - - - - - - - - - -
- {props.title} -
-
- Any bankruptcy in the past three years? -
-
- { - props.upperFirstLetter( - props.answers[props.data.bankruptcyPast.answer_id] - ) - } -
-
-
- Current on energy bills? -
-
- { - props.upperFirstLetter( - props.answers[props.data.currentOnEnergyBills.answer_id] - ) - } -
-
-
- What is the current outstanding balance of the mortgage? -
-
- { - props.upperFirstLetter( - props.answers[props.data.currentMortgageBalance.answer_id] - ) - } -
-
-
- Is your building currently profitable? -
-
- { - props.upperFirstLetter( - props.answers[props.data.profitable.answer_id] - ) - } -
-
-
- What is your current budget for a down payment? -
-
- { - props.upperFirstLetter( - props.answers[props.data.budgetForDownPayment.answer_id] - ) - } + + +
+
+ {props.title}
-
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ Legal Ownership +
+
+ { + props.upperFirstLetter( + props.answers[props.data.legalOwnership.answer_id] + ) + } +
+
+
+ Number of DOB violations? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.numberOfDobViolations.answer_id] + ) + } +
+
+
+ Any bankruptcy in the past three years? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.bankruptcyPast.answer_id] + ) + } +
+
+
+ Current on energy bills? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.currentOnEnergyBills.answer_id] + ) + } +
+
+
+ What is the current outstanding balance of the mortgage? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.currentMortgageBalance.answer_id] + ) + } +
+
+
+ Is your building currently profitable? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.profitable.answer_id] + ) + } +
+
+
+ What is your current budget for a down payment? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.budgetForDownPayment.answer_id] + ) + } +
+
+ ); }; diff --git a/src/components/Questionnaire/ReviewAnswers/RemoteSurvey.js b/src/components/Questionnaire/ReviewAnswers/RemoteSurvey.js index 04afeb1d77c1244535eb8bc13e80bdd6b91399e5..df4aec6d60f65006a5da75cdff64d21f79d04ac0 100644 --- a/src/components/Questionnaire/ReviewAnswers/RemoteSurvey.js +++ b/src/components/Questionnaire/ReviewAnswers/RemoteSurvey.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Table } from 'reactstrap'; - +import { Table, Card, CardHeader } from 'reactstrap'; const RemoteSurvey = (props) => { const cellStyle = { @@ -11,217 +10,239 @@ const RemoteSurvey = (props) => { }; return (
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {props.title} -
-
- Heating System -
-
- { - props.upperFirstLetter( - props.answers[props.data.heatingSystem.answer_id] - ) - } -
-
-
- Heating Fuel Source -
-
- { - props.upperFirstLetter( - props.answers[props.data.heatingFuelSource.answer_id] - ) - } -
-
-
- Is Domestic Hot Water (DHW) and heat prepared by the same boiler? -
-
- { - props.upperFirstLetter( - props.answers[props.data.DHWSameBoiler.answer_id] - ) - } -
-
-
- Age of heat generating system? -
-
- { - props.upperFirstLetter( - props.answers[props.data.ageOfHeatGenerateSystem.answer_id] - ) - } -
-
-
- When do you plan to replace the heating system? -
-
- { - props.upperFirstLetter( - props.answers[props.data.planToReplaceHS.answer_id] - ) - } -
-
-
- Hallways heated? -
-
- { - props.upperFirstLetter( - props.answers[props.data.hallwaysHeated.answer_id] - ) - } -
-
-
- Basement heated? -
-
- { - props.upperFirstLetter( - props.answers[props.data.basementHeated.answer_id] - ) - } -
-
-
- Stairwells heated? -
-
- { - props.upperFirstLetter( - props.answers[props.data.stairwellsHeated.answer_id] - ) - } -
-
-
- Floors heated? -
-
- { - props.upperFirstLetter( - props.answers[props.data.floorsHeated.answer_id] - ) - } -
-
-
- Is the roof flat and easily accessible by a stairwell? -
-
- { - props.upperFirstLetter( - props.answers[props.data.accessibleByStairwell.answer_id] - ) - } -
-
-
- Is the back facade of your building attached to an adjacent building or structure? -
-
- { - props.upperFirstLetter( - props.answers[props.data.backFacadeAttached.answer_id] - ) - } -
-
-
- Are the exterior walls of your building attached to an adjacent building or structure? -
-
- { - props.upperFirstLetter( - props.answers[props.data.exteriorWallsAttached.answer_id] - ) - } -
-
-
- Any tenant complaints about comfort issues? (Temperature) -
-
- { - props.upperFirstLetter( - props.answers[props.data.tenantComplaintsComfort.answer_id] - ) - } -
-
-
- Any tenant complaints about drafty windows? -
-
- { - props.upperFirstLetter( - props.answers[props.data.tenantComplaintsWindows.answer_id] - ) - } -
-
-
- Is the building directly metered for electricity (tenants pay ConEd bills)? -
-
- { - props.upperFirstLetter( - props.answers[props.data.meteredForElectricity.answer_id] - ) - } + + +
+
+ {props.title}
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Heating System +
+
+ { + props.upperFirstLetter( + props.answers[props.data.heatingSystem.answer_id] + ) + } +
+
+
+ Heating Fuel Source +
+
+ { + props.upperFirstLetter( + props.answers[props.data.heatingFuelSource.answer_id] + ) + } +
+
+
+ Is Domestic Hot Water (DHW) and heat prepared by the same boiler? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.DHWSameBoiler.answer_id] + ) + } +
+
+
+ Age of heat generating system? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.ageOfHeatGenerateSystem.answer_id] + ) + } +
+
+
+ When do you plan to replace the heating system? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.planToReplaceHS.answer_id] + ) + } +
+
+
+ Hallways heated? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.hallwaysHeated.answer_id] + ) + } +
+
+
+ Basement heated? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.basementHeated.answer_id] + ) + } +
+
+
+ Stairwells heated? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.stairwellsHeated.answer_id] + ) + } +
+
+
+ Floors heated? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.floorsHeated.answer_id] + ) + } +
+
+
+ Is the roof flat and easily accessible by a stairwell? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.accessibleByStairwell.answer_id] + ) + } +
+
+
+ Is the back facade of your building attached to an adjacent building or structure? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.backFacadeAttached.answer_id] + ) + } +
+
+
+ Are the exterior walls of your building attached + to an adjacent building or structure? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.exteriorWallsAttached.answer_id] + ) + } +
+
+
+ Any tenant complaints about comfort issues? (Temperature) +
+
+ { + props.upperFirstLetter( + props.answers[props.data.tenantComplaintsComfort.answer_id] + ) + } +
+
+
+ Any tenant complaints about drafty windows? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.tenantComplaintsWindows.answer_id] + ) + } +
+
+
+ Is the building directly metered for electricity (tenants pay ConEd bills)? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.meteredForElectricity.answer_id] + ) + } +
+
+
+ Number of Heating Violations in last 5 years? +
+
+ { + props.upperFirstLetter( + props.answers[props.data.numberOfHeatingViolations.answer_id] + ) + } +
+
+ ); }; diff --git a/src/containers/Questionnaire/index.js b/src/containers/Questionnaire/index.js index 6b2d4d112a0249fc7fde899ce4db251293016f77..6afad907a84dd29d9db7b9ffabe15d71922076fc 100644 --- a/src/containers/Questionnaire/index.js +++ b/src/containers/Questionnaire/index.js @@ -27,10 +27,12 @@ class Questionnaire extends Component { lastName: 'Last name', email: 'Email', phone: 'Phone number', + buildingSqFt: 'Building Square Feet', + numberOfFloors: 'Number of Floors', heatingSystem: 'Heating System', heatingFuelSource: 'Heating Fuel Source', DHWSameBoiler: 'Domestic Hot Water', - AgeOfHeatGenerateSystem: 'Age of heat generating system', + ageOfHeatGenerateSystem: 'Age of heat generating system', planToReplaceHS: 'Plan to replace the heating system', hallwaysHeated: 'Heated hallways', basementHeated: 'Heated basement', @@ -47,6 +49,9 @@ class Questionnaire extends Component { currentMortgageBalance: 'Outstanding mortgage balance', profitable: 'Building profit', budgetForDownPayment: 'Down payment budget', + legalOwnership: 'Legal ownership', + numberOfHeatingViolations: 'Number of heating violations', + numberOfDobViolations: 'Number of DOB violations', }; this.state = { buildingInfo: {}, @@ -112,7 +117,9 @@ class Questionnaire extends Component { Object.entries(data).forEach(formData => { if (['buildingInfo', 'remoteSurvey', 'financialInitials'].includes(formData[0])) { Object.entries(formData[1]).forEach(fieldData => { - if (fieldData[0] !== 'other' && fieldData[1].toString().replace(/^\s+|\s+$/g, '') === '') { + if (fieldData[0] !== 'other' && + fieldData[0] !== 'address' && + fieldData[1].toString().replace(/^\s+|\s+$/g, '') === '') { emptyFields.push(this.nameMapping[fieldData[0]]); } if (fieldData[0] === 'phone' && !(validPhone.test(fieldData[1]))) { @@ -123,8 +130,8 @@ class Questionnaire extends Component { } if (typeof fieldData[1] === 'object' && fieldData[1].answer_id !== undefined && - fieldData[1].answer_id === -1 && - fieldData[1].question_id !== 16) { + parseInt(fieldData[1].answer_id, 10) === -1 && + parseInt(fieldData[1].question_id, 10) !== 16) { emptyFields.push(this.nameMapping[fieldData[0]]); } }); @@ -132,12 +139,12 @@ class Questionnaire extends Component { }); if (emptyFields.length > 0) { - errorMessage.push(`Please fill in ${emptyFields.join(', ')} field(s)`); + errorMessage.push(`Please fill in:\n${emptyFields.join('\n')}\nfield(s)`); alert(errorMessage); return false; } if (invalidFields.length > 0) { - errorMessage.push(`\nInvalid input in ${invalidFields.join(', ')} field(s)`); + errorMessage.push(`\nInvalid input in:\n${invalidFields.join('\n')}\nfield(s)`); alert(errorMessage); return false; } @@ -162,17 +169,14 @@ class Questionnaire extends Component { if (buildingInfo.data !== undefined && buildingInfo.data !== null && submittedAnswers.data !== undefined && submittedAnswers.data !== null && building !== undefined) { - console.log(questionnaire); // eslint-disable-line const address = building.street_address.map(addressItem => { return `${addressItem}, ${building.borough}`; }); const tableHeader = { - paddingBottom: '20px', - borderTop: '1px solid #CCCCCC', - background: '#EEEEEE', fontWeight: 'bold', - paddingTop: '20px', + paddingTop: '5px', + paddingBottom: '5px', }; const labelStyle = { @@ -184,7 +188,7 @@ class Questionnaire extends Component { const successMsgStyle = { padding: '25px 50px 25px 50px', - border: '4px solid #CCCCCC', + border: '1px solid #D8D8D8', marginBottom: '25px', background: '#B8DFC2', fontWeight: 'bold', @@ -211,6 +215,8 @@ class Questionnaire extends Component { lastName={buildingInfo.data.lastName} email={buildingInfo.data.email} phone={buildingInfo.data.phone} + buildingSqFt={buildingInfo.data.buildingSqFt} + numberOfFloors={buildingInfo.data.numberOfFloors} numOfStudio={buildingInfo.data.unitInfo.studio} numOfOneBedroom={buildingInfo.data.unitInfo.oneBedroom} numOfTwoBedroom={buildingInfo.data.unitInfo.twoBedroom} @@ -250,6 +256,9 @@ class Questionnaire extends Component { meteredForElectricity={ submittedAnswers.data.remoteSurvey.meteredForElectricity } + numberOfHeatingViolations={ + submittedAnswers.data.remoteSurvey.numberOfHeatingViolations + } onChangeEvent={this.onChangeEvent} /> @@ -259,6 +268,7 @@ class Questionnaire extends Component { diff --git a/src/containers/Questionnaire/reducer.js b/src/containers/Questionnaire/reducer.js index 651cbf2c62facffc89da9960b596bc865ff57014..e4a981a891e2287af702794dbb8adc491cc89807 100644 --- a/src/containers/Questionnaire/reducer.js +++ b/src/containers/Questionnaire/reducer.js @@ -96,7 +96,6 @@ export default function (state = questionnaireInitialState, action) { }; case SUBMIT_QUESTIONNAIRE_SUCCEEDED: - console.log(action); // eslint-disable-line return { ...state, buildingInfo: { @@ -179,7 +178,6 @@ export default function (state = questionnaireInitialState, action) { }; case CALCULATE_COST_SUCCEEDED: - console.log(action); // eslint-disable-line return { ...state, submitted: false, diff --git a/src/containers/Questionnaire/sagas.js b/src/containers/Questionnaire/sagas.js index 99cc3eb031ad6ce70682ff37d53a370c874dc5b0..04f32150813bd6ae9aa3c780149ff6bcf9bc3f44 100644 --- a/src/containers/Questionnaire/sagas.js +++ b/src/containers/Questionnaire/sagas.js @@ -31,7 +31,6 @@ function* loadQuestionnaire(action) { } function* submitQuestionnaire(action) { - console.log(action); // eslint-disable-line const url = `${process.env.REACT_APP_BLOCLINK_URL}/buildings/${action.buildingId}/pna/questionnaire/`; const res = yield call( request, @@ -51,7 +50,6 @@ function* submitQuestionnaire(action) { } function* editQuestionnaire(action) { - console.log(action); // eslint-disable-line yield put(editQuestionnaireSucceeded(action.payload)); }