Repository navigation
Fix: Uber invite navigation and press #70588
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
mountiny
merged 13 commits into
Expensify:main
from
callstack-internal:fix/waterim/uber-invite
Sep 17, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e4df966
update constant
waterim 50093e4
update editInvite
waterim 498e3f1
navigate to invites
waterim 98ad34a
update enabled
waterim 4599753
update policy param
waterim 58a927f
remove already added users from invite, add refresh on the disconnect
waterim b48b9fe
update enabled
waterim d4fddd6
update emailList
waterim 9aef7c2
revert link change
waterim 5aef19b
remove areReceiptPartnerEnabled
waterim 9c903b9
fix navigation
waterim d487cb2
add offline feedback to the invite button
waterim 8afe191
sort out only linked users
waterim 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
3 changes: 2 additions & 1 deletion
3
src/libs/API/parameters/InviteWorkspaceEmployeesToUberParams.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 |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| type InviteWorkspaceEmployeesToUberParams = { | ||
| policyID: string; | ||
| emails: string[]; | ||
| /** The list of emails to invite to Uber for Business in CSV format */ | ||
|
waterim marked this conversation as resolved.
Resolved
|
||
| emailList: string; | ||
| }; | ||
|
|
||
| export default InviteWorkspaceEmployeesToUberParams; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2925,12 +2925,12 @@ function inviteWorkspaceEmployeesToUber(policyID: string, emails: string[]) { | |
|
|
||
| const params: InviteWorkspaceEmployeesToUberParams = { | ||
| policyID, | ||
| emails, | ||
| emailList: emails.join(','), | ||
| }; | ||
|
|
||
| // Build optimistic employees mapping: mark invited emails as invited | ||
| const invitedEmployees = emails.reduce<Record<string, {status: string}>>((acc, email) => { | ||
| acc[email] = {status: 'invited'}; | ||
| acc[email] = {status: CONST.POLICY.RECEIPT_PARTNERS.UBER_EMPLOYEE_STATUS.INVITED}; | ||
| return acc; | ||
| }, {}); | ||
|
|
||
|
|
@@ -3707,9 +3707,11 @@ function enablePolicyReceiptPartners(policyID: string, enabled: boolean, shouldN | |
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`, | ||
| value: { | ||
| areReceiptPartnersEnabled: enabled, | ||
| pendingFields: { | ||
| areReceiptPartnersEnabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, | ||
| receiptPartners: { | ||
|
waterim marked this conversation as resolved.
Resolved
|
||
| enabled, | ||
| pendingFields: { | ||
| enabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, | ||
| }, | ||
|
Comment on lines
+3710
to
+3714
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change caused We should set |
||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -3719,8 +3721,10 @@ function enablePolicyReceiptPartners(policyID: string, enabled: boolean, shouldN | |
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`, | ||
| value: { | ||
| pendingFields: { | ||
| areReceiptPartnersEnabled: null, | ||
| receiptPartners: { | ||
| pendingFields: { | ||
| enabled: null, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -3730,9 +3734,11 @@ function enablePolicyReceiptPartners(policyID: string, enabled: boolean, shouldN | |
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`, | ||
| value: { | ||
| areReceiptPartnersEnabled: !enabled, | ||
| pendingFields: { | ||
| areReceiptPartnersEnabled: null, | ||
| receiptPartners: { | ||
| enabled: !enabled, | ||
| pendingFields: { | ||
| enabled: null, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
||
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we rename the const itself to reflect the key name? I understand that ARE_RECEIPT_PARTNERS_ENABLED suggest more of a boolean value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking to do that, but other namings are the same and decided to use the same pattern:
ARE_TAXES_ENABLED: 'tax' as an example