update: sheet routes

This commit is contained in:
Ittipat Lusuk 2026-03-26 14:23:12 +07:00
parent e9192c8607
commit b1dd9de062
5 changed files with 144 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -10,13 +10,15 @@
CherryIcon,
DiamondIcon,
BugIcon,
CupSodaIcon
CupSodaIcon,
FileSpreadsheet
} from '@lucide/svelte/icons';
import TaobinLogo from '$lib/assets/logo.svelte';
import { goto } from '$app/navigation';
import Button from '$lib/components/ui/button/button.svelte';
import { get } from 'svelte/store';
import { sidebarStore } from '$lib/core/stores/sidebar';
import { referenceFromPage } from '$lib/core/stores/recipeStore';
let sideBar: HTMLElement | null = $state(null);
let isSideBarOpen: boolean = $state(true);
@ -67,6 +69,17 @@
icon: BugIcon
}
]
},
{
title: 'Sheet',
items: [
{
title: 'Overview',
url: '/departments',
icon: FileSpreadsheet
}
]
}
// more to add here
]
@ -109,7 +122,17 @@
<Sidebar.MenuItem>
<Sidebar.MenuButton>
{#snippet child({ props })}
<a href={sub.url} {...props}>
<a
href={sub.url}
{...props}
onclick={(e) => {
if (nav.title === 'Sheet') {
e.preventDefault();
referenceFromPage.set('sheet');
goto(sub.url);
}
}}
>
{#if sub.icon}
<sub.icon />
{/if}