-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove MoneyRequestConfirmPage #34947
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 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 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ import categoryPropTypes from '@components/categoryPropTypes'; | |
import HeaderWithBackButton from '@components/HeaderWithBackButton'; | ||
import * as Expensicons from '@components/Icon/Expensicons'; | ||
import MoneyRequestConfirmationList from '@components/MoneyTemporaryForRefactorRequestConfirmationList'; | ||
import {usePersonalDetails} from '@components/OnyxProvider'; | ||
import ScreenWrapper from '@components/ScreenWrapper'; | ||
import tagPropTypes from '@components/tagPropTypes'; | ||
import transactionPropTypes from '@components/transactionPropTypes'; | ||
|
@@ -23,7 +24,6 @@ import Navigation from '@libs/Navigation/Navigation'; | |
import * as OptionsListUtils from '@libs/OptionsListUtils'; | ||
import * as ReportUtils from '@libs/ReportUtils'; | ||
import * as TransactionUtils from '@libs/TransactionUtils'; | ||
import personalDetailsPropType from '@pages/personalDetailsPropType'; | ||
import reportPropTypes from '@pages/reportPropTypes'; | ||
import {policyPropTypes} from '@pages/workspace/withPolicy'; | ||
import * as IOU from '@userActions/IOU'; | ||
|
@@ -43,9 +43,6 @@ const propTypes = { | |
/** The personal details of the current user */ | ||
...withCurrentUserPersonalDetailsPropTypes, | ||
|
||
/** Personal details of all users */ | ||
personalDetails: personalDetailsPropType, | ||
|
||
/** The policy of the report */ | ||
...policyPropTypes, | ||
|
||
|
@@ -62,7 +59,6 @@ const propTypes = { | |
transaction: transactionPropTypes, | ||
}; | ||
const defaultProps = { | ||
personalDetails: {}, | ||
policy: {}, | ||
policyCategories: {}, | ||
policyTags: {}, | ||
|
@@ -72,7 +68,6 @@ const defaultProps = { | |
}; | ||
function IOURequestStepConfirmation({ | ||
currentUserPersonalDetails, | ||
personalDetails, | ||
policy, | ||
policyTags, | ||
policyCategories, | ||
|
@@ -86,6 +81,7 @@ function IOURequestStepConfirmation({ | |
const {translate} = useLocalize(); | ||
const {windowWidth} = useWindowDimensions(); | ||
const {isOffline} = useNetwork(); | ||
const personalDetails = usePersonalDetails() || CONST.EMPTY_OBJECT; | ||
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. All changes in this file come from #31076 (follow guideline: Replace all uses of the Old Component with the New Component) |
||
const [receiptFile, setReceiptFile] = useState(); | ||
const receiptFilename = lodashGet(transaction, 'filename'); | ||
const receiptPath = lodashGet(transaction, 'receipt.source'); | ||
|
@@ -385,12 +381,6 @@ export default compose( | |
withCurrentUserPersonalDetails, | ||
withWritableReportOrNotFound, | ||
withFullTransactionOrNotFound, | ||
withOnyx({ | ||
personalDetails: { | ||
key: ONYXKEYS.PERSONAL_DETAILS_LIST, | ||
}, | ||
}), | ||
// eslint-disable-next-line rulesdir/no-multiple-onyx-in-file | ||
withOnyx({ | ||
policy: { | ||
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${report ? report.policyID : '0'}`, | ||
|
Oops, something went wrong.
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.
This Route still be used in many places like MoneyRequestCategoryPage, MoneyRequestTagPage,... But all these places will be removed in this epic. So that I removed this route in this PR
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 see. We should change all of these places to navigate to the new route.
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.
OK so we are not using those components and they will be removed as well. We are good here.
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.
This caused a regression. The Send money flow still uses this route.
Screen.Recording.2024-01-29.at.12.39.40.AM.mov
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.
This crash is only temporary because we haven't migrated the rest of this refactor cleanup yet. I will create a new PR to temporarily fix those places to use the new route