-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Invoicing bank accounts section #47218
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
Merged
madmax330
merged 29 commits into
Expensify:main
from
rezkiy37:feature/45177-invoice-back-accounts-section
Sep 30, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
67e37b9
create raw WorkspaceInvoiceVBASection
rezkiy37 c2b9af4
add invoice types
rezkiy37 077a401
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 be90481
integrate bank accounts logic
rezkiy37 8e9d73e
add translations
rezkiy37 3661b67
integrate add bank account button
rezkiy37 e7a88a0
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 97d6073
omit card logic
rezkiy37 54591c2
reuse types
rezkiy37 2a8f11f
integrate usePaymentMethodState hook
rezkiy37 cb90633
rename shouldUseSuccessAddBankAccountButton
rezkiy37 05af88f
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 edd8507
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 2bec476
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 162d4da
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 c3258e2
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 68cb5a2
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 676a0da
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 8094a1a
implement setInvoicingTransferBankAccount
rezkiy37 6b2fff4
PaymentMethodList accepts invoiceTransferBankAccountID
rezkiy37 d273a5a
implement default back account in WorkspaceInvoiceVBASection
rezkiy37 46f5e1b
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 03b76f2
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 386dc9c
Refactor PaymentMethodList component to use useOnyx
rezkiy37 7b0f675
Merge branches 'feature/45177-invoice-back-accounts-section', 'featur…
rezkiy37 c8861f3
update disabled prop
rezkiy37 5ae1ca6
rename shouldShowAddBankAccountButton
rezkiy37 5635b84
tweak comment
rezkiy37 2ffc83e
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import {useCallback, useState} from 'react'; | ||
| import type {PaymentMethodState} from './types'; | ||
|
|
||
| const initialState: PaymentMethodState = { | ||
| isSelectedPaymentMethodDefault: false, | ||
| selectedPaymentMethod: {}, | ||
| formattedSelectedPaymentMethod: { | ||
| title: '', | ||
| }, | ||
| methodID: '', | ||
| selectedPaymentMethodType: '', | ||
| }; | ||
|
|
||
| function usePaymentMethodState() { | ||
| const [paymentMethod, setPaymentMethod] = useState<PaymentMethodState>(initialState); | ||
|
|
||
| const resetSelectedPaymentMethodData = useCallback(() => { | ||
| setPaymentMethod(initialState); | ||
| }, [setPaymentMethod]); | ||
|
|
||
| return { | ||
| paymentMethod, | ||
| setPaymentMethod, | ||
| resetSelectedPaymentMethodData, | ||
| }; | ||
| } | ||
|
|
||
| export default usePaymentMethodState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import type {ViewStyle} from 'react-native'; | ||
| import type {AccountData} from '@src/types/onyx'; | ||
| import type IconAsset from '@src/types/utils/IconAsset'; | ||
|
|
||
| type FormattedSelectedPaymentMethodIcon = { | ||
| icon: IconAsset; | ||
| iconHeight?: number; | ||
| iconWidth?: number; | ||
| iconStyles?: ViewStyle[]; | ||
| iconSize?: number; | ||
| }; | ||
|
|
||
| type FormattedSelectedPaymentMethod = { | ||
| title: string; | ||
| icon?: FormattedSelectedPaymentMethodIcon; | ||
| description?: string; | ||
| type?: string; | ||
| }; | ||
|
|
||
| type PaymentMethodState = { | ||
| isSelectedPaymentMethodDefault: boolean; | ||
| selectedPaymentMethod: AccountData; | ||
| formattedSelectedPaymentMethod: FormattedSelectedPaymentMethod; | ||
| methodID: string | number; | ||
| selectedPaymentMethodType: string; | ||
| }; | ||
|
|
||
| export type {FormattedSelectedPaymentMethodIcon, FormattedSelectedPaymentMethod, PaymentMethodState}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/libs/API/parameters/SetInvoicingTransferBankAccountParams.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| type SetInvoicingTransferBankAccountParams = { | ||
| bankAccountID: number; | ||
| policyID: string; | ||
| }; | ||
|
|
||
| export default SetInvoicingTransferBankAccountParams; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.