Merge branch 'master' of https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/Supra_App
This commit is contained in:
commit
f4b8df2c27
29 changed files with 693 additions and 97 deletions
|
|
@ -11,7 +11,8 @@
|
|||
DiamondIcon,
|
||||
BugIcon,
|
||||
CupSodaIcon,
|
||||
Shield
|
||||
Shield,
|
||||
FileSpreadsheet
|
||||
} from '@lucide/svelte/icons';
|
||||
import TaobinLogo from '$lib/assets/logo.svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
|
|
@ -19,6 +20,7 @@
|
|||
import { sidebarStore } from '$lib/core/stores/sidebar';
|
||||
import { auth } from '$lib/core/stores/auth';
|
||||
import { isUserAdmin } from '$lib/core/admin/adminService';
|
||||
import { referenceFromPage } from '$lib/core/stores/recipeStore';
|
||||
|
||||
let sideBar: HTMLElement | null = $state(null);
|
||||
let isSideBarOpen: boolean = $state(true);
|
||||
|
|
@ -70,6 +72,17 @@
|
|||
icon: BugIcon
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Sheet',
|
||||
items: [
|
||||
{
|
||||
title: 'Overview',
|
||||
url: '/departments',
|
||||
icon: FileSpreadsheet
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -138,7 +151,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}
|
||||
|
|
@ -162,7 +185,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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue