@@ -6,8 +6,10 @@ import ReportsTable from './Reports/ReportsTable'
66import IssuesTable from './Reports/IssuesTable'
77import { formNameFromRule } from '../Services/Ufixit'
88import InfoPopover from './Widgets/InfoPopover'
9+ import StatusPill from './Widgets/StatusPill'
910import ProgressIcon from './Icons/ProgressIcon'
1011import PrintIcon from './Icons/PrintIcon'
12+ import RightArrowIcon from './Icons/RightArrowIcon'
1113import SortIcon from './Icons/SortIcon'
1214import './ReportsPage.css'
1315
@@ -60,22 +62,39 @@ export default function ReportsPage({t, report, settings, quickSearchTerm}) {
6062 tempIssues . map ( ( issue => {
6163 let label = ''
6264 let searchTerm = ''
65+ let content = ''
6366 let formName = formNameFromRule ( issue . id )
6467 if ( formName === 'review_only' ) {
6568 label = t ( 'report.label.unhandled' ) + issue . id
69+ let tempContent = t ( 'rule.summary.' + issue . id )
70+ if ( tempContent === `rule.summary.${ issue . id } ` ) {
71+ tempContent = t ( 'form.review_only.summary' )
72+ }
73+ content = tempContent
6674 searchTerm = issue . id
6775 }
6876 else {
6977 label = t ( `form.${ formName } .title` )
7078 searchTerm = t ( `form.${ formName } .title` )
79+ content = t ( `form.${ formName } .summary` )
7180 }
7281 issue . display = label
7382 issue . label = (
74- < span className = "issue-label" >
83+ < span className = "issue-label clickable-text " >
7584 { label }
7685 < InfoPopover
7786 t = { t }
78- content = { t ( `form.${ formName } .summary` ) }
87+ title = { t ( 'fix.label.barrier_information' ) }
88+ content = { content }
89+ action = { (
90+ < button
91+ className = "btn-text btn-link btn-icon-right"
92+ onClick = { ( ) => quickSearchTerm ( searchTerm ) }
93+ >
94+ { t ( 'report.label.view_barriers' ) }
95+ < RightArrowIcon className = 'icon-sm' />
96+ </ button >
97+ ) }
7998 />
8099 </ span >
81100 )
@@ -93,13 +112,12 @@ export default function ReportsPage({t, report, settings, quickSearchTerm}) {
93112 if ( ! labels . includes ( issue . label_display ) ) {
94113 labels . push ( issue . label_display )
95114 if ( issue . type === 'error' || issue . type === 'issue' ) {
96- issue . type = t ( 'filter.label.severity.issue' )
97- }
98- else if ( issue . type === 'potential' ) {
99- issue . type = t ( 'filter.label.severity.potential' )
115+ issue . type = ( < StatusPill t = { t } settings = { settings } issue = { { status : settings . ISSUE_FILTER . ACTIVE , severity : settings . ISSUE_FILTER . ISSUE } } /> )
116+ issue . type_display = t ( 'filter.label.severity.issue' )
100117 }
101- else if ( issue . type === 'suggestion' ) {
102- issue . type = t ( 'filter.label.severity.suggestion' )
118+ else if ( issue . type === 'potential' || issue . type === 'suggestion' ) {
119+ issue . type = ( < StatusPill t = { t } settings = { settings } issue = { { status : settings . ISSUE_FILTER . ACTIVE , severity : settings . ISSUE_FILTER . POTENTIAL } } /> )
120+ issue . type_display = t ( 'filter.label.severity.potential' )
103121 }
104122 issue . handled = ( issue . fixed + issue . resolved > 0 ? 1 : 0 )
105123 mergedIssues . push ( issue )
0 commit comments