From 9e9a414e50cfc2a4a4afa2b682a4b7e71aee7ea6 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Wed, 3 Apr 2024 16:47:52 +0200 Subject: [PATCH 1/2] Remove the link to the requirement-assessment list view that shouldn't exist in the breadcrumb --- frontend/src/lib/utils/table.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend/src/lib/utils/table.ts b/frontend/src/lib/utils/table.ts index 493278ca5..8a0e2c4c8 100644 --- a/frontend/src/lib/utils/table.ts +++ b/frontend/src/lib/utils/table.ts @@ -86,10 +86,6 @@ export const listViewFields = { head: ['name', 'framework', 'description', 'project'], body: ['name', 'framework', 'description', 'project'] }, - 'requirement-assessments': { - head: ['name', 'description', 'complianceAssessment'], - body: ['name', 'description', 'compliance_assessment'] - }, evidences: { head: ['name', 'file', 'description'], body: ['name', 'attachment', 'description'] From 3df6a203fb8caa6d6cc6be2d9b3ce781336c386d Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Fri, 5 Apr 2024 08:39:33 +0200 Subject: [PATCH 2/2] 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']