mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
* Added support for the teams starter plan * Plans now respect display sort order. Updated teams starter to be in its own product * Remove upgrade button and show new copy instead -- wip copy * Added upgrade dialog for teams starter plan when adding an 11th user * Updated the add user validator to check if plan is teams starter. Updated to not count duplicated emails in the overall count * Renamed validator to be more descriptive and added additional unit tests * Added validator for org types that require customer support to upgrade * Updated small localization for teams plan to account for new starter plan * Removed invalid tests * Resolved issues around free trial flow for teams starter * Added new layout for teams starter free trial flow * Updated copy following demo. Resolved display issues discovered during demo * Removed temporary copy for testing * Updated the second step of free trial flow to use org display name * Updated invite user modal to display 10 instead of 20 as the invite limit for Teams Starter --------- Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
import { Component, OnInit, ViewChild } from "@angular/core";
|
|
import { ActivatedRoute } from "@angular/router";
|
|
import { first } from "rxjs/operators";
|
|
|
|
import { PlanType } from "@bitwarden/common/billing/enums";
|
|
import { ProductType } from "@bitwarden/common/enums";
|
|
|
|
import { OrganizationPlansComponent } from "../../billing";
|
|
import { SharedModule } from "../../shared";
|
|
|
|
@Component({
|
|
templateUrl: "create-organization.component.html",
|
|
standalone: true,
|
|
imports: [SharedModule, OrganizationPlansComponent],
|
|
})
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
|
export class CreateOrganizationComponent implements OnInit {
|
|
@ViewChild(OrganizationPlansComponent, { static: true })
|
|
orgPlansComponent: OrganizationPlansComponent;
|
|
|
|
constructor(private route: ActivatedRoute) {}
|
|
|
|
ngOnInit() {
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
|
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
|
|
if (qParams.plan === "families") {
|
|
this.orgPlansComponent.plan = PlanType.FamiliesAnnually;
|
|
this.orgPlansComponent.product = ProductType.Families;
|
|
} else if (qParams.plan === "teams") {
|
|
this.orgPlansComponent.plan = PlanType.TeamsAnnually;
|
|
this.orgPlansComponent.product = ProductType.Teams;
|
|
} else if (qParams.plan === "teamsStarter") {
|
|
this.orgPlansComponent.plan = PlanType.TeamsStarter;
|
|
this.orgPlansComponent.product = ProductType.TeamsStarter;
|
|
} else if (qParams.plan === "enterprise") {
|
|
this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;
|
|
this.orgPlansComponent.product = ProductType.Enterprise;
|
|
}
|
|
});
|
|
}
|
|
}
|