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

[AC-1911] Clients: Create components to manage client organization seat allocation #8505

Conversation

cyprain-okeke
Copy link
Contributor

@cyprain-okeke cyprain-okeke commented Mar 27, 2024

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

In the Provider Portal, on the Clients tab, implement components according to the Figma designs that allows the Provider Admin to view and manage the number of seats they’ve allocated to each of their client organizations.

Notes
The 3-dot menu to the right of each client organization opens more options including “Subscription”, which opens the manage-client-subscription.component modal and “Unlink organization”, which should behave the same as the current Provider Portal’s client management

The “Add organization” button will not be included in this story. That piece will be tackled in this story after this one has been completed

Code changes

  • file.ext: Description of what was changed and why

Screenshots

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
  • Ensure that all UI additions follow WCAG AA requirements

Uploading Screen Recording 2024-04-01 at 14.26.55.mov…

@cyprain-okeke cyprain-okeke added the needs-qa Marks a PR as requiring QA approval label Mar 27, 2024
@cyprain-okeke cyprain-okeke requested a review from a team March 27, 2024 08:14
@cyprain-okeke cyprain-okeke requested a review from a team as a code owner March 27, 2024 08:14
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 169 lines in your changes are missing coverage. Please review.

Project coverage is 26.83%. Comparing base (2e51d96) to head (e8fc351).
Report is 11 commits behind head on main.

Files Patch % Lines
...s/clients/manage-client-organizations.component.ts 0.00% 76 Missing ⚠️
...nage-client-organization-subscription.component.ts 0.00% 51 Missing ⚠️
.../models/response/provider-subscription-response.ts 0.00% 18 Missing ⚠️
...min-console/providers/clients/clients.component.ts 0.00% 14 Missing ⚠️
...common/src/billing/services/billing-api.service.ts 0.00% 4 Missing ⚠️
...rc/app/admin-console/providers/providers.module.ts 0.00% 2 Missing ⚠️
...in-console/providers/providers-layout.component.ts 0.00% 1 Missing ⚠️
...dmin-console/providers/providers-routing.module.ts 0.00% 1 Missing ⚠️
...ls/request/provider-subscription-update.request.ts 0.00% 1 Missing ⚠️
libs/common/src/enums/feature-flag.enum.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8505      +/-   ##
==========================================
+ Coverage   26.80%   26.83%   +0.03%     
==========================================
  Files        2308     2315       +7     
  Lines       67393    67605     +212     
  Branches    12630    12668      +38     
==========================================
+ Hits        18063    18142      +79     
- Misses      47940    48070     +130     
- Partials     1390     1393       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amorask-bitwarden amorask-bitwarden removed the needs-qa Marks a PR as requiring QA approval label Mar 27, 2024
Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Nice start. Got a few points below for you and then we can work through this initial feedback below.

❓ Did you end up getting the feature flag to work? I can't trigger it locally.

✏️ For all net-new files, we should be creating them in a manner where the Billing team owns them so that we don't have to ask other teams for reviews on them arbitrarily. I'd suggest either reorganizing what you have so that it's in a billing folder or updating the CODEOWNERS file.

Copy link
Contributor

github-actions bot commented Mar 28, 2024

Logo
Checkmarx One – Scan Summary & Detailsa97290a1-e654-4c81-83fd-49620e7a1abb

New Issues

Severity Issue Source File / Package Checkmarx Insight
HIGH Client_DOM_XSS /apps/web/src/app/auth/settings/two-factor-verify.component.html: 3 Attack Vector
HIGH Client_DOM_XSS /bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.html: 27 Attack Vector
HIGH Client_DOM_XSS /bitwarden_license/bit-web/src/app/admin-console/providers/settings/account.component.html: 27 Attack Vector
MEDIUM Client_Potential_XSS /apps/desktop/src/app/components/avatar.component.ts: 45 Attack Vector
MEDIUM Client_Potential_XSS /libs/components/src/avatar/avatar.component.ts: 48 Attack Vector
MEDIUM Client_Potential_XSS /apps/desktop/src/app/components/avatar.component.ts: 45 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/common/src/tools/send/services/send.service.ts: 26 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/common/src/tools/send/services/send.service.ts: 25 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 117 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 119 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 119 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 118 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 118 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/tools/export.command.ts: 117 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 147 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 100 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 148 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 641 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 667 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 147 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 124 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 146 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 657 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 147 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 146 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 125 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 288 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 147 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 147 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 669 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 287 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 148 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 146 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 289 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 148 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 146 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 643 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 148 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 146 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 148 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 123 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 666 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 642 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 100 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/auth/src/angular/user-verification/user-verification-form-input.component.ts: 71 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/auth/src/angular/user-verification/user-verification-form-input.component.ts: 71 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/auth/src/angular/user-verification/user-verification-form-input.component.ts: 71 Attack Vector
LOW Use_Of_Hardcoded_Password /libs/auth/src/angular/user-verification/user-verification-form-input.component.ts: 71 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 456 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 538 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 418 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 555 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/cli/src/auth/commands/login.command.ts: 513 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/content/notification-bar.ts: 557 Attack Vector
LOW Use_Of_Hardcoded_Password /apps/browser/src/autofill/content/notification-bar.ts: 557 Attack Vector
LOW Use_Of_Hardcoded_Password

More results are available on AST platform

Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Great work - this is really coming along and looks great on the front-end. I caught one more bug that I left a note for.

Additionally, can you address my comment regarding net-new files? We should either store those files somewhere we own or update the CODEOWNERS for us to own them specifically. AC team won't have context on what to review for these.

Thanks!

@amorask-bitwarden
Copy link
Contributor

Sorry, one more thing. I've scaled both of my client organizations in the example below down below their seat minimum, which means the warning shown in this Figma is not working. In my example, each plan has a seat minimum of 100. The single Teams org has 70 seats and the single Enterprise org has 40 seats. If I manage the subscription for the Teams org, I should see the helper text for 30 unassigned seats.
image

image

cyprain-okeke and others added 3 commits March 28, 2024 19:21
…onents-to-manage-client-organization-seat-allocation' into ac-1911-create-components-to-manage-client-organization-seat-allocation
@cyprain-okeke cyprain-okeke removed the request for review from addisonbeck March 28, 2024 18:24
…onents-to-manage-client-organization-seat-allocation' into ac-1911-create-components-to-manage-client-organization-seat-allocation
Copy link
Contributor

@r-tome r-tome left a comment

Choose a reason for hiding this comment

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

LGTM but I have one business logic question: shouldn't we disable the "Manage seats" option if the selected Organization Plan does not support consolidated billing?

@amorask-bitwarden
Copy link
Contributor

LGTM but I have one business logic question: shouldn't we disable the "Manage seats" option if the selected Organization Plan does not support consolidated billing?

Hi @r-tome, once Consolidated Billing goes live, a Provider will not be able to link an organization that doesn't use one of the supported plans so theoretically, that case wouldn't be possible.

Copy link
Contributor

@r-tome r-tome left a comment

Choose a reason for hiding this comment

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

Thanks for answering @amorask-bitwarden!
Good work @cyprain-okeke!

@cyprain-okeke cyprain-okeke merged commit 9956f02 into main Apr 2, 2024
63 checks passed
@cyprain-okeke cyprain-okeke deleted the ac-1911-create-components-to-manage-client-organization-seat-allocation branch April 2, 2024 16:04
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.

None yet

3 participants