From 87be2a324c66a4b261baa5b62e2c0d324d916516 Mon Sep 17 00:00:00 2001 From: Trevor Coleman Date: Wed, 14 Feb 2024 12:31:54 -0500 Subject: [PATCH 1/3] fix(Violations): move violation below billable field --- src/components/ReportActionItem/MoneyRequestView.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 6b16f272e4c8..5cd055677b0a 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -403,13 +403,13 @@ function MoneyRequestView({ isOn={!!transactionBillable} onToggle={saveBillable} /> - {getErrorForField('billable') && ( - - )} + {getErrorForField('billable') && ( + + )} )} From 872f22cc0cd49a9fb9cea4304a4cfa5cbc1250f4 Mon Sep 17 00:00:00 2001 From: Trevor Coleman Date: Wed, 14 Feb 2024 18:13:30 -0500 Subject: [PATCH 2/3] add style overrides --- .../ReportActionItem/MoneyRequestView.tsx | 30 ++++++++++--------- src/components/ViolationMessages.tsx | 9 ++++-- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 5cd055677b0a..d312574b7d2e 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -395,22 +395,24 @@ function MoneyRequestView({ )} {shouldShowBillable && ( - <> - + + {translate('common.billable')} - + {getErrorForField('billable') && ( + + )} - {getErrorForField('billable') && ( - - )} - + + )} ; textStyle?: StyleProp}; + +export default function ViolationMessages({violations, isLast, containerStyle, textStyle}: ViolationMessagesProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const violationMessages = useMemo(() => violations.map((violation) => [violation.name, ViolationsUtils.getViolationTranslation(violation, translate)]), [translate, violations]); return ( - + {violationMessages.map(([name, message]) => ( {message} From 1bb702752a5a698224c1ce3dbf3abaefb1ac8923 Mon Sep 17 00:00:00 2001 From: Trevor Coleman Date: Thu, 15 Feb 2024 13:26:11 -0500 Subject: [PATCH 3/3] fix(Violations): make boolean --- src/components/ReportActionItem/MoneyRequestView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index d312574b7d2e..b5a8b8160263 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -398,7 +398,7 @@ function MoneyRequestView({ {translate('common.billable')} - {getErrorForField('billable') && ( + {!!getErrorForField('billable') && (