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 88b839b0081c306efdb872be4ce7beac4d7416ef..955a05fdbbe6fc5780b95ef6867c5d3987214fdd 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>