Skip to content

Commit

Permalink
🐛 Update name col in identified risks table (#1590)
Browse files Browse the repository at this point in the history
Resolves https://issues.redhat.com/browse/MTA-1836

Signed-off-by: ibolton336 <ibolton@redhat.com>
  • Loading branch information
ibolton336 committed Dec 6, 2023
1 parent 789434f commit 1198255
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
useFetchAssessmentsWithArchetypeApplications();

interface ITableRowData {
assessmentName: string;
questionnaireName: string;
questionId: string;
section: string;
question: Question;
Expand Down Expand Up @@ -129,7 +129,7 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
question: question,
answer: answer,
applications: uniqueApplications ? uniqueApplications : [],
assessmentName: assessment.questionnaire.name,
questionnaireName: assessment.questionnaire.name,
questionId: itemId,
});
}
Expand All @@ -143,7 +143,7 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
idProperty: "questionId",
items: tableData || [],
columnNames: {
assessmentName: "Assessment Name",
questionnaireName: "Questionnaire Name",
section: "Section",
question: "Question",
answer: "Answer",
Expand All @@ -155,7 +155,7 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
isSortEnabled: true,
hasActionsColumn: false,
getSortValues: (item) => ({
assessmentName: item.assessmentName,
questionnaireName: item.questionnaireName,
section: item.section,
question: item.question.text,
answer: item.answer.text,
Expand All @@ -165,7 +165,7 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
riskLevelMapping["unknown"],
}),
sortableColumns: [
"assessmentName",
"questionnaireName",
"section",
"question",
"answer",
Expand Down Expand Up @@ -213,8 +213,8 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
<Thead>
<Tr>
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "assessmentName" })}>
Assessment name
<Th {...getThProps({ columnKey: "questionnaireName" })}>
Questionnaire name
</Th>
<Th {...getThProps({ columnKey: "section" })}>Section</Th>
<Th {...getThProps({ columnKey: "question" })}>Question</Th>
Expand Down Expand Up @@ -250,8 +250,8 @@ export const IdentifiedRisksTable: React.FC<IIdentifiedRisksTableProps> = ({
item={item}
rowIndex={rowIndex}
>
<Td {...getTdProps({ columnKey: "assessmentName" })}>
{item.assessmentName}
<Td {...getTdProps({ columnKey: "questionnaireName" })}>
{item.questionnaireName}
</Td>
<Td {...getTdProps({ columnKey: "section" })}>
{item?.section ?? "N/A"}
Expand Down

0 comments on commit 1198255

Please sign in to comment.