Skip to content
Snippets Groups Projects
Commit 8ba80c2a authored by Aurélie HAUTBOIS's avatar Aurélie HAUTBOIS
Browse files

Merge branch 'features/US387-Update-profileType' into 'dev'

Features/us387 update profile type

See merge request web-et-numerique/llle_project/ecolyo!262
parents 12370ce5 da1b4b29
No related branches found
No related tags found
1 merge request!262Features/us387 update profile type
......@@ -10,6 +10,7 @@ import profileIcon from 'assets/icons/ico/profile.svg'
import {
HousingType,
IndividualInsulationWork,
IndividualOrCollective,
ThreeChoicesAnswer,
} from 'enum/profileType.enum'
......@@ -87,6 +88,7 @@ describe('ProfileTypeOptions component', () => {
const profileTypeCompleted = {
...profileData,
}
profileTypeCompleted.profileType.heating = IndividualOrCollective.INDIVIDUAL
profileTypeCompleted.isProfileTypeCompleted = true
profileTypeCompleted.profileType.housingType = HousingType.APPARTMENT
profileTypeCompleted.profileType.hasInstalledVentilation =
......
......@@ -9,7 +9,6 @@ import {
HousingType,
ThreeChoicesAnswer,
OutsideFacingWalls,
ConstructionYear,
} from 'enum/profileType.enum'
import { FluidType } from 'enum/fluid.enum'
import { useHistory } from 'react-router-dom'
......@@ -82,8 +81,7 @@ const ProfileTypeOptions: React.FC = () => {
`profile_type.housing_type.${profile.profileType.housingType}`
)}
</div>
{profile.profileType.constructionYear !==
ConstructionYear.UNKNOWN && (
{profile.profileType.constructionYear && (
<div className="value">
{t(
`profile_type.construction_year.${'text_' +
......
......@@ -13,6 +13,6 @@
"between_1975_and_1989": 1780,
"between_1990_and_1998": 1670,
"after_1999": 2060,
"unknown": 1780
"unknown": 2060
}
}
......@@ -6,7 +6,7 @@
"between_1975_and_1989": 140,
"between_1990_and_1998": 129,
"after_1999": 106,
"unknown": 140
"unknown": 106
},
"appartment": {
"before_1948": 119,
......@@ -14,7 +14,7 @@
"between_1975_and_1989": 105,
"between_1990_and_1998": 73,
"after_1999": 74,
"unknown": 105
"unknown": 74
}
},
"adjustment_outisde_facing_walls": {
......@@ -93,12 +93,12 @@
"unknown": {
"none": 0,
"roof_insulation": 0,
"window_replacement": -0.06,
"wall_insulation": -0.2,
"window_replacement_and_wall_insulation": -0.25,
"window_replacement_and_roof_insulation": -0.07,
"roof_and_wall_insulation": -0.2,
"window_replacement_and_roof_and_wall_insulation": -0.25
"window_replacement": 0,
"wall_insulation": 0,
"window_replacement_and_wall_insulation": 0,
"window_replacement_and_roof_insulation": 0,
"roof_and_wall_insulation": 0,
"window_replacement_and_roof_and_wall_insulation": 0
}
},
"adjustment_facilities": {
......
......@@ -451,6 +451,7 @@
"text_between_1975_and_1989": "Construit entre 1975 et 1989",
"text_between_1990_and_1998": "Construit entre 1990 et 1998",
"text_after_1999": "Construit après 1999",
"text_unknown": "Construit après 1999",
"before_1948": "Avant 1948",
"between_1948_and_1974": "Entre 1975 et 1989",
"between_1975_and_1989": "Entre 1975 et 1989",
......
......@@ -10,7 +10,6 @@ import {
Floor,
HotWaterEquipment,
HousingType,
IndividualInsulationWork,
IndividualOrCollective,
OutsideFacingWalls,
ThreeChoicesAnswer,
......@@ -32,25 +31,22 @@ const initialState: Profile = {
monthlyAnalysisDate: DateTime.fromISO('0000-01-01T00:00:00.000Z'),
isProfileTypeCompleted: false,
profileType: {
housingType: HousingType.INDIVIDUAL_HOUSE,
constructionYear: ConstructionYear.BETWEEN_1975_AND_1989,
area: 100,
occupantsNumber: 4,
outsideFacingWalls: OutsideFacingWalls.TWO,
floor: Floor.NOT_APPLICABLE,
heating: IndividualOrCollective.INDIVIDUAL,
housingType: HousingType.APPARTMENT,
constructionYear: ConstructionYear.AFTER_1999,
area: 35,
occupantsNumber: 1,
outsideFacingWalls: OutsideFacingWalls.ONE,
floor: Floor.INTERMEDIATE_FLOOR,
heating: IndividualOrCollective.COLLECTIVE,
coldWater: IndividualOrCollective.INDIVIDUAL,
hotWater: IndividualOrCollective.INDIVIDUAL,
individualInsulationWork: [
IndividualInsulationWork.WINDOW_REPLACEMENT,
IndividualInsulationWork.WALL_INSULATION,
],
individualInsulationWork: [],
hasInstalledVentilation: ThreeChoicesAnswer.NO,
hasReplacedHeater: ThreeChoicesAnswer.NO,
hotWaterEquipment: HotWaterEquipment.SOLAR,
hotWaterEquipment: HotWaterEquipment.OTHER,
warmingFluid: FluidType.ELECTRICITY,
hotWaterFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.GAS,
},
}
......
......@@ -5,7 +5,6 @@ import {
IndividualOrCollective,
HotWaterEquipment,
HousingType,
IndividualInsulationWork,
OutsideFacingWalls,
ThreeChoicesAnswer,
} from 'enum/profileType.enum'
......@@ -32,24 +31,22 @@ export const profileData: Profile = {
}),
sendAnalysisNotification: false,
profileType: {
housingType: HousingType.INDIVIDUAL_HOUSE,
constructionYear: ConstructionYear.BETWEEN_1975_AND_1989,
area: 100,
occupantsNumber: 4,
outsideFacingWalls: OutsideFacingWalls.TWO,
floor: Floor.NOT_APPLICABLE,
heating: IndividualOrCollective.INDIVIDUAL,
housingType: HousingType.APPARTMENT,
constructionYear: ConstructionYear.AFTER_1999,
area: 35,
occupantsNumber: 1,
outsideFacingWalls: OutsideFacingWalls.ONE,
floor: Floor.INTERMEDIATE_FLOOR,
heating: IndividualOrCollective.COLLECTIVE,
coldWater: IndividualOrCollective.INDIVIDUAL,
hotWater: IndividualOrCollective.INDIVIDUAL,
individualInsulationWork: [
IndividualInsulationWork.WINDOW_REPLACEMENT,
IndividualInsulationWork.WALL_INSULATION,
],
hasReplacedHeater: ThreeChoicesAnswer.NO,
individualInsulationWork: [],
hasInstalledVentilation: ThreeChoicesAnswer.NO,
hotWaterEquipment: HotWaterEquipment.SOLAR,
hasReplacedHeater: ThreeChoicesAnswer.NO,
hotWaterEquipment: HotWaterEquipment.OTHER,
warmingFluid: FluidType.ELECTRICITY,
hotWaterFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.GAS,
},
isProfileTypeCompleted: false,
}
......@@ -4,7 +4,6 @@ import {
Floor,
HotWaterEquipment,
HousingType,
IndividualInsulationWork,
IndividualOrCollective,
OutsideFacingWalls,
ThreeChoicesAnswer,
......@@ -105,25 +104,22 @@ export const mockInitialProfileState: Profile = {
monthlyAnalysisDate: DateTime.fromISO('0000-01-01T00:00:00.000Z'),
isProfileTypeCompleted: false,
profileType: {
housingType: HousingType.INDIVIDUAL_HOUSE,
constructionYear: ConstructionYear.BETWEEN_1975_AND_1989,
area: 100,
occupantsNumber: 4,
outsideFacingWalls: OutsideFacingWalls.TWO,
floor: Floor.NOT_APPLICABLE,
heating: IndividualOrCollective.INDIVIDUAL,
housingType: HousingType.APPARTMENT,
constructionYear: ConstructionYear.AFTER_1999,
area: 35,
occupantsNumber: 1,
outsideFacingWalls: OutsideFacingWalls.ONE,
floor: Floor.INTERMEDIATE_FLOOR,
heating: IndividualOrCollective.COLLECTIVE,
coldWater: IndividualOrCollective.INDIVIDUAL,
hotWater: IndividualOrCollective.INDIVIDUAL,
individualInsulationWork: [
IndividualInsulationWork.WINDOW_REPLACEMENT,
IndividualInsulationWork.WALL_INSULATION,
],
individualInsulationWork: [],
hasInstalledVentilation: ThreeChoicesAnswer.NO,
hasReplacedHeater: ThreeChoicesAnswer.NO,
hotWaterEquipment: HotWaterEquipment.SOLAR,
hotWaterEquipment: HotWaterEquipment.OTHER,
warmingFluid: FluidType.ELECTRICITY,
hotWaterFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.ELECTRICITY,
cookingFluid: FluidType.GAS,
},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment