Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 49 additions & 47 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,53 +376,55 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
</View>
)}
</HeaderWithBackButton>
<View style={[isMoreContentShown && [styles.dFlex, styles.flexColumn, styles.borderBottom], styles.ph5, styles.pb3, styles.gap3]}>
{shouldShowSettlementButton && shouldUseNarrowLayout && (
<SettlementButton
currency={moneyRequestReport.currency}
confirmApproval={confirmApproval}
policyID={moneyRequestReport.policyID}
chatReportID={moneyRequestReport.chatReportID}
iouReport={moneyRequestReport}
onPress={confirmPayment}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
formattedAmount={!hasOnlyHeldExpenses ? displayedAmount : ''}
shouldDisableApproveButton={shouldDisableApproveButton}
isDisabled={isOffline && !canAllowSettlement}
isLoading={!isOffline && !canAllowSettlement}
/>
)}
{shouldShowSubmitButton && shouldUseNarrowLayout && (
<Button
medium
success={isWaitingForSubmissionFromCurrentUser}
text={translate('common.submit')}
style={[styles.w100, styles.pr0]}
onPress={() => IOU.submitReport(moneyRequestReport)}
isDisabled={shouldDisableSubmitButton}
/>
)}
{shouldShowMarkAsCashButton && shouldUseNarrowLayout && (
<Button
medium
success
text={translate('iou.markAsCash')}
style={[styles.w100, styles.pr0]}
onPress={markAsCash}
/>
)}
{shouldShowNextStep && <MoneyReportHeaderStatusBar nextStep={nextStep} />}
{statusBarProps && (
<MoneyRequestHeaderStatusBar
title={statusBarProps.title}
description={statusBarProps.description}
danger={statusBarProps.danger}
/>
)}
</View>
{isMoreContentShown && (
<View style={[styles.dFlex, styles.flexColumn, styles.gap3, styles.pb3, styles.ph5, styles.borderBottom]}>
{shouldShowSettlementButton && shouldUseNarrowLayout && (
<SettlementButton
currency={moneyRequestReport.currency}
confirmApproval={confirmApproval}
policyID={moneyRequestReport.policyID}
chatReportID={moneyRequestReport.chatReportID}
iouReport={moneyRequestReport}
onPress={confirmPayment}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
formattedAmount={!hasOnlyHeldExpenses ? displayedAmount : ''}
shouldDisableApproveButton={shouldDisableApproveButton}
isDisabled={isOffline && !canAllowSettlement}
isLoading={!isOffline && !canAllowSettlement}
/>
)}
{shouldShowSubmitButton && shouldUseNarrowLayout && (
<Button
medium
success={isWaitingForSubmissionFromCurrentUser}
text={translate('common.submit')}
style={[styles.w100, styles.pr0]}
onPress={() => IOU.submitReport(moneyRequestReport)}
isDisabled={shouldDisableSubmitButton}
/>
)}
{shouldShowMarkAsCashButton && shouldUseNarrowLayout && (
<Button
medium
success
text={translate('iou.markAsCash')}
style={[styles.w100, styles.pr0]}
onPress={markAsCash}
/>
)}
{shouldShowNextStep && <MoneyReportHeaderStatusBar nextStep={nextStep} />}
{statusBarProps && (
<MoneyRequestHeaderStatusBar
title={statusBarProps.title}
description={statusBarProps.description}
danger={statusBarProps.danger}
/>
)}
</View>
)}
{isHoldMenuVisible && requestType !== undefined && (
<ProcessMoneyReportHoldMenu
nonHeldAmount={!hasOnlyHeldExpenses ? nonHeldAmount : undefined}
Expand Down