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:
@@ -20,9 +20,9 @@ export type TrustCenterDocumentAccess = {
|
||||
filename: string;
|
||||
audit?: {
|
||||
id: string;
|
||||
framework: {
|
||||
framework?: {
|
||||
name: string;
|
||||
};
|
||||
} | null;
|
||||
} | null;
|
||||
} | null;
|
||||
trustCenterFile?: {
|
||||
|
||||
@@ -72,7 +72,7 @@ export function getTrustCenterDocumentAccessInfo(
|
||||
name: docAccess.report.filename,
|
||||
type: "report",
|
||||
typeLabel: __("Report"),
|
||||
category: docAccess.report.audit?.framework.name ?? "",
|
||||
category: docAccess.report.audit?.framework?.name ?? "",
|
||||
id: docAccess.report.id,
|
||||
status: docAccess.status,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user