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

Feat/global reimbursements #3

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8636802
feat: GR
MrMuzyk Aug 1, 2024
136c6d9
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Aug 1, 2024
8bcc723
feat: UI
MrMuzyk Aug 13, 2024
b1e228b
feat: draft
MrMuzyk Aug 20, 2024
615505c
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Aug 20, 2024
3be3481
feat: draft values
MrMuzyk Aug 26, 2024
2ff61c2
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Aug 26, 2024
41092bf
feat: global reimbursements more
MrMuzyk Sep 2, 2024
7eb4d71
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 2, 2024
a0315c5
feat: some corrections and ownership percentage validation
MrMuzyk Sep 4, 2024
a5ff4b9
fix: prop removal
MrMuzyk Sep 4, 2024
bdc036e
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 4, 2024
45484f1
feat: mobile styles
MrMuzyk Sep 4, 2024
52674c3
fix: ts
MrMuzyk Sep 9, 2024
d8de0fd
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 9, 2024
9569fa0
fix: ts and lint
MrMuzyk Sep 9, 2024
9bcbd09
fix: revert ios changes
MrMuzyk Sep 9, 2024
d3042af
fix: revert ios changes
MrMuzyk Sep 9, 2024
a8a76ee
region selector
MrMuzyk Sep 12, 2024
4c48daf
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 12, 2024
6c679e9
fix naming
MrMuzyk Sep 12, 2024
e713b1e
ts fix
MrMuzyk Sep 12, 2024
1ce1107
feat: fixes
MrMuzyk Sep 19, 2024
309fcc8
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 19, 2024
fe2f2d0
fix: ts and lint
MrMuzyk Sep 19, 2024
bff1300
feat: before form type change
MrMuzyk Sep 20, 2024
b983e1f
feat: interactive step wrapper
MrMuzyk Sep 24, 2024
3a5402b
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Sep 24, 2024
bdc3f85
feat: more or less working step 1-2
MrMuzyk Sep 26, 2024
a61f086
feat: reworking
MrMuzyk Oct 3, 2024
7f11174
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Oct 3, 2024
7ece302
feat: updating
MrMuzyk Oct 10, 2024
dc98c23
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Oct 10, 2024
a4608b5
fix: linter/ts
MrMuzyk Oct 11, 2024
1ccb470
fix: few smaller fixes
MrMuzyk Oct 11, 2024
e97b24d
fix: loosen types on getfields
MrMuzyk Oct 11, 2024
257c22b
feat: move everything under existing form key
MrMuzyk Oct 15, 2024
662078f
Merge branch 'main' of https://github.com/Expensify/App into feat/glo…
MrMuzyk Oct 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
28 changes: 28 additions & 0 deletions assets/images/simple-illustrations/simple-illustration__pillow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
302 changes: 301 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ const CONST = {
SMS: {
DOMAIN: '@expensify.sms',
},
BANK_ACCOUNT: {
USD_BANK_ACCOUNT: {
BENEFICIAL_OWNER_INFO_STEP: {
SUBSTEP: {
IS_USER_UBO: 1,
Expand Down Expand Up @@ -369,6 +369,53 @@ const CONST = {
PERSONAL: 'PERSONAL',
},
},
NON_USD_BANK_ACCOUNT: {
STEP: {
COUNTRY: 'CountryStep',
BANK_INFO: 'BankInfoStep',
BUSINESS_INFO: 'BusinessInfoStep',
OWNERSHIP_INFO: 'OwnershipInfoStep',
SIGNER_INFO: 'SignerInfoStep',
AGREEMENTS: 'AgreementsStep',
FINISH: 'FinishStep',
},
STEP_NAMES: ['1', '2', '3', '4', '5', '6'],
STEP_HEADER_HEIGHT: 40,
OWNERSHIP_INFO_STEP: {
SUBSTEP: {
IS_USER_OWNER: 1,
IS_ANYONE_ELSE_OWNER: 2,
OWNER_DETAILS_FORM: 3,
ARE_THERE_MORE_OWNERS: 4,
OWNERSHIP_CHART: 5,
OWNERS_LIST: 6,
},
OWNER_DATA: {
OWNER_KEYS: 'ownerKeys',
PREFIX: 'owner',
FIRST_NAME: 'firstName',
LAST_NAME: 'lastName',
OWNERSHIP_PERCENTAGE: 'ownershipPercentage',
DOB: 'dob',
SSN_LAST_4: 'ssnLast4',
STREET: 'street',
CITY: 'city',
STATE: 'state',
ZIP_CODE: 'zipCode',
COUNTRY: 'country',
},
},
SIGNER_INFO_STEP: {
SUBSTEP: {
IS_DIRECTOR: 1,
ENTER_EMAIL: 2,
SIGNER_DETAILS_FORM: 3,
HANG_TIGHT: 4,
},
},
ALLOWED_FILE_TYPES: ['pdf', 'jpg', 'jpeg', 'png'],
MAX_FILE_SIZE_MB: 5,
},
INCORPORATION_TYPES: {
LLC: 'LLC',
CORPORATION: 'Corp',
Expand Down Expand Up @@ -2916,6 +2963,259 @@ const CONST = {
ZW: 'Zimbabwe',
},

COUNTRY_PHONE_NUMBER_CODES: {
AF: '+93',
AX: '+358-18',
AL: '+355',
DZ: '+213',
AS: '+1-684',
AD: '+376',
AO: '+244',
AI: '+1-264',
AQ: '+672',
AG: '+1-268',
AR: '+54',
AM: '+374',
AW: '+297',
AC: '+247',
AU: '+61',
AT: '+43',
AZ: '+994',
BS: '+1-242',
BH: '+973',
BD: '+880',
BB: '+1-246',
BY: '+375',
BE: '+32',
BZ: '+501',
BJ: '+229',
BM: '+1-441',
BT: '+975',
BO: '+591',
BA: '+387',
BW: '+267',
BR: '+55',
IO: '+246',
VG: '+1-284',
BN: '+673',
BG: '+359',
BF: '+226',
BI: '+257',
KH: '+855',
CM: '+237',
CA: '+1',
CV: '+238',
BQ: '+599',
KY: '+1-345',
CF: '+236',
TD: '+235',
CL: '+56',
CN: '+86',
CX: '+61',
CC: '+61',
CO: '+57',
KM: '+269',
CG: '+242',
CD: '+243',
CK: '+682',
CR: '+506',
CI: '+225',
HR: '+385',
CU: '+53',
CW: '+599',
CY: '+357',
CZ: '+420',
DK: '+45',
DJ: '+253',
DM: '+1-767',
DO: '+1-809, +1-829, +1-849',
EC: '+593',
EG: '+20',
SV: '+503',
GQ: '+240',
ER: '+291',
EE: '+372',
ET: '+251',
FK: '+500',
FO: '+298',
FJ: '+679',
FI: '+358',
FR: '+33',
GF: '+594',
PF: '+689',
TF: '+262',
GA: '+241',
GM: '+220',
GE: '+995',
DE: '+49',
GH: '+233',
GI: '+350',
GR: '+30',
GL: '+299',
GD: '+1-473',
GP: '+590',
GU: '+1-671',
GT: '+502',
GG: '+44-1481',
GN: '+224',
GW: '+245',
GY: '+592',
HT: '+509',
HN: '+504',
HK: '+852',
HU: '+36',
IS: '+354',
IN: '+91',
ID: '+62',
IR: '+98',
IQ: '+964',
IE: '+353',
IM: '+44-1624',
IL: '+972',
IT: '+39',
JM: '+1-876',
JP: '+81',
JE: '+44-1534',
JO: '+962',
KZ: '+7',
KE: '+254',
KI: '+686',
XK: '+383',
KW: '+965',
KG: '+996',
LA: '+856',
LV: '+371',
LB: '+961',
LS: '+266',
LR: '+231',
LY: '+218',
LI: '+423',
LT: '+370',
LU: '+352',
MO: '+853',
MK: '+389',
MG: '+261',
MW: '+265',
MY: '+60',
MV: '+960',
ML: '+223',
MT: '+356',
MH: '+692',
MQ: '+596',
MR: '+222',
MU: '+230',
YT: '+262',
MX: '+52',
FM: '+691',
MD: '+373',
MC: '+377',
MN: '+976',
ME: '+382',
MS: '+1-664',
MA: '+212',
MZ: '+258',
MM: '+95',
NA: '+264',
NR: '+674',
NP: '+977',
NL: '+31',
NC: '+687',
NZ: '+64',
NI: '+505',
NE: '+227',
NG: '+234',
NU: '+683',
NF: '+672',
KP: '+850',
MP: '+1-670',
NO: '+47',
OM: '+968',
PK: '+92',
PW: '+680',
PS: '+970',
PA: '+507',
PG: '+675',
PY: '+595',
PE: '+51',
PH: '+63',
PN: '+64',
PL: '+48',
PT: '+351',
PR: '+1-787, +1-939',
QA: '+974',
RE: '+262',
RO: '+40',
RU: '+7',
RW: '+250',
BL: '+590',
WS: '+685',
SM: '+378',
ST: '+239',
SA: '+966',
SN: '+221',
RS: '+381',
SC: '+248',
SL: '+232',
SG: '+65',
SX: '+1-721',
SK: '+421',
SI: '+386',
SB: '+677',
SO: '+252',
ZA: '+27',
GS: '+500',
KR: '+82',
SS: '+211',
ES: '+34',
LK: '+94',
SH: '+290',
KN: '+1-869',
LC: '+1-758',
MF: '+590',
PM: '+508',
VC: '+1-784',
SD: '+249',
SR: '+597',
SJ: '+47',
SZ: '+268',
SE: '+46',
CH: '+41',
SY: '+963',
TW: '+886',
TJ: '+992',
TZ: '+255',
TH: '+66',
TL: '+670',
TG: '+228',
TK: '+690',
TO: '+676',
TT: '+1-868',
TA: '+290',
TN: '+216',
TR: '+90',
TM: '+993',
TC: '+1-649',
TV: '+688',
UM: '+1',
VI: '+1-340',
UG: '+256',
UA: '+380',
AE: '+971',
GB: '+44',
US: '+1',
UY: '+598',
UZ: '+998',
VU: '+678',
VA: '+39-06',
VE: '+58',
VN: '+84',
WF: '+681',
EH: '+212',
YE: '+967',
ZM: '+260',
ZW: '+263',
},

// Sources: https://github.com/Expensify/App/issues/14958#issuecomment-1442138427
// https://github.com/Expensify/App/issues/14958#issuecomment-1456026810
COUNTRY_ZIP_REGEX_DATA: {
Expand Down
3 changes: 3 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ const ONYXKEYS = {
REPORT_FIELDS_EDIT_FORM_DRAFT: 'reportFieldsEditFormDraft',
REIMBURSEMENT_ACCOUNT_FORM: 'reimbursementAccount',
REIMBURSEMENT_ACCOUNT_FORM_DRAFT: 'reimbursementAccountDraft',
NON_USD_REIMBURSEMENT_ACCOUNT_FORM: 'nonUSDReimbursementAccount',
NON_USD_REIMBURSEMENT_ACCOUNT_FORM_DRAFT: 'nonUSDReimbursementAccountDraft',
PERSONAL_BANK_ACCOUNT_FORM: 'personalBankAccount',
PERSONAL_BANK_ACCOUNT_FORM_DRAFT: 'personalBankAccountDraft',
DISABLE_AUTO_RENEW_SURVEY_FORM: 'disableAutoRenewSurveyForm',
Expand Down Expand Up @@ -690,6 +692,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.GET_PHYSICAL_CARD_FORM]: FormTypes.GetPhysicalCardForm;
[ONYXKEYS.FORMS.REPORT_FIELDS_EDIT_FORM]: FormTypes.ReportFieldsEditForm;
[ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM]: FormTypes.ReimbursementAccountForm;
[ONYXKEYS.FORMS.NON_USD_REIMBURSEMENT_ACCOUNT_FORM]: FormTypes.NonUSDReimbursementAccountForm;
[ONYXKEYS.FORMS.PERSONAL_BANK_ACCOUNT_FORM]: FormTypes.PersonalBankAccountForm;
[ONYXKEYS.FORMS.WORKSPACE_DESCRIPTION_FORM]: FormTypes.WorkspaceDescriptionForm;
[ONYXKEYS.FORMS.WALLET_ADDITIONAL_DETAILS]: FormTypes.AdditionalDetailStepForm;
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddPaymentCard/PaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function PaymentCardForm({
aria-label={translate('common.zip')}
role={CONST.ROLE.PRESENTATION}
inputMode={CONST.INPUT_MODE.NUMERIC}
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
maxLength={CONST.USD_BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
containerStyles={[styles.mt5]}
/>
{!!showStateSelector && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddressForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function AddressForm({
role={CONST.ROLE.PRESENTATION}
autoCapitalize="characters"
defaultValue={zip}
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
maxLength={CONST.USD_BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
hint={zipFormat}
onValueChange={onAddressChanged}
shouldSaveDraft={shouldSaveDraft}
Expand Down
Loading
Loading