mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01:00
Resolved subscription page problem for free org (#8622)
This commit is contained in:
parent
775c8a1bbe
commit
9f8f93ef97
@ -14,7 +14,7 @@
|
|||||||
<dl class="tw-grid tw-grid-flow-col tw-grid-rows-2">
|
<dl class="tw-grid tw-grid-flow-col tw-grid-rows-2">
|
||||||
<dt>{{ "billingPlan" | i18n }}</dt>
|
<dt>{{ "billingPlan" | i18n }}</dt>
|
||||||
<dd>{{ planName }}</dd>
|
<dd>{{ planName }}</dd>
|
||||||
<ng-container>
|
<ng-container *ngIf="data.status && data.date">
|
||||||
<dt>{{ data.status.label }}</dt>
|
<dt>{{ data.status.label }}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span class="tw-capitalize">
|
<span class="tw-capitalize">
|
||||||
|
@ -5,11 +5,11 @@ import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/mode
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
|
||||||
type ComponentData = {
|
type ComponentData = {
|
||||||
status: {
|
status?: {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
date: {
|
date?: {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
@ -44,13 +44,15 @@ export class SubscriptionStatusComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get status(): string {
|
get status(): string {
|
||||||
return this.subscription.status != "canceled" && this.subscription.cancelAtEndDate
|
return this.subscription
|
||||||
? "pending_cancellation"
|
? this.subscription.status != "canceled" && this.subscription.cancelAtEndDate
|
||||||
: this.subscription.status;
|
? "pending_cancellation"
|
||||||
|
: this.subscription.status
|
||||||
|
: "free";
|
||||||
}
|
}
|
||||||
|
|
||||||
get subscription() {
|
get subscription() {
|
||||||
return this.organizationSubscriptionResponse.subscription;
|
return this.organizationSubscriptionResponse?.subscription;
|
||||||
}
|
}
|
||||||
|
|
||||||
get data(): ComponentData {
|
get data(): ComponentData {
|
||||||
@ -61,6 +63,9 @@ export class SubscriptionStatusComponent {
|
|||||||
const cancellationDateLabel = this.i18nService.t("cancellationDate");
|
const cancellationDateLabel = this.i18nService.t("cancellationDate");
|
||||||
|
|
||||||
switch (this.status) {
|
switch (this.status) {
|
||||||
|
case "free": {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
case "trialing": {
|
case "trialing": {
|
||||||
return {
|
return {
|
||||||
status: {
|
status: {
|
||||||
|
Loading…
Reference in New Issue
Block a user