Repository navigation
Move attendees from transaction to transaction's comment
#58120
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
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6310773
fix transaction comment changes
allroundexperts 3e78fcd
fix type errors
allroundexperts b805797
prettier
allroundexperts e02b372
merge with main
allroundexperts 1562008
update attendees command
allroundexperts 50157df
Merge branch 'main' into fix-57717
allroundexperts e4832b3
re-add mobile exfy
allroundexperts d497b33
fix lint errors
allroundexperts 1257c8a
Merge branch 'main' into fix-57717
allroundexperts 40e161e
fix more lint
allroundexperts e7c96d8
fix last ts error
allroundexperts f9a5889
Merge branch 'main' into fix-57717
allroundexperts d052937
remove gitmodules changes
allroundexperts aa8a87b
fix incorrect modified expense message
allroundexperts 2ba5250
Merge branch 'main' into fix-57717
allroundexperts 19be7fd
Apply suggestions from code review
allroundexperts 4f5a193
add patch
allroundexperts 854bce0
fix ts error
allroundexperts 2c442bb
prettier
allroundexperts 65a1770
Merge branch 'main' into fix-57717
allroundexperts 36d0ffd
apply suggestion
allroundexperts 774c9c1
pass empty string
allroundexperts 6b55a24
add suggestion
allroundexperts 418c938
Apply suggestions from code review
allroundexperts 7ce704f
add key for list
allroundexperts 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -256,7 +256,7 @@ function buildOptimisticTransaction(params: BuildOptimisticTransactionParams): T | |
| // Because JS can only handle 53-bit numbers, transactionIDs are strings in the front-end (just like reportActionID) | ||
| const transactionID = existingTransactionID ?? NumberUtils.rand64(); | ||
|
|
||
| const commentJSON: Comment = {comment}; | ||
| const commentJSON: Comment = {comment, attendees}; | ||
| if (source) { | ||
| commentJSON.source = source; | ||
| } | ||
|
|
@@ -299,7 +299,6 @@ function buildOptimisticTransaction(params: BuildOptimisticTransactionParams): T | |
| taxAmount, | ||
| billable, | ||
| reimbursable, | ||
| attendees, | ||
| inserted: DateUtils.getDBTime(), | ||
| }; | ||
| } | ||
|
|
@@ -331,10 +330,10 @@ function isMerchantMissing(transaction: OnyxEntry<Transaction>) { | |
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| function shouldShowAttendees(iouType: IOUType, policy: OnyxEntry<Policy>): boolean { | ||
| return false; | ||
| // return false; | ||
| // To be renabled once feature is complete: https://github.com/Expensify/App/issues/44725 | ||
| // Keep this disabled for per diem expense | ||
| // return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM); | ||
| return iouType === CONST.IOU.TYPE.SUBMIT && !!policy?.id && (policy?.type === CONST.POLICY.TYPE.CORPORATE || policy?.type === CONST.POLICY.TYPE.TEAM); | ||
|
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. Not having |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -656,7 +655,7 @@ function getMerchantOrDescription(transaction: OnyxEntry<Transaction>) { | |
| * Return the list of modified attendees if present otherwise list of attendees | ||
| */ | ||
| function getAttendees(transaction: OnyxInputOrEntry<Transaction>): Attendee[] { | ||
| return transaction?.modifiedAttendees ? transaction.modifiedAttendees : transaction?.attendees ?? []; | ||
| return transaction?.modifiedAttendees ? transaction.modifiedAttendees : transaction?.comment?.attendees ?? []; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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
Oops, something went wrong.
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.
Should we return
falsehere before we merge it?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.
Nah, the rest is ready so let's go ahead and release this to everyone. We'd just need to clean up the commented code here, though I'm not going to block on this so we can get this deployed asap, and I'll clean up the commented code once this is on production.