From 35e7df72bcd979d7963e309dcc9b824de701fdb1 Mon Sep 17 00:00:00 2001 From: Mozafar Haider Date: Mon, 11 Mar 2024 12:56:36 +0000 Subject: [PATCH] fix(tracker-api-migration): fix 'created' value not displaying in the job summary fixes DHIS2-16133 - the property was renamed from 'imported' to 'created' --- src/components/JobSummary/SingleSummary/SingleSummary.js | 4 +++- src/components/JobSummary/Summary/Summary.js | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/JobSummary/SingleSummary/SingleSummary.js b/src/components/JobSummary/SingleSummary/SingleSummary.js index 001bf54d1..3a0e0f546 100644 --- a/src/components/JobSummary/SingleSummary/SingleSummary.js +++ b/src/components/JobSummary/SingleSummary/SingleSummary.js @@ -49,7 +49,9 @@ const SingleSummary = ({ - {importCount?.imported ?? '0'} + {importCount?.imported ?? + importCount?.created ?? + '0'} {importCount?.deleted} {importCount?.ignored} diff --git a/src/components/JobSummary/Summary/Summary.js b/src/components/JobSummary/Summary/Summary.js index a2702d9ff..5fd1f48ca 100644 --- a/src/components/JobSummary/Summary/Summary.js +++ b/src/components/JobSummary/Summary/Summary.js @@ -14,8 +14,7 @@ const extractStats = (summary) => { const total = imported + deleted + ignored + updated return { imported, deleted, ignored, updated, total } } else if (summary.stats) { - const { imported, deleted, ignored, updated, total } = summary.stats - return { imported, deleted, ignored, updated, total } + return summary.stats } }