[AC-471] Cloud update subscription page (#4897)
* [AC-471] feat: update copy * [AC-471] feat: change text color when expired * [AC-471] feat: remove charge amount
This commit is contained in:
parent
926012f921
commit
7e905d518b
|
@ -55,15 +55,11 @@
|
||||||
"pendingCancellation" | i18n
|
"pendingCancellation" | i18n
|
||||||
}}</span>
|
}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>{{ "nextCharge" | i18n }}</dt>
|
<dt [ngClass]="{ 'tw-text-danger': isExpired }">
|
||||||
<dd>
|
{{ "subscriptionExpiration" | i18n }}
|
||||||
{{
|
</dt>
|
||||||
nextInvoice
|
<dd [ngClass]="{ 'tw-text-danger': isExpired }">
|
||||||
? (nextInvoice.date | date : "mediumDate") +
|
{{ nextInvoice ? (nextInvoice.date | date : "mediumDate") : "-" }}
|
||||||
", " +
|
|
||||||
(nextInvoice.amount | currency : "$")
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</dd>
|
</dd>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -99,6 +99,16 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||||
return this.sub != null ? this.sub.upcomingInvoice : null;
|
return this.sub != null ? this.sub.upcomingInvoice : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isExpired() {
|
||||||
|
const nextInvoice = this.nextInvoice;
|
||||||
|
|
||||||
|
if (nextInvoice == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Date(nextInvoice.date).getTime() < Date.now();
|
||||||
|
}
|
||||||
|
|
||||||
get storagePercentage() {
|
get storagePercentage() {
|
||||||
return this.sub != null && this.sub.maxStorageGb
|
return this.sub != null && this.sub.maxStorageGb
|
||||||
? +(100 * (this.sub.storageGb / this.sub.maxStorageGb)).toFixed(2)
|
? +(100 * (this.sub.storageGb / this.sub.maxStorageGb)).toFixed(2)
|
||||||
|
|
|
@ -2020,6 +2020,9 @@
|
||||||
"cancelSubscription": {
|
"cancelSubscription": {
|
||||||
"message": "Cancel subscription"
|
"message": "Cancel subscription"
|
||||||
},
|
},
|
||||||
|
"subscriptionExpiration": {
|
||||||
|
"message": "Subscription expiration"
|
||||||
|
},
|
||||||
"subscriptionCanceled": {
|
"subscriptionCanceled": {
|
||||||
"message": "The subscription has been canceled."
|
"message": "The subscription has been canceled."
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue