added company setting to quick navigation

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2026-06-14 12:07:14 +02:00
parent 3fa8add4fd
commit 1d629f100f
@@ -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',