diff --git a/src/components/JobSummary/Summary/Summary.js b/src/components/JobSummary/Summary/Summary.js index 5fd1f48c..92dd8a57 100644 --- a/src/components/JobSummary/Summary/Summary.js +++ b/src/components/JobSummary/Summary/Summary.js @@ -1,3 +1,5 @@ +import i18n from '@dhis2/d2-i18n' +import { NoticeBox } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' import { typeReportParse } from '../helper.js' @@ -6,7 +8,7 @@ import { TypeReportSummary } from '../TypeReportSummary/TypeReportSummary.js' import styles from './Summary.module.css' const extractStats = (summary) => { - if (summary.responseType == 'ImportSummaries') { + if (summary.responseType === 'ImportSummaries') { const { imported, deleted, ignored, updated, total } = summary return { imported, deleted, ignored, updated, total } } else if (summary.importCount) { @@ -18,7 +20,26 @@ const extractStats = (summary) => { } } -const Summary = ({ summary, importType }) => { +const Summary = ({ summary, importType, dryRun }) => { + // Check for dry run + if (dryRun) { + const { ignored, total } = extractStats(summary) + return ( +