From 014281cb93d46f6e4cd9b241f3e1673039bbb901 Mon Sep 17 00:00:00 2001
From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
Date: Tue, 23 Jan 2024 12:47:52 -0500
Subject: [PATCH] [AC-1758] Show banner when organization requires a payment
method (#7088)
* Add billing banner states to account settings
* Add billing banner service
* Add add-payment-method-banners.component
* Use add-payment-method-banners.component in layouts
* Clear banner on payment method addition
* Ran prettier after CI update
* Finalize banners styling/translations
* Will's (non-Tailwind) feedback
* Review feedback
* Review feedback
* Review feedback
* Replace StateService with StateProvider in BillingBannerService
* Remove StateService methods
---
.../fido2/fido2-use-browser-link.component.ts | 2 +-
.../organization-layout.component.html | 2 +-
.../shared/adjust-payment.component.ts | 5 ++
.../payment-method-banners.component.html | 15 ++++
.../payment-method-banners.component.ts | 76 +++++++++++++++++++
.../app/layouts/user-layout.component.html | 1 +
.../src/app/shared/loose-components.module.ts | 2 +
apps/web/src/locales/en/messages.json | 20 +++--
.../providers/providers-layout.component.html | 1 +
.../providers/providers.module.ts | 2 +
.../providers/setup/setup.component.html | 1 +
.../src/services/jslib-services.module.ts | 7 ++
.../organization-api.service.abstraction.ts | 2 +
.../organization/organization-api.service.ts | 15 ++++
.../billing-banner.service.abstraction.ts | 6 ++
...ion-risks-subscription-failure.response.ts | 13 ++++
.../services/billing-banner.service.ts | 44 +++++++++++
.../src/platform/state/state-definitions.ts | 2 +
18 files changed, 208 insertions(+), 8 deletions(-)
create mode 100644 apps/web/src/app/components/payment-method-banners/payment-method-banners.component.html
create mode 100644 apps/web/src/app/components/payment-method-banners/payment-method-banners.component.ts
create mode 100644 libs/common/src/billing/abstractions/billing-banner.service.abstraction.ts
create mode 100644 libs/common/src/billing/models/response/organization-risks-subscription-failure.response.ts
create mode 100644 libs/common/src/billing/services/billing-banner.service.ts
diff --git a/apps/browser/src/vault/popup/components/fido2/fido2-use-browser-link.component.ts b/apps/browser/src/vault/popup/components/fido2/fido2-use-browser-link.component.ts
index 7af90125db..d062a7b0a0 100644
--- a/apps/browser/src/vault/popup/components/fido2/fido2-use-browser-link.component.ts
+++ b/apps/browser/src/vault/popup/components/fido2/fido2-use-browser-link.component.ts
@@ -38,7 +38,7 @@ import {
],
})
export class Fido2UseBrowserLinkComponent {
- showOverlay: boolean = false;
+ showOverlay = false;
isOpen = false;
overlayPosition: ConnectedPosition[] = [
{
diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
index c34c07150d..44647d0d3b 100644
--- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
+++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
@@ -1,4 +1,5 @@