From accc78eb2ecf5f5c8a3a764d071147751b671462 Mon Sep 17 00:00:00 2001 From: hreyes Date: Wed, 27 May 2026 07:35:53 -0600 Subject: [PATCH] feature/ver-app-activa --- .../lib/components/sidebar/app-sidebar.svelte | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) 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} +