App: Update MoneyRequestPreview.js for violations

  • Design Doc
  • We need to update src/components/ReportActionItem/MoneyRequestPreview.js
    • Update the value of hasFieldErrors to check for props.transactions.violations in order to show the RBR
      • const hasFieldErrors = TransactionUtils.hasMissingSmartscanFields(props.transaction) || TransactionUtils.hasViolations(props.transaction.transactionID);
    • In getPreviewHeaderText we check for violations on the transactions, and display it using the dot separator
      • violations = TransactionUtils.hasViolations(props.transaction.transactionID)
if (violations) {
    message += violations.length > 1 || props.translate(violations[0]).length > 15 ? (' • ' + translate('violations.reviewRequired') : `• ${props.translate(props.transaction.violations[0])}`;
}
- Note: “Review Required” will be translated
    - EN: Review Required
    - ES: Necesita Revisión

UI Examples

Missing Category (Violation Name) Review Required
image image

@cdanwards @lindboe @trevor-coleman please comment so I can assign you

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 21 (14 by maintainers)

Most upvoted comments

Sorry about the delay on that one. Should be all good now. Closing this one out.