-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Stop using MY_PERSONAL_DETAILS and only use PERSONAL_DETAILS in Onyx #9560
Merged
Merged
Changes from 21 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
1a05abf
Refactor AuthScreens.js to use PERSONAL_DETAILS instead of MY_PERSONA…
puneetlath 8b67fd9
Flag wich details in the personalDetails object belong to the current…
puneetlath 98092d7
Update AuthScreen.js to look for new isCurrentUser flag
puneetlath 09fe20d
Update Report.js to use PERSONAL_DETAILS instead of MY_PERSONAL_DETAILS
puneetlath 413872f
Replace semicolon that was supposed to be comma
puneetlath dc7170b
Refactor ReportActionCompose.js to use PERSONAL_DETAILS instead of MY…
puneetlath 630e90e
Refactor RequestCallPage.js to use PERSONAL_DETAILS instead of MY_PER…
puneetlath c6a6d82
Refactor DateUtils.js to use PERSONAL_DETAILS instead of MY_PERSONAL_…
puneetlath 9aa4772
Refactor EnablePayments.js to use PERSONAL_DETAILS instead of MY_PERS…
puneetlath a65ca25
Refactor IOUModal.js to use PERSONAL_DETAILS instead of MY_PERSONAL_D…
puneetlath c3ba3b0
Refactor IOUCurrencySelection.js to use PERSONAL_DETAILS instead of M…
puneetlath b1a1eb7
Refactor SidebarLinks.js to use PERSONAL_DETAILS instead of MY_PERSON…
puneetlath dc7a183
Refactor ProfilePage.js to use PERSONAL_DETAILS instead of MY_PERSONA…
puneetlath b035b1d
Remove no longer used currentUserPersonalDetailsPropsTypes
puneetlath 5f9bf56
Refactor InitialSettingsPage.js to use PERSONAL_DETAILS instead of MY…
puneetlath b005095
Refactor IOUConfirmationList.js to use PERSONAL_DETAILS instead of MY…
puneetlath 22e1150
No longer save to MY_PERSONAL_DETAILS key in fetchPersonalDetails method
puneetlath 085ed98
Refactor PersonalDetails.js to use PERSONAL_DETAILS instead of MY_PER…
puneetlath 380dbaf
Remove the MY_PERSONAL_DETAILS onyx key
puneetlath 3d37ef3
Merge branch 'main' into puneet-personaldetails-refactor
puneetlath 67e1fd5
Get rid of unnecessary personal details references from IOUCurrencySe…
puneetlath 8aec239
Create HOC for withPersonalDetails
puneetlath 31ab939
Add session prop and proptype to personal details HOC
puneetlath 1def41d
rename withPersonalDetails to withCurrentUserPersonalDetails
puneetlath 00bd238
update withCurrentUserPersonalDetails to pass single prop of current …
puneetlath afa27df
update RequestCallPage to use withCurrentUserPersonalDetails HOC
puneetlath 6fc8e92
update ReportActionCompose to use withCurrentUserPersonalDetails HOC
puneetlath a6fbd64
update Report.js to use current user email instead of current user flag
puneetlath 59168f3
update AdditionalDetailsStep to use withCurrentUserPersonalDetails HOC
puneetlath 55568ac
update IOUModal to use withCurrentUserPersonalDetails HOC
puneetlath cd60eca
update InitialSettingsPage to use withCurrentUserPersonalDetails HOC
puneetlath 83ae808
update SidebarLinks to use withCurrentUserPersonalDetails HOC
puneetlath 92a6cbb
update IOUConfirmationList to use withCurrentUserPersonalDetails HOC
puneetlath e6bbd9c
update ProfilePage to use withCurrentUserPersonalDetails HOC
puneetlath c9e4421
update DateUtils to use current user email instead of current user flag
puneetlath 6f371c0
use lodash get instead of new variable for current user
puneetlath 58f74c8
update AuthScreens to use current user email instead of current user …
puneetlath ccb9d27
dont flag the current user details in personal details
puneetlath 0deaba4
Add more values to personal details prop type
puneetlath 972c310
Merge branch 'main' into puneet-personaldetails-refactor
puneetlath 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
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 |
---|---|---|
|
@@ -38,8 +38,8 @@ import networkPropTypes from '../components/networkPropTypes'; | |
const propTypes = { | ||
...withLocalizePropTypes, | ||
|
||
/** The personal details of the person who is logged in */ | ||
myPersonalDetails: personalDetailsPropType.isRequired, | ||
/** Personal details of all the users */ | ||
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. In Probably should be consistent - I think it makes sense to keep |
||
personalDetails: PropTypes.objectOf(personalDetailsPropType).isRequired, | ||
|
||
/** Login list for the user that is signed in */ | ||
loginList: PropTypes.arrayOf(PropTypes.shape({ | ||
|
@@ -99,7 +99,8 @@ const defaultProps = { | |
class RequestCallPage extends Component { | ||
constructor(props) { | ||
super(props); | ||
const {firstName, lastName} = PersonalDetails.extractFirstAndLastNameFromAvailableDetails(props.myPersonalDetails); | ||
const myPersonalDetails = _.findWhere(props.personalDetails, {isCurrentUser: true}); | ||
const {firstName, lastName} = PersonalDetails.extractFirstAndLastNameFromAvailableDetails(myPersonalDetails); | ||
this.state = { | ||
firstName, | ||
hasFirstNameError: false, | ||
|
@@ -355,8 +356,8 @@ export default compose( | |
withLocalize, | ||
withNetwork(), | ||
withOnyx({ | ||
myPersonalDetails: { | ||
key: ONYXKEYS.MY_PERSONAL_DETAILS, | ||
personalDetails: { | ||
key: ONYXKEYS.PERSONAL_DETAILS, | ||
}, | ||
loginList: { | ||
key: ONYXKEYS.LOGIN_LIST, | ||
|
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
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.
NAB - should be plural since there's more than one prop type in this file - though this isn't your fault since you didn't create the original file :D
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.
Good call. Updating.