@@ -85,85 +85,93 @@ export const ReportRow = ({
8585 const { id : campaignId , customer_title } = campaign ;
8686
8787 return (
88- < Row id = "reports" style = { { marginBottom : theme . space . xxl } } >
89- { ( reports && reports . length ) || isFunctional ? (
90- < Col xs = { 12 } >
91- < SectionTitle
92- title = { t ( '__CAMPAIGN_PAGE_REPORTS_TITLE' ) }
93- subtitle = { t ( '__CAMPAIGN_PAGE_REPORTS_DESCRIPTION' ) }
94- />
95- </ Col >
96- ) : null }
97- { isFunctional && (
98- < Col xs = { 12 } md = { 4 } lg = { 3 } >
99- < BugsReportCard campaignId = { campaignId } title = { customer_title } />
100- </ Col >
101- ) }
102- { reports && reports . length
103- ? reports . map ( ( report ) => (
104- < Col xs = { 12 } md = { 4 } lg = { 3 } >
105- < SpecialCard >
106- < SpecialCard . Meta
107- justifyContent = "start"
108- style = { { fontSize : theme . fontSizes . sm } }
109- >
110- { report . update_date ? (
111- < >
112- { t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL' ) } { ' ' }
113- { format ( new Date ( report . update_date ) , 'dd/MM/yyyy' ) }
114- </ >
115- ) : (
116- < >
117- { t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_UPLOADED_ON_LABEL' ) } { ' ' }
118- { format (
119- new Date ( report . creation_date ?? '' ) ,
120- 'dd/MM/yyyy'
121- ) }
122- </ >
123- ) }
124- </ SpecialCard . Meta >
88+ < div style = { { minHeight : '100vh' } } >
89+ < Row id = "reports" >
90+ { ( reports && reports . length ) || isFunctional ? (
91+ < Col xs = { 12 } >
92+ < SectionTitle
93+ title = { t ( '__CAMPAIGN_PAGE_REPORTS_TITLE' ) }
94+ subtitle = { t ( '__CAMPAIGN_PAGE_REPORTS_DESCRIPTION' ) }
95+ />
96+ </ Col >
97+ ) : null }
98+ { isFunctional && (
99+ < Col xs = { 12 } md = { 4 } lg = { 3 } >
100+ < BugsReportCard campaignId = { campaignId } title = { customer_title } />
101+ </ Col >
102+ ) }
103+ { reports && reports . length
104+ ? reports . map ( ( report ) => (
105+ < Col xs = { 12 } md = { 4 } lg = { 3 } >
106+ < SpecialCard >
107+ < SpecialCard . Meta
108+ justifyContent = "start"
109+ style = { { fontSize : theme . fontSizes . sm } }
110+ >
111+ { report . update_date ? (
112+ < >
113+ { t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL' ) } { ' ' }
114+ { format ( new Date ( report . update_date ) , 'dd/MM/yyyy' ) }
115+ </ >
116+ ) : (
117+ < >
118+ { t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_UPLOADED_ON_LABEL' ) } { ' ' }
119+ { format (
120+ new Date ( report . creation_date ?? '' ) ,
121+ 'dd/MM/yyyy'
122+ ) }
123+ </ >
124+ ) }
125+ </ SpecialCard . Meta >
125126
126- < SpecialCard . Thumb >
127- { getFileTypeIcon ( report . file_type ?. type ?? '' , report . url ) }
128- </ SpecialCard . Thumb >
127+ < SpecialCard . Thumb >
128+ { getFileTypeIcon ( report . file_type ?. type ?? '' , report . url ) }
129+ </ SpecialCard . Thumb >
129130
130- < SpecialCard . Header >
131- < SpecialCard . Header . Label >
132- { getFileTypeName ( report . file_type ?. type ?? '' , report . url ) }
133- </ SpecialCard . Header . Label >
134- < SpecialCard . Header . Title >
135- { report . title }
136- </ SpecialCard . Header . Title >
137- </ SpecialCard . Header >
131+ < SpecialCard . Header >
132+ < SpecialCard . Header . Label >
133+ { getFileTypeName (
134+ report . file_type ?. type ?? '' ,
135+ report . url
136+ ) }
137+ </ SpecialCard . Header . Label >
138+ < SpecialCard . Header . Title >
139+ { report . title }
140+ </ SpecialCard . Header . Title >
141+ </ SpecialCard . Header >
138142
139- < SpecialCard . Footer direction = "column" justifyContent = "center" >
140- < Button
141- className = { `report-btn report-btn-${
142- report . file_type ?. type === 'link' ? 'link' : 'download'
143- } report-btn-${ report . file_type ?. type ?? '' } `}
144- isPill
145- isStretched
146- onClick = { ( ) => {
147- // eslint-disable-next-line security/detect-non-literal-fs-filename
148- window . open ( report . url || '' , '_blank' ) ;
149- } }
143+ < SpecialCard . Footer
144+ direction = "column"
145+ justifyContent = "center"
150146 >
151- < Button . StartIcon >
152- { report . file_type ?. type === 'link' ? (
153- < OpenLinkIcon />
154- ) : (
155- < DownloadIcon />
156- ) }
157- </ Button . StartIcon >
158- { report . file_type ?. type === 'link'
159- ? t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL' )
160- : t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL' ) }
161- </ Button >
162- </ SpecialCard . Footer >
163- </ SpecialCard >
164- </ Col >
165- ) )
166- : null }
167- </ Row >
147+ < Button
148+ className = { `report-btn report-btn-${
149+ report . file_type ?. type === 'link' ? 'link' : 'download'
150+ } report-btn-${ report . file_type ?. type ?? '' } `}
151+ isPill
152+ isStretched
153+ onClick = { ( ) => {
154+ // eslint-disable-next-line security/detect-non-literal-fs-filename
155+ window . open ( report . url || '' , '_blank' ) ;
156+ } }
157+ >
158+ < Button . StartIcon >
159+ { report . file_type ?. type === 'link' ? (
160+ < OpenLinkIcon />
161+ ) : (
162+ < DownloadIcon />
163+ ) }
164+ </ Button . StartIcon >
165+ { report . file_type ?. type === 'link'
166+ ? t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL' )
167+ : t ( '__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL' ) }
168+ </ Button >
169+ </ SpecialCard . Footer >
170+ </ SpecialCard >
171+ </ Col >
172+ ) )
173+ : null }
174+ </ Row >
175+ </ div >
168176 ) ;
169177} ;
0 commit comments