Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation of #48147:
When we edit the amount to be higher, we don't receive the
modifiedAmount
violation from the BE, but if we edit the date, then we receive themodifiedDate
violation from the BE. We can say that it's a BE issue, but our real issue here is that we have inconsistent conditions.From what I found, we don't want to show the notice violation (modified date/amount is a type of notice) if it's not a policy report.
App/src/components/ReportActionItem/MoneyRequestView.tsx
Line 226 in b9af3d1
App/src/hooks/useViolations.ts
Lines 59 to 67 in b9af3d1
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Line 113 in b9af3d1
To be honest, the condition to show violation or not is really all over the place and it's really easy to miss it, but I'm gonna make it consistent for what we added for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional video showing the RB still shows for policy report:
web.mp4