Skip to content
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

feat(container): updated user widget and support dynamic updates #13412

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oalkabouss
Copy link
Contributor

@oalkabouss oalkabouss commented Oct 3, 2024

ref:MANAGER-14829

Question Answer
Branch? master
Bug fix? no
New feature? yes
Breaking change? no
Tickets MANAGER-14829
License BSD 3-Clause
  • Try to keep pull requests small so they can be easily reviewed.
  • Commits are signed-off
  • Only FR translations have been updated
  • Branch is up-to-date with target branch
  • Lint has passed locally
  • Standalone app was ran and tested locally
  • Ticket reference is mentioned in linked commits (internal only)
  • Breaking change is mentioned in relevant commits

Description

  1. Display the company name in the user widget.
  2. Update user information in the user widget when it is changed: I have implemented an onUserChange

Related

Comment on lines 73 to 74
{user.legalform === LEGAL_FORMS.INDIVIDUAL ?
`${user.firstname} ${user.name}`: user.organisation }
Copy link
Contributor

Choose a reason for hiding this comment

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

From the ticket I would have implemented this way:

Suggested change
{user.legalform === LEGAL_FORMS.INDIVIDUAL ?
`${user.firstname} ${user.name}`: user.organisation }
{user.legalform === LEGAL_FORMS.CORPORATION?
user.organisation : `${user.firstname} ${user.name}` }

Comment on lines 107 to 108
>{user.legalform === LEGAL_FORMS.INDIVIDUAL ?
`${user.firstname} ${user.name}` : user.organisation}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

import { LANGUAGES } from '@ovh-ux/manager-config';
import { getShellClient } from '../../../../shell';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you try and inject the shell client (shellClient) directly in the constructor (you should then be able to use it this way: shellClient.getShellClient())
It should be exposed in packages/manager/apps/dedicated/client/app/app.module.js line 236:
.constant('shellClient', shellClient)

ref:MANAGER-14829

Signed-off-by: Omar ALKABOUSS MOUSSANA <[email protected]>
Copy link

sonarcloud bot commented Oct 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants