From 3df6a203fb8caa6d6cc6be2d9b3ce781336c386d Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Fri, 5 Apr 2024 08:39:33 +0200 Subject: [PATCH] Fix: error 500 in evidence detail view due to lack of the requirement-assessments config of listViewFields in table.ts --- frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte | 2 +- frontend/src/lib/utils/table.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 1369debb3..742e254fc 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -40,7 +40,7 @@ } return { label: $page.data.label || t, - href: Object.keys(listViewFields).includes(tokens[0]) ? tokenPath : null + href: Object.keys(listViewFields).includes(tokens[0]) && !listViewFields[tokens[0]].breadcrumb_link_disabled ? tokenPath : null }; }); diff --git a/frontend/src/lib/utils/table.ts b/frontend/src/lib/utils/table.ts index 8a0e2c4c8..2ec95d5d1 100644 --- a/frontend/src/lib/utils/table.ts +++ b/frontend/src/lib/utils/table.ts @@ -86,6 +86,11 @@ export const listViewFields = { head: ['name', 'framework', 'description', 'project'], body: ['name', 'framework', 'description', 'project'] }, + 'requirement-assessments': { + head: ['name', 'description', 'complianceAssessment'], + body: ['name', 'description', 'compliance_assessment'], + breadcrumb_link_disabled: true + }, evidences: { head: ['name', 'file', 'description'], body: ['name', 'attachment', 'description']