diff --git a/frontend/src/lib/components/sidebar/app-sidebar.svelte b/frontend/src/lib/components/sidebar/app-sidebar.svelte index bb3f4855..c50ca3ad 100644 --- a/frontend/src/lib/components/sidebar/app-sidebar.svelte +++ b/frontend/src/lib/components/sidebar/app-sidebar.svelte @@ -9,7 +9,9 @@ import NavUser from "./nav-user.svelte"; import TeamSwitcher from "./team-switcher.svelte"; import AppLauncher from "./app-launcher.svelte"; - import { systemStore } from "$lib/stores/system.svelte"; + import { systemStore, type SystemType } from "$lib/stores/system.svelte"; + import PackageIcon from "@lucide/svelte/icons/package"; + import BarChart3Icon from "@lucide/svelte/icons/bar-chart-3"; import * as Sidebar from "$lib/components/ui/sidebar/index.js"; import type { ComponentProps } from "svelte"; @@ -77,6 +79,11 @@ const sidebar = useSidebar(); + const ACTIVE_ICONS: Record = { + fixed_asset: PackageIcon, + inventory: BarChart3Icon, + }; + onMount(() => { const expandForKeyboardNav = () => { sidebar.setOpen(true); @@ -90,7 +97,37 @@ - +
+ + + {#if systemStore.activeLabel} + {@const activeLabel = systemStore.activeLabel} + {@const activeSystem = systemStore.activeSystem} + {@const Icon = activeSystem ? ACTIVE_ICONS[activeSystem] : null} + +
+ {#if Icon} +
+ +
+ {/if} +
+ Aplicación activa + + {activeLabel.name} + + + {activeLabel.code} + +
+
+ {/if} +