From fa7649472807519b1c7839785744a3539bed8db3 Mon Sep 17 00:00:00 2001
From: Dorine Lambinet <dorine.lambinet@assemblee-nationale.fr>
Date: Fri, 11 Oct 2024 12:07:43 +0200
Subject: [PATCH] =?UTF-8?q?Cr=C3=A9e=20composant=20unique=20pour=20liste?=
=?UTF-8?q?=20des=20dispositifs=20modifi=C3=A9s=20par=20PLF=20PLFSS?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/PlfVariablesListIntro.svelte | 65 +++++++++++++++++
src/routes/+page.svelte | 72 +------------------
src/routes/accueil/+page.svelte | 63 +---------------
3 files changed, 69 insertions(+), 131 deletions(-)
create mode 100644 src/lib/components/PlfVariablesListIntro.svelte
diff --git a/src/lib/components/PlfVariablesListIntro.svelte b/src/lib/components/PlfVariablesListIntro.svelte
new file mode 100644
index 000000000..d376d9b3a
--- /dev/null
+++ b/src/lib/components/PlfVariablesListIntro.svelte
@@ -0,0 +1,65 @@
+<script lang="ts">
+ import type { DisplayMode } from "$lib/displays"
+ import { newSimulationUrl } from "$lib/urls"
+
+ export let displayMode: DisplayMode
+</script>
+
+<div>
+ <h3 class="mt-4 mb-2 text-base mx-2 font-bold">
+ Article 2 du PLF 2025 | Impôt sur le revenu :
+ </h3>
+ <a
+ class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
+ data-sveltekit-noscroll
+ href={newSimulationUrl({
+ ...displayMode,
+ parametersVariableName: "irpp_economique",
+ })}
+ >
+ Indexation des seuils du barème de l'<b>impôt sur le revenu</b>
+ </a>
+ <h3 class="mt-4 mb-2 text-base mx-2 font-bold">
+ Article 6 du PLFSS 2025 | Allègements de cotisations :
+ </h3>
+ <div class="flex flex-col gap-3">
+ <div>
+ <a
+ class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
+ data-sveltekit-noscroll
+ href={newSimulationUrl({
+ ...displayMode,
+ parametersVariableName: "allegement_general",
+ })}
+ >
+ Baisse des taux et modification de l'assiette de la
+ <b>réduction générale</b>
+ </a>
+ </div>
+ <div>
+ <a
+ class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
+ data-sveltekit-noscroll
+ href={newSimulationUrl({
+ ...displayMode,
+ parametersVariableName: "allegement_cotisation_maladie",
+ })}
+ >
+ Baisse du plafond de rémunération de l'<b>allègement maladie</b>
+ </a>
+ </div>
+ <div>
+ <a
+ class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
+ data-sveltekit-noscroll
+ href={newSimulationUrl({
+ ...displayMode,
+ parametersVariableName:
+ "allegement_cotisation_allocations_familiales",
+ })}
+ >
+ Baisse du plafond de rémunération de l'<b>allègement famille</b>
+ </a>
+ </div>
+ </div>
+</div>
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index b1a1e4014..e5ffa345b 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -37,6 +37,7 @@
import BudgetSimulationSharingModal from "$lib/components/BudgetSimulationSharingModal.svelte"
import CopyClipboard from "$lib/components/CopyClipboard.svelte"
import ModificationsPanel from "$lib/components/ModificationsPanel.svelte"
+ import PlfVariablesListIntro from "$lib/components/PlfVariablesListIntro.svelte"
import SkeletonLoaderBudget from "$lib/components/budget/SkeletonLoaderBudget.svelte"
import StaticAggregates from "$lib/components/budget/StaticAggregates.svelte"
import TestCaseCompareView from "$lib/components/test_cases/TestCaseCompareView.svelte"
@@ -1075,76 +1076,7 @@
prestation :
</h2>
{#if $billActive}
- <div>
- <h3
- class="text-le-rouge-bill mt-4 mb-2 text-base mx-2 font-bold"
- >
- Article 2 du PLF 2025 | Impôt sur le revenu :
- </h3>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName: "irpp_economique",
- })}
- >
- Indexation des seuils du barème de l'<b
- >impôt sur le revenu</b
- >
- </a>
- <h3
- class="text-le-rouge-bill mt-4 mb-2 text-base mx-2 font-bold"
- >
- Article 6 du PLFSS 2025 | Allègements de cotisations :
- </h3>
- <div class="flex flex-col gap-3">
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName: "allegement_general",
- })}
- >
- Baisse des taux et modification de l'assiette de la <b
- >réduction générale</b
- >
- </a>
- </div>
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName:
- "allegement_cotisation_maladie",
- })}
- >
- Baisse du plafond de rémunération de l'<b
- >allègement maladie</b
- >
- </a>
- </div>
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-sm hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName:
- "allegement_cotisation_allocations_familiales",
- })}
- >
- Baisse du plafond de rémunération de l'<b
- >allègement famille</b
- >
- </a>
- </div>
- </div>
- </div>
+ <PlfVariablesListIntro {displayMode} />
{/if}
{#key displayMode.budget}
<div
diff --git a/src/routes/accueil/+page.svelte b/src/routes/accueil/+page.svelte
index af668095e..29dc5832e 100644
--- a/src/routes/accueil/+page.svelte
+++ b/src/routes/accueil/+page.svelte
@@ -16,6 +16,7 @@
import { auditQuerySingleton } from "$lib/auditors/queries"
import PictoFemme from "$lib/components/pictos/PictoFemme.svelte"
import PictoOpenFisca from "$lib/components/pictos/PictoOpenFisca.svelte"
+ import PlfVariablesListIntro from "$lib/components/PlfVariablesListIntro.svelte"
import WelcomeSearch from "$lib/components/search/WelcomeSearch.svelte"
import TestCaseSelectModal from "$lib/components/test_cases/TestCaseSelectModal.svelte"
import AnchorTitle from "$lib/components/transverse_pages/AnchorTitle.svelte"
@@ -319,67 +320,7 @@
Consulter les impacts du PLF / PLFSS 2025 :
</h2>
- <h3 class="mt-4 mb-2 text-lg mx-2 font-bold">
- Article 2 du PLF 2025 | Impôt sur le revenu :
- </h3>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-base hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName: "irpp_economique",
- })}
- >
- Indexation des seuils du barème de l'<b>impôt sur le revenu</b>
- </a>
- <h3 class="mt-4 mb-2 text-lg mx-2 font-bold">
- Article 6 du PLFSS 2025 | Allègements de cotisations :
- </h3>
- <div class="flex flex-col gap-2">
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-base hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName: "allegement_general",
- })}
- >
- Baisse des taux et modification de l'assiette de la <b
- >réduction générale</b
- >
- </a>
- </div>
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-base hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName: "allegement_cotisation_maladie",
- })}
- >
- Baisse du plafond de rémunération de l'<b
- >allègement maladie</b
- >
- </a>
- </div>
- <div>
- <a
- class="mx-1 px-3 py-1 bg-white border-le-rouge-bill border-2 hover:bg-opacity-80 active:bg-opacity-70 rounded-full text-base hover:bg-red-100"
- data-sveltekit-noscroll
- href={newSimulationUrl({
- ...displayMode,
- parametersVariableName:
- "allegement_cotisation_allocations_familiales",
- })}
- >
- Baisse du plafond de rémunération de l'<b
- >allègement famille</b
- >
- </a>
- </div>
- </div>
+ <PlfVariablesListIntro {displayMode} />
</div>
{/if}
<div class="flex gap-9 mt-5 mb-3">
--
GitLab