From 1d629f100f2496c8f0d507c681804db03a0eeb6f Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Sun, 14 Jun 2026 12:07:14 +0200 Subject: [PATCH] added company setting to quick navigation Signed-off-by: Ronni Skansing --- .../src/lib/components/modal/CommandPalette.svelte | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend/src/lib/components/modal/CommandPalette.svelte b/frontend/src/lib/components/modal/CommandPalette.svelte index dedb8e2..2f142b6 100644 --- a/frontend/src/lib/components/modal/CommandPalette.svelte +++ b/frontend/src/lib/components/modal/CommandPalette.svelte @@ -5,6 +5,9 @@ import { goto } from '$app/navigation'; import { menu, topMenu } from '$lib/consts/navigation'; import { shouldHideMenuItem } from '$lib/utils/common'; + import { AppStateService } from '$lib/service/appState'; + + const appState = AppStateService.instance; // external export let visible = false; export let toggleChangeCompanyModal = () => {}; @@ -73,6 +76,16 @@ category: 'Settings' }); + // add the settings for the company currently being viewed + const context = appState.getContext(); + if (appState.isCompanyContext() && context.companyID) { + items.push({ + label: 'Company Settings', + route: `/company/${context.companyID}`, + category: context.companyName || 'Company' + }); + } + // add actions (not navigation) items.push({ label: 'Switch Company',