From 14f46591dd1d1f9965f0d0abdc9c2595c004f71d Mon Sep 17 00:00:00 2001 From: Dorine Lambinet <dorine.lambinet@assemblee-nationale.fr> Date: Mon, 10 Mar 2025 17:15:46 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20affichage=20inflator=20pour=20les=20monta?= =?UTF-8?q?nts=20r=C3=A9valu=C3=A9s,=20m=C3=AAme=20retrait=20du=20PLF/PLFS?= =?UTF-8?q?S?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inflation_view/InflationLawButton.svelte | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lib/components/legislation_view/parameters/inflation_view/InflationLawButton.svelte b/src/lib/components/legislation_view/parameters/inflation_view/InflationLawButton.svelte index 88b839b00..955a05fdb 100644 --- a/src/lib/components/legislation_view/parameters/inflation_view/InflationLawButton.svelte +++ b/src/lib/components/legislation_view/parameters/inflation_view/InflationLawButton.svelte @@ -4,7 +4,7 @@ const bubble = createBubbler() import type { ValueParameter } from "@openfisca/json-model" - import { billName, yearPLF } from "$lib/shared.svelte" + import { billName, revaluationName } from "$lib/shared.svelte" import { formatValue } from "$lib/values" interface Props { @@ -51,6 +51,19 @@ ? formatValue(billInflator.values["latest"].value, billInflator.unit) : undefined, ) + + let revaluationInflator = $derived( + inflatorWithLatestByReformName?.[revaluationName], + ) + + let revaluationInflatorValueFormatted = $derived( + revaluationInflator !== undefined + ? formatValue( + revaluationInflator.values["latest"].value, + revaluationInflator.unit, + ) + : undefined, + ) </script> <button @@ -73,7 +86,7 @@ Revalorisation de {billInflatorValueFormatted}, suite à l'indexation d'usage du barème de l'IR par le PLF. {:else} - Indexation sur l'inflation à {billInflatorValueFormatted}. + Indexation sur l'inflation à {revaluationInflatorValueFormatted}. {/if} </p> </button> -- GitLab