app/javascript/components/admin/ImportStatus.jsx in lcms-engine-0.3.0 vs app/javascript/components/admin/ImportStatus.jsx in lcms-engine-0.3.1

- old
+ new

@@ -1,6 +1,7 @@ import React from 'react' +import _ from 'lodash' class ImportStatus extends React.Component { constructor(props) { super(props) this.state = { jobs: props.jobs } @@ -51,11 +52,12 @@ resourceButton(job) { if (this.withPdf) { return ( <a href={job.link} - className="o-adm-materials__resource ub-icon ub-file-pdf button primary u-margin-left--small u-margin-bottom--zero" target="_blank"> + className="o-adm-materials__resource button primary u-margin-left--small u-margin-bottom--zero" target="_blank"> + <i className="far fa-file-pdf"></i> </a> ) } let linkWithParams = function(route, params = {}) { @@ -67,11 +69,12 @@ } return _.map(this.links, (link, idx) => ( <a key={`pl-${idx}`} href={linkWithParams(link, { id: job.model.id })} - className="o-adm-materials__resource ub-icon ub-eye button primary u-margin-left--small u-margin-bottom--zero" target="_blank"> + className="o-adm-materials__resource button primary u-margin-left--small u-margin-bottom--zero" target="_blank"> + <i className="fas fa-eye"></i> </a> )) } spinner() { @@ -97,10 +100,11 @@ {job.link} </a> {job.status !== 'done' ? this.spinner() : null} {job.status === 'done' && job.ok ? <span>{this.resourceButton(job)}</span> : null} </div> - {job.errors ? (<p dangerouslySetInnerHTML={{__html: _.join(job.errors, '<br/>')}}></p>) : null} + {!(_.isEmpty(job.errors)) ? (<p dangerouslySetInnerHTML={{__html: _.join(job.errors, '<br/>')}}></p>) : null} + {!(_.isEmpty(job.warnings)) ? (<p dangerouslySetInnerHTML={{ __html: _.join(job.warnings, '<br/>') }}></p>) : null} </li> ) }) return (