Skip to content

Update MoneyRequestPreview.js for violations #32571

Closed

Description

@cead22
  • 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

Activity

  1. added
    Daily
    Improvement
    on Dec 6, 2023
  2. self-assigned this
    on Dec 6, 2023
  3. trevor-coleman commented on Dec 6, 2023

    @trevor-coleman
    Contributor

    Reporting as requested!

  4. melvin-bot commented on Dec 6, 2023

    @melvin-bot

    📣 @trevor-coleman! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  5. cead22 commented on Dec 8, 2023

    @cead22
    ContributorAuthor

    This is one is in the queue but Trevor is finishing other issues first

  6. cead22 commented on Dec 12, 2023

    @cead22
    ContributorAuthor

    Same ^

  7. cead22 commented on Dec 14, 2023

    @cead22
    ContributorAuthor

    Same update ^

  8. 25 remaining items

  9. removed
    Improvement
    on Feb 21, 2024
  10. reopened this on Feb 21, 2024
  11. added
    NewFeature
    on Feb 21, 2024
  12. melvin-bot commented on Feb 21, 2024

    @melvin-bot
  13. cead22 commented on Feb 21, 2024

    @cead22
    ContributorAuthor

    @lschurr Can you please handle payment for @akinwale 's review of the PR? Thanks

  14. akinwale commented on Mar 11, 2024

    @akinwale
    Contributor

    @lschurr Automation seems to have missed this one. The PR was deployed to production on 2024-02-26, so the payment due date is 2024-03-04, and it's currently one week overdue.

  15. lschurr commented on Mar 11, 2024

    @lschurr
    Contributor

    Ah, thanks! I missed this one as well. I'll update and get this done today.

  16. added
    Daily
    and removed
    Weekly
    on Mar 11, 2024
  17. lschurr commented on Mar 11, 2024

    @lschurr
    Contributor
  18. akinwale commented on Mar 11, 2024

    @akinwale
    Contributor

    Offer sent @akinwale

    Accepted. Thanks!

  19. lschurr commented on Mar 11, 2024

    @lschurr
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyEngineeringNewFeatureReviewing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions