mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +01:00
[PM-11417] Customers' Expiration Date in Admin Console changing to next invoice date when Pending Invoice items exist (#10774)
* Resolve the wrong subscription expiration date * Refactor the change to include flag * refactor the change to consider the flag * Resolve the year bug for all subscription * Changes for the premium user * resolve the premium issue
This commit is contained in:
parent
b2966b158a
commit
8eef46ad4e
@ -48,7 +48,7 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>{{ "nextCharge" | i18n }}</dt>
|
<dt>{{ "nextCharge" | i18n }}</dt>
|
||||||
<dd>
|
<dd *ngIf="!enableTimeThreshold">
|
||||||
{{
|
{{
|
||||||
nextInvoice
|
nextInvoice
|
||||||
? (nextInvoice.date | date: "mediumDate") +
|
? (nextInvoice.date | date: "mediumDate") +
|
||||||
@ -57,6 +57,15 @@
|
|||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd *ngIf="enableTimeThreshold">
|
||||||
|
{{
|
||||||
|
nextInvoice
|
||||||
|
? (sub.subscription.periodEndDate | date: "mediumDate") +
|
||||||
|
", " +
|
||||||
|
(nextInvoice.amount | currency: "$")
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-w-2/3" *ngIf="subscription">
|
<div class="tw-w-2/3" *ngIf="subscription">
|
||||||
|
@ -40,9 +40,13 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
sub: SubscriptionResponse;
|
sub: SubscriptionResponse;
|
||||||
selfHosted = false;
|
selfHosted = false;
|
||||||
cloudWebVaultUrl: string;
|
cloudWebVaultUrl: string;
|
||||||
|
enableTimeThreshold: boolean;
|
||||||
|
|
||||||
cancelPromise: Promise<any>;
|
cancelPromise: Promise<any>;
|
||||||
reinstatePromise: Promise<any>;
|
reinstatePromise: Promise<any>;
|
||||||
|
protected enableTimeThreshold$ = this.configService.getFeatureFlag$(
|
||||||
|
FeatureFlag.EnableTimeThreshold,
|
||||||
|
);
|
||||||
|
|
||||||
protected deprecateStripeSourcesAPI$ = this.configService.getFeatureFlag$(
|
protected deprecateStripeSourcesAPI$ = this.configService.getFeatureFlag$(
|
||||||
FeatureFlag.AC2476_DeprecateStripeSourcesAPI,
|
FeatureFlag.AC2476_DeprecateStripeSourcesAPI,
|
||||||
@ -67,6 +71,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.cloudWebVaultUrl = await firstValueFrom(this.environmentService.cloudWebVaultUrl$);
|
this.cloudWebVaultUrl = await firstValueFrom(this.environmentService.cloudWebVaultUrl$);
|
||||||
await this.load();
|
await this.load();
|
||||||
|
this.enableTimeThreshold = await firstValueFrom(this.enableTimeThreshold$);
|
||||||
this.firstLoaded = true;
|
this.firstLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,12 @@
|
|||||||
<dt [ngClass]="{ 'tw-text-danger': isExpired }">
|
<dt [ngClass]="{ 'tw-text-danger': isExpired }">
|
||||||
{{ "subscriptionExpiration" | i18n }}
|
{{ "subscriptionExpiration" | i18n }}
|
||||||
</dt>
|
</dt>
|
||||||
<dd [ngClass]="{ 'tw-text-danger': isExpired }">
|
<dd [ngClass]="{ 'tw-text-danger': isExpired }" *ngIf="!enableTimeThreshold">
|
||||||
{{ nextInvoice ? (nextInvoice.date | date: "mediumDate") : "-" }}
|
{{ nextInvoice ? (nextInvoice.date | date: "mediumDate") : "-" }}
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd [ngClass]="{ 'tw-text-danger': isExpired }" *ngIf="enableTimeThreshold">
|
||||||
|
{{ nextInvoice ? (sub.subscription.periodEndDate | date: "mediumDate") : "-" }}
|
||||||
|
</dd>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</dl>
|
</dl>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
Loading…
Reference in New Issue
Block a user