mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-24284] - milestone 3 (#17230)
* first draft # Conflicts: # apps/web/src/app/billing/individual/upgrade/upgrade-payment/services/upgrade-payment.service.ts # apps/web/src/app/billing/organizations/organization-plans.component.ts # libs/common/src/billing/services/subscription-pricing.service.ts # libs/common/src/enums/feature-flag.enum.ts * more filtering for pricing cards * prettier * tests * tests v2
This commit is contained in:
@@ -8,7 +8,7 @@ export enum PlanType {
|
||||
EnterpriseMonthly2019 = 4,
|
||||
EnterpriseAnnually2019 = 5,
|
||||
Custom = 6,
|
||||
FamiliesAnnually = 7,
|
||||
FamiliesAnnually2025 = 7,
|
||||
TeamsMonthly2020 = 8,
|
||||
TeamsAnnually2020 = 9,
|
||||
EnterpriseMonthly2020 = 10,
|
||||
@@ -23,4 +23,5 @@ export enum PlanType {
|
||||
EnterpriseMonthly = 19,
|
||||
EnterpriseAnnually = 20,
|
||||
TeamsStarter = 21,
|
||||
FamiliesAnnually = 22,
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ describe("DefaultSubscriptionPricingService", () => {
|
||||
let logService: MockProxy<LogService>;
|
||||
|
||||
const mockFamiliesPlan = {
|
||||
type: PlanType.FamiliesAnnually,
|
||||
type: PlanType.FamiliesAnnually2025,
|
||||
productTier: ProductTierType.Families,
|
||||
name: "Families (Annually)",
|
||||
isAnnual: true,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
combineLatest,
|
||||
combineLatestWith,
|
||||
from,
|
||||
map,
|
||||
Observable,
|
||||
@@ -141,8 +142,13 @@ export class DefaultSubscriptionPricingService implements SubscriptionPricingSer
|
||||
);
|
||||
|
||||
private families$: Observable<PersonalSubscriptionPricingTier> = this.plansResponse$.pipe(
|
||||
map((plans) => {
|
||||
const familiesPlan = plans.data.find((plan) => plan.type === PlanType.FamiliesAnnually)!;
|
||||
combineLatestWith(this.configService.getFeatureFlag$(FeatureFlag.PM26462_Milestone_3)),
|
||||
map(([plans, milestone3FeatureEnabled]) => {
|
||||
const familiesPlan = plans.data.find(
|
||||
(plan) =>
|
||||
plan.type ===
|
||||
(milestone3FeatureEnabled ? PlanType.FamiliesAnnually : PlanType.FamiliesAnnually2025),
|
||||
)!;
|
||||
|
||||
return {
|
||||
id: PersonalSubscriptionPricingTierIds.Families,
|
||||
|
||||
@@ -32,6 +32,7 @@ export enum FeatureFlag {
|
||||
PM24033PremiumUpgradeNewDesign = "pm-24033-updat-premium-subscription-page",
|
||||
PM26793_FetchPremiumPriceFromPricingService = "pm-26793-fetch-premium-price-from-pricing-service",
|
||||
PM23713_PremiumBadgeOpensNewPremiumUpgradeDialog = "pm-23713-premium-badge-opens-new-premium-upgrade-dialog",
|
||||
PM26462_Milestone_3 = "pm-26462-milestone-3",
|
||||
|
||||
/* Key Management */
|
||||
PrivateKeyRegeneration = "pm-12241-private-key-regeneration",
|
||||
@@ -124,6 +125,7 @@ export const DefaultFeatureFlagValue = {
|
||||
[FeatureFlag.PM24033PremiumUpgradeNewDesign]: FALSE,
|
||||
[FeatureFlag.PM26793_FetchPremiumPriceFromPricingService]: FALSE,
|
||||
[FeatureFlag.PM23713_PremiumBadgeOpensNewPremiumUpgradeDialog]: FALSE,
|
||||
[FeatureFlag.PM26462_Milestone_3]: FALSE,
|
||||
|
||||
/* Key Management */
|
||||
[FeatureFlag.PrivateKeyRegeneration]: FALSE,
|
||||
|
||||
Reference in New Issue
Block a user