Skip to content

Commit

Permalink
Fix: error 500 in evidence detail view due to lack of the requirement…
Browse files Browse the repository at this point in the history
…-assessments config of listViewFields in table.ts
  • Loading branch information
monsieurswag committed Apr 5, 2024
1 parent 9e9a414 commit 3df6a20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
});
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 3df6a20

Please sign in to comment.