Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
63fd924
Set up routes for new personal details pages
Beamanator Jan 13, 2023
35224f4
New initial personal details page
Beamanator Jan 13, 2023
ed029f5
Add legal name page
Beamanator Jan 13, 2023
649d633
Fix personal details page init linking
Beamanator Jan 13, 2023
2640c4c
Add date of birth page
Beamanator Jan 13, 2023
894d60b
New Home Address page
Beamanator Jan 13, 2023
0d0cdbe
Country picker initial commit
Beamanator Jan 13, 2023
e5211a0
Make variable names more clear
Beamanator Jan 16, 2023
94d633d
Add button to navigate to personal details page
Beamanator Jan 16, 2023
88b1b6f
Add all legal first name errors
Beamanator Jan 16, 2023
3d0a9eb
Make variable names a bit clearer
Beamanator Jan 16, 2023
084eae4
Add necessary default & trim
Beamanator Jan 16, 2023
b18abc5
Modify validation fn to be dynamic
Beamanator Jan 16, 2023
78082ce
Start creating dob validation fn
Beamanator Jan 17, 2023
3d4ee4a
Revert since we'll make a new function
Beamanator Jan 17, 2023
942ff32
Make comment clearer
Beamanator Jan 17, 2023
3eb5047
Remove unused imports
Beamanator Jan 17, 2023
f058f83
Add better date errors
Beamanator Jan 17, 2023
5787f36
Move everything to new private_personalDetails key
Beamanator Jan 17, 2023
2080f93
Finish up Address field validation
Beamanator Jan 17, 2023
dd5bf2d
Remove unused imports
Beamanator Jan 17, 2023
e2db532
Clean up required field validation
Beamanator Jan 17, 2023
efc6961
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 18, 2023
c77a752
Fix api endpoints, body data, and cleanup
Beamanator Jan 18, 2023
45918a2
Clean up a lot
Beamanator Jan 18, 2023
8f19829
Merge branch 'main' of github.com:Expensify/App into georgia-new-avatars
Beamanator Jan 20, 2023
412fd1d
Allow google places to populate address field
Beamanator Jan 20, 2023
5ba4976
Update translation key
Beamanator Jan 20, 2023
974a83c
Add list of all countries for country picker
Beamanator Jan 20, 2023
ea79301
Address lint errors
Beamanator Jan 20, 2023
0304ea2
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 24, 2023
8bd87cd
Language updates
Beamanator Jan 24, 2023
080fbe8
Make dob vars match API
Beamanator Jan 24, 2023
b8742ab
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 24, 2023
b29fbcd
Make personal details routes reuse prefix
Beamanator Jan 24, 2023
db0a15e
Move United States name to const
Beamanator Jan 24, 2023
9985601
Comment updates
Beamanator Jan 24, 2023
326e883
Minor logic fix
Beamanator Jan 24, 2023
3de46a3
Merge branch 'beaman-createPersonalDetailsPages' of github.com:Expens…
Beamanator Jan 24, 2023
1cde4fb
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 25, 2023
2dd91d0
Lint fixes
Beamanator Jan 25, 2023
6be2bc4
A few error updates
Beamanator Jan 25, 2023
c7a5c21
Combine common invalid date error message
Beamanator Jan 25, 2023
956d419
Final bit of error message cleanup
Beamanator Jan 25, 2023
e1d06c7
Address lint errors
Beamanator Jan 25, 2023
986a72a
Please don't make me strangle anyone
Beamanator Jan 25, 2023
70dcd17
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 30, 2023
74405cf
Improve date validation errors
Beamanator Jan 31, 2023
cdd4ddc
Fix a few error messages
Beamanator Jan 31, 2023
f4bfe21
Add ability to cap address search at 50 characters
Beamanator Jan 31, 2023
ed38aa3
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Jan 31, 2023
8862174
Use standard moment date format for all platforms
Beamanator Jan 31, 2023
53e1b14
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Feb 1, 2023
7e8a139
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Feb 3, 2023
1f61517
Add scrollview to page
Beamanator Feb 3, 2023
8f3d0a9
(you saw nothing)
Beamanator Feb 3, 2023
bbf2e06
Fix country auto-population
Beamanator Feb 3, 2023
1cdb126
Merge branch 'main' of github.com:Expensify/App into beaman-createPer…
Beamanator Feb 6, 2023
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
255 changes: 255 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const ACTIVE_EXPENSIFY_URL = Url.addTrailingForwardSlash(lodashGet(Config, 'NEW_
const USE_EXPENSIFY_URL = 'https://use.expensify.com';
const PLATFORM_OS_MACOS = 'Mac OS';
const ANDROID_PACKAGE_NAME = 'com.expensify.chat';
const USA_COUNTRY_NAME = 'United States';

const CONST = {
ANDROID_PACKAGE_NAME,
Expand Down Expand Up @@ -840,6 +841,7 @@ const CONST = {
MAX_COMMENT_LENGTH: 15000,

FORM_CHARACTER_LIMIT: 50,
LEGAL_NAMES_CHARACTER_LIMIT: 150,
AVATAR_CROP_MODAL: {
// The next two constants control what is min and max value of the image crop scale.
// Values define in how many times the image can be bigger than its container.
Expand Down Expand Up @@ -907,6 +909,259 @@ const CONST = {

TFA_CODE_LENGTH: 6,
CHAT_ATTACHMENT_TOKEN_KEY: 'X-Chat-Attachment-Token',

USA_COUNTRY_NAME,
ALL_COUNTRIES: [
'Afghanistan',
'Aland Islands',
'Albania',
'Algeria',
'American Samoa',
Comment on lines +914 to +919

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to get spanish translation of all these 😬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I guess, we'll store only english value in storage.
Also, I would recommend adding a test to check that this list has equal number of entries in both english and Spanish translations and compare values at random indexes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm very true, I like those ideas - but also that got me thinking, we only show States in the StatePicker in English, right? Maybe a follow-up could be translating both of those?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, these countries should be in spanish if selected. Do we display states, countries right now? I don't think so

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed 1:1 - We don't display countries yet, states so far we only display the state two letter code, which probably doesn't have a translation 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a follow-up for this since I don't want to hold this PR back much longer: #14549

'Andorra',
'Angola',
'Anguilla',
'Antarctica',
'Antigua and Barbuda',
'Argentina',
'Armenia',
'Aruba',
'Australia',
'Austria',
'Azerbaijan',
'Bahamas',
'Bahrain',
'Bangladesh',
'Barbados',
'Belarus',
'Belgium',
'Belize',
'Benin',
'Bermuda',
'Bhutan',
'Bolivia',
'Bonaire, Saint Eustatius and Saba ',
'Bosnia and Herzegovina',
'Botswana',
'Bouvet Island',
'Brazil',
'British Indian Ocean Territory',
'British Virgin Islands',
'Brunei',
'Bulgaria',
'Burkina Faso',
'Burundi',
'Cambodia',
'Cameroon',
'Canada',
'Cape Verde',
'Cayman Islands',
'Central African Republic',
'Chad',
'Chile',
'China',
'Christmas Island',
'Cocos Islands',
'Colombia',
'Comoros',
'Cook Islands',
'Costa Rica',
'Croatia',
'Cuba',
'Curacao',
'Cyprus',
'Czech Republic',
'Democratic Republic of the Congo',
'Denmark',
'Djibouti',
'Dominica',
'Dominican Republic',
'East Timor',
'Ecuador',
'Egypt',
'El Salvador',
'Equatorial Guinea',
'Eritrea',
'Estonia',
'Ethiopia',
'Falkland Islands',
'Faroe Islands',
'Fiji',
'Finland',
'France',
'French Guiana',
'French Polynesia',
'French Southern Territories',
'Gabon',
'Gambia',
'Georgia',
'Germany',
'Ghana',
'Gibraltar',
'Greece',
'Greenland',
'Grenada',
'Guadeloupe',
'Guam',
'Guatemala',
'Guernsey',
'Guinea',
'Guinea-Bissau',
'Guyana',
'Haiti',
'Heard Island and McDonald Islands',
'Honduras',
'Hong Kong',
'Hungary',
'Iceland',
'India',
'Indonesia',
'Iran',
'Iraq',
'Ireland',
'Isle of Man',
'Israel',
'Italy',
'Ivory Coast',
'Jamaica',
'Japan',
'Jersey',
'Jordan',
'Kazakhstan',
'Kenya',
'Kiribati',
'Kosovo',
'Kuwait',
'Kyrgyzstan',
'Laos',
'Latvia',
'Lebanon',
'Lesotho',
'Liberia',
'Libya',
'Liechtenstein',
'Lithuania',
'Luxembourg',
'Macao',
'Macedonia',
'Madagascar',
'Malawi',
'Malaysia',
'Maldives',
'Mali',
'Malta',
'Marshall Islands',
'Martinique',
'Mauritania',
'Mauritius',
'Mayotte',
'Mexico',
'Micronesia',
'Moldova',
'Monaco',
'Mongolia',
'Montenegro',
'Montserrat',
'Morocco',
'Mozambique',
'Myanmar',
'Namibia',
'Nauru',
'Nepal',
'Netherlands',
'New Caledonia',
'New Zealand',
'Nicaragua',
'Niger',
'Nigeria',
'Niue',
'Norfolk Island',
'North Korea',
'Northern Mariana Islands',
'Norway',
'Oman',
'Pakistan',
'Palau',
'Palestinian Territory',
'Panama',
'Papua New Guinea',
'Paraguay',
'Peru',
'Philippines',
'Pitcairn',
'Poland',
'Portugal',
'Puerto Rico',
'Qatar',
'Republic of the Congo',
'Reunion',
'Romania',
'Russia',
'Rwanda',
'Saint Barthelemy',
'Saint Helena',
'Saint Kitts and Nevis',
'Saint Lucia',
'Saint Martin',
'Saint Pierre and Miquelon',
'Saint Vincent and the Grenadines',
'Samoa',
'San Marino',
'Sao Tome and Principe',
'Saudi Arabia',
'Senegal',
'Serbia',
'Seychelles',
'Sierra Leone',
'Singapore',
'Sint Maarten',
'Slovakia',
'Slovenia',
'Solomon Islands',
'Somalia',
'South Africa',
'South Georgia and the South Sandwich Islands',
'South Korea',
'South Sudan',
'Spain',
'Sri Lanka',
'Sudan',
'Suriname',
'Svalbard and Jan Mayen',
'Swaziland',
'Sweden',
'Switzerland',
'Syria',
'Taiwan',
'Tajikistan',
'Tanzania',
'Thailand',
'Togo',
'Tokelau',
'Tonga',
'Trinidad and Tobago',
'Tunisia',
'Turkey',
'Turkmenistan',
'Turks and Caicos Islands',
'Tuvalu',
'U.S. Virgin Islands',
'Uganda',
'Ukraine',
'United Arab Emirates',
'United Kingdom',
USA_COUNTRY_NAME,
'Uruguay',
'Uzbekistan',
'Vanuatu',
'Vatican',
'Venezuela',
'Vietnam',
'Wallis and Futuna',
'Western Sahara',
'Yemen',
'Zambia',
'Zimbabwe',
],
};

export default CONST;
6 changes: 6 additions & 0 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export default {
// Contains all the personalDetails the user has access to
PERSONAL_DETAILS: 'personalDetails',

// Contains all the private personal details of the user
PRIVATE_PERSONAL_DETAILS: 'private_personalDetails',

// Contains a list of all currencies available to the user - user can
// select a currency based on the list
CURRENCY_LIST: 'currencyList',
Expand Down Expand Up @@ -173,6 +176,9 @@ export default {
CLOSE_ACCOUNT_FORM: 'closeAccount',
PROFILE_SETTINGS_FORM: 'profileSettingsForm',
DISPLAY_NAME_FORM: 'displayNameForm',
LEGAL_NAME_FORM: 'legalNameForm',
DATE_OF_BIRTH_FORM: 'dateOfBirthForm',
HOME_ADDRESS_FORM: 'homeAddressForm',
NEW_ROOM_FORM: 'newRoomForm',
ROOM_SETTINGS_FORM: 'roomSettingsForm',
},
Expand Down
5 changes: 5 additions & 0 deletions src/ROUTES.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const IOU_DETAILS = 'iou/details';
const IOU_REQUEST_CURRENCY = `${IOU_REQUEST}/currency`;
const IOU_BILL_CURRENCY = `${IOU_BILL}/currency`;
const IOU_SEND_CURRENCY = `${IOU_SEND}/currency`;
const SETTINGS_PERSONAL_DETAILS = 'settings/profile/personal-details';

export default {
BANK_ACCOUNT: 'bank-account',
Expand Down Expand Up @@ -44,6 +45,10 @@ export default {
getSettingsAddLoginRoute: type => `settings/addlogin/${type}`,
SETTINGS_PAYMENTS_TRANSFER_BALANCE: 'settings/payments/transfer-balance',
SETTINGS_PAYMENTS_CHOOSE_TRANSFER_ACCOUNT: 'settings/payments/choose-transfer-account',
SETTINGS_PERSONAL_DETAILS,
SETTINGS_PERSONAL_DETAILS_LEGAL_NAME: `${SETTINGS_PERSONAL_DETAILS}/legal-name`,
SETTINGS_PERSONAL_DETAILS_DATE_OF_BIRTH: `${SETTINGS_PERSONAL_DETAILS}/date-of-birth`,
SETTINGS_PERSONAL_DETAILS_ADDRESS: `${SETTINGS_PERSONAL_DETAILS}/address`,
NEW_GROUP: 'new/group',
NEW_CHAT: 'new/chat',
REPORT,
Expand Down
Loading