Skip to content
Snippets Groups Projects
Commit d84cf09c authored by sandcha's avatar sandcha
Browse files

Ordonnance les dotations des totaux selon l'ordre de la section loi

parent ccd44f21
No related branches found
No related tags found
1 merge request!24Corrige l'affichage sur petit écran, corrige l'ordre d'affichage des impacts et permet la suppression de carte communale
......@@ -11,6 +11,7 @@
type DotationTotalReform,
type DotationSummaryTotal,
getDotationIconName,
getDotations,
} from "$lib/dotations"
let {
......@@ -18,12 +19,16 @@
}: {
totalParDotation: DotationSummaryTotal
} = $props()
const dotationsOrder: Dotation[] = getDotations()
</script>
<div class="flex w-full flex-row divide-x overflow-x-auto text-center">
{#each Object.entries(totalParDotation) as [dotation, totalCommunes]}
{#each dotationsOrder as dotation}
{#if dotation in totalParDotation}
{@const totalCommunes = totalParDotation[dotation]}
{@const baseEligibles = (totalCommunes as DotationTotalBase).eligibles}
{@const amendementTotal = getAmendementTotal()[dotation as Dotation]}
{@const amendementTotal = getAmendementTotal()[dotation]}
{@const amendementToujoursEligibles =
amendementTotal === undefined
? baseEligibles
......@@ -38,7 +43,7 @@
<span class="flex items-center">
<iconify-icon
class="align-middle text-2xl"
icon={getDotationIconName(dotation as Dotation)}
icon={getDotationIconName(dotation)}
alt={dotation}
></iconify-icon>
</span>
......@@ -62,5 +67,6 @@
{/if}
</div>
{/if}
{/if}
{/each}
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment