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

Main personalDetailsList & policyMembers Onyx key migrations #20473

Merged
merged 199 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 197 commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
503794f
Start migrating personalDetails to *List
Beamanator Jun 6, 2023
759466a
Start personalDetails migration to *List
Beamanator Jun 6, 2023
a4ab800
Merge pull request #20323 from Expensify/beaman-startPersonalDetailsM…
puneetlath Jun 6, 2023
b94183a
Remove all uses of old personalDetails onyx key
Beamanator Jun 6, 2023
7a95a3a
Use accountID to get avatars
Beamanator Jun 6, 2023
410cb62
Update to new function name
Beamanator Jun 6, 2023
7f0a66d
Migrate email to accountID where possible
Beamanator Jun 6, 2023
54ecbcb
Update a few tests with accountID-keyed details
Beamanator Jun 6, 2023
b9d30ef
Fix lots of accountID tests
Beamanator Jun 6, 2023
e5bc39b
SidebarFilterTest fixed
burczu Jun 7, 2023
d547dab
SidebarOrderTest fixed
burczu Jun 7, 2023
588cb20
JSDoc fixed
burczu Jun 7, 2023
ef3d955
fix: start migration for getSearchOptions, getOptions and createOption
BeeMargarida Jun 7, 2023
e8b7f86
Merge pull request #20351 from burczu/beaman-continueMigration-fork
Beamanator Jun 7, 2023
5c395d0
fix: complete migration of some report utils to accountID
BeeMargarida Jun 7, 2023
5f5789b
fix: generate random accountID for users info not in Onyx
BeeMargarida Jun 7, 2023
8261127
Merge branch 'beaman-continueMigration' into migration-OptionsListUtils
BeeMargarida Jun 7, 2023
f18dd6c
New util to default displayName to hidden if unavailable
Beamanator Jun 7, 2023
cf0b245
fix: update ReportUtils to use accountID and fix tests
BeeMargarida Jun 7, 2023
9d30f05
fix: add notes and fix small issues
BeeMargarida Jun 7, 2023
3ca4e0d
style: prettier
BeeMargarida Jun 7, 2023
fde3aff
Merge pull request #20371 from BeeMargarida/migration-OptionsListUtils
Beamanator Jun 7, 2023
156deff
Update a few tests
Beamanator Jun 7, 2023
fe62c42
Merge branch 'beaman-continueMigration' of github.com:Expensify/App i…
Beamanator Jun 7, 2023
9a70430
Clean up session key subscription
Beamanator Jun 7, 2023
f376593
Add new policy members key
neil-marcellini Jun 7, 2023
1d585b7
workspaces list with policy members by accountID
neil-marcellini Jun 7, 2023
c74be2c
Avatar with policy members by accountID
neil-marcellini Jun 7, 2023
0348e22
Settings page with policy members by accountID
neil-marcellini Jun 7, 2023
dda26cb
Migrate to new optionslistutil
Beamanator Jun 7, 2023
5bd48f8
Migrate to accountID & simplify
Beamanator Jun 7, 2023
60db587
withPolicy HOC members by accountID
neil-marcellini Jun 7, 2023
eae14eb
Workspace page with members by accountID
neil-marcellini Jun 7, 2023
97bf498
Merge branch 'beaman-continueMigration' into neil-collection-policy-m…
neil-marcellini Jun 7, 2023
7e77b01
Lots of accountID migrations
Beamanator Jun 7, 2023
f141c28
A few more small migrations
Beamanator Jun 7, 2023
637cce2
Merge branch 'beaman-continueMigration' into neil-collection-policy-m…
neil-marcellini Jun 7, 2023
fd201cd
Add most expensify-email accountIDs
Beamanator Jun 7, 2023
73cdf02
More migration to report participantAccountIDs
Beamanator Jun 7, 2023
60b1463
Add missing comma
Beamanator Jun 7, 2023
3d577f5
Get policy member details by accountID
neil-marcellini Jun 7, 2023
43d050a
Fix get workspace members when keyed by accountID
neil-marcellini Jun 7, 2023
083c8a8
A few more updates
Beamanator Jun 7, 2023
5204d4c
Set selected employees with members by accountIDs
neil-marcellini Jun 7, 2023
b5c20b7
Update needed hoc
Beamanator Jun 7, 2023
2eaabb8
Update personal details
Beamanator Jun 7, 2023
40aaaad
A few little fixes
Beamanator Jun 7, 2023
d580e30
Fix lint issues
Beamanator Jun 7, 2023
7f981d8
Fix report action item avatars
Beamanator Jun 7, 2023
75e0030
Remove unused var
Beamanator Jun 7, 2023
13de4af
Fix race condition
Beamanator Jun 7, 2023
a1509a8
Fix some report utils tests
Beamanator Jun 7, 2023
10176c4
A bit more updates
Beamanator Jun 7, 2023
c3497ff
Fix a few more tests
Beamanator Jun 7, 2023
651309a
Fix sidebar filter tests
Beamanator Jun 7, 2023
f141959
Create util to get emails from policy members
neil-marcellini Jun 7, 2023
6dd4a1a
Workspace invite with policy members by accountID
neil-marcellini Jun 7, 2023
bde9682
Use new util to get policy member emails
neil-marcellini Jun 7, 2023
fc38685
Map member emails to accountIDs for easy access
neil-marcellini Jun 8, 2023
8d9c4eb
Remove policy members optimistically by accountID
neil-marcellini Jun 8, 2023
e55550d
policyMembers is actually allPolicyMembers
neil-marcellini Jun 8, 2023
bac0a50
Rename to allPolicyMembers and update prop type
neil-marcellini Jun 8, 2023
ed057cc
WIP invitedEmailsToAccountIDs
neil-marcellini Jun 8, 2023
1e97491
Many iOU updates
Beamanator Jun 8, 2023
dde8e89
Merge pull request #20397 from Expensify/neil-collection-policy-members
Beamanator Jun 8, 2023
5a8eb95
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 8, 2023
f3745b6
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 8, 2023
b419252
Merge branch 'beaman-continueMigration' of github.com:Expensify/App i…
Beamanator Jun 8, 2023
fe3d585
More iOU updates
Beamanator Jun 8, 2023
3754886
A bit of cleanup
Beamanator Jun 8, 2023
7fe728c
Many task edits
Beamanator Jun 8, 2023
69939e8
Fix iOU test and more migration
Beamanator Jun 8, 2023
79cca49
Fix reportUtilsTest
Beamanator Jun 8, 2023
1762fbe
Merge pull request #20328 from Expensify/beaman-continueMigration
neil-marcellini Jun 8, 2023
2f518a5
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 8, 2023
8a480fc
Get email domains from personalDetails
Beamanator Jun 8, 2023
859b80b
Fix up some lint and task issues
Beamanator Jun 8, 2023
30b87f9
Remove console log
Beamanator Jun 8, 2023
8d67b14
A bit more cleanup
Beamanator Jun 8, 2023
5ea8f9e
Lintey lintey fixey fixey
Beamanator Jun 8, 2023
63c2cb1
Add missing dependency
Beamanator Jun 8, 2023
1a5b372
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 8, 2023
5f3c1b9
prettify
Beamanator Jun 8, 2023
b8f7302
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 8, 2023
af67818
Finish Optimistic add policy members by accountIDs
neil-marcellini Jun 8, 2023
e8ed324
Clear member errors by accountID
neil-marcellini Jun 8, 2023
716b563
Fix using emails as icon name
Beamanator Jun 8, 2023
2de625c
Remove policy member list from createWorkspace
neil-marcellini Jun 8, 2023
56cdc66
Remove deprecated policy member list key entirely
neil-marcellini Jun 8, 2023
6f727cb
Use new onyx key because of hoc
Beamanator Jun 8, 2023
d9f872a
Fix some default avatars
Beamanator Jun 8, 2023
3943090
Prop type and other fixes
Beamanator Jun 8, 2023
3a79cec
Use accountIDs length for consistency
neil-marcellini Jun 8, 2023
13163da
Fix race condition
Beamanator Jun 8, 2023
ff50c08
Fix avatar on initial settings page
Beamanator Jun 8, 2023
c87100b
Prettify my changes
neil-marcellini Jun 8, 2023
1486fa4
Add accountID to options
Beamanator Jun 8, 2023
aa2fa9f
A few proptype fixes
Beamanator Jun 8, 2023
83a2ad2
lawl
Beamanator Jun 8, 2023
a609cd8
Fix member emails to accountIDs
neil-marcellini Jun 8, 2023
99a300a
Get avatars by accountIDs for member invite
neil-marcellini Jun 8, 2023
87987b2
Send array of accountIDs to openReport
Beamanator Jun 8, 2023
0f1b61d
Fix race condition
Beamanator Jun 8, 2023
2b2fc3e
Fix invite user, get accountID from option
neil-marcellini Jun 8, 2023
86d6f5b
using personalDetails in getDisplayNamesWithTooltips
burczu Jun 9, 2023
8099f81
using personalDetails in buildOptimisticIOUReport
burczu Jun 9, 2023
d85b9d6
fix: search by accountID in participants
BeeMargarida Jun 9, 2023
346c374
fix: getClientPolicyMemberEmailsToAccountIDs
BeeMargarida Jun 9, 2023
90a5ba8
todo from removeUsers method of WorkspaceMembersPage addressed
burczu Jun 9, 2023
decad9e
prettier + lint applied
burczu Jun 9, 2023
f16bb61
casting to number reverted
burczu Jun 9, 2023
f1c9047
Merge pull request #20508 from BeeMargarida/beemargarida/personalDeta…
Beamanator Jun 9, 2023
bdb6cc2
Merge pull request #20506 from burczu/personalDetails-migration-todos
Beamanator Jun 9, 2023
ec1e2f5
Add optimistic data to options
Beamanator Jun 9, 2023
f5d92e0
Separate optimistic account data in openReport function
Beamanator Jun 9, 2023
38ff349
Pass optimistic accounts to openReport
Beamanator Jun 9, 2023
799dd86
Add placeholder params and TODOs
Beamanator Jun 9, 2023
85479fd
Send only login list to backend for opening report
Beamanator Jun 9, 2023
c59de73
Fix openReport use
Beamanator Jun 9, 2023
a355363
Fix excluding valid members or expensify emails
neil-marcellini Jun 9, 2023
c5781ae
Merge branch 'personalDetailsList-migration' into neil-policy-members…
neil-marcellini Jun 9, 2023
6eeaefd
Fix avatar for members with errors
neil-marcellini Jun 9, 2023
1b61ad3
fix: fix empty search option when searching for new users
BeeMargarida Jun 12, 2023
4d58410
style: prettier + lint
BeeMargarida Jun 12, 2023
f71c7e4
Update personal detail utils
Beamanator Jun 12, 2023
97114d8
Use correct var
Beamanator Jun 12, 2023
d8f0eb9
fix: comment
BeeMargarida Jun 12, 2023
ac2040d
Merge pull request #20576 from BeeMargarida/fix/personalDetailsList-m…
Beamanator Jun 12, 2023
550c0ce
Merge pull request #20482 from Expensify/neil-policy-members-migration
Beamanator Jun 12, 2023
37050f7
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 12, 2023
2ac7d95
Use new var
Beamanator Jun 12, 2023
a602bc2
prettify
Beamanator Jun 12, 2023
6d4340c
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 12, 2023
b376e23
lint & prettier updates
Beamanator Jun 12, 2023
f8d8a87
Merge pull request #20547 from Expensify/beaman-handleOptimisticRepor…
Beamanator Jun 12, 2023
b755ac7
Merge pull request #20474 from Expensify/beaman-migrateExpensifyGuide…
Beamanator Jun 12, 2023
d28efb2
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 12, 2023
9650f74
Optimistically add default avatar URL, not svg
Beamanator Jun 12, 2023
201577c
use accountID in onyx
Beamanator Jun 12, 2023
f4638f3
Force a lot of accountIDs to be numbers
Beamanator Jun 12, 2023
41e72cc
Fix another place accountIDs can be strings
Beamanator Jun 12, 2023
26ca405
Force accountID to be number
Beamanator Jun 12, 2023
4a73b22
Prettier wants multi-line
Beamanator Jun 12, 2023
e5e6fbf
Show correct avatar in shareCodePage
Beamanator Jun 13, 2023
282e54d
fix: add optimistic personal details on report creation
BeeMargarida Jun 13, 2023
02eaef4
casting to number added
burczu Jun 13, 2023
bb176dc
Merge pull request #20662 from burczu/personalDetails-migration_bug-3
Beamanator Jun 13, 2023
314a87d
fix: add missing concierge login in getPersonalDetailsForAccountID
BeeMargarida Jun 13, 2023
b3b2baf
Merge pull request #20665 from BeeMargarida/personalDetailsList-migra…
mountiny Jun 13, 2023
ad97971
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 13, 2023
ce1cf17
Merge branch 'personalDetailsList-migration' of github.com:Expensify/…
Beamanator Jun 13, 2023
b0fe64d
Remove old function
Beamanator Jun 13, 2023
f115431
setting lastActorAccountID in the optimistic report
burczu Jun 13, 2023
5214306
missing accountID value fixed
burczu Jun 13, 2023
d26ec82
Force more accountIDs to be numbers
Beamanator Jun 13, 2023
61e9a3b
Merge branch 'personalDetailsList-migration' into personalDetailsList…
BeeMargarida Jun 13, 2023
bb67aeb
duplications removed
burczu Jun 13, 2023
3bf8dc3
casting to string added
burczu Jun 13, 2023
d1b2f47
tests fixed
burczu Jun 13, 2023
16f687a
switched to use number type for accountID in ReportActionItemFragment
burczu Jun 13, 2023
dd6dfd2
Merge pull request #20668 from burczu/personalDetails-migration_bug-4
Beamanator Jun 13, 2023
251b8a1
fix: add avatar and account ID to optimistic personal details
BeeMargarida Jun 13, 2023
b752d1f
Merge branch 'personalDetailsList-migration' into personalDetailsList…
BeeMargarida Jun 13, 2023
c5320ac
Generate numbers for accountIDs
Beamanator Jun 13, 2023
d7571a3
Merge pull request #20661 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 13, 2023
bad8cb4
Fix jsdoc
Beamanator Jun 13, 2023
64c7125
Store URL, not svg in onyx
Beamanator Jun 13, 2023
dd3bfd7
Compare accountID to concierge accountID
Beamanator Jun 13, 2023
1faa94b
fix: send money IOU problem
BeeMargarida Jun 13, 2023
c840d82
fix: use recipientAccountID
BeeMargarida Jun 13, 2023
0c8f2d4
fix: use accountID in canShowReportRecipientLocalTime
BeeMargarida Jun 13, 2023
d416032
fix: lint
BeeMargarida Jun 13, 2023
b1add93
style: prettier
BeeMargarida Jun 13, 2023
3397b76
Merge pull request #20691 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 13, 2023
e549f6d
Merge branch 'personalDetailsList-migration' into personalDetailsList…
BeeMargarida Jun 13, 2023
a166ad7
fix: same fix for request money and split bill
BeeMargarida Jun 13, 2023
4fdc8db
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 14, 2023
019af1f
Merge branch 'personalDetailsList-migration' into personalDetailsList…
BeeMargarida Jun 14, 2023
b7844c3
refactor: newline before comment
BeeMargarida Jun 14, 2023
dc168d2
fix: remove required from avatar and display name (anon users don't h…
BeeMargarida Jun 14, 2023
ffea89a
Merge pull request #20679 from BeeMargarida/personalDetailsList-migra…
mountiny Jun 14, 2023
8d17486
fix: wrong parameters passed in addPolicyReport
BeeMargarida Jun 14, 2023
dcfa3c2
Merge pull request #20748 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 14, 2023
92394a8
fix: use account IDs addPolicyReport
BeeMargarida Jun 14, 2023
37ca5c4
Merge pull request #20750 from BeeMargarida/personalDetailsList-migra…
mountiny Jun 14, 2023
43b6ebf
fix: IOU report header and undefined in money request LHN
BeeMargarida Jun 14, 2023
ee294de
Merge pull request #20752 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 14, 2023
d868df8
revert: fallback for getDisplayNameForParticipant
BeeMargarida Jun 14, 2023
d6beb85
Merge pull request #20753 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 14, 2023
b081aa8
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 14, 2023
d63c7c4
fix: setContactMethodAsDefault use accountID
BeeMargarida Jun 15, 2023
2d99090
fix: remove unnecessary spread
BeeMargarida Jun 15, 2023
961d93c
A few accountID updates
Beamanator Jun 15, 2023
0792bc1
fix: use accountIDs as numbers in react methods
BeeMargarida Jun 15, 2023
8b2e680
Merge pull request #20792 from BeeMargarida/personalDetailsList-migra…
Beamanator Jun 15, 2023
b074a57
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Beamanator Jun 15, 2023
b30a6dd
A bit of code cleanup
Beamanator Jun 15, 2023
320bcca
More cleanup & adding consts
Beamanator Jun 15, 2023
ff4df6b
Use correct consts and functions for expensify emails
Beamanator Jun 15, 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
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@ USE_WEB_PROXY=false
USE_WDYR=false
CAPTURE_METRICS=false
ONYX_METRICS=false

EXPENSIFY_ACCOUNT_ID_ACCOUNTING=-1
EXPENSIFY_ACCOUNT_ID_ADMIN=-1
EXPENSIFY_ACCOUNT_ID_BILLS=-1
EXPENSIFY_ACCOUNT_ID_CHRONOS=-1
EXPENSIFY_ACCOUNT_ID_CONCIERGE=-1
EXPENSIFY_ACCOUNT_ID_CONTRIBUTORS=-1
EXPENSIFY_ACCOUNT_ID_FIRST_RESPONDER=-1
EXPENSIFY_ACCOUNT_ID_HELP=-1
EXPENSIFY_ACCOUNT_ID_INTEGRATION_TESTING_CREDS=-1
EXPENSIFY_ACCOUNT_ID_PAYROLL=-1
EXPENSIFY_ACCOUNT_ID_QA=-1
EXPENSIFY_ACCOUNT_ID_QA_TRAVIS=-1
EXPENSIFY_ACCOUNT_ID_RECEIPTS=-1
EXPENSIFY_ACCOUNT_ID_REWARDS=-1
EXPENSIFY_ACCOUNT_ID_STUDENT_AMBASSADOR=-1
EXPENSIFY_ACCOUNT_ID_SVFG=-1
77 changes: 58 additions & 19 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,22 +862,41 @@ const CONST = {
LHN_SKELETON_VIEW_ITEM_HEIGHT: 64,
EXPENSIFY_PARTNER_NAME: 'expensify.com',
EMAIL: {
CONCIERGE: 'concierge@expensify.com',
HELP: 'help@expensify.com',
RECEIPTS: 'receipts@expensify.com',
ACCOUNTING: 'accounting@expensify.com',
ADMIN: 'admin@expensify.com',
BILLS: 'bills@expensify.com',
CHRONOS: '[email protected]',
QA: 'qa@expensify.com',
CONCIERGE: 'concierge@expensify.com',
CONTRIBUTORS: '[email protected]',
FIRST_RESPONDER: '[email protected]',
GUIDES_DOMAIN: 'team.expensify.com',
HELP: '[email protected]',
INTEGRATION_TESTING_CREDS: '[email protected]',
PAYROLL: '[email protected]',
QA: '[email protected]',
QA_TRAVIS: '[email protected]',
BILLS: 'bills@expensify.com',
RECEIPTS: 'receipts@expensify.com',
STUDENT_AMBASSADOR: '[email protected]',
ACCOUNTING: '[email protected]',
PAYROLL: '[email protected]',
SVFG: '[email protected]',
INTEGRATION_TESTING_CREDS: '[email protected]',
ADMIN: '[email protected]',
GUIDES_DOMAIN: 'team.expensify.com',
},

ACCOUNT_ID: {
ACCOUNTING: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_ACCOUNTING', 9645353)),
ADMIN: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_ADMIN', -1)),
BILLS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_BILLS', 1371)),
CHRONOS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_CHRONOS', 10027416)),
CONCIERGE: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_CONCIERGE', 8392101)),
CONTRIBUTORS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_CONTRIBUTORS', 9675014)),
FIRST_RESPONDER: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_FIRST_RESPONDER', 9375152)),
HELP: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_HELP', -1)),
INTEGRATION_TESTING_CREDS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_INTEGRATION_TESTING_CREDS', -1)),
PAYROLL: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_PAYROLL', 9679724)),
QA: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_QA', 3126513)),
QA_TRAVIS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_QA_TRAVIS', 8595733)),
RECEIPTS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_RECEIPTS', -1)),
REWARDS: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_REWARDS', 11023767)), // [email protected]
STUDENT_AMBASSADOR: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_STUDENT_AMBASSADOR', 10476956)),
SVFG: Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_SVFG', 2012843)),
},

ENVIRONMENT: {
Expand Down Expand Up @@ -1166,21 +1185,41 @@ const CONST = {
},
get EXPENSIFY_EMAILS() {
return [
this.EMAIL.CONCIERGE,
this.EMAIL.HELP,
this.EMAIL.RECEIPTS,
this.EMAIL.ACCOUNTING,
this.EMAIL.ADMIN,
this.EMAIL.BILLS,
this.EMAIL.CHRONOS,
this.EMAIL.QA,
this.EMAIL.CONCIERGE,
this.EMAIL.CONTRIBUTORS,
this.EMAIL.FIRST_RESPONDER,
this.EMAIL.HELP,
this.EMAIL.INTEGRATION_TESTING_CREDS,
this.EMAIL.PAYROLL,
this.EMAIL.QA,
this.EMAIL.QA_TRAVIS,
this.EMAIL.BILLS,
this.EMAIL.RECEIPTS,
this.EMAIL.STUDENT_AMBASSADOR,
this.EMAIL.ACCOUNTING,
this.EMAIL.PAYROLL,
this.EMAIL.SVFG,
this.EMAIL.INTEGRATION_TESTING_CREDS,
this.EMAIL.ADMIN,
];
},
get EXPENSIFY_ACCOUNT_IDS() {
return [
this.ACCOUNT_ID.ACCOUNTING,
this.ACCOUNT_ID.ADMIN,
this.ACCOUNT_ID.BILLS,
this.ACCOUNT_ID.CHRONOS,
this.ACCOUNT_ID.CONCIERGE,
this.ACCOUNT_ID.CONTRIBUTORS,
this.ACCOUNT_ID.FIRST_RESPONDER,
this.ACCOUNT_ID.HELP,
this.ACCOUNT_ID.INTEGRATION_TESTING_CREDS,
this.ACCOUNT_ID.PAYROLL,
this.ACCOUNT_ID.QA,
this.ACCOUNT_ID.QA_TRAVIS,
this.ACCOUNT_ID.RECEIPTS,
this.ACCOUNT_ID.REWARDS,
this.ACCOUNT_ID.STUDENT_AMBASSADOR,
this.ACCOUNT_ID.SVFG,
];
},

Expand Down
5 changes: 1 addition & 4 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ export default {
// Has information about the network status (offline/online)
NETWORK: 'network',

// Contains all the personalDetails the user has access to
PERSONAL_DETAILS: 'personalDetails',

// Contains all the personalDetails the user has access to, keyed by accountID
PERSONAL_DETAILS_LIST: 'personalDetailsList',

Expand Down Expand Up @@ -113,7 +110,7 @@ export default {
COLLECTION: {
DOWNLOAD: 'download_',
POLICY: 'policy_',
POLICY_MEMBER_LIST: 'policyMemberList_',
POLICY_MEMBERS: 'policyMembers_',
WORKSPACE_INVITE_MEMBERS_DRAFT: 'workspaceInviteMembersDraft_',
REPORT: 'report_',
REPORT_ACTIONS: 'reportActions_',
Expand Down
13 changes: 7 additions & 6 deletions src/components/ArchivedReportFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as ReportUtils from '../libs/ReportUtils';
import reportPropTypes from '../pages/reportPropTypes';
import * as ReportActionsUtils from '../libs/ReportActionsUtils';
import styles from '../styles/styles';
import * as PersonalDetailsUtils from '../libs/PersonalDetailsUtils';

const propTypes = {
/** The reason this report was archived */
Expand Down Expand Up @@ -49,14 +50,14 @@ const defaultProps = {

function ArchivedReportFooter(props) {
const archiveReason = lodashGet(props.reportClosedAction, 'originalMessage.reason', CONST.REPORT.ARCHIVE_REASON.DEFAULT);
let displayName = lodashGet(props.personalDetails, `${props.report.ownerEmail}.displayName`, props.report.ownerEmail);
let displayName = PersonalDetailsUtils.getDisplayNameOrDefault(props.personalDetails, [props.report.ownerAccountID, 'displayName'], props.report.ownerEmail);

let oldDisplayName;
if (archiveReason === CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED) {
const newLogin = props.reportClosedAction.originalMessage.newLogin;
const oldLogin = props.reportClosedAction.originalMessage.oldLogin;
displayName = lodashGet(props.personalDetails, `${newLogin}.displayName`, newLogin);
oldDisplayName = lodashGet(props.personalDetails, `${oldLogin}.displayName`, oldLogin);
const newAccountID = props.reportClosedAction.originalMessage.newAccountID;
const oldAccountID = props.reportClosedAction.originalMessage.oldAccountID;
displayName = PersonalDetailsUtils.getDisplayNameOrDefault(props.personalDetails, [newAccountID, 'displayName']);
oldDisplayName = PersonalDetailsUtils.getDisplayNameOrDefault(props.personalDetails, [oldAccountID, 'displayName']);
}

return (
Expand All @@ -81,7 +82,7 @@ export default compose(
withLocalize,
withOnyx({
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS,
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
reportClosedAction: {
key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`,
Expand Down
6 changes: 3 additions & 3 deletions src/components/AvatarWithDisplayName.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ const defaultProps = {
};

function AvatarWithDisplayName(props) {
const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerEmail, true);
const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerAccountID, true);
const subtitle = ReportUtils.getChatRoomSubtitle(props.report);
const isExpenseReport = ReportUtils.isExpenseReport(props.report);
const icons = ReportUtils.getIcons(props.report, props.personalDetails, props.policies);
const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForLogins([props.report.ownerEmail], props.personalDetails);
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(ownerPersonalDetails, false);
const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs([props.report.ownerAccountID], props.personalDetails);
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(_.values(ownerPersonalDetails), false);
const avatarContainerStyle = StyleUtils.getEmptyAvatarStyle(props.size) || styles.emptyAvatar;
return (
<View style={[styles.appContentHeaderTitle, styles.flex1]}>
Expand Down
12 changes: 6 additions & 6 deletions src/components/AvatarWithIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const propTypes = {
/* Onyx Props */

/** The employee list of all policies (coming from Onyx) */
policiesMemberList: PropTypes.objectOf(policyMemberPropType),
allPolicyMembers: PropTypes.objectOf(PropTypes.objectOf(policyMemberPropType)),

/** All the user's policies (from Onyx via withFullPolicy) */
policies: PropTypes.objectOf(policyPropTypes.policy),
Expand Down Expand Up @@ -62,7 +62,7 @@ const propTypes = {
const defaultProps = {
tooltipText: '',
reimbursementAccount: {},
policiesMemberList: {},
allPolicyMembers: {},
policies: {},
bankAccountList: {},
cardList: {},
Expand All @@ -75,7 +75,7 @@ function AvatarWithIndicator(props) {
// If a policy was just deleted from Onyx, then Onyx will pass a null value to the props, and
// those should be cleaned out before doing any error checking
const cleanPolicies = _.pick(props.policies, (policy) => policy);
const cleanPolicyMembers = _.pick(props.policiesMemberList, (member) => member);
const cleanAllPolicyMembers = _.pick(props.allPolicyMembers, (policyMembers) => policyMembers);

// All of the error & info-checking methods are put into an array. This is so that using _.some() will return
// early as soon as the first error / info condition is returned. This makes the checks very efficient since
Expand All @@ -85,7 +85,7 @@ function AvatarWithIndicator(props) {
() => PaymentMethods.hasPaymentMethodError(props.bankAccountList, props.cardList),
() => _.some(cleanPolicies, PolicyUtils.hasPolicyError),
() => _.some(cleanPolicies, PolicyUtils.hasCustomUnitsError),
() => _.some(cleanPolicyMembers, PolicyUtils.hasPolicyMemberError),
() => _.some(cleanAllPolicyMembers, PolicyUtils.hasPolicyMemberError),
() => !_.isEmpty(props.reimbursementAccount.errors),
() => UserUtils.hasLoginListError(props.loginList),

Expand Down Expand Up @@ -114,8 +114,8 @@ AvatarWithIndicator.propTypes = propTypes;
AvatarWithIndicator.displayName = 'AvatarWithIndicator';

export default withOnyx({
policiesMemberList: {
key: ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST,
allPolicyMembers: {
key: ONYXKEYS.COLLECTION.POLICY_MEMBERS,
},
policies: {
key: ONYXKEYS.COLLECTION.POLICY,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DisplayNames/displayNamesPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const propTypes = {
displayName: PropTypes.string,

/** The Account ID for the tooltip */
accountID: PropTypes.string,
accountID: PropTypes.number,

/** The login for the tooltip fallback */
login: PropTypes.string,
Expand Down
8 changes: 4 additions & 4 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ function MoneyRequestHeader(props) {
const moneyRequestReport = props.isSingleTransactionView ? props.parentReport : props.report;
const isSettled = ReportUtils.isSettled(moneyRequestReport.reportID);
const isExpenseReport = ReportUtils.isExpenseReport(moneyRequestReport);
const payeeName = isExpenseReport ? ReportUtils.getPolicyName(moneyRequestReport, props.policies) : ReportUtils.getDisplayNameForParticipant(moneyRequestReport.managerEmail);
const payeeName = isExpenseReport ? ReportUtils.getPolicyName(moneyRequestReport, props.policies) : ReportUtils.getDisplayNameForParticipant(moneyRequestReport.managerID);
const payeeAvatar = isExpenseReport
? ReportUtils.getWorkspaceAvatar(moneyRequestReport)
: UserUtils.getAvatar(lodashGet(props.personalDetails, [moneyRequestReport.managerEmail, 'avatar']), moneyRequestReport.managerEmail);
: UserUtils.getAvatar(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'avatar']), moneyRequestReport.managerID);
const policy = props.policies[`${ONYXKEYS.COLLECTION.POLICY}${props.report.policyID}`];
const isPayer =
Policy.isAdminOfFreePolicy([policy]) || (ReportUtils.isMoneyRequestReport(moneyRequestReport) && lodashGet(props.session, 'email', null) === moneyRequestReport.managerEmail);
Policy.isAdminOfFreePolicy([policy]) || (ReportUtils.isMoneyRequestReport(moneyRequestReport) && lodashGet(props.session, 'accountID', null) === moneyRequestReport.managerID);
const shouldShowSettlementButton = !isSettled && !props.isSingleTransactionView && isPayer;
const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport);
const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerEmail, 'payPalMeAddress']));
const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'payPalMeAddress']));
return (
<View style={[{backgroundColor: themeColors.highlightBG}, styles.pl0]}>
<HeaderWithBackButton
Expand Down
2 changes: 1 addition & 1 deletion src/components/MultipleAvatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function MultipleAvatars(props) {
let avatarContainerStyles = props.size === CONST.AVATAR_SIZE.SMALL ? [styles.emptyAvatarSmall, styles.emptyAvatarMarginSmall] : [styles.emptyAvatar, styles.emptyAvatarMargin];
const singleAvatarStyles = props.size === CONST.AVATAR_SIZE.SMALL ? styles.singleAvatarSmall : styles.singleAvatar;
const secondAvatarStyles = [props.size === CONST.AVATAR_SIZE.SMALL ? styles.secondAvatarSmall : styles.secondAvatar, ...props.secondAvatarStyle];
const tooltipTexts = props.shouldShowTooltip ? _.pluck(props.icons, 'name') : [];
const tooltipTexts = props.shouldShowTooltip ? _.pluck(props.icons, 'name') : [''];

if (!props.icons.length) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/components/OnyxProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ComposeProviders from './ComposeProviders';
// Set up any providers for individual keys. This should only be used in cases where many components will subscribe to
// the same key (e.g. FlatList renderItem components)
const [withNetwork, NetworkProvider, NetworkContext] = createOnyxContext(ONYXKEYS.NETWORK, {});
const [withPersonalDetails, PersonalDetailsProvider] = createOnyxContext(ONYXKEYS.PERSONAL_DETAILS);
const [withPersonalDetails, PersonalDetailsProvider] = createOnyxContext(ONYXKEYS.PERSONAL_DETAILS_LIST);
const [withCurrentDate, CurrentDateProvider] = createOnyxContext(ONYXKEYS.CURRENT_DATE);
const [withReportActionsDrafts, ReportActionsDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS);
const [withBlockedFromConcierge, BlockedFromConciergeProvider] = createOnyxContext(ONYXKEYS.NVP_BLOCKED_FROM_CONCIERGE);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Reactions/ReactionTooltipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const propTypes = {
/**
* A list of account IDs to display in the tooltip.
*/
accountIDs: PropTypes.arrayOf(PropTypes.string).isRequired,
accountIDs: PropTypes.arrayOf(PropTypes.number).isRequired,

...withCurrentUserPersonalDetailsPropTypes,
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/Reactions/ReportActionItemReactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function ReportActionItemReactions(props) {
>
{_.map(reactionsWithCount, (reaction) => {
const reactionCount = reaction.users.length;
const reactionUsers = _.map(reaction.users, (sender) => sender.accountID.toString());
const reactionUsers = _.map(reaction.users, (sender) => sender.accountID);
const emoji = _.find(emojis, (e) => e.name === reaction.emoji);
const emojiCodes = EmojiUtils.getUniqueEmojiCodes(emoji, reaction.users);
const hasUserReacted = Report.hasAccountIDReacted(props.currentUserPersonalDetails.accountID, reactionUsers);
Expand All @@ -80,7 +80,7 @@ function ReportActionItemReactions(props) {
currentUserPersonalDetails={props.currentUserPersonalDetails}
/>
)}
renderTooltipContentKey={[...reactionUsers, ...emojiCodes]}
renderTooltipContentKey={[..._.map(reactionUsers, (user) => user.toString()), ...emojiCodes]}
key={reaction.emoji}
>
<View>
Expand Down
Loading