diff --git a/src/components/Options/ProfileTypeOptions.tsx b/src/components/Options/ProfileTypeOptions.tsx index d7e1288449fc7e8b8b40dbb33910b4747737acea..f84004b3c7bef03a32e4830c19d6a18f12e9569b 100644 --- a/src/components/Options/ProfileTypeOptions.tsx +++ b/src/components/Options/ProfileTypeOptions.tsx @@ -62,7 +62,7 @@ const ProfileTypeOptions: React.FC = () => { <div ref={content} style={{ - maxHeight: `${active ? scrollHeight : 0}px`, + maxHeight: `${active ? scrollHeight + 50 : 0}px`, }} className={classNames('accordion-content', { ['active']: active, @@ -156,12 +156,17 @@ const ProfileTypeOptions: React.FC = () => { )} </div> <div className="value"> - {profile.profileType.warmingFluid == null - ? t('profile_type.hot_water_fluid.no_fluid_text') - : t( + {profile.profileType.warmingFluid !== null && + profile.profileType.heating === + IndividualOrCollective.INDIVIDUAL + ? t( `profile_type.hot_water_fluid.${profile.profileType .hotWaterFluid + '_text'}` - )} + ) + : profile.profileType.heating === + IndividualOrCollective.INDIVIDUAL + ? t('profile_type.hot_water_fluid.no_fluid_text') + : ''} </div> {profile.profileType.hotWater === IndividualOrCollective.INDIVIDUAL && ( @@ -172,24 +177,25 @@ const ProfileTypeOptions: React.FC = () => { </div> )} </div> + {profile.profileType.individualInsulationWork.length > 0 && ( + <div className="fields"> + <div className="label"> + {t('profile_type.individual_insulation_work.title')} + </div> - <div className="fields"> - <div className="label"> - {t('profile_type.individual_insulation_work.title')} + {profile.profileType.individualInsulationWork.map( + (work, index) => { + return ( + <div key={index} className="value"> + {t( + `profile_type.individual_insulation_work.${work}` + )} + </div> + ) + } + )} </div> - {profile.profileType.individualInsulationWork.map( - (work, index) => { - return ( - <div key={index} className="value"> - {t( - `profile_type.individual_insulation_work.${work}` - )} - </div> - ) - } - )} - </div> - + )} <div className="fields"> <div className="label"> {t('profile_type.cooking_fluid.title')} diff --git a/src/components/Options/profileTypeOptions.scss b/src/components/Options/profileTypeOptions.scss index 050b415b9957a9ac850dd71f2a7cb3767b0bd204..4f3af3c11d497113a0c1845c7640c6703a3e7d65 100644 --- a/src/components/Options/profileTypeOptions.scss +++ b/src/components/Options/profileTypeOptions.scss @@ -14,7 +14,6 @@ .value { color: $white; padding: 0 0 0.5rem 0; - margin-right: 2rem; } ul { display: flex; @@ -40,11 +39,13 @@ display: flex; flex-wrap: wrap; width: 100%; + padding-top: 1.25rem; } .fields { align-items: flex-start; margin: 0px 1rem; padding: 8px 0px; + width: 100%; } button.profile-link { color: $grey-bright; diff --git a/src/locales/fr.json b/src/locales/fr.json index 5202b8c5b4d082aa099c68afc016ee01c0d5a4b9..515c7b2db1e822c24e297ee3dab557b45557f602 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -463,7 +463,7 @@ "floor": { "title": "Étage", "question": "À quel étage est votre appartement ?", - "ground_floor": "Au rez-de-chaussé", + "ground_floor": "Au rez-de-chaussée", "intermediate_floor": "Étage intermédiaire", "last_floor": "Dernier étage", "not_applicable": "Sans objet"