Update TS types for nullable audit framework

The console GraphQL schema made Audit.framework nullable which
requires updating the TrustCenterDocumentAccess type and its
helper to handle the optional framework field.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-17 00:40:10 +01:00
parent a82e353a47
commit c8df8b0c87
2 changed files with 3 additions and 3 deletions

View File

@@ -20,9 +20,9 @@ export type TrustCenterDocumentAccess = {
filename: string; filename: string;
audit?: { audit?: {
id: string; id: string;
framework: { framework?: {
name: string; name: string;
}; } | null;
} | null; } | null;
} | null; } | null;
trustCenterFile?: { trustCenterFile?: {

View File

@@ -72,7 +72,7 @@ export function getTrustCenterDocumentAccessInfo(
name: docAccess.report.filename, name: docAccess.report.filename,
type: "report", type: "report",
typeLabel: __("Report"), typeLabel: __("Report"),
category: docAccess.report.audit?.framework.name ?? "", category: docAccess.report.audit?.framework?.name ?? "",
id: docAccess.report.id, id: docAccess.report.id,
status: docAccess.status, status: docAccess.status,
}; };