diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index 97e915d47b22..3a1c35d46c94 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -128,7 +128,7 @@ function HeaderWithBackButton({
)} diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index d1272f1499ba..1fc8645d91e0 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -228,73 +228,79 @@ function MoneyRequestPreviewContent({ {isEmptyObject(transaction) && !ReportActionsUtils.isMessageDeleted(action) && action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? ( ) : ( - - - - {getPreviewHeaderText() + (isSettled && !iouReport?.isCancelledIOU ? ` • ${getSettledMessage()}` : '')} - - {!isSettled && shouldShowRBR && ( - - )} - - - - - {displayAmount} - - {ReportUtils.isSettled(iouReport?.reportID) && !isBillSplit && ( - + + + + + + {getPreviewHeaderText() + (isSettled && !iouReport?.isCancelledIOU ? ` • ${getSettledMessage()}` : '')} + + {!isSettled && shouldShowRBR && ( - - )} - - {isBillSplit && ( - - + )} - )} - - - - {!isCurrentUserManager && shouldShowPendingConversionMessage && ( - {translate('iou.pendingConversionMessage')} - )} - {shouldShowDescription && ( - - ${parser.replace(merchantOrDescription)}`} /> + + + + + {displayAmount} + + {ReportUtils.isSettled(iouReport?.reportID) && !isBillSplit && ( + + + + )} + + {isBillSplit && ( + + + + )} + + + + {!isCurrentUserManager && shouldShowPendingConversionMessage && ( + {translate('iou.pendingConversionMessage')} + )} + {shouldShowDescription && ( + + ${parser.replace(merchantOrDescription)}`} /> + + )} + {shouldShowMerchant && {merchantOrDescription}} + + {isBillSplit && participantAccountIDs.length > 0 && !!requestAmount && requestAmount > 0 && ( + + {translate('iou.amountEach', { + amount: CurrencyUtils.convertToDisplayString( + IOUUtils.calculateAmount(isPolicyExpenseChat ? 1 : participantAccountIDs.length - 1, requestAmount, requestCurrency ?? ''), + requestCurrency, + ), + })} + + )} - )} - {shouldShowMerchant && {merchantOrDescription}} + - {isBillSplit && participantAccountIDs.length > 0 && !!requestAmount && requestAmount > 0 && ( - - {translate('iou.amountEach', { - amount: CurrencyUtils.convertToDisplayString( - IOUUtils.calculateAmount(isPolicyExpenseChat ? 1 : participantAccountIDs.length - 1, requestAmount, requestCurrency ?? ''), - requestCurrency, - ), - })} - - )} )} diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 0af7140e1523..0bd18d8ee7ea 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -292,7 +292,7 @@ function MoneyRequestView({ shouldShowTitleIcon={isSettled} titleIcon={Expensicons.Checkmark} description={amountDescription} - titleStyle={styles.newKansasLarge} + titleStyle={styles.textHeadlineH2} interactive={canEditAmount} shouldShowRightIcon={canEditAmount} onPress={() => Navigation.navigate(ROUTES.EDIT_REQUEST.getRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.AMOUNT))} diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index cbc728ffd1ce..a84e4a041609 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -135,6 +135,7 @@ function ReportPreview({ const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(iouReport); const transactionsWithReceipts = ReportUtils.getTransactionsWithReceipts(iouReportID); const numberOfScanningReceipts = transactionsWithReceipts.filter((transaction) => TransactionUtils.isReceiptBeingScanned(transaction)).length; + const numberOfPendingRequests = transactionsWithReceipts.filter((transaction) => TransactionUtils.isPending(transaction) && TransactionUtils.isCardTransaction(transaction)).length; const hasReceipts = transactionsWithReceipts.length > 0; const isScanning = hasReceipts && areAllRequestsBeingSmartScanned; @@ -151,8 +152,9 @@ function ReportPreview({ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing formattedMerchant || translate('iou.requestCount', { - count: numberOfRequests - numberOfScanningReceipts, + count: numberOfRequests - numberOfScanningReceipts - numberOfPendingRequests, scanningReceipts: numberOfScanningReceipts, + pendingReceipts: numberOfPendingRequests, }); const shouldShowSubmitButton = isDraftExpenseReport && reimbursableSpend !== 0; @@ -265,74 +267,77 @@ function ReportPreview({ )} - - - - {getPreviewMessage()} - - {!iouSettled && hasErrors && ( - - )} - - - - {getDisplayAmount()} - {ReportUtils.isSettled(iouReportID) && ( - + + + + + + {getPreviewMessage()} + + {!iouSettled && hasErrors && ( + )} + + + + + {getDisplayAmount()} + {ReportUtils.isSettled(iouReportID) && ( + + + + )} + - )} - - - {shouldShowSubtitle && ( - - - {previewSubtitle || moneyRequestComment} + {shouldShowSubtitle && ( + + + {previewSubtitle || moneyRequestComment} + + + )} - )} - {shouldShowSettlementButton && ( - chatReport && iouReport && paymentType && IOU.payMoneyRequest(paymentType, chatReport, iouReport)} - enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS} - addBankAccountRoute={bankAccountRoute} - shouldHidePaymentOptions={!shouldShowPayButton} - shouldShowApproveButton={shouldShowApproveButton} - style={[styles.mt3]} - kycWallAnchorAlignment={{ - horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT, - vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, - }} - paymentMethodDropdownAnchorAlignment={{ - horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, - vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, - }} - isDisabled={!canAllowSettlement} - /> - )} - {shouldShowSubmitButton && ( -