diff --git a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx index 3dfc4e16ba93..937b2632f659 100644 --- a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx @@ -143,6 +143,16 @@ function CreateReportFieldsPage({ onTypeSelected={(type) => formRef.current?.resetForm({...inputValues, type, initialValue: type === CONST.REPORT_FIELD_TYPES.DATE ? defaultDate : ''})} /> + {inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.LIST && ( + Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID))} + title={formDraft?.[INPUT_IDS.LIST_VALUES]?.join(', ')} + numberOfLinesTitle={5} + /> + )} + {inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.TEXT && ( )} - - {inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.LIST && ( - Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID))} - /> - )} )} diff --git a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx b/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx index 2b596042f3b0..347993b1b96b 100644 --- a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx +++ b/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx @@ -47,6 +47,7 @@ function ReportFieldsSettingsPage({ const isDateFieldType = reportField.type === CONST.REPORT_FIELD_TYPES.DATE; const isListFieldType = reportField.type === CONST.REPORT_FIELD_TYPES.LIST; const isListFieldEmpty = isListFieldType && reportField.values.length <= 0; + const listValues = Object.values(policy?.fieldList?.[reportFieldKey]?.values ?? {}); const deleteReportFieldAndHideModal = () => { ReportField.deleteReportFields(policyID, [reportFieldKey]); @@ -95,6 +96,17 @@ function ReportFieldsSettingsPage({ description={translate('common.type')} interactive={false} /> + {isListFieldType && ( + Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID, reportFieldID))} + title={listValues.join(', ')} + numberOfLinesTitle={5} + /> + )} {!isListFieldEmpty && ( Navigation.navigate(ROUTES.WORKSPACE_EDIT_REPORT_FIELDS_INITIAL_VALUE.getRoute(policyID, reportFieldID))} /> )} - {isListFieldType && ( - Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID, reportFieldID))} - /> - )} {!hasAccountingConnections && (