diff --git a/src/components/ReportActionItem/IOUPreview.js b/src/components/ReportActionItem/IOUPreview.js index a835f1d1a4a3..e3ea5b09b2f5 100644 --- a/src/components/ReportActionItem/IOUPreview.js +++ b/src/components/ReportActionItem/IOUPreview.js @@ -1,7 +1,7 @@ import React from 'react'; import { View, - TouchableWithoutFeedback, + Pressable, } from 'react-native'; import PropTypes from 'prop-types'; import Str from 'expensify-common/lib/str'; @@ -113,7 +113,7 @@ const defaultProps = { iouReport: {}, shouldHidePayButton: false, onPayButtonPressed: null, - onPreviewPressed: () => {}, + onPreviewPressed: null, action: undefined, contextMenuAnchor: undefined, checkIfContextMenuActive: () => {}, @@ -179,89 +179,96 @@ const IOUPreview = (props) => { ); }; + const childContainer = ( + + { + PaymentMethods.clearWalletTermsError(); + Report.clearIOUError(props.chatReportID); + }} + errorRowStyles={[styles.mbn1]} + needsOffscreenAlphaCompositing + > + + + + + {cachedTotal} + + {!props.iouReport.hasOutstandingIOU && ( + + + + )} + + + + + + {isCurrentUserManager + ? ( + + {props.iouReport.hasOutstandingIOU + ? props.translate('iou.youowe', {owner: ownerName}) + : props.translate('iou.youpaid', {owner: ownerName})} + + ) : ( + <> + + {props.iouReport.hasOutstandingIOU + ? props.translate('iou.owesyou', {manager: managerName}) + : props.translate('iou.paidyou', {manager: managerName})} + + {props.shouldShowPendingConversionMessage && ( + + {props.translate('iou.pendingConversionMessage')} + + )} + + )} + {(isCurrentUserManager + && !props.shouldHidePayButton + && props.iouReport.stateNum === CONST.REPORT.STATE_NUM.PROCESSING && ( +