diff --git a/src/lib/components/parameters/ArticleModal.svelte b/src/lib/components/parameters/ArticleModal.svelte index 88ca132e7e91ca0255f57e22f1dcd287bd425425..e78a12d38b32e92995ebe1d13fadd1ca449fd4b4 100644 --- a/src/lib/components/parameters/ArticleModal.svelte +++ b/src/lib/components/parameters/ArticleModal.svelte @@ -10,6 +10,7 @@ Transition, TransitionChild, } from "@rgossiaux/svelte-headlessui" + import { each } from "svelte/internal" export let billParameter: ValueParameter | ScaleParameter export let isOpen = false @@ -53,28 +54,29 @@ <div class="my-8 inline-block w-full max-w-6xl transform overflow-hidden rounded-md bg-white p-6 text-left align-middle shadow-xl transition-all" > - {#if billParameter.name === "impot_revenu.bareme_ir_depuis_1945.bareme"} - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètres :</span> Barème de l'impôt sur - le revenu - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" + <div class="flex justify-between text-black"> + <DialogTitle + as="h3" + class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" > + <span class="font-normal">Paramètre :</span> + {billParameter.ux_name ?? billParameter.description} + </DialogTitle> + + <button + class="text-gray-400 hover:text-black" + on:click={closeModal} + type="button" + > + <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button + > + </div> + + <DialogDescription + as="div" + class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" + > + {#if billParameter.name === "impot_revenu.bareme_ir_depuis_1945.bareme"} <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -125,40 +127,7 @@ <span class="bg-le-gris-dispositif-light">160 336 €</span>. </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.general"} - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Plafond de l'avantage - en impôt par demi-part supplémentaire \ attribuée en raison d'une - personne à charge (cas général) - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.general"} <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -182,41 +151,9 @@ commune. </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.celib"} - <!--Paramètre plaf_qf.celib --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Plafond de l'avantage - en impôt par demi-part supplémentaire délivrée pour les personnes - ayant élevé seules un enfant pendant 5 ans - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.celib"} + <!--Paramètre plaf_qf.celib --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -238,40 +175,9 @@ ; </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.celib_enf"} - <!--Paramètre plaf_qf.celib_enfant --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Plafond de l'avantage - en impôt pour la part du premier enfant à charge d'un parent isolé - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.celib_enf"} + <!--Paramètre plaf_qf.celib_enfant --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -298,41 +204,9 @@ deux premiers enfants est limitée à la moitié de cette somme. </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond"} - <!--Paramètre plaf_qf.reduc_postplafond --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Réduction d'impôt complémentaire - pour les invalides ou les anciens combattants, si le plafond général - de la demi-part supplémentaire a été atteint - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond"} + <!--Paramètre plaf_qf.reduc_postplafond --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -358,41 +232,9 @@ d'impôt résultant du plafonnement. </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond_veuf"} - <!--Paramètre plaf_qf.reduc_postplafond_veuf --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Réduction d'impôt complémentaire - pour les veufs ayant des enfants à charge, si le plafond général - de leur demi-part supplémentaire a été atteint - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond_veuf"} + <!--Paramètre plaf_qf.reduc_postplafond_veuf --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -417,40 +259,9 @@ de la cotisation d'impôt résultant du plafonnement. </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuadMarReu"} - <!--Paramètre plaf_qf.abat_dom.plaf_GuadMarReu --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Plafond maximal d'abattement - DOM - Guadeloupe, Martinique, Réunion - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuadMarReu"} + <!--Paramètre plaf_qf.abat_dom.plaf_GuadMarReu --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -474,40 +285,9 @@ Guyane et de Mayotte ; </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuyMay"} - <!--Paramètre plaf_qf.abat_dom.plaf_GuyMay --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Plafond maximal d'abattement - DOM - Guyane, Mayotte - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuyMay"} + <!--Paramètre plaf_qf.abat_dom.plaf_GuyMay --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -531,40 +311,9 @@ la Guyane et de Mayotte ; </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuadMarReu"} - <!--Paramètre plaf_qf.abat_dom.taux_GuadMarReu --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span> Taux d'abattement DOM - - Guadeloupe, Martinique, Réunion - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuadMarReu"} + <!--Paramètre plaf_qf.abat_dom.taux_GuadMarReu --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -588,40 +337,9 @@ domiciliés dans les départements de la Guyane et de Mayotte ; </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuyMay"} - <!--Paramètre plaf_qf.abat_dom.taux_GuyMay --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span>Taux d'abattement - DOM - Guyane, Mayotte - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuyMay"} + <!--Paramètre plaf_qf.abat_dom.taux_GuyMay --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -645,40 +363,9 @@ domiciliés dans les départements de la Guyane et de Mayotte ; </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_celib"} - <!--Paramètre plaf_qf.decote.seuil_celib --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span>Seuil de la décote - pour un célibataire - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_celib"} + <!--Paramètre plaf_qf.decote.seuil_celib --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -703,40 +390,9 @@ % </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_couple"} - <!--Paramètre plaf_qf.decote.seuil_couple --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span>Seuil de la décote - pour un couple - </DialogTitle> - - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_couple"} + <!--Paramètre plaf_qf.decote.seuil_couple --> + <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -760,39 +416,9 @@ commune.40 % </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.taux"} - <!--Paramètre plaf_qf.decote.taux --> - <div class="flex justify-between text-black"> - <DialogTitle - as="h3" - class="text-xl font-thin text-le-gris-dispositif-dark md:text-xl" - > - <span class="font-normal">Paramètre :</span>Taux de la décote - </DialogTitle> + {:else if billParameter.name === "impot_revenu.calcul_impot_revenu.plaf_qf.decote.taux"} + <!--Paramètre plaf_qf.decote.taux --> - <button - class="text-gray-400 hover:text-black" - on:click={closeModal} - type="button" - > - <Icon class="ml-2 h-10 w-10" icon="ri-close-line" /></button - > - </div> - <DialogDescription - as="div" - class="mt-2 rounded-r-md border-l-4 bg-gray-50 p-3 md:mt-6" - > <h4 class="mb-4 font-serif text-2xl italic text-gray-700 md:text-3xl" > @@ -817,18 +443,18 @@ montant pour les contribuables soumis à imposition commune.40 % </p> </div> - <div class="mt-4 text-right text-sm text-gray-500"> - <p class="">Extrait d'article à jour au 07 août 2022.</p> - <span class="text-sm text-gray-500 md:text-base"> - <a - class="link" - href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" - target="_blank">Voir l'article sur Légifrance.fr</a - > - </span> - </div> - </DialogDescription> - {/if} + {/if} + <div class="mt-4 text-right text-sm text-gray-500"> + <p class="">Extrait d'article à jour au 07 août 2022.</p> + <span class="text-sm text-gray-500 md:text-base"> + <a + class="link" + href="https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000042907517/2022-08-07/" + target="_blank">Voir l'article sur Légifrance.fr</a + > + </span> + </div> + </DialogDescription> </div> </TransitionChild> </div>