Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
d7ef177
feat: personal info page
MrMuzyk Oct 25, 2023
70e0056
Created Interactive Step Header
gedu Oct 25, 2023
15bdfea
replaced the console.warn with an Error
gedu Oct 25, 2023
a40c40f
updated the text
gedu Oct 25, 2023
7150dbd
Fixed comments
gedu Oct 25, 2023
79e9a6c
add: useSubStep hook and some basic tests
Swor71 Oct 26, 2023
861db50
fixed some console errors
gedu Oct 26, 2023
c506a61
Added comments to the props
gedu Oct 27, 2023
f4ddc30
add: descriptions for jsdoc properties
Swor71 Oct 27, 2023
ea52ce1
feat: substeps
MrMuzyk Oct 27, 2023
31dc2cf
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Oct 27, 2023
8ea2e86
Merge branch 'marcin/30239-useSubStep-hook' of github.com:Swor71/App …
MrMuzyk Oct 27, 2023
5a086ab
Merge branch 'edu/vbba_setup_flow/30237_interactive_sub_step_header' …
MrMuzyk Oct 27, 2023
3b2c54e
change: jsdoc comments
Swor71 Oct 27, 2023
f76e933
add: prevScreen method and screenIndex to the return from the hook, a…
Swor71 Oct 27, 2023
3538899
Merge branch 'marcin/30239-useSubStep-hook' of github.com:Swor71/App …
MrMuzyk Oct 27, 2023
bd3f397
fix: jsdoc on screenIndex
Swor71 Oct 27, 2023
18d20f7
Merge pull request #30415 from gedu/edu/vbba_setup_flow/30237_interac…
mountiny Oct 27, 2023
95c2716
feat: more of personal info
MrMuzyk Oct 30, 2023
cf4c1ec
feat: begining of cleanup
MrMuzyk Oct 30, 2023
75c976c
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Oct 30, 2023
92dbaea
Merge branch 'vit-tieredBankAccountFlow' into marcin/30239-useSubStep…
Swor71 Oct 30, 2023
9e75d88
fix: cr fixes
MrMuzyk Oct 31, 2023
59a3f6a
fix: minor layout fixes
MrMuzyk Oct 31, 2023
9a8394d
fix: fix check for inital substep
MrMuzyk Oct 31, 2023
5046ed2
Merge pull request #30426 from Swor71/marcin/30239-useSubStep-hook
mountiny Oct 31, 2023
ca9f2f6
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 2, 2023
4f13317
add: BusinessInfo and NameBusiness substep
Swor71 Nov 3, 2023
d493d3a
add: TaxIdBusiness substep
Swor71 Nov 3, 2023
82e383c
add: WebsiteBusiness substep
Swor71 Nov 3, 2023
942d549
add: PhoneNumberBusiness substep
Swor71 Nov 3, 2023
cfd4ace
add: extracted getDefaultStateForField util and used it across the flow
Swor71 Nov 3, 2023
36e10e6
add: SSN with getDefaultStateForField util used
Swor71 Nov 3, 2023
ce24ca8
add: AddressBusiness substep
Swor71 Nov 3, 2023
316040a
add: TypeBusiness substep
Swor71 Nov 3, 2023
92b0ae2
add: IncorporationDateBusiness substep
Swor71 Nov 6, 2023
6f29432
feat: CR fixes
MrMuzyk Nov 6, 2023
b964b3c
fix: linting fixes
MrMuzyk Nov 6, 2023
de9b598
add: IncorporationStateBusiness substep
Swor71 Nov 6, 2023
54fd19f
fix: default values
MrMuzyk Nov 6, 2023
098e60c
add: getSubstepValues util
Swor71 Nov 6, 2023
7d807c7
Merge branch 'main' into vit-tieredBankAccountFlow
mountiny Nov 6, 2023
427ab33
add: ConfirmationBusiness substep
Swor71 Nov 6, 2023
8152cd4
Merge remote-tracking branch 'mmuzyk/michal/personal-info-page' into …
Swor71 Nov 6, 2023
4a29bc9
change: removed the usages of updateOnyxVBBAData
Swor71 Nov 6, 2023
e229faa
fix: IncorporationDate date picker usage
Swor71 Nov 6, 2023
0a33668
add: getInitialSubstepForBusinessInfo util and adjusted BusinessInfo …
Swor71 Nov 6, 2023
72cc6f1
add: validation on all substeps
Swor71 Nov 6, 2023
dff94a5
change: cleaned up CompanyStep component
Swor71 Nov 6, 2023
76d5e9c
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 7, 2023
ead9074
fix: lint fixes
MrMuzyk Nov 7, 2023
8d579c5
add: Spanish translations, moved website link to const
Swor71 Nov 7, 2023
5e1c05d
fix: prettier fix
MrMuzyk Nov 7, 2023
47553da
fix: initial substep fix
MrMuzyk Nov 7, 2023
72546e5
change: removed isRequired for reimbursementAccount
Swor71 Nov 7, 2023
8fa9a25
fix: initial substep after CR
Swor71 Nov 7, 2023
4cd72c8
Merge pull request #30576 from MrMuzyk/michal/personal-info-page
mountiny Nov 7, 2023
3b668bc
change: removed extra View wrapper when using Form
Swor71 Nov 7, 2023
749e6a0
fix: getInitialSubstepForBusinessInfo util
Swor71 Nov 8, 2023
d4a6cc4
Merge branch 'vit-tieredBankAccountFlow' into marcin/business-info-page
Swor71 Nov 8, 2023
eafe68b
fix: lint errors after merge of vit-tieredBankAccountFlow
Swor71 Nov 8, 2023
02f287e
feat: BankInfo step
MrMuzyk Nov 9, 2023
88b7cee
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 9, 2023
a1348cb
fix: remove console logs
MrMuzyk Nov 9, 2023
3b8568a
Merge branch 'main' into vit-tieredBankAccountFlow
mountiny Nov 13, 2023
25496b4
feat: cr fixes
MrMuzyk Nov 13, 2023
b314897
resolve merge conflicts
mountiny Nov 13, 2023
07ff1f2
feat: more fixes
MrMuzyk Nov 13, 2023
2d5e60c
feat: revert podfile change
MrMuzyk Nov 13, 2023
0e3fbe3
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 13, 2023
6bc3c42
fix: linter fix
MrMuzyk Nov 13, 2023
2b2f4a2
fix: removed additional spaces in jsdoc comment for getSubstepValues
Swor71 Nov 13, 2023
8197628
Merge branch 'vit-tieredBankAccountFlow' into marcin/business-info-page
Swor71 Nov 13, 2023
87f077c
fix: lint issues after merging latest feature branch (main sync)
Swor71 Nov 13, 2023
1140b43
Revert "fix: lint issues after merging latest feature branch (main sy…
Swor71 Nov 13, 2023
5fd108e
fix: lint issues
Swor71 Nov 13, 2023
97b5227
fix: cr fixes
MrMuzyk Nov 14, 2023
d6bd017
fix: changed keyboardType to inputMode, full state name on Confirmati…
Swor71 Nov 14, 2023
48c9996
fix: change to input mode
MrMuzyk Nov 14, 2023
0f3ef94
feat: accessibility changes
MrMuzyk Nov 14, 2023
218c487
change: a11y label / role
Swor71 Nov 14, 2023
4fe37bb
fix: add max date of today for IncorporationDate
Swor71 Nov 14, 2023
75fae66
fix: added wrapper styles to IncorporateState to fix padding issue
Swor71 Nov 14, 2023
0bb725a
Merge pull request #30924 from Swor71/marcin/business-info-page
mountiny Nov 14, 2023
048dfdc
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 15, 2023
a066221
feat: update util function
MrMuzyk Nov 15, 2023
bf43cc4
fix: fixed edge cases
MrMuzyk Nov 16, 2023
1088c04
feat: add text for plaid
MrMuzyk Nov 16, 2023
ab237f5
Merge main and resolve merge conflicts
mountiny Nov 16, 2023
3ae88d7
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 17, 2023
42ae28e
fix: prettier fix
MrMuzyk Nov 17, 2023
57da62e
Merge pull request #31121 from MrMuzyk/michal/bank-info-screen
mountiny Nov 17, 2023
d84e933
Merge main
mountiny Nov 20, 2023
b1ada29
Merge branch 'vit-tieredBankAccountFlow' of github.com:Expensify/App …
mountiny Nov 20, 2023
6beb491
Merge branch 'main' of https://github.com/Expensify/App into michal/o…
MrMuzyk Nov 22, 2023
88e7b0a
feat: verify identity
MrMuzyk Nov 24, 2023
2137c0f
draft: bank owner verification page commit
Swor71 Nov 24, 2023
a27d4b2
Merge main
mountiny Nov 24, 2023
4c15a86
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Nov 24, 2023
affc306
fix: small polishing fies
MrMuzyk Nov 24, 2023
14cd02f
fix: removed unused ref
MrMuzyk Nov 24, 2023
f43a36a
fix: lint fixes
MrMuzyk Nov 24, 2023
187dc92
fix: cr fixes
MrMuzyk Nov 27, 2023
8cde23a
fix: typo and form wrapper change
MrMuzyk Nov 27, 2023
a06e1d4
Merge pull request #31812 from MrMuzyk/michal/onfido-step
mountiny Nov 27, 2023
cef2e8c
Merge branch 'marcin/bank-owner-verification-page' of github.com:Swor…
MrMuzyk Nov 27, 2023
97ed396
feat: UBO step
MrMuzyk Nov 29, 2023
26adf3b
feat: break
MrMuzyk Dec 6, 2023
e0dedb6
Merge main
mountiny Dec 7, 2023
dcd1e98
before rebase
MrMuzyk Dec 7, 2023
b0f8813
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Dec 7, 2023
6367197
fix: fixing stuff after rebase
MrMuzyk Dec 7, 2023
10c486d
feat: checking all once more
MrMuzyk Dec 7, 2023
0f74c4b
feat: es translations
MrMuzyk Dec 8, 2023
ba7b7b5
fix: cr fixes
MrMuzyk Dec 11, 2023
21fedad
Merge main and resolve merge conflicts
mountiny Dec 14, 2023
dd49213
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Dec 14, 2023
b1003e9
fix: styles imports fix
MrMuzyk Dec 14, 2023
aaa1c13
fix: rework forms
MrMuzyk Dec 14, 2023
c7e5489
fix: default value fix
MrMuzyk Dec 14, 2023
701ec37
feat: add one more proptype to formProvider
MrMuzyk Dec 15, 2023
a6ee5a3
Merge pull request #32709 from MrMuzyk/michal/ubo-step
mountiny Dec 15, 2023
a2b4569
Merge main and resolve merge conflicts
mountiny Dec 15, 2023
1b9958b
feat: migrate interactiveStepSubHeader to ts
MrMuzyk Dec 18, 2023
954f5b9
fix: cr fix
MrMuzyk Dec 18, 2023
b234f73
chore: migrate useSubStep hook to ts
Swor71 Dec 18, 2023
b546231
fix: removed corresponding js file
Swor71 Dec 18, 2023
9e69db6
fix: cr fix
MrMuzyk Dec 18, 2023
201f1b6
Merge pull request #33226 from MrMuzyk/feat/interactive-step-sub-head…
arosiclair Dec 18, 2023
7cee9c1
feat: getValuesForBeneficialOwner migrate to ts
MrMuzyk Dec 19, 2023
354a2e3
refactor: migrated getInitialSubstepForBusinessInfo helper
barttom Dec 19, 2023
d4495ec
refactor: migrated getInitialSubstepForPersonalInfo to typescript
barttom Dec 19, 2023
4e120c8
fix: changed typing, added comment
barttom Dec 19, 2023
8c85c12
fix: cr fixes
MrMuzyk Dec 19, 2023
1f8ade1
fix: linter
MrMuzyk Dec 19, 2023
cf0f1a6
Merge pull request #33231 from Swor71/marcin/migrate-useSubstepHook-t…
mountiny Dec 19, 2023
3e7e21e
Merge pull request #33270 from MrMuzyk/feat/get-values-for-beneficial…
mountiny Dec 19, 2023
e075c54
Merge pull request #33271 from barttom/refactor/getInitialSubstepForB…
mountiny Dec 19, 2023
dd91c18
feat: migrate getSubstepValues to ts
Swor71 Dec 19, 2023
a7b2405
Merge pull request #33272 from barttom/refactor/getInitialSubstepForP…
bondydaa Dec 19, 2023
b60de4a
add: return type to the hook
Swor71 Dec 20, 2023
dfcebe9
Merge pull request #33281 from Swor71/marcin/migrate-getSubstepValues-ts
mountiny Dec 20, 2023
973dd49
fix: better narrowing for getSubstepValues return
Swor71 Dec 20, 2023
a8944cf
Merge main
mountiny Dec 21, 2023
eadc97d
Merge pull request #33350 from Swor71/fix-getSubstepValues-util-ts
mountiny Dec 21, 2023
104ee2b
fix: fixed datepicker
barttom Dec 21, 2023
0afb1f2
Merge pull request #33402 from barttom/fix/fixes-after-merge-21122023
mountiny Dec 21, 2023
aadfdbd
fix: fixed component in datepicker
barttom Dec 21, 2023
0bcce1e
Merge pull request #33405 from barttom/fix/fixes-after-merge-21122023…
Julesssss Dec 21, 2023
91858d6
feat: add new verification step page
barttom Dec 1, 2023
3180e92
feat: added submit of stpe, added default valuies and validation for …
barttom Dec 5, 2023
b40dbc7
feat: added ConnectBankAccount component
barttom Dec 7, 2023
9dd74d3
feat: added EnableBankAccount step
barttom Dec 7, 2023
50fa822
fix: rollback import
barttom Dec 7, 2023
c4b58d7
fix: fixed translation
barttom Dec 7, 2023
48d7a8e
feat: handled sending proper data after the last step
barttom Dec 15, 2023
2c6e183
feat: handled sending proper data after the last step
barttom Dec 15, 2023
714cb1a
feat: added new compnents for verification and enable steps
barttom Dec 15, 2023
89a9e81
fix: fixed imports
barttom Dec 15, 2023
4609424
fix: fixed helepr funciton
barttom Dec 15, 2023
d6fcd71
refactor: remove unused components
barttom Dec 15, 2023
4d0ca8b
refactor: fixed prettier
barttom Dec 15, 2023
0df650b
fix: fixed stepper colors
barttom Dec 17, 2023
06d8f09
fix: follow const variable uppercased names, change ubo step value na…
barttom Dec 18, 2023
a3aa0bc
feat: updated translation
barttom Dec 18, 2023
eaeffed
fix: added default values, added close button to the CompleteVerifica…
barttom Dec 18, 2023
7fdab99
fix: added default values and missed comments
barttom Dec 18, 2023
2cfb812
fix: removed unused useMemo
barttom Dec 18, 2023
598740d
feat: BankInfo migration to ts
MrMuzyk Dec 21, 2023
9ba3ec2
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Dec 21, 2023
2996514
fix: move expect errors
MrMuzyk Dec 21, 2023
a4c0f85
fix: test fix
MrMuzyk Dec 21, 2023
51d14f7
fix: fixed card styles on the bank accont confirmation
barttom Dec 21, 2023
b35b92b
fix: lint
barttom Dec 21, 2023
5467681
fix: fixed card styles on the bank accont confirmation
barttom Dec 21, 2023
3c00ef2
fix: cr fixes
MrMuzyk Dec 22, 2023
9c12a98
feat: small fix
MrMuzyk Dec 22, 2023
85f44ee
fix: more changes
MrMuzyk Dec 22, 2023
d918cd4
Merge pull request #32666 from barttom/refactor/30442/varification-step
mountiny Dec 22, 2023
ec5704e
Merge branch 'vit-tieredBankAccountFlow' of https://github.com/Expens…
MrMuzyk Dec 22, 2023
929933c
feat: migrate BusinessInfo step to TS
Swor71 Dec 22, 2023
5936131
fix: added casting to TranslationPaths
Swor71 Dec 22, 2023
2cfe13d
Merge pull request #33408 from MrMuzyk/feat/bank-info-step-to-ts
mountiny Dec 22, 2023
a78e325
Merge branch 'vit-tieredBankAccountFlow' into marcin/migrate-business…
Swor71 Dec 22, 2023
4064f8c
fix: CR comments
Swor71 Dec 28, 2023
47634ab
fix: CR comments
Swor71 Dec 29, 2023
68b0160
Merge pull request #33495 from Swor71/marcin/migrate-businessInfo-ts
mountiny Dec 29, 2023
06b826b
Merge main to resolve merge conflicts
mountiny Dec 29, 2023
943863d
Sync with upstream
mountiny Dec 29, 2023
6ccb30d
Merge branch 'main' into vit-tieredBankAccountFlow
mountiny Jan 4, 2024
9709323
refactor: migrated BeneficialOwnerInfo
barttom Dec 20, 2023
8f79ac3
refactor: migrated BeneficialOwnerCheckUBO component
barttom Dec 22, 2023
d62eedd
refactor: migrated CompanyOwnersListUBO to ts
barttom Dec 22, 2023
42271f6
refactor: improvements in BeneficialOwnerInfo & BeneficialOwneCHeckUbo
barttom Jan 2, 2024
1e51492
fix: fixes in CompanyOwnersListUBO
barttom Jan 3, 2024
0c77132
fix: fixes in CompanyOwnersListUBO
barttom Jan 3, 2024
0520950
refactor: migrated Address component
barttom Jan 4, 2024
91cdddb
refactor: finished ConfirmationUBO migration
barttom Jan 4, 2024
cf04fa2
refactor: finished ConfirmationUBO migration
barttom Jan 4, 2024
f6e8c1b
refactor: mirgrated DateOfBirthUBO
barttom Jan 4, 2024
862f951
refactor: migrated LegalNameUBO
barttom Jan 4, 2024
31f87c4
refactor: migrated LegalNameUBO
barttom Jan 4, 2024
02d7b6e
refactor: migrated SocialSecurityNumberUbo
barttom Jan 4, 2024
d497f3a
refactor: fixed callback type
barttom Jan 4, 2024
6bdb95a
refactor: fixed PR comments
barttom Jan 6, 2024
7bdf9c5
refactor: adjusted migrated files to changes from main branch
barttom Jan 6, 2024
9498329
fix: added formprovider
barttom Jan 8, 2024
15a820b
fix: fix linter
barttom Jan 8, 2024
72bec45
Merge pull request #33956 from barttom/refactor/ubo-step-ts-migration
mountiny Jan 8, 2024
035c328
refactor: migrated CompleteVerification step
barttom Jan 9, 2024
d74a2df
fix: fixed lint errors
barttom Jan 9, 2024
4c58710
fix: removed unnecessary comment
barttom Jan 10, 2024
9b4e365
Merge pull request #34138 from barttom/refactor/complete-verification…
mountiny Jan 10, 2024
9975297
feat: PersonalInfo ts migration
MrMuzyk Jan 10, 2024
663739b
feat: small fixes
MrMuzyk Jan 10, 2024
a8452f9
fix: change props name for help links
MrMuzyk Jan 10, 2024
2da7382
Merge main to resolve merge conflicts
mountiny Jan 10, 2024
ad0c28c
Merge pull request #34220 from MrMuzyk/feat/personal-info-ts-migration
mountiny Jan 10, 2024
2acfed6
feat: EnableBankAccount ts migration
MrMuzyk Jan 10, 2024
20663ac
fix: rebase errors
MrMuzyk Jan 10, 2024
b470e94
fix: cr fixes
MrMuzyk Jan 11, 2024
bb7abab
fix: cr
MrMuzyk Jan 11, 2024
bccec25
fix: fix comment
MrMuzyk Jan 11, 2024
10f17e6
Merge pull request #34255 from MrMuzyk/feat/enable-account-migrate-to-ts
mountiny Jan 11, 2024
57f6431
refactor: migrated connectbank account step
barttom Jan 11, 2024
6742591
fix: fixed amount validation
barttom Jan 11, 2024
b5cd316
fix: added props descriptions
barttom Jan 11, 2024
4cdc1b6
Merge pull request #34326 from barttom/refactor/conect-bank-account-t…
mountiny Jan 11, 2024
106a602
feat: migrate VerifyIdentity to ts
Swor71 Jan 11, 2024
fad1257
fix: removed reimbursementAccountDefaultProps
Swor71 Jan 11, 2024
6680af4
fix: move to the last step when editing data
barttom Jan 11, 2024
56e32a2
Merge pull request #34338 from Swor71/marcin/migrate-verify-identity-…
mountiny Jan 11, 2024
cc1de27
refactor: remove usage from AddressBusiness
barttom Jan 12, 2024
e851092
refactor: remove usage from IncorporationDateBusiness
barttom Jan 12, 2024
6acd1cb
refactor: remove usage from IncorporationStateBusiness
barttom Jan 12, 2024
ac27526
refactor: remove usage from NameBusiness
barttom Jan 12, 2024
93bf043
refactor: remove usage from PhoneNumberBusiness
barttom Jan 12, 2024
ee450b5
refactor: remove usage from TaxIdBusiness
barttom Jan 12, 2024
d89dcbc
refactor: remove usage from TypeBusiness
barttom Jan 12, 2024
87401a7
refactor: remove usage from WebsiteBusiness
barttom Jan 12, 2024
bfce092
refactor: remove usage from ConfirmAgreements
barttom Jan 12, 2024
297b696
refactor: remove usage from getSubstepValues
barttom Jan 12, 2024
77bb056
refactor: removed helper
barttom Jan 12, 2024
2f82ba0
Merge main
mountiny Jan 12, 2024
a61e206
fix: added default value
barttom Jan 12, 2024
7cee965
Merge pull request #34413 from barttom/refactor/remove-getDefaultValu…
mountiny Jan 12, 2024
d9860ca
Merge pull request #34408 from barttom/fix/back-button-logic
mountiny Jan 12, 2024
2d2c833
Use new vbba 111 commands and swap order of company step and requesto…
nkuoch Jan 2, 2024
322ed33
Merge pull request #33838 from Expensify/nat-vbba111
mountiny Jan 16, 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
80 changes: 79 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,71 @@ const CONST = {
DOMAIN: '@expensify.sms',
},
BANK_ACCOUNT: {
BANK_INFO_STEP: {
INPUT_KEY: {
ROUTING_NUMBER: 'routingNumber',
ACCOUNT_NUMBER: 'accountNumber',
PLAID_MASK: 'plaidMask',
IS_SAVINGS: 'isSavings',
BANK_NAME: 'bankName',
PLAID_ACCOUNT_ID: 'plaidAccountID',
PLAID_ACCESS_TOKEN: 'plaidAccessToken',
},
},
PERSONAL_INFO_STEP: {
INPUT_KEY: {
FIRST_NAME: 'firstName',
LAST_NAME: 'lastName',
DOB: 'dob',
SSN_LAST_4: 'ssnLast4',
STREET: 'requestorAddressStreet',
CITY: 'requestorAddressCity',
STATE: 'requestorAddressState',
ZIP_CODE: 'requestorAddressZipCode',
},
},
BUSINESS_INFO_STEP: {
INPUT_KEY: {
COMPANY_NAME: 'companyName',
COMPANY_TAX_ID: 'companyTaxID',
COMPANY_WEBSITE: 'website',
COMPANY_PHONE: 'companyPhone',
STREET: 'addressStreet',
CITY: 'addressCity',
STATE: 'addressState',
ZIP_CODE: 'addressZipCode',
INCORPORATION_TYPE: 'incorporationType',
INCORPORATION_DATE: 'incorporationDate',
INCORPORATION_STATE: 'incorporationState',
HAS_NO_CONNECTION_TO_CANNABIS: 'hasNoConnectionToCannabis',
},
},
BENEFICIAL_OWNER_INFO_STEP: {
SUBSTEP: {
IS_USER_UBO: 1,
IS_ANYONE_ELSE_UBO: 2,
UBO_DETAILS_FORM: 3,
ARE_THERE_MORE_UBOS: 4,
UBOS_LIST: 5,
},
INPUT_KEY: {
OWNS_MORE_THAN_25_PERCENT: 'ownsMoreThan25Percent',
HAS_OTHER_BENEFICIAL_OWNERS: 'hasOtherBeneficialOwners',
BENEFICIAL_OWNERS: 'beneficialOwners',
},
BENEFICIAL_OWNER_DATA: {
BENEFICIAL_OWNER_KEYS: 'beneficialOwnerKeys',
PREFIX: 'beneficialOwner',
FIRST_NAME: 'firstName',
LAST_NAME: 'lastName',
DOB: 'dob',
SSN_LAST_4: 'ssnLast4',
STREET: 'street',
CITY: 'city',
STATE: 'state',
ZIP_CODE: 'zipCode',
},
},
PLAID: {
ALLOWED_THROTTLED_COUNT: 2,
ERROR: {
Expand All @@ -197,6 +262,13 @@ const CONST = {
EXIT: 'EXIT',
},
},
COMPLETE_VERIFICATION: {
INPUT_KEY: {
IS_AUTHORIZED_TO_USE_BANK_ACCOUNT: 'isAuthorizedToUseBankAccount',
CERTIFY_TRUE_INFORMATION: 'certifyTrueInformation',
ACCEPT_TERMS_AND_CONDITIONS: 'acceptTermsAndConditions',
},
},
ERROR: {
MISSING_ROUTING_NUMBER: '402 Missing routingNumber',
MAX_ROUTING_NUMBER: '402 Maximum Size Exceeded routingNumber',
Expand All @@ -206,14 +278,18 @@ const CONST = {
STEP: {
// In the order they appear in the VBA flow
BANK_ACCOUNT: 'BankAccountStep',
COMPANY: 'CompanyStep',
REQUESTOR: 'RequestorStep',
COMPANY: 'CompanyStep',
BENEFICIAL_OWNERS: 'BeneficialOwnersStep',
ACH_CONTRACT: 'ACHContractStep',
VALIDATION: 'ValidationStep',
ENABLE: 'EnableStep',
},
STEP_NAMES: ['1', '2', '3', '4', '5'],
STEPS_HEADER_HEIGHT: 40,
SUBSTEP: {
MANUAL: 'manual',
PLAID: 'plaid',
},
VERIFICATIONS: {
ERROR_MESSAGE: 'verifications.errorMessage',
Expand Down Expand Up @@ -477,6 +553,8 @@ const CONST = {
ONFIDO_FACIAL_SCAN_POLICY_URL: 'https://onfido.com/facial-scan-policy-and-release/',
ONFIDO_PRIVACY_POLICY_URL: 'https://onfido.com/privacy/',
ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/',
LIST_OF_RESTRICTED_BUSINESSES: 'https://community.expensify.com/discussion/6191/list-of-restricted-businesses',

// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
EXPENSIFY_INBOX_URL: 'https://www.expensify.com/inbox',
Expand Down
2 changes: 2 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const ONYXKEYS = {

/** Token needed to initialize Onfido */
ONFIDO_TOKEN: 'onfidoToken',
ONFIDO_APPLICANT_ID: 'onfidoApplicantID',

/** Indicates which locale should be used */
NVP_PREFERRED_LOCALE: 'preferredLocale',
Expand Down Expand Up @@ -398,6 +399,7 @@ type OnyxValues = {
[ONYXKEYS.IS_PLAID_DISABLED]: boolean;
[ONYXKEYS.PLAID_LINK_TOKEN]: string;
[ONYXKEYS.ONFIDO_TOKEN]: string;
[ONYXKEYS.ONFIDO_APPLICANT_ID]: string;
[ONYXKEYS.NVP_PREFERRED_LOCALE]: OnyxTypes.Locale;
[ONYXKEYS.USER_WALLET]: OnyxTypes.UserWallet;
[ONYXKEYS.WALLET_ONFIDO]: OnyxTypes.WalletOnfido;
Expand Down
59 changes: 56 additions & 3 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React, {useCallback, useEffect, useRef} from 'react';
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {ActivityIndicator, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
Expand All @@ -20,6 +20,7 @@ import Icon from './Icon';
import getBankIcon from './Icon/BankIcons';
import Picker from './Picker';
import PlaidLink from './PlaidLink';
import RadioButtons from './RadioButtons';
import Text from './Text';

const propTypes = {
Expand Down Expand Up @@ -55,6 +56,9 @@ const propTypes = {

/** Are we adding a withdrawal account? */
allowDebit: PropTypes.bool,

/** Is displayed in new VBBA */
isDisplayedInNewVBBA: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -68,6 +72,7 @@ const defaultProps = {
allowDebit: false,
bankAccountID: 0,
isPlaidDisabled: false,
isDisplayedInNewVBBA: false,
};

function AddPlaidBankAccount({
Expand All @@ -82,11 +87,21 @@ function AddPlaidBankAccount({
bankAccountID,
allowDebit,
isPlaidDisabled,
isDisplayedInNewVBBA,
}) {
const theme = useTheme();
const styles = useThemeStyles();
const plaidBankAccounts = lodashGet(plaidData, 'bankAccounts', []);
const defaultSelectedPlaidAccount = _.find(plaidBankAccounts, (account) => account.plaidAccountID === selectedPlaidAccountID);
const defaultSelectedPlaidAccountID = lodashGet(defaultSelectedPlaidAccount, 'plaidAccountID', '');
const defaultSelectedPlaidAccountMask = lodashGet(
_.find(plaidBankAccounts, (account) => account.plaidAccountID === selectedPlaidAccountID),
'mask',
'',
);
const subscribedKeyboardShortcuts = useRef([]);
const previousNetworkState = useRef();
const [selectedPlaidAccountMask, setSelectedPlaidAccountMask] = useState(defaultSelectedPlaidAccountMask);

const {translate} = useLocalize();
const {isOffline} = useNetwork();
Expand Down Expand Up @@ -162,17 +177,27 @@ function AddPlaidBankAccount({
previousNetworkState.current = isOffline;
}, [allowDebit, bankAccountID, isAuthenticatedWithPlaid, isOffline]);

const plaidBankAccounts = lodashGet(plaidData, 'bankAccounts') || [];
const token = getPlaidLinkToken();
const options = _.map(plaidBankAccounts, (account) => ({
value: account.plaidAccountID,
label: `${account.addressName} ${account.mask}`,
label: account.addressName,
}));
const {icon, iconSize, iconStyles} = getBankIcon({styles});
const plaidErrors = lodashGet(plaidData, 'errors');
const plaidDataErrorMessage = !_.isEmpty(plaidErrors) ? _.chain(plaidErrors).values().first().value() : '';
const bankName = lodashGet(plaidData, 'bankName');

/**
* @param {String} plaidAccountID
*
* When user selects one of plaid accounts we need to set the mask in order to display it on UI
*/
const handleSelectingPlaidAccount = (plaidAccountID) => {
const mask = _.find(plaidBankAccounts, (account) => account.plaidAccountID === plaidAccountID).mask;
setSelectedPlaidAccountMask(mask);
onSelect(plaidAccountID);
};

if (isPlaidDisabled) {
return (
<View>
Expand Down Expand Up @@ -239,6 +264,34 @@ function AddPlaidBankAccount({
return <FullPageOfflineBlockingView>{renderPlaidLink()}</FullPageOfflineBlockingView>;
}

if (isDisplayedInNewVBBA) {
return (
<FullPageOfflineBlockingView>
<Text style={[styles.mb5, styles.textHeadline]}>{translate('bankAccount.chooseAnAccount')}</Text>
{!_.isEmpty(text) && <Text style={[styles.mb5]}>{text}</Text>}
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mb5]}>
<Icon
src={icon}
height={iconSize}
width={iconSize}
/>
<View>
<Text style={[styles.ml3, styles.textStrong]}>{bankName}</Text>
{selectedPlaidAccountMask.length > 0 && (
<Text style={[styles.ml3, styles.textLabelSupporting]}>{`${translate('bankAccount.accountEnding')} ${selectedPlaidAccountMask}`}</Text>
)}
</View>
</View>
<Text style={[styles.textLabelSupporting]}>{`${translate('bankAccount.chooseAnAccountBelow')}:`}</Text>
<RadioButtons
items={options}
defaultCheckedValue={defaultSelectedPlaidAccountID}
onPress={handleSelectingPlaidAccount}
/>
</FullPageOfflineBlockingView>
);
}

// Plaid bank accounts view
return (
<FullPageOfflineBlockingView>
Expand Down
1 change: 0 additions & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,4 @@ function Button(
}

Button.displayName = 'Button';

export default withNavigationFallback(React.forwardRef(Button));
43 changes: 41 additions & 2 deletions src/components/DatePicker/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {setYear} from 'date-fns';
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, {forwardRef, useState} from 'react';
import React, {forwardRef, useEffect, useState} from 'react';
import {View} from 'react-native';
import * as Expensicons from '@components/Icon/Expensicons';
import refPropTypes from '@components/refPropTypes';
import TextInput from '@components/TextInput';
import {propTypes as baseTextInputPropTypes, defaultProps as defaultBaseTextInputPropTypes} from '@components/TextInput/BaseTextInput/baseTextInputPropTypes';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as FormActions from '@userActions/FormActions';
import CONST from '@src/CONST';
import CalendarPicker from './CalendarPicker';

Expand Down Expand Up @@ -42,6 +43,12 @@ const propTypes = {
/** A function that is passed by FormWrapper */
onTouched: PropTypes.func.isRequired,

/** Saves a draft of the input value when used in a form */
shouldSaveDraft: PropTypes.bool,

/** ID of the wrapping form */
formID: PropTypes.string,

...baseTextInputPropTypes,
};

Expand All @@ -50,9 +57,28 @@ const datePickerDefaultProps = {
minDate: setYear(new Date(), CONST.CALENDAR_PICKER.MIN_YEAR),
maxDate: setYear(new Date(), CONST.CALENDAR_PICKER.MAX_YEAR),
value: undefined,
shouldSaveDraft: false,
formID: '',
};

function DatePicker({forwardedRef, containerStyles, defaultValue, disabled, errorText, inputID, isSmallScreenWidth, label, maxDate, minDate, onInputChange, onTouched, placeholder, value}) {
function DatePicker({
forwardedRef,
containerStyles,
defaultValue,
disabled,
errorText,
inputID,
isSmallScreenWidth,
label,
maxDate,
minDate,
onInputChange,
onTouched,
placeholder,
value,
shouldSaveDraft,
formID,
}) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const [selectedDate, setSelectedDate] = useState(value || defaultValue || undefined);
Expand All @@ -67,6 +93,19 @@ function DatePicker({forwardedRef, containerStyles, defaultValue, disabled, erro
setSelectedDate(newValue);
};

useEffect(() => {
// Value is provided to input via props and onChange never fires. We have to save draft manually.
if (shouldSaveDraft && formID !== '') {
FormActions.setDraftValues(formID, {[inputID]: selectedDate});
}

if (selectedDate === value || _.isUndefined(value)) {
return;
}

setSelectedDate(value);
}, [formID, inputID, selectedDate, shouldSaveDraft, value]);

return (
<View style={styles.datePickerRoot}>
<View style={[isSmallScreenWidth ? styles.flex2 : {}, styles.pointerEventsNone]}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/FormProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const propTypes = {
}),

/** Contains draft values for each input in the form */
draftValues: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.objectOf(Date)])),
draftValues: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.objectOf(Date), PropTypes.arrayOf(PropTypes.string)])),

/** Should the button be enabled when offline */
enabledWhenOffline: PropTypes.bool,
Expand Down
7 changes: 4 additions & 3 deletions src/components/Form/FormWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ const propTypes = {
/** Container styles */
style: stylePropTypes,

/** Submit button styles */
submitButtonStyles: stylePropTypes,
/** Submit button container styles */
// eslint-disable-next-line react/forbid-prop-types
submitButtonStyles: PropTypes.arrayOf(PropTypes.object),

/** Custom content to display in the footer after submit button */
footerContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
Expand Down Expand Up @@ -93,10 +94,10 @@ function FormWrapper(props) {
footerContent,
isSubmitButtonVisible,
style,
submitButtonStyles,
enabledWhenOffline,
isSubmitActionDangerous,
formID,
submitButtonStyles,
} = props;
const formRef = useRef(null);
const formContentRef = useRef(null);
Expand Down
Loading