-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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

