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;
|
filename: string;
|
||||||
audit?: {
|
audit?: {
|
||||||
id: string;
|
id: string;
|
||||||
framework: {
|
framework?: {
|
||||||
name: string;
|
name: string;
|
||||||
};
|
} | null;
|
||||||
} | null;
|
} | null;
|
||||||
} | null;
|
} | null;
|
||||||
trustCenterFile?: {
|
trustCenterFile?: {
|
||||||
|
|||||||
@@ -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,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user