feat(ui): ship unified audit surfaces
This commit is contained in:
@@ -44,6 +44,30 @@ function redirectToDecisioning(path: string) {
|
||||
};
|
||||
}
|
||||
|
||||
function redirectToEvidence(path: string) {
|
||||
return ({
|
||||
params,
|
||||
queryParams,
|
||||
fragment,
|
||||
}: {
|
||||
params: Record<string, string>;
|
||||
queryParams: Record<string, string>;
|
||||
fragment?: string | null;
|
||||
}) => {
|
||||
const router = inject(Router);
|
||||
let targetPath = path;
|
||||
|
||||
for (const [name, value] of Object.entries(params ?? {})) {
|
||||
targetPath = targetPath.replaceAll(`:${name}`, encodeURIComponent(value));
|
||||
}
|
||||
|
||||
const target = router.parseUrl(targetPath);
|
||||
target.queryParams = { ...queryParams };
|
||||
target.fragment = fragment ?? null;
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
export const ADMINISTRATION_ROUTES: Routes = [
|
||||
// A0 — Administration overview
|
||||
{
|
||||
@@ -245,6 +269,27 @@ export const ADMINISTRATION_ROUTES: Routes = [
|
||||
},
|
||||
|
||||
// A6 — Trust & Signing
|
||||
{
|
||||
path: 'audit',
|
||||
title: 'Unified Audit Log',
|
||||
data: { breadcrumb: 'Unified Audit Log' },
|
||||
redirectTo: redirectToEvidence('/evidence/audit-log'),
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: 'audit/:page',
|
||||
title: 'Unified Audit Log',
|
||||
data: { breadcrumb: 'Unified Audit Log' },
|
||||
redirectTo: redirectToEvidence('/evidence/audit-log/:page'),
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: 'audit/:page/:child',
|
||||
title: 'Unified Audit Log',
|
||||
data: { breadcrumb: 'Unified Audit Log' },
|
||||
redirectTo: redirectToEvidence('/evidence/audit-log/:page/:child'),
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: 'trust-signing',
|
||||
title: 'Trust & Signing',
|
||||
|
||||
Reference in New Issue
Block a user