Changing behavior to display modal if organization on-hold/inactive#207
Changing behavior to display modal if organization on-hold/inactive#207nicholas-maestrello merged 4 commits intomasterfrom
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
react/components/UserWidget.tsx
Outdated
| </p> | ||
| </div> | ||
| )} | ||
| <h3 className={`${handles.userWidgetModalH3} flex`}>{`${ |
There was a problem hiding this comment.
Faz sentido renderizar isso aqui se não tiver nome? Não dá pra incluir na validação de baixo?
react/components/UserWidget.tsx
Outdated
| </div> | ||
| <div className="ml-auto"> | ||
| {userWidgetData?.getActiveOrganizationsByEmail?.length > 1 && ( | ||
| {(userWidgetData?.getActiveOrganizationsByEmail?.length > 1 || |
There was a problem hiding this comment.
Validação meio longa pra ficar aqui, não dá pra extrair ela pra uma const? Legibilidade sendo prejudicada.
|
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
What problem is this solving?
When a user's organization status changes to "on-hold" or "inactive", the UserWidget disappears entirely, leaving users unable to switch to their other active organizations. The widget also failed to render when cost center data was unavailable.
How to test it?
Screenshots or example usage:
Before: UserWidget is hidden when the organization is on-hold, the user is stuck without options
After: Modal automatically opens with a warning message, showing available active organizations
Screen.Recording.2026-01-13.at.13.21.24.mov
Describe alternatives you've considered, if any.
Related to / Depends on
Requires b2b-organizations-graphql@2.x update to allow retrieval of on-hold organizations