From 610ce2667f7b4104ecb157a8c399249a15ff91cf Mon Sep 17 00:00:00 2001
From: Carlos Barros <765936+barros001@users.noreply.github.com>
Date: Wed, 28 Feb 2024 10:39:52 -0500
Subject: [PATCH] renamed rootReportName to reportNameon
ParentNavigationSummaryParams type
---
src/components/ParentNavigationSubtitle.tsx | 6 +++---
src/languages/en.ts | 2 +-
src/languages/es.ts | 2 +-
src/languages/types.ts | 2 +-
src/libs/ReportUtils.ts | 6 +++---
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/components/ParentNavigationSubtitle.tsx b/src/components/ParentNavigationSubtitle.tsx
index 2816715dae2c..3109453ca6b0 100644
--- a/src/components/ParentNavigationSubtitle.tsx
+++ b/src/components/ParentNavigationSubtitle.tsx
@@ -21,7 +21,7 @@ type ParentNavigationSubtitleProps = {
function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportID = '', pressableStyles}: ParentNavigationSubtitleProps) {
const styles = useThemeStyles();
- const {workspaceName, rootReportName} = parentNavigationSubtitleData;
+ const {workspaceName, reportName} = parentNavigationSubtitleData;
const {translate} = useLocalize();
@@ -30,7 +30,7 @@ function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportID
onPress={() => {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
}}
- accessibilityLabel={translate('threads.parentNavigationSummary', {rootReportName, workspaceName})}
+ accessibilityLabel={translate('threads.parentNavigationSummary', {reportName, workspaceName})}
role={CONST.ROLE.LINK}
style={pressableStyles}
>
@@ -39,7 +39,7 @@ function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportID
numberOfLines={1}
>
{`${translate('threads.from')} `}
- {rootReportName}
+ {reportName}
{Boolean(workspaceName) && {` ${translate('threads.in')} ${workspaceName}`}}
diff --git a/src/languages/en.ts b/src/languages/en.ts
index cf8823f5b2be..35b9dd9a18d1 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -2171,7 +2171,7 @@ export default {
reply: 'Reply',
from: 'From',
in: 'in',
- parentNavigationSummary: ({rootReportName, workspaceName}: ParentNavigationSummaryParams) => `From ${rootReportName}${workspaceName ? ` in ${workspaceName}` : ''}`,
+ parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `From ${reportName}${workspaceName ? ` in ${workspaceName}` : ''}`,
},
qrCodes: {
copy: 'Copy URL',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index b3a8eef73d7c..398010caf656 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -2659,7 +2659,7 @@ export default {
reply: 'Respuesta',
from: 'De',
in: 'en',
- parentNavigationSummary: ({rootReportName, workspaceName}: ParentNavigationSummaryParams) => `De ${rootReportName}${workspaceName ? ` en ${workspaceName}` : ''}`,
+ parentNavigationSummary: ({reportName, workspaceName}: ParentNavigationSummaryParams) => `De ${reportName}${workspaceName ? ` en ${workspaceName}` : ''}`,
},
qrCodes: {
copy: 'Copiar URL',
diff --git a/src/languages/types.ts b/src/languages/types.ts
index bb56d5c38cd3..ed82bcd99a92 100644
--- a/src/languages/types.ts
+++ b/src/languages/types.ts
@@ -195,7 +195,7 @@ type OOOEventSummaryFullDayParams = {summary: string; dayCount: number; date: st
type OOOEventSummaryPartialDayParams = {summary: string; timePeriod: string; date: string};
-type ParentNavigationSummaryParams = {rootReportName?: string; workspaceName?: string};
+type ParentNavigationSummaryParams = {reportName?: string; workspaceName?: string};
type SetTheRequestParams = {valueName: string; newValueToDisplay: string};
diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts
index 867e1e3f5a12..97b4d93790c7 100644
--- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -2590,19 +2590,19 @@ function getParentNavigationSubtitle(report: OnyxEntry): ParentNavigatio
if (isIOURequest(parentReport)) {
return {
- rootReportName: getReportName(parentReport),
+ reportName: getReportName(parentReport),
};
}
if (isExpenseRequest(parentReport)) {
return {
- rootReportName: getReportName(parentReport),
+ reportName: getReportName(parentReport),
workspaceName: isIOUReport(parentReport) ? CONST.POLICY.OWNER_EMAIL_FAKE : getPolicyName(parentReport, true),
};
}
return {
- rootReportName: getReportName(parentReport),
+ reportName: getReportName(parentReport),
workspaceName: getPolicyName(parentReport, true),
};
}