Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/37095: Tag list show required #37388

Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
const isMerchantRequired = isPolicyExpenseChat && !isScanRequest && shouldShowMerchant;

const isCategoryRequired = canUseViolations && lodashGet(policy, 'requiresCategory', false);
const isTagRequired = canUseViolations && lodashGet(policy, 'requiresTag', false);

Check failure on line 313 in src/components/MoneyTemporaryForRefactorRequestConfirmationList.js

View workflow job for this annotation

GitHub Actions / Run ESLint

'isTagRequired' is assigned a value but never used

useEffect(() => {
if ((!isMerchantRequired && isMerchantEmpty) || !merchantError) {
Expand Down Expand Up @@ -763,7 +763,7 @@
shouldShow: shouldShowCategories,
isSupplementary: !isCategoryRequired,
},
..._.map(policyTagLists, ({name}, index) => ({
..._.map(policyTagLists, ({name, required}, index) => ({
item: (
<MenuItemWithTopDescription
key={name}
Expand All @@ -779,11 +779,11 @@
style={[styles.moneyRequestMenuItem]}
disabled={didConfirm}
interactive={!isReadOnly}
rightLabel={isTagRequired ? translate('common.required') : ''}
rightLabel={required ? translate('common.required') : ''}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use required field in both single tag and mulitple levels tags case based on comment

/>
),
shouldShow: shouldShowTags,
isSupplementary: !isTagRequired,
isSupplementary: !required,
})),
{
item: (
Expand Down
Loading