1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Conditionally display new copy under subscriptions table [AC-1657] (#6332)

* Add copy to translations

* Add copy to premium user subscription page

* Add copy to organization user subscription page

* Conditionally display copy on premium user subscription page

* Conditionally display copy on organization user subscription page

* Update translations to approved copy
This commit is contained in:
Alex Morask
2023-09-29 12:58:19 -04:00
committed by GitHub
parent c7afbab217
commit 1233a081e4
7 changed files with 54 additions and 0 deletions

View File

@@ -81,6 +81,17 @@
{{ i.quantity * i.amount | currency : "$" }} /{{ i.interval | i18n }}
</td>
</tr>
<tr bitRow *ngIf="discount && discount.active">
<td bitCell colspan="2">
<small>
{{ "customBillingStart" | i18n }}
<a routerLink="/settings/subscription/billing-history">
{{ "billingHistory" | i18n }}
</a>
{{ "customBillingEnd" | i18n }}
</small>
</td>
</tr>
</ng-container>
<ng-container *ngIf="userOrg.isFreeOrg">
<tr bitRow *ngIf="userOrg.usePasswordManager">

View File

@@ -140,6 +140,10 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
return this.sub != null ? this.sub.upcomingInvoice : null;
}
get discount() {
return this.sub != null ? this.sub.discount : null;
}
get isExpired() {
const nextInvoice = this.nextInvoice;

View File

@@ -90,6 +90,17 @@
</td>
<td>{{ i.quantity * i.amount | currency : "$" }} /{{ i.interval | i18n }}</td>
</tr>
<tr *ngIf="discount != null && discount.active">
<td colspan="2">
<small>
{{ "customBillingStart" | i18n }}
<a routerLink="/settings/subscription/billing-history">
{{ "billingHistory" | i18n }}
</a>
{{ "customBillingEnd" | i18n }}
</small>
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -206,6 +206,10 @@ export class UserSubscriptionComponent implements OnInit {
return this.sub != null ? this.sub.upcomingInvoice : null;
}
get discount() {
return this.sub != null ? this.sub.discount : null;
}
get storagePercentage() {
return this.sub != null && this.sub.maxStorageGb
? +(100 * (this.sub.storageGb / this.sub.maxStorageGb)).toFixed(2)

View File

@@ -7177,5 +7177,11 @@
},
"alreadyHaveAccount": {
"message": "Already have an account?"
},
"customBillingStart": {
"message": "Custom billing is not reflected. Visit the "
},
"customBillingEnd": {
"message": " page for latest invoicing."
}
}