Skip to content

Changing behavior to display modal if organization on-hold/inactive#207

Merged
nicholas-maestrello merged 4 commits intomasterfrom
B2BTEAM-3097
Jan 15, 2026
Merged

Changing behavior to display modal if organization on-hold/inactive#207
nicholas-maestrello merged 4 commits intomasterfrom
B2BTEAM-3097

Conversation

@nicholas-maestrello
Copy link
Contributor

@nicholas-maestrello nicholas-maestrello commented Jan 13, 2026

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?

  1. Login with a user belonging to multiple organizations
  2. Set their current organization status to "on-hold" in the admin
  3. Verify the organization selector modal opens automatically
  4. Verify a warning message is displayed indicating the organization is on-hold
  5. Verify user can select and switch to an active organization
  6. Verify the "Change Organization" button appears even with a single organization when the current org is on-hold

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.

  • Forcing logout when organization goes on-hold (rejected - bad UX)
  • Only showing error message without modal (rejected - doesn't help users resolve the issue)

Related to / Depends on

Requires b2b-organizations-graphql@2.x update to allow retrieval of on-hold organizations

@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Jan 13, 2026

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:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Jan 13, 2026

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 86, PR deletions = 18

Generated by 🚫 dangerJS against b6b2c1e

</p>
</div>
)}
<h3 className={`${handles.userWidgetModalH3} flex`}>{`${
Copy link
Contributor

Choose a reason for hiding this comment

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

Faz sentido renderizar isso aqui se não tiver nome? Não dá pra incluir na validação de baixo?

</div>
<div className="ml-auto">
{userWidgetData?.getActiveOrganizationsByEmail?.length > 1 && (
{(userWidgetData?.getActiveOrganizationsByEmail?.length > 1 ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Validação meio longa pra ficar aqui, não dá pra extrair ela pra uma const? Legibilidade sendo prejudicada.

@nicholas-maestrello nicholas-maestrello merged commit 51be7b3 into master Jan 15, 2026
14 of 15 checks passed
@nicholas-maestrello nicholas-maestrello deleted the B2BTEAM-3097 branch January 15, 2026 14:49
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Jan 15, 2026

Your PR has been merged! App is being published. 🚀
Version 3.1.3 → 3.1.4

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:

vtex deploy vtex.b2b-organizations@3.1.4

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants