Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

feat(navbar): display currently logged in user name #2236

Merged

Conversation

AlexTan331
Copy link
Contributor

@AlexTan331 AlexTan331 commented Jul 14, 2020

Fixes #2225 .

Changes proposed in this pull request:

  • add ability to display user name in profile dropdown
  • add ability to navigate to the setting route
  • add new test for display user name
  • add translation key to display profile message

No new dependency added

@gitpod-io
Copy link

gitpod-io bot commented Jul 14, 2020

@vercel
Copy link

vercel bot commented Jul 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/g3faleqak
✅ Preview: https://hospitalrun-fr-git-fork-alextan331-display-user-in-profi-2de9ea.hospitalrun.vercel.app

matteovivona
matteovivona previously approved these changes Jul 14, 2020
@matteovivona matteovivona added in progress indicates that issue/pull request is currently being worked on 🚀enhancement an issue/pull request that adds a feature to the application labels Jul 14, 2020
@matteovivona matteovivona added this to the v2.0 milestone Jul 14, 2020
@@ -13,6 +13,7 @@ export default {
required: 'Password is required.',
},
},
success: 'Currently signed in as ',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use currentlySignedInAs as the key instead of success. I think that it makes it more clear what the key is supposed to represent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave off the trailing space in the key and make whoever uses this key put a space in.

@@ -170,13 +170,22 @@ describe('Navbar', () => {
})

describe('account', () => {
it('should render an account link list', () => {
it("should render a link with the user's identification", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a test to make sure that it renders the user's first and last name

src/shared/components/navbar/Navbar.tsx Outdated Show resolved Hide resolved
@jackcmeyer jackcmeyer changed the title feat(navbar): add feature to display currently logged in user name in… feat(navbar): display currently logged in user name Jul 18, 2020
@jackcmeyer jackcmeyer merged commit 5a4bfa5 into HospitalRun:master Jul 18, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
🚀enhancement an issue/pull request that adds a feature to the application in progress indicates that issue/pull request is currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display currently logged in user name in profile dropdown
3 participants