From e57fc347a73deff0bd314624ddb6e51247633fc5 Mon Sep 17 00:00:00 2001 From: Huzaifa Rasheed <68777211+huzaifa-99@users.noreply.github.com> Date: Thu, 11 May 2023 18:20:59 +0500 Subject: [PATCH 1/4] Adjust iou preview height based on description availability --- src/components/ReportActionItem/IOUPreview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/IOUPreview.js b/src/components/ReportActionItem/IOUPreview.js index 758c708e4d91..ae9c7eb93fd1 100644 --- a/src/components/ReportActionItem/IOUPreview.js +++ b/src/components/ReportActionItem/IOUPreview.js @@ -143,6 +143,7 @@ const IOUPreview = (props) => { const sessionEmail = lodashGet(props.session, 'email', null); const managerEmail = props.iouReport.managerEmail || ''; const ownerEmail = props.iouReport.ownerEmail || ''; + const requestDescription = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')); // When displaying within a IOUDetailsModal we cannot guarantee that participants are included in the originalMessage data // Because an IOUPreview of type split can never be rendered within the IOUDetailsModal, manually building the email array is only needed for non-billSplit ious @@ -240,7 +241,7 @@ const IOUPreview = (props) => { {props.translate('iou.pendingConversionMessage')} )} - {Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', ''))} + {requestDescription ? {requestDescription} : ''} {isCurrentUserManager && !props.shouldHidePayButton && props.iouReport.stateNum === CONST.REPORT.STATE_NUM.PROCESSING && (