Skip to content

Commit

Permalink
Merge pull request #31897 from c3024/28928-remove-red-dot-after-reque…
Browse files Browse the repository at this point in the history
…st-is-settled

remove red dot for settled money scan requests with empty smart scan fields
  • Loading branch information
aldo-expensify authored Dec 1, 2023
2 parents 4e01d57 + b9c56f4 commit a1815b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function MoneyRequestPreview(props) {
<Text style={[styles.textLabelSupporting, styles.flex1, styles.lh20, styles.mb1]}>
{getPreviewHeaderText() + (isSettled && !props.iouReport.isCancelledIOU ? ` • ${getSettledMessage()}` : '')}
</Text>
{hasFieldErrors && (
{!isSettled && hasFieldErrors && (
<Icon
src={Expensicons.DotIndicator}
fill={theme.danger}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function ReportPreview(props) {
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={[styles.textLabelSupporting, styles.mb1, styles.lh20]}>{getPreviewMessage()}</Text>
</View>
{hasErrors && (
{!iouSettled && hasErrors && (
<Icon
src={Expensicons.DotIndicator}
fill={theme.danger}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,11 @@ function getAllReportErrors(report, reportActions) {
if (parentReportAction.actorAccountID === currentUserAccountID && ReportActionUtils.isTransactionThread(parentReportAction)) {
const transactionID = lodashGet(parentReportAction, ['originalMessage', 'IOUTransactionID'], '');
const transaction = allTransactions[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] || {};
if (TransactionUtils.hasMissingSmartscanFields(transaction)) {
if (TransactionUtils.hasMissingSmartscanFields(transaction) && !ReportUtils.isSettled(transaction.reportID)) {
_.extend(reportActionErrors, {smartscan: ErrorUtils.getMicroSecondOnyxError('report.genericSmartscanFailureMessage')});
}
} else if ((ReportUtils.isIOUReport(report) || ReportUtils.isExpenseReport(report)) && report.ownerAccountID === currentUserAccountID) {
if (ReportUtils.hasMissingSmartscanFields(report.reportID)) {
if (ReportUtils.hasMissingSmartscanFields(report.reportID) && !ReportUtils.isSettled(report.reportID)) {
_.extend(reportActionErrors, {smartscan: ErrorUtils.getMicroSecondOnyxError('report.genericSmartscanFailureMessage')});
}
}
Expand Down

0 comments on commit a1815b3

Please sign in to comment.