From eeab59943de853a9cc0f9b4ee84461092589edd4 Mon Sep 17 00:00:00 2001 From: Dorine Lambinet <dorine.lambinet@gmail.com> Date: Thu, 28 Apr 2022 11:35:40 +0200 Subject: [PATCH] Affichage des frais de logement --- .../test_cases/TestCaseSummary.svelte | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lib/components/test_cases/TestCaseSummary.svelte b/src/lib/components/test_cases/TestCaseSummary.svelte index e88faa9ea..85b0ba1be 100644 --- a/src/lib/components/test_cases/TestCaseSummary.svelte +++ b/src/lib/components/test_cases/TestCaseSummary.svelte @@ -494,26 +494,38 @@ </div> {/each} - <!--Frais fixe du ménage {#each Object.keys(familySituation).sort( (populationId1, populationId2) => populationId1.localeCompare(populationId2), ) as populationId} {@const loyer = getVariableValue(situation, "loyer", populationId)} + {@const statut_occupation_logement = getVariableValue( + situation, + "statut_occupation_logement", + populationId, + )} <div class="flex flex-col items-start gap-2"> - - {#if loyer !== 0} + {#if loyer > 0} <div class="flex items-center"> <PictoMaison /> <div class="pl-2"> <abbr class="text-sm" - title="loyer ou mensualité d'emprunt pour un primo-accédant" + title="Frais de loyer ou d'emprunt pour un primo-accédant par an" > Frais logement :</abbr > <span>{loyer}/an</span> + + <abbr + class="my-1 bg-white text-gray-800 rounded-2xl py-1 px-2 text-xs shadow-sm" + title="Statut des frais" + >{#if statut_occupation_logement === "locataire_foyer" || statut_occupation_logement === "locataire_hlm" || statut_occupation_logement === "locataire_meuble" || statut_occupation_logement === "locataire_vide"}loyer + {:else if statut_occupation_logement === "primo_accedant"}emprunt + primo-accédant{/if}</abbr + > </div> </div> {/if} + <!--Frais carburants <div class="flex items-center"> <PictoFraisGazoil /> <div class="pl-2"> @@ -522,8 +534,7 @@ > <span>XX/an</span> </div> - </div> + </div>--> </div> {/each} ---> </div> -- GitLab