Skip to content

Commit

Permalink
Decouple the isSettled logic from settled message
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Sep 18, 2023
1 parent 12ba6f9 commit ae6f8b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function MoneyRequestPreview(props) {
const isScanning = hasReceipt && TransactionUtils.isReceiptBeingScanned(props.transaction);
const hasFieldErrors = TransactionUtils.hasMissingSmartscanFields(props.transaction);
const isDistanceRequest = TransactionUtils.isDistanceRequest(props.transaction);
const isSettled = ReportUtils.isSettled(props.iouReport);

// Show the merchant for IOUs and expenses only if they are custom or not related to scanning smartscan
const shouldShowMerchant =
Expand Down Expand Up @@ -245,7 +246,7 @@ function MoneyRequestPreview(props) {
<View style={[styles.flexRow]}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={[styles.textLabelSupporting, styles.mb1, styles.lh20]}>{getPreviewHeaderText()}</Text>
{Boolean(getSettledMessage()) && (
{isSettled && (
<>
<Icon
src={Expensicons.DotIndicator}
Expand Down

0 comments on commit ae6f8b7

Please sign in to comment.