From 04117478f612248f4dc87d579f39721074d25e2c Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 12 Dec 2024 10:32:44 +0100 Subject: [PATCH] fix: change from property to fields --- .../WidgetsChangelog/common/Changelog/Changelog.types.js | 6 +++--- .../WidgetsChangelog/common/hooks/useListDataValues.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core_modules/capture-core/components/WidgetsChangelog/common/Changelog/Changelog.types.js b/src/core_modules/capture-core/components/WidgetsChangelog/common/Changelog/Changelog.types.js index d7173ddc1c..ece01ab3a9 100644 --- a/src/core_modules/capture-core/components/WidgetsChangelog/common/Changelog/Changelog.types.js +++ b/src/core_modules/capture-core/components/WidgetsChangelog/common/Changelog/Changelog.types.js @@ -6,7 +6,7 @@ type CreatedChange = {| type: typeof CHANGE_TYPES.CREATED, dataElement?: string, attribute?: string, - property?: string, + field?: string, currentValue: any, |} @@ -14,7 +14,7 @@ type UpdatedChange = {| type: typeof CHANGE_TYPES.UPDATED, dataElement?: string, attribute?: string, - property?: string, + field?: string, previousValue: any, currentValue: any, |} @@ -23,7 +23,7 @@ type DeletedChange = {| type: typeof CHANGE_TYPES.DELETED, dataElement?: string, attribute?: string, - property?: string, + field?: string, previousValue: any, |} diff --git a/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useListDataValues.js b/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useListDataValues.js index 479ff8d758..16dcbe87f2 100644 --- a/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useListDataValues.js +++ b/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useListDataValues.js @@ -44,8 +44,8 @@ const fetchFormattedValues = async ({ elementKey: string, change: Change, ) => { - const { dataElement, attribute, property } = change; - const fieldId = dataElement ?? attribute ?? property; + const { dataElement, attribute, field } = change; + const fieldId = dataElement ?? attribute ?? field; if (!fieldId) { log.error('Could not find fieldId in change:', change); return { metadataElement: null, fieldId: null };