@@ -24,102 +24,106 @@ export default function DataQualitySummary({
2424 latestDataset . validation_report === null ) && (
2525 < WarningContentBox > { t ( 'errorLoadingQualityReport' ) } </ WarningContentBox >
2626 ) }
27- { latestDataset ?. validation_report !== undefined &&
28- latestDataset . validation_report !== null && (
29- < Box sx = { { display : 'flex' , gap : 1 } } >
30- { isOfficialFeed && (
31- < Tooltip title = { t ( 'officialFeedTooltip' ) } placement = 'top' >
32- < Chip
33- sx = { verificationBadgeStyle }
34- icon = { < VerifiedIcon sx = { { fill : 'white' } } > </ VerifiedIcon > }
35- label = { t ( 'officialFeed' ) }
36- > </ Chip >
37- </ Tooltip >
38- ) }
27+ < Box sx = { { display : 'flex' , gap : 1 } } >
28+ { isOfficialFeed && (
29+ < Tooltip title = { t ( 'officialFeedTooltip' ) } placement = 'top' >
3930 < Chip
40- data-testid = 'error-count'
41- clickable
42- component = 'a'
43- href = { latestDataset ?. validation_report ?. url_html }
44- target = '_blank'
45- rel = 'noopener noreferrer'
46- icon = {
47- latestDataset ?. validation_report ?. unique_error_count !==
48- undefined &&
49- latestDataset ?. validation_report ?. unique_error_count > 0 ? (
50- < ReportOutlined />
51- ) : (
52- < CheckCircle />
53- )
54- }
55- label = {
56- latestDataset ?. validation_report ?. unique_error_count !==
57- undefined &&
58- latestDataset ?. validation_report ?. unique_error_count > 0
59- ? `${ latestDataset ?. validation_report
60- ?. unique_error_count } ${ t ( 'common:feedback.errors' ) } `
61- : t ( 'common:feedback.noErrors' )
62- }
63- color = {
64- latestDataset ?. validation_report ?. unique_error_count !==
65- undefined &&
66- latestDataset ?. validation_report ?. unique_error_count > 0
67- ? 'error'
68- : 'success'
69- }
70- variant = 'outlined'
71- />
31+ sx = { verificationBadgeStyle }
32+ icon = { < VerifiedIcon sx = { { fill : 'white' } } > </ VerifiedIcon > }
33+ label = { t ( 'officialFeed' ) }
34+ > </ Chip >
35+ </ Tooltip >
36+ ) }
37+ { latestDataset ?. validation_report !== undefined &&
38+ latestDataset . validation_report !== null && (
39+ < >
40+ < Chip
41+ data-testid = 'error-count'
42+ clickable
43+ component = 'a'
44+ href = { latestDataset ?. validation_report ?. url_html }
45+ target = '_blank'
46+ rel = 'noopener noreferrer'
47+ icon = {
48+ latestDataset ?. validation_report ?. unique_error_count !==
49+ undefined &&
50+ latestDataset ?. validation_report ?. unique_error_count > 0 ? (
51+ < ReportOutlined />
52+ ) : (
53+ < CheckCircle />
54+ )
55+ }
56+ label = {
57+ latestDataset ?. validation_report ?. unique_error_count !==
58+ undefined &&
59+ latestDataset ?. validation_report ?. unique_error_count > 0
60+ ? `${ latestDataset ?. validation_report
61+ ?. unique_error_count } ${ t ( 'common:feedback.errors' ) } `
62+ : t ( 'common:feedback.noErrors' )
63+ }
64+ color = {
65+ latestDataset ?. validation_report ?. unique_error_count !==
66+ undefined &&
67+ latestDataset ?. validation_report ?. unique_error_count > 0
68+ ? 'error'
69+ : 'success'
70+ }
71+ variant = 'outlined'
72+ />
7273
73- < Chip
74- data-testid = 'warning-count'
75- clickable
76- component = 'a'
77- href = { latestDataset ?. validation_report ?. url_html }
78- target = '_blank'
79- rel = 'noopener noreferrer'
80- icon = {
81- latestDataset ?. validation_report ?. unique_warning_count !==
82- undefined &&
83- latestDataset ?. validation_report ?. unique_warning_count > 0 ? (
84- < ReportOutlined />
85- ) : (
86- < CheckCircle />
87- )
88- }
89- label = {
90- latestDataset ?. validation_report ?. unique_warning_count !==
91- undefined &&
92- latestDataset ?. validation_report ?. unique_warning_count > 0
93- ? `${ latestDataset ?. validation_report
94- ?. unique_warning_count } ${ t ( 'common:feedback.warnings' ) } `
95- : t ( 'common:feedback.no_warnings' )
96- }
97- color = {
98- latestDataset ?. validation_report ?. unique_warning_count !==
99- undefined &&
100- latestDataset ?. validation_report ?. unique_warning_count > 0
101- ? 'warning'
102- : 'success'
103- }
104- variant = 'outlined'
105- />
74+ < Chip
75+ data-testid = 'warning-count'
76+ clickable
77+ component = 'a'
78+ href = { latestDataset ?. validation_report ?. url_html }
79+ target = '_blank'
80+ rel = 'noopener noreferrer'
81+ icon = {
82+ latestDataset ?. validation_report ?. unique_warning_count !==
83+ undefined &&
84+ latestDataset ?. validation_report ?. unique_warning_count > 0 ? (
85+ < ReportOutlined />
86+ ) : (
87+ < CheckCircle />
88+ )
89+ }
90+ label = {
91+ latestDataset ?. validation_report ?. unique_warning_count !==
92+ undefined &&
93+ latestDataset ?. validation_report ?. unique_warning_count > 0
94+ ? `${ latestDataset ?. validation_report
95+ ?. unique_warning_count } ${ t (
96+ 'common:feedback.warnings' ,
97+ ) } `
98+ : t ( 'common:feedback.no_warnings' )
99+ }
100+ color = {
101+ latestDataset ?. validation_report ?. unique_warning_count !==
102+ undefined &&
103+ latestDataset ?. validation_report ?. unique_warning_count > 0
104+ ? 'warning'
105+ : 'success'
106+ }
107+ variant = 'outlined'
108+ />
106109
107- < Chip
108- data-testid = 'info-count'
109- icon = { < InfoOutlinedIcon /> }
110- clickable
111- component = 'a'
112- href = { latestDataset ?. validation_report ?. url_html }
113- target = '_blank'
114- rel = 'noopener noreferrer'
115- label = { `${
116- latestDataset ?. validation_report ?. unique_info_count ?? '0'
117- } ${ t ( 'common:feedback.infoNotices' ) } `}
118- color = 'primary'
119- variant = 'outlined'
120- />
121- </ Box >
122- ) }
110+ < Chip
111+ data-testid = 'info-count'
112+ icon = { < InfoOutlinedIcon /> }
113+ clickable
114+ component = 'a'
115+ href = { latestDataset ?. validation_report ?. url_html }
116+ target = '_blank'
117+ rel = 'noopener noreferrer'
118+ label = { `${
119+ latestDataset ?. validation_report ?. unique_info_count ?? '0'
120+ } ${ t ( 'common:feedback.infoNotices' ) } `}
121+ color = 'primary'
122+ variant = 'outlined'
123+ />
124+ </ >
125+ ) }
126+ </ Box >
123127 </ Box >
124128 ) ;
125129}
0 commit comments