diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 39a5fcaa4ee0..e676c83c8b9b 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -627,6 +627,28 @@ function ReportActionItem(props) { if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED) { const parentReportAction = props.parentReportActions[props.report.parentReportActionID]; if (ReportActionsUtils.isTransactionThread(parentReportAction)) { + const isReversedTransaction = ReportActionsUtils.isReversedTransaction(parentReportAction); + if (ReportActionsUtils.isDeletedParentAction(parentReportAction) || isReversedTransaction) { + return ( + + + + + + ${props.translate(isReversedTransaction ? 'parentReportAction.reversedTransaction' : 'parentReportAction.deletedRequest')}`} + /> + + + + + + ); + } return ( + ${props.translate('parentReportAction.deletedTask')}`} /> - ); @@ -857,9 +878,10 @@ export default compose( }, }), )( - memo( - ReportActionItem, - (prevProps, nextProps) => + memo(ReportActionItem, (prevProps, nextProps) => { + const prevParentReportAction = prevProps.parentReportActions[prevProps.report.parentReportActionID]; + const nextParentReportAction = nextProps.parentReportActions[nextProps.report.parentReportActionID]; + return ( prevProps.displayAsGroup === nextProps.displayAsGroup && prevProps.draftMessage === nextProps.draftMessage && prevProps.isMostRecentIOUReportAction === nextProps.isMostRecentIOUReportAction && @@ -888,6 +910,8 @@ export default compose( prevProps.linkedReportActionID === nextProps.linkedReportActionID && _.isEqual(prevProps.policyReportFields, nextProps.policyReportFields) && _.isEqual(prevProps.report.reportFields, nextProps.report.reportFields) && - _.isEqual(prevProps.policy, nextProps.policy), - ), + _.isEqual(prevProps.policy, nextProps.policy) && + _.isEqual(prevParentReportAction, nextParentReportAction) + ); + }), );