feat: publish case launch context and product area
This commit is contained in:
@@ -14,6 +14,7 @@ import { ActionToolbar,
|
||||
hasScope,
|
||||
usePlatformModuleInstalled,
|
||||
useGuardedNavigate,
|
||||
useRegisterActiveObject,
|
||||
useUnsavedDraftGuard,
|
||||
type PlatformRouteContext
|
||||
} from "@govoplan/core-webui";
|
||||
@@ -74,6 +75,16 @@ export default function CaseDetailPage({ settings, auth }: PlatformRouteContext)
|
||||
? "Enable Mandates to verify formal authority."
|
||||
: undefined;
|
||||
const canFileRecords = recordsAvailable && hasScope(auth, "records:workspace:write");
|
||||
const activeCase = useMemo(() => record ? {
|
||||
ownerModule: record.reference.owner_module,
|
||||
kind: record.reference.kind,
|
||||
objectId: record.reference.object_id,
|
||||
tenantId: record.reference.tenant_id,
|
||||
label: `${record.case_number} · ${record.title}`,
|
||||
version: record.reference.version ?? String(record.revision),
|
||||
path: `/cases/${encodeURIComponent(record.reference.object_id)}`
|
||||
} : null, [record]);
|
||||
useRegisterActiveObject(activeCase);
|
||||
|
||||
const load = useCallback((signal?: AbortSignal) => {
|
||||
setLoading(true);
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
margin-top: 16px;
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-compact);
|
||||
background: var(--surface-raised);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
margin-top: 18px;
|
||||
background: var(--border);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-compact);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
.case-decision-list > article {
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-compact);
|
||||
background: var(--surface-raised);
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
@media (max-width: 900px) {
|
||||
.cases-count {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user