diff --git a/example.env b/example.env index 2f1eac40ffef12a4af8952dbeb09516988fd00ca..593a054ecccafcdfd040a3c6c9848c66b6f25f78 100644 --- a/example.env +++ b/example.env @@ -86,6 +86,9 @@ PROXY=false # Reform name must belong to a name of an OpenFisca reform in metadata.json # REFORM_REVALUATION=contrefactuel_plf +# Indique que la réforme PLF est fausse si cette variable est à true. +REFORM_MOCK_VALUES=false + # Show intro balloons. SHOW_TUTORIAL=true diff --git a/src/lib/components/variables/InflationLawDetails.svelte b/src/lib/components/variables/InflationLawDetails.svelte index bc7744877afaf56faf9f1692bf4016e46c609ce7..18dcee63fb2c57be9de4b659b21fd444a50df91f 100644 --- a/src/lib/components/variables/InflationLawDetails.svelte +++ b/src/lib/components/variables/InflationLawDetails.svelte @@ -180,7 +180,7 @@ > {/if} </span> - {#if billMockValues} + {#if $billMockValues} <!-- MONTRER WARNING --> <button class="mt-2 font-sans text-base bg-orange-200 px-1 italic text-orange-800 hover:underline cursor-pointer" @@ -213,7 +213,7 @@ />En {$yearPLF}, les seuils augmentent de {revaluationInflatorValueFormatted}. </p> {/if} - {#if billMockValues} + {#if $billMockValues} <!-- MONTRER WARNING --> <button class="mt-2 font-sans text-base bg-orange-200 px-1 italic text-orange-800 hover:underline cursor-pointer" diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0001a7d32f421a48e80eb2aacc67e72066af981d..63e552f475364b0f7369c6e0bee0e9fa757882b5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -105,9 +105,7 @@ setContext("billName", billName) const billActive: Writable<boolean> = writable(currentBillName !== undefined) setContext("billActive", billActive) - const billMockValues: Writable<boolean> = writable( - data.reformMockValues === true, - ) + const billMockValues: Writable<boolean> = writable(data.reformMockValues) setContext("billMockValues", billMockValues) let currentRevaluationName: string | undefined =