From ea908ec55b8de36a089ed6d370a99d19ebb844f0 Mon Sep 17 00:00:00 2001 From: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com> Date: Mon, 28 Aug 2023 09:58:55 -0400 Subject: [PATCH] [AC-1336] Indicate unpaid subscriptions on payment screen (#5962) * Add text for creating a charge for unpaid invoices * Refactor payment method to simplify promises --- .../settings/payment-method.component.html | 1 + .../settings/payment-method.component.ts | 28 +++++++++++++++---- apps/web/src/locales/en/messages.json | 3 ++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/billing/settings/payment-method.component.html b/apps/web/src/app/billing/settings/payment-method.component.html index 9fde6419e1..16e9d7bfcd 100644 --- a/apps/web/src/app/billing/settings/payment-method.component.html +++ b/apps/web/src/app/billing/settings/payment-method.component.html @@ -112,6 +112,7 @@ *ngIf="showAdjustPayment" > +
{{ "paymentChargedWithUnpaidSubscription" | i18n }}
{{ "taxInformationDesc" | i18n }}
diff --git a/apps/web/src/app/billing/settings/payment-method.component.ts b/apps/web/src/app/billing/settings/payment-method.component.ts index a550926262..5a8e598f7b 100644 --- a/apps/web/src/app/billing/settings/payment-method.component.ts +++ b/apps/web/src/app/billing/settings/payment-method.component.ts @@ -4,9 +4,10 @@ import { ActivatedRoute, Router } from "@angular/router"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; -import { OrganizationResponse } from "@bitwarden/common/admin-console/models/response/organization.response"; import { PaymentMethodType } from "@bitwarden/common/billing/enums"; import { BillingPaymentResponse } from "@bitwarden/common/billing/models/response/billing-payment.response"; +import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/models/response/organization-subscription.response"; +import { SubscriptionResponse } from "@bitwarden/common/billing/models/response/subscription.response"; import { VerifyBankRequest } from "@bitwarden/common/models/request/verify-bank.request"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @@ -28,9 +29,11 @@ export class PaymentMethodComponent implements OnInit { showAdjustPayment = false; showAddCredit = false; billing: BillingPaymentResponse; - org: OrganizationResponse; + org: OrganizationSubscriptionResponse; + sub: SubscriptionResponse; paymentMethodType = PaymentMethodType; organizationId: string; + isUnpaid = false; verifyBankPromise: Promise