diff --git a/jslib b/jslib index cdbe08ae7e..647b254a71 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit cdbe08ae7eb9f0b127ebc2e28de287ff8096aebc +Subproject commit 647b254a71d0af105e1f6f1a1febeb15cd4181fb diff --git a/src/app/organizations/settings/organization-billing.component.html b/src/app/organizations/settings/organization-billing.component.html index 0b117f8afd..075b872ea2 100644 --- a/src/app/organizations/settings/organization-billing.component.html +++ b/src/app/organizations/settings/organization-billing.component.html @@ -173,20 +173,51 @@ -

{{'charges' | i18n}}

-

{{'noCharges' | i18n}}

- +

{{'invoices' | i18n}}

+

{{'noInvoices' | i18n}}

+
- + + - - - - + + + + +
{{i.date | date:'mediumDate'}} - - - + + + + {{'invoiceNumber' | i18n : i.number}} {{c.createdDate | date:'mediumDate'}}{{c.paymentSource ? c.paymentSource.description : '-'}}{{c.status}}{{c.amount | currency:'$'}}{{i.amount | currency:'$'}} + + + {{'paid' | i18n}} + + + + {{'unpaid' | i18n}} + +
+

{{'transactions' | i18n}}

+

{{'noTransactions' | i18n}}

+ + + + + + +
{{t.createdDate | date:'mediumDate'}} + {{'chargeNoun' | i18n}} + {{'chargeRefund' | i18n}} + + + {{t.details}} + {{t.amount | currency:'$'}}
diff --git a/src/app/organizations/settings/organization-billing.component.ts b/src/app/organizations/settings/organization-billing.component.ts index c3f95d2a31..b6874f05dd 100644 --- a/src/app/organizations/settings/organization-billing.component.ts +++ b/src/app/organizations/settings/organization-billing.component.ts @@ -20,6 +20,7 @@ import { TokenService } from 'jslib/abstractions/token.service'; import { PaymentMethodType } from 'jslib/enums/paymentMethodType'; import { PlanType } from 'jslib/enums/planType'; +import { TransactionType } from 'jslib/enums/transactionType'; @Component({ selector: 'app-org-billing', @@ -37,6 +38,7 @@ export class OrganizationBillingComponent implements OnInit { showUpdateLicense = false; billing: OrganizationBillingResponse; paymentMethodType = PaymentMethodType; + transactionType = TransactionType; selfHosted = false; verifyAmount1: number; verifyAmount2: number; @@ -227,12 +229,16 @@ export class OrganizationBillingComponent implements OnInit { return this.billing != null ? this.billing.upcomingInvoice : null; } - get paymentSource() { - return this.billing != null ? this.billing.paymentSource : null; + get invoices() { + return this.billing != null ? this.billing.invoices : null; } - get charges() { - return this.billing != null ? this.billing.charges : null; + get transactions() { + return this.billing != null ? this.billing.transactions : null; + } + + get paymentSource() { + return this.billing != null ? this.billing.paymentSource : null; } get storagePercentage() { diff --git a/src/app/settings/user-billing.component.html b/src/app/settings/user-billing.component.html index d47e0816d1..e8d9e2ffcf 100644 --- a/src/app/settings/user-billing.component.html +++ b/src/app/settings/user-billing.component.html @@ -117,15 +117,51 @@ -

{{'charges' | i18n}}

-

{{'noCharges' | i18n}}

- +

{{'invoices' | i18n}}

+

{{'noInvoices' | i18n}}

+
- - - - - + + + + + + + +
{{c.createdDate | date:'mediumDate'}}{{c.paymentSource ? c.paymentSource.description : '-'}}{{c.status}}{{c.amount | currency:'$'}}
{{i.date | date:'mediumDate'}} + + + + {{'invoiceNumber' | i18n : i.number}} + {{i.amount | currency:'$'}} + + + {{'paid' | i18n}} + + + + {{'unpaid' | i18n}} + +
+

{{'transactions' | i18n}}

+

{{'noTransactions' | i18n}}

+ + + + + + +
{{t.createdDate | date:'mediumDate'}} + {{'chargeNoun' | i18n}} + {{'chargeRefund' | i18n}} + + + {{t.details}} + {{t.amount | currency:'$'}}
diff --git a/src/app/settings/user-billing.component.ts b/src/app/settings/user-billing.component.ts index c2f5e4828c..210971246f 100644 --- a/src/app/settings/user-billing.component.ts +++ b/src/app/settings/user-billing.component.ts @@ -15,6 +15,7 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { TokenService } from 'jslib/abstractions/token.service'; import { PaymentMethodType } from 'jslib/enums/paymentMethodType'; +import { TransactionType } from 'jslib/enums/transactionType'; @Component({ selector: 'app-user-billing', @@ -29,6 +30,7 @@ export class UserBillingComponent implements OnInit { showUpdateLicense = false; billing: BillingResponse; paymentMethodType = PaymentMethodType; + transactionType = TransactionType; selfHosted = false; cancelPromise: Promise; @@ -164,8 +166,12 @@ export class UserBillingComponent implements OnInit { return this.billing != null ? this.billing.paymentSource : null; } - get charges() { - return this.billing != null ? this.billing.charges : null; + get invoices() { + return this.billing != null ? this.billing.invoices : null; + } + + get transactions() { + return this.billing != null ? this.billing.transactions : null; } get storagePercentage() { diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 60da9aadfc..64917d31fc 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1691,12 +1691,34 @@ "changePaymentMethod": { "message": "Change Payment Method" }, - "charges": { - "message": "Charges", - "description": "Credit card charges/payments." + "invoices": { + "message": "Invoices" }, - "noCharges": { - "message": "No charges." + "noInvoices": { + "message": "No invoices." + }, + "paid" : { + "message": "Paid", + "description": "Past tense status of an invoice. ex. Paid or unpaid." + }, + "unpaid" : { + "message": "Unpaid", + "description": "Past tense status of an invoice. ex. Paid or unpaid." + }, + "transactions": { + "message": "Transactions", + "description": "Payment/credit transactions." + }, + "noTransactions": { + "message": "No transactions." + }, + "chargeNoun": { + "message": "Charge", + "description": "Noun. A charge from a payment method." + }, + "refundNoun": { + "message": "Refund", + "description": "Noun. A refunded payment that was charged." }, "chargesStatement": { "message": "Any charges will appear on your statement as $STATEMENT_NAME$.", @@ -2474,8 +2496,21 @@ "message": "Contact customer support if you would like to change your plan. Please ensure that you have an active payment method added to the account.", "description": "A billing plan/package. For example: families, teams, enterprise, etc." }, - "invoice": { - "message": "Invoice" + "invoiceNumber": { + "message": "Invoice #$NUMBER$", + "description": "ex. Invoice #79C66F0-0001", + "placeholders": { + "number": { + "content": "$1", + "example": "79C66F0-0001" + } + } + }, + "viewInvoice": { + "message": "View Invoice" + }, + "downloadInvoice": { + "message": "Download Invoice" }, "verifyBankAccount": { "message": "Verify Bank Account"