Skip to content
Snippets Groups Projects
Commit b6c2b6b3 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Add unknown property for construction year + add hints in form

parent 72a1a4a4
No related branches found
No related tags found
1 merge request!242Add unknown property for construction year + add hints in form
...@@ -89,7 +89,9 @@ const ProfileTypeFormMultiChoice: React.FC<ProfileTypeFormMultiChoiceProps> = ({ ...@@ -89,7 +89,9 @@ const ProfileTypeFormMultiChoice: React.FC<ProfileTypeFormMultiChoiceProps> = ({
`profile_type.${ProfileTypeStepForm[step].toLowerCase()}.question` `profile_type.${ProfileTypeStepForm[step].toLowerCase()}.question`
)} )}
</div> </div>
<span>{t('profile_type.multi_choices')}</span> <span className="profile-question-hint">
{t('profile_type.multi_choices')}
</span>
{answerType.choices.map( {answerType.choices.map(
(value: ProfileTypeAnswerChoices, index: number) => { (value: ProfileTypeAnswerChoices, index: number) => {
return value ? ( return value ? (
......
...@@ -73,6 +73,11 @@ const ProfileTypeFormNumberSelection: React.FC<ProfileTypeFormNumberSelectionPro ...@@ -73,6 +73,11 @@ const ProfileTypeFormNumberSelection: React.FC<ProfileTypeFormNumberSelectionPro
`profile_type.${ProfileTypeStepForm[step].toLowerCase()}.question` `profile_type.${ProfileTypeStepForm[step].toLowerCase()}.question`
)} )}
</div> </div>
{ProfileTypeStepForm[step] === 'OUTSIDE_FACING_WALLS' && (
<span className="profile-question-hint">
{t('profile_type.outside_facing_walls.hint')}
</span>
)}
{answer !== null ? ( {answer !== null ? (
<div className={'number-container'}> <div className={'number-container'}>
<button <button
......
...@@ -13,19 +13,27 @@ ...@@ -13,19 +13,27 @@
line-height: 150%; line-height: 150%;
padding: 1rem 0; padding: 1rem 0;
} }
.profile-question-hint {
font-size: 1rem;
color: $grey-bright;
display: block;
margin-bottom: 1rem;
font-style: italic;
}
.profile-question-answers { .profile-question-answers {
display: flex; display: flex;
} }
.profile-question-answers-radio-long { .profile-question-answers-radio-long {
flex-wrap: wrap; flex-wrap: wrap;
} }
.profile-question-answers-other { .profile-question-answers-other {
flex-direction: column; flex-direction: column;
} }
.radio_short, .radio_long, .checkbox { .radio_short,
background: linear-gradient(180deg, #323339 0%, #25262B 100%); .radio_long,
.checkbox {
background: linear-gradient(180deg, #323339 0%, #25262b 100%);
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55); box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55);
margin: 0.5rem 0; margin: 0.5rem 0;
display: flex; display: flex;
...@@ -52,44 +60,52 @@ ...@@ -52,44 +60,52 @@
border-radius: 1px; border-radius: 1px;
} }
} }
.radio_short, .checkbox { .radio_short,
padding: 1.2rem; .checkbox {
border-radius: 4px; padding: 1.2rem;
border-radius: 4px;
} }
.radio_long { .radio_long {
padding: .5rem 1rem; padding: 0.5rem 1rem;
border-radius: 20px; border-radius: 20px;
text-align: center; text-align: center;
} }
.answer-checked { .answer-checked {
background: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(226, 137, 4, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #F1C017; background: radial-gradient(
105.25% 64.58% at 49.68% 70.83%,
rgba(226, 137, 4, 0.5) 0%,
rgba(255, 255, 255, 0) 100%
),
#f1c017;
color: $dark-light-2; color: $dark-light-2;
input { input {
&:before, &:after { &:before,
content: ''; &:after {
position: absolute; content: '';
display: inline-block; position: absolute;
background: $gold-shadow; display: inline-block;
border-radius: 0.5rem; background: $gold-shadow;
} border-radius: 0.5rem;
&:before { }
width: 3px; &:before {
height: 12px; width: 3px;
left: 10px; height: 12px;
top: 4px; left: 10px;
transform: rotate(41deg); top: 4px;
} transform: rotate(41deg);
&:after { }
width: 3px; &:after {
height: 6px; width: 3px;
left: 5px; height: 6px;
top: 8px; left: 5px;
transform: rotate(133deg); top: 8px;
transform: rotate(133deg);
}
} }
}
} }
.text, .number { .text,
.number {
font-size: 1.25rem; font-size: 1.25rem;
input { input {
margin: 0.5rem; margin: 0.5rem;
...@@ -124,9 +140,9 @@ ...@@ -124,9 +140,9 @@
margin: 0.5rem; margin: 0.5rem;
&:focus { &:focus {
outline:none; outline: none;
} }
} }
button:disabled { button:disabled {
opacity: 0.5; opacity: 0.5;
} }
\ No newline at end of file
...@@ -4,13 +4,15 @@ ...@@ -4,13 +4,15 @@
"between_1948_and_1974": 3130, "between_1948_and_1974": 3130,
"between_1975_and_1989": 2900, "between_1975_and_1989": 2900,
"between_1990_and_1998": 3230, "between_1990_and_1998": 3230,
"after_1999": 2900 "after_1999": 2900,
"unknown": 2900
}, },
"appartment": { "appartment": {
"before_1948": 1120, "before_1948": 1120,
"between_1948_and_1974": 1880, "between_1948_and_1974": 1880,
"between_1975_and_1989": 1780, "between_1975_and_1989": 1780,
"between_1990_and_1998": 1670, "between_1990_and_1998": 1670,
"after_1999": 2060 "after_1999": 2060,
"unknown": 1780
} }
} }
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
"between_1948_and_1974": 184, "between_1948_and_1974": 184,
"between_1975_and_1989": 140, "between_1975_and_1989": 140,
"between_1990_and_1998": 129, "between_1990_and_1998": 129,
"after_1999": 106 "after_1999": 106,
"unknown": 140
}, },
"appartment": { "appartment": {
"before_1948": 119, "before_1948": 119,
"between_1948_and_1974": 150, "between_1948_and_1974": 150,
"between_1975_and_1989": 105, "between_1975_and_1989": 105,
"between_1990_and_1998": 73, "between_1990_and_1998": 73,
"after_1999": 74 "after_1999": 74,
"unknown": 105
} }
}, },
"adjustment_outisde_facing_walls": { "adjustment_outisde_facing_walls": {
...@@ -87,6 +89,16 @@ ...@@ -87,6 +89,16 @@
"window_replacement_and_roof_insulation": 0, "window_replacement_and_roof_insulation": 0,
"roof_and_wall_insulation": 0, "roof_and_wall_insulation": 0,
"window_replacement_and_roof_and_wall_insulation": 0 "window_replacement_and_roof_and_wall_insulation": 0
},
"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
} }
}, },
"adjustment_facilities": { "adjustment_facilities": {
......
...@@ -22,6 +22,7 @@ export enum ConstructionYear { ...@@ -22,6 +22,7 @@ export enum ConstructionYear {
BETWEEN_1975_AND_1989 = 'between_1975_and_1989', BETWEEN_1975_AND_1989 = 'between_1975_and_1989',
BETWEEN_1990_AND_1998 = 'between_1990_and_1998', BETWEEN_1990_AND_1998 = 'between_1990_and_1998',
AFTER_1999 = 'after_1999', AFTER_1999 = 'after_1999',
UNKNOWN = 'unknown',
} }
export enum IndividualOrCollective { export enum IndividualOrCollective {
......
...@@ -430,7 +430,8 @@ ...@@ -430,7 +430,8 @@
"between_1948_and_1974": "Entre 1975 et 1989", "between_1948_and_1974": "Entre 1975 et 1989",
"between_1975_and_1989": "Entre 1975 et 1989", "between_1975_and_1989": "Entre 1975 et 1989",
"between_1990_and_1998": "Entre 1990 et 1998", "between_1990_and_1998": "Entre 1990 et 1998",
"after_1999": "Après 1999" "after_1999": "Après 1999",
"unknown": "Je ne sais pas"
}, },
"area": { "area": {
"title": "Surface", "title": "Surface",
...@@ -442,7 +443,8 @@ ...@@ -442,7 +443,8 @@
}, },
"outside_facing_walls": { "outside_facing_walls": {
"title": "Murs extérieurs", "title": "Murs extérieurs",
"question": "Combien de façades donnent sur l'extérieur ?" "question": "Combien de façades de votre logement donnent-elles sur l’extérieur ?",
"hint": "Dit autrement, en regardant votre logement du dessus, combien de côtés donnent sur l’extérieur ? Sans compter le toit ni le plafond. La mitoyenneté cela compte dans vos consommations finales !"
}, },
"floor": { "floor": {
"title": "Étage", "title": "Étage",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment