Skip to content

Commit

Permalink
Merge pull request #44130 from Nodebrute/policyErrors
Browse files Browse the repository at this point in the history
clear policy errors
  • Loading branch information
mountiny authored Jul 22, 2024
2 parents 794a0a4 + f049a8b commit 69214a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
3 changes: 0 additions & 3 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,6 @@ function updateGroupChatName(reportID: string, reportName: string) {
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
reportName: ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]?.reportName ?? null,
errors: {
reportName: Localize.translateLocal('common.genericErrorMessage'),
},
pendingFields: {
reportName: null,
},
Expand Down
28 changes: 12 additions & 16 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -713,22 +713,18 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
promotedActions={promotedActions}
/>

{menuItems.map((item) => {
const brickRoadIndicator =
ReportUtils.hasReportNameError(report) && item.key === CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined;
return (
<MenuItem
key={item.key}
title={translate(item.translationKey)}
subtitle={item.subtitle}
icon={item.icon}
onPress={item.action}
isAnonymousAction={item.isAnonymousAction}
shouldShowRightIcon={item.shouldShowRightIcon}
brickRoadIndicator={brickRoadIndicator ?? item.brickRoadIndicator}
/>
);
})}
{menuItems.map((item) => (
<MenuItem
key={item.key}
title={translate(item.translationKey)}
subtitle={item.subtitle}
icon={item.icon}
onPress={item.action}
isAnonymousAction={item.isAnonymousAction}
shouldShowRightIcon={item.shouldShowRightIcon}
brickRoadIndicator={item.brickRoadIndicator}
/>
))}

{shouldShowDeleteButton && (
<MenuItem
Expand Down

0 comments on commit 69214a6

Please sign in to comment.