Skip to content

Commit

Permalink
fix code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnC-80 committed Oct 2, 2023
1 parent fdb8748 commit 0dce212
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/settings/JobProfiles/ViewJobProfile/ViewJobProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ const {
ERROR,
} = FILE_STATUSES;

const jobPartsCellFormatter = record => (
<FormattedMessage
id="ui-data-import.logViewer.partOfTotal"
values={{
number: record.jobPartNumber,
total: record.totalJobParts
}}
/>
);

const ViewJobProfileComponent = props => {
const {
resources,
Expand Down Expand Up @@ -295,15 +305,7 @@ const ViewJobProfileComponent = props => {
const jobsUsingThisProfileFormatter = {
...listTemplate({}),
fileName: record => fileNameCellFormatter(record, location),
jobParts: record => (
<FormattedMessage
id="ui-data-import.logViewer.partOfTotal"
values={{
number: record.jobPartNumber,
total: record.totalJobParts
}}
/>
)
jobParts: jobPartsCellFormatter
};

const tagsEntityLink = `data-import-profiles/jobProfiles/${jobProfileRecord.id}`;
Expand Down

0 comments on commit 0dce212

Please sign in to comment.