Skip to content

Commit

Permalink
fix: add onyx prop to show issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BeeMargarida committed Sep 18, 2023
1 parent 15dc6f1 commit 6e9ecc8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const propTypes = {
transactionID: PropTypes.string,
}),

parentPolicy: PropTypes.any,

Check failure on line 56 in src/components/MoneyRequestHeader.js

View workflow job for this annotation

GitHub Actions / lint

Prop type "any" is forbidden

...windowDimensionsPropTypes,
};

Expand All @@ -63,6 +65,7 @@ const defaultProps = {
parentReport: {},
parentReportAction: {},
transaction: {},
parentPolicy: {}
};

function MoneyRequestHeader(props) {
Expand All @@ -71,6 +74,9 @@ function MoneyRequestHeader(props) {
const moneyRequestReport = props.parentReport;
const isSettled = ReportUtils.isSettled(moneyRequestReport.reportID);

console.log("[DEV] parentReport", props.parentReport);

Check failure on line 77 in src/components/MoneyRequestHeader.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
console.log("[DEV] parentPolicy", props.parentPolicy);

Check failure on line 78 in src/components/MoneyRequestHeader.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement

// Only the requestor can take delete the request, admins can only edit it.
const isActionOwner = props.parentReportAction.actorAccountID === lodashGet(props.session, 'accountID', null);
const report = props.report;
Expand Down Expand Up @@ -140,8 +146,14 @@ export default compose(
canEvict: false,
},
transaction: {
key: ({report, parentReportActions}) =>
`${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(parentReportActions, [report.parentReportActionID, 'originalMessage', 'IOUTransactionID'], '')}`,
key: ({report, parentReportAction}) =>
`${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(parentReportAction, [report.parentReportActionID, 'originalMessage', 'IOUTransactionID'], '')}`,
},
parentPolicy: {
key: (props) => {
console.log("[DEV] parentPolicy key", props);

Check failure on line 154 in src/components/MoneyRequestHeader.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
return `${ONYXKEYS.COLLECTION.POLICY}${props.parentReport ? props.parentReport.policyID : undefined}`;
}
}
}),
)(MoneyRequestHeader);

0 comments on commit 6e9ecc8

Please sign in to comment.