mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[AC-2721] [Defect] Apply subscription status updates in provider subscription details (#9729)
* Resolve the pending cancellation status * Add the contact information
This commit is contained in:
@@ -8426,5 +8426,8 @@
|
|||||||
"example":"increments of 100,000"
|
"example":"increments of 100,000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"providerReinstate":{
|
||||||
|
"message": " Contact Customer Support to reinstate your subscription."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ export class SubscriptionStatusComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get status(): string {
|
get status(): string {
|
||||||
|
if (this.subscription.cancelAt && this.subscription.status === "active") {
|
||||||
|
this.subscription.status = "pending_cancellation";
|
||||||
|
}
|
||||||
|
|
||||||
return this.subscription.status;
|
return this.subscription.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,13 +155,15 @@ export class SubscriptionStatusComponent {
|
|||||||
},
|
},
|
||||||
date: {
|
date: {
|
||||||
label: cancellationDateLabel,
|
label: cancellationDateLabel,
|
||||||
value: this.subscription.currentPeriodEndDate.toDateString(),
|
value: this.subscription.cancelAt,
|
||||||
},
|
},
|
||||||
callout: {
|
callout: {
|
||||||
severity: "warning",
|
severity: "warning",
|
||||||
header: pendingCancellationText,
|
header: pendingCancellationText,
|
||||||
body: this.i18nService.t("subscriptionPendingCanceled"),
|
body:
|
||||||
showReinstatementButton: true,
|
this.i18nService.t("subscriptionPendingCanceled") +
|
||||||
|
this.i18nService.t("providerReinstate"),
|
||||||
|
showReinstatementButton: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export class ProviderSubscriptionResponse extends BaseResponse {
|
|||||||
unpaidPeriodEndDate?: string;
|
unpaidPeriodEndDate?: string;
|
||||||
gracePeriod?: number | null;
|
gracePeriod?: number | null;
|
||||||
suspensionDate?: string;
|
suspensionDate?: string;
|
||||||
|
cancelAt?: string;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
super(response);
|
super(response);
|
||||||
@@ -19,6 +20,7 @@ export class ProviderSubscriptionResponse extends BaseResponse {
|
|||||||
this.unpaidPeriodEndDate = this.getResponseProperty("unpaidPeriodEndDate");
|
this.unpaidPeriodEndDate = this.getResponseProperty("unpaidPeriodEndDate");
|
||||||
this.gracePeriod = this.getResponseProperty("gracePeriod");
|
this.gracePeriod = this.getResponseProperty("gracePeriod");
|
||||||
this.suspensionDate = this.getResponseProperty("suspensionDate");
|
this.suspensionDate = this.getResponseProperty("suspensionDate");
|
||||||
|
this.cancelAt = this.getResponseProperty("cancelAt");
|
||||||
const plans = this.getResponseProperty("plans");
|
const plans = this.getResponseProperty("plans");
|
||||||
if (plans != null) {
|
if (plans != null) {
|
||||||
this.plans = plans.map((i: any) => new ProviderPlanResponse(i));
|
this.plans = plans.map((i: any) => new ProviderPlanResponse(i));
|
||||||
|
|||||||
Reference in New Issue
Block a user