Refactor year management in the database layer, enhance Year model with budget field, and update UI components for year selection and dashboard display

This commit is contained in:
Norbert Maciaszek
2025-11-25 00:16:21 +01:00
parent 1030991d92
commit f31eb3dc0d
15 changed files with 498 additions and 14 deletions

View File

@@ -0,0 +1,31 @@
<script>
import { XIcon } from 'lucide-svelte';
import { fade } from 'svelte/transition';
let { isOpen, onClose, children, heading = 'Modal' } = $props();
</script>
<div
role="dialog"
aria-modal="true"
transition:fade={{ duration: 200 }}
class="fixed inset-0 bg-black/50 flex justify-center items-center"
onclick={(e) => {
if (e.target === e.currentTarget) {
onClose();
}
}}
>
<div class="bg-neutral-200 rounded-lg text-black shadow-md min-w-xl">
{#if heading}
<div class="p-4 flex justify-between items-center border-b border-neutral-400">
<h2 class="text-lg font-bold">{heading}</h2>
<XIcon class="size-6 cursor-pointer" onclick={onClose} />
</div>
{/if}
<div class="p-4">
{@render children()}
</div>
</div>
</div>