Skip to main content
Sign in
Snippets Groups Projects
Commit 47a682da authored by Toufic Batache's avatar Toufic Batache
Browse files

Ouvrir les articles de loi (sources modale droit attendu 2024) dans une modale...

Ouvrir les articles de loi (sources modale droit attendu 2024) dans une modale comme dans le reste de l'UI
parent df60a6fb
No related branches found
No related tags found
2 merge requests!158Bouton et modale simulation budget et autre évolution UI du budget,!157Ajout partage simulation budgétaire
Pipeline #10232 passed
......@@ -10,6 +10,7 @@
} from "@rgossiaux/svelte-headlessui"
import InflationLawDetails from "$lib/components/variables/InflationLawDetails.svelte"
import ArticleModal from "$lib/components/parameters/ArticleModal.svelte"
export let isOpen = false
export let billParameter: ScaleParameter | ValueParameter
......@@ -17,6 +18,8 @@
export let revaluationDetails: ValueParameter
export let revaluationParameter: ScaleParameter | ValueParameter
let openReferenceUrl: string | undefined | null = null
$: revaluationReferences = [
...(revaluationDetails.reference === undefined
? []
......@@ -141,10 +144,10 @@
{#each revaluationReferences as reference}
<li>
{#if reference.href !== undefined}
<a
href={reference.href}
<button
class="cursor-pointer underline hover:text-le-bleu"
>{reference.title}</a
on:click={() => (openReferenceUrl = reference.href)}
>{reference.title}</button
>
{:else}
{reference.title}
......@@ -153,6 +156,12 @@
{/each}
</ol>
</div>
<ArticleModal
on:close={() => (openReferenceUrl = null)}
parameter={lawParameter ?? billParameter}
referenceUrl={openReferenceUrl ?? null}
/>
</DialogDescription>
</div>
</TransitionChild>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment