Repository navigation
Update MoneyRequestView.js #31084
Copy link
Copy link
Closed
Labels
EngineeringImprovementItem broken or needs improvement.Item broken or needs improvement.NewFeatureSomething to build that is a new item.Something to build that is a new item.ReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Description
- Design Doc
- Let's update MoneyRequestView.js
- The following should only apply to users in the violations beta
- Let's add a connection to the transactionViolations and policyCategories Onyx collections as shown in the code snippet below, which will go in the
withOnyxsection of the code at the bottom - Let's add the new onyx key for the transaction violation collection
- Add a new transactionViolation prop
- Pass the transactionViolation to the MoneyRequestView function
- For each field that can have a violation, Inside OfflineWithFeedback and below MenuItemWithTopDescription let's add a View that wraps a Text component to show the violation text, as shown in the snippet below
- The fields are merchant, amount, category, date, tag, comment, billable, receipt, and tax
- Fields with violations that go into a new page, like a list page for the cate of category and description for instance, should show a RBR circle to the right, in front of the caret
>. Screenshots below
withOnyx({
…
policyCategories: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${report.policyID}`,
},
transactionViolation: {
key: ({report}) => {
const parentReportAction = ReportActionsUtils.getParentReportAction(report);
const transactionID = lodashGet(parentReportAction, ['originalMessage', 'IOUTransactionID'], 0);
return `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`;
},
},
...{Boolean(ViolationUtils.getViolationForField(transactionViolation, 'amount')) && (
<View>
<Text style={[styles.ph5, styles.textLabelError]}>{ViolationUtils.getViolationForField(transactionViolation, 'amount')}</Text>
</View>
)}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EngineeringImprovementItem broken or needs improvement.Item broken or needs improvement.NewFeatureSomething to build that is a new item.Something to build that is a new item.ReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2


Activity
melvin-bot commentedon Nov 8, 2023
cead22 commentedon Nov 8, 2023
@lindboe @cdanwards can you please comment here so I can assign you?
(@NicMendonca sorry about that ping, that was a mistake)
cdanwards commentedon Nov 10, 2023
Commenting for assignment
cdanwards commentedon Nov 10, 2023
@cead22 I'm unable to see the 2 images listed at the end of the ticket description, do you mind providing screenshots?
cead22 commentedon Nov 10, 2023
Can you try refreshing the page? GH adds a token to the image URLs and if you had this tab open before or you opened a cached version of this page, the token may not work. Let me know if that still doesn't work
26 remaining items
aimane-chnaif commentedon Feb 4, 2024
@cead22 C+ payment is pending here. Can you please reopen?
melvin-bot commentedon Feb 5, 2024
Triggered auto assignment to @MitchExpensify (
NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.MitchExpensify commentedon Feb 6, 2024
Payment summary:
C+: $500 @aimane-chnaif (Upwork job here)
cead22 commentedon Feb 23, 2024
Can we close?
aimane-chnaif commentedon Feb 23, 2024
Not yet
MitchExpensify commentedon Feb 26, 2024
Paid, contract ended, sorry for the delay!