Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update Payment flow on clicking Pay #50640

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift click to select a range
31823cc
add strings
rezkiy37 Oct 11, 2024
3948c12
add invoice case for getBankAccountRoute
rezkiy37 Oct 11, 2024
a2d1b9a
add invoice payment menu items
rezkiy37 Oct 11, 2024
f4f708a
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 14, 2024
905f8e5
add payment method button
rezkiy37 Oct 14, 2024
94647a4
pay invoice command accepts method id
rezkiy37 Oct 14, 2024
0080e82
integrate payment logic
rezkiy37 Oct 14, 2024
abed35d
pass account type
rezkiy37 Oct 15, 2024
e45613d
set add debit card route
rezkiy37 Oct 15, 2024
8b081a7
render all payment methods
rezkiy37 Oct 15, 2024
1302948
clear todo
rezkiy37 Oct 15, 2024
699a035
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 16, 2024
2e05df0
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 17, 2024
16f0136
Revert "set add debit card route"
rezkiy37 Oct 17, 2024
dbd3e10
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 25, 2024
4a8928a
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 28, 2024
5168b6f
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 6, 2024
3e5d028
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 14, 2024
ee24a29
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 19, 2024
27edab4
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 20, 2024
38d4636
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 25, 2024
90712f2
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 4, 2024
05209e7
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 6, 2024
6f13e9d
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 9, 2024
529231e
use expensify payment type
rezkiy37 Dec 9, 2024
facf112
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 12, 2024
972bd42
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 16, 2024
006cd92
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 23, 2024
e263162
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Dec 28, 2024
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
Prev Previous commit
Next Next commit
Revert "set add debit card route"
This reverts commit e45613d.
  • Loading branch information
rezkiy37 committed Oct 17, 2024
commit 16f01362231c8933572ac1d35042dc440f1b14d3
6 changes: 2 additions & 4 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 153,6 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const formattedAmount = CurrencyUtils.convertToDisplayString(reimbursableSpend, moneyRequestReport?.currency);
const [nonHeldAmount, fullAmount] = ReportUtils.getNonHeldAndFullAmount(moneyRequestReport, policy);
const isAnyTransactionOnHold = ReportUtils.hasHeldExpenses(moneyRequestReport?.reportID);
const isInvoiceReport = ReportUtils.isInvoiceReport(moneyRequestReport);
const displayedAmount = isAnyTransactionOnHold && canAllowSettlement ? nonHeldAmount : formattedAmount;
const isMoreContentShown = shouldShowNextStep || shouldShowStatusBar || (shouldShowAnyButton && shouldUseNarrowLayout);
const {isDelegateAccessRestricted, delegatorEmail} = useDelegateUserDetails();
Expand All @@ -170,7 169,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
setIsNoDelegateAccessMenuVisible(true);
} else if (isAnyTransactionOnHold) {
setIsHoldMenuVisible(true);
} else if (isInvoiceReport) {
} else if (ReportUtils.isInvoiceReport(moneyRequestReport)) {
IOU.payInvoice(
type,
chatReport,
Expand All @@ -183,7 182,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
IOU.payMoneyRequest(type, chatReport, moneyRequestReport, true);
}
},
[chatReport, isAnyTransactionOnHold, isDelegateAccessRestricted, isInvoiceReport, moneyRequestReport],
[chatReport, isAnyTransactionOnHold, isDelegateAccessRestricted, moneyRequestReport],
);

const confirmApproval = () => {
Expand Down Expand Up @@ -335,7 334,6 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
onPress={confirmPayment}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
addDebitCardRoute={isInvoiceReport ? ROUTES.SETTINGS_WALLET : undefined}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
shouldDisableApproveButton={shouldDisableApproveButton}
Expand Down
1 change: 0 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 543,6 @@ function ReportPreview({
confirmApproval={confirmApproval}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
addDebitCardRoute={isInvoiceRoom ? ROUTES.SETTINGS_WALLET : undefined}
shouldHidePaymentOptions={!shouldShowPayButton}
shouldShowApproveButton={shouldShowApproveButton}
shouldDisableApproveButton={shouldDisableApproveButton}
Expand Down
Loading