@@ -29,6 +29,7 @@ import {
|
||||
activeProcurementEntry,
|
||||
procurementNavigation,
|
||||
} from '@/lib/procurement-navigation';
|
||||
import type { CommonFinanceNavigation } from '@/lib/procurement-navigation';
|
||||
import { roleLabels } from '@/types/procurement';
|
||||
import type { WorkContextState } from '@/types/work-context';
|
||||
import { WorkContextChange } from '@/components/work-context-change';
|
||||
@@ -54,6 +55,9 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
permissions: string[];
|
||||
} | null;
|
||||
const context = page.props.workContext as WorkContextState | null;
|
||||
const commonFinance = page.props.commonFinanceNavigation as
|
||||
| CommonFinanceNavigation
|
||||
| undefined;
|
||||
const scopedEntries = new Set(
|
||||
procurementNavigation(
|
||||
context?.permissions ?? [],
|
||||
@@ -63,6 +67,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
page.props.operationalOrdersAvailable === true,
|
||||
page.props.privateAuditAvailable === true,
|
||||
page.props.capitalRegisterAvailable === true,
|
||||
commonFinance,
|
||||
).flatMap((group) => group.entries.map((entry) => entry.id)),
|
||||
);
|
||||
const groups = procurementNavigation(
|
||||
@@ -73,6 +78,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
page.props.operationalOrdersAvailable === true,
|
||||
page.props.privateAuditAvailable === true,
|
||||
page.props.capitalRegisterAvailable === true,
|
||||
commonFinance,
|
||||
)
|
||||
.map((group) => ({
|
||||
...group,
|
||||
|
||||
Reference in New Issue
Block a user