From 1ccf57b2abac893a93e7f60d4e9438b3705d693a Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Tue, 15 Oct 2024 23:57:57 +0530 Subject: [PATCH 1/3] fix: The Date options for Report Fields are ambiguous and should be updated. Signed-off-by: krishna2323 --- src/libs/WorkspaceReportFieldUtils.ts | 2 +- src/pages/workspace/reportFields/CreateReportFieldsPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/WorkspaceReportFieldUtils.ts b/src/libs/WorkspaceReportFieldUtils.ts index b7d93b8dee3a..503c1d440d69 100644 --- a/src/libs/WorkspaceReportFieldUtils.ts +++ b/src/libs/WorkspaceReportFieldUtils.ts @@ -80,7 +80,7 @@ function getReportFieldInitialValue(reportField: PolicyReportField | null): stri } if (reportField.type === CONST.REPORT_FIELD_TYPES.DATE) { - return Localize.translateLocal('common.currentDate'); + return Localize.translateLocal('common.initialValue'); } return reportField.value ?? reportField.defaultValue; diff --git a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx index 8dbd90c9e929..31bd5883e431 100644 --- a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx @@ -171,7 +171,7 @@ function CreateReportFieldsPage({ {inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.DATE && ( Date: Wed, 16 Oct 2024 00:02:56 +0530 Subject: [PATCH 2/3] minor update. Signed-off-by: krishna2323 --- src/libs/WorkspaceReportFieldUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/WorkspaceReportFieldUtils.ts b/src/libs/WorkspaceReportFieldUtils.ts index 503c1d440d69..b7d93b8dee3a 100644 --- a/src/libs/WorkspaceReportFieldUtils.ts +++ b/src/libs/WorkspaceReportFieldUtils.ts @@ -80,7 +80,7 @@ function getReportFieldInitialValue(reportField: PolicyReportField | null): stri } if (reportField.type === CONST.REPORT_FIELD_TYPES.DATE) { - return Localize.translateLocal('common.initialValue'); + return Localize.translateLocal('common.currentDate'); } return reportField.value ?? reportField.defaultValue; From 1d36289a5c3ae312244d2b9dc2ef1e4a5c72b0f6 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Wed, 27 Nov 2024 17:55:32 +0530 Subject: [PATCH 3/3] make report field date section consistent. Signed-off-by: krishna2323 --- src/libs/WorkspaceReportFieldUtils.ts | 2 +- src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/WorkspaceReportFieldUtils.ts b/src/libs/WorkspaceReportFieldUtils.ts index b7d93b8dee3a..503c1d440d69 100644 --- a/src/libs/WorkspaceReportFieldUtils.ts +++ b/src/libs/WorkspaceReportFieldUtils.ts @@ -80,7 +80,7 @@ function getReportFieldInitialValue(reportField: PolicyReportField | null): stri } if (reportField.type === CONST.REPORT_FIELD_TYPES.DATE) { - return Localize.translateLocal('common.currentDate'); + return Localize.translateLocal('common.initialValue'); } return reportField.value ?? reportField.defaultValue; diff --git a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx b/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx index cc6460d20641..d947de43444a 100644 --- a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx +++ b/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx @@ -113,7 +113,7 @@ function ReportFieldsSettingsPage({ style={[styles.moneyRequestMenuItem]} titleStyle={styles.flex1} title={WorkspaceReportFieldUtils.getReportFieldInitialValue(reportField)} - description={translate('common.initialValue')} + description={translate('common.date')} shouldShowRightIcon={!isDateFieldType && !hasAccountingConnections} interactive={!isDateFieldType && !hasAccountingConnections} onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_REPORT_FIELDS_INITIAL_VALUE.getRoute(policyID, reportFieldID))}