Skip to content

Commit

Permalink
Merge pull request #47364 from FitseTLT/fix-displaying-disabled-tag-i…
Browse files Browse the repository at this point in the history
…n-money-request-view

Fix - Disabled "Region" not shown in confirmation page but displayed in money request view
  • Loading branch information
stitesExpensify committed Aug 26, 2024
2 parents 279f302 + 0866f7c commit f7c9fa8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,21 @@ function MoneyRequestView({
...parentReportAction?.errors,
};

const tagList = policyTagLists.map(({name, orderWeight}, index) => {
const tagList = policyTagLists.map(({name, orderWeight, tags}, index) => {
const tagForDisplay = TransactionUtils.getTagForDisplay(updatedTransaction ?? transaction, index);
const shouldShow = !!tagForDisplay || OptionsListUtils.hasEnabledOptions(tags);
if (!shouldShow) {
return null;
}

const tagError = getErrorForField(
'tag',
{
tagListIndex: index,
tagListName: name,
},
PolicyUtils.hasDependentTags(policy, policyTagList),
TransactionUtils.getTagForDisplay(updatedTransaction ?? transaction, index),
tagForDisplay,
);
return (
<OfflineWithFeedback
Expand All @@ -427,7 +433,7 @@ function MoneyRequestView({
>
<MenuItemWithTopDescription
description={name ?? translate('common.tag')}
title={TransactionUtils.getTagForDisplay(updatedTransaction ?? transaction, index)}
title={tagForDisplay}
interactive={canEdit}
shouldShowRightIcon={canEdit}
titleStyle={styles.flex1}
Expand Down

0 comments on commit f7c9fa8

Please sign in to comment.