From de978a75f7a7ebdc8b09fb7dd71585b174087494 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Thu, 20 Apr 2023 11:47:22 +0500 Subject: [PATCH 1/3] fix: make the whole iouprevie row clickable --- src/components/ReportActionItem/IOUPreview.js | 164 +++++++++--------- 1 file changed, 86 insertions(+), 78 deletions(-) diff --git a/src/components/ReportActionItem/IOUPreview.js b/src/components/ReportActionItem/IOUPreview.js index a835f1d1a4a3..ddd34a7dd9ca 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'; @@ -179,89 +179,97 @@ 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 && ( +