From 778700f3993b3763cfbd9c667b6ecc81d74f05f7 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 1 Dec 2021 19:48:05 -0600 Subject: [PATCH] Fix families sponsorship redeem page (#1321) * Display sponsorship warning when sponsoring an org Move actions to drop down menu Fix revoke cancel success popup * Only show warning when sponsorship exists (cherry picked from commit d9231ae3f38b2ea963ed4f8dda084b830c5b4c7e) --- .../sponsored-families.component.html | 36 ++++++++++--------- .../sponsoring-org-row.component.html | 32 ++++++++++------- .../settings/sponsoring-org-row.component.ts | 4 +-- src/locales/en/messages.json | 2 +- 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/app/settings/sponsored-families.component.html b/src/app/settings/sponsored-families.component.html index 6d1c3899749..8ca5d8b21a2 100644 --- a/src/app/settings/sponsored-families.component.html +++ b/src/app/settings/sponsored-families.component.html @@ -24,7 +24,6 @@

{{'sponsoredFamilies' | i18n}}

- {{'sponsoredFamiliesLeaveCopy' | i18n}}
@@ -36,20 +35,23 @@

{{'sponsoredFamilies' | i18n}}

-
- - - - - - - - - - - - - -
{{'recipient' | i18n}}{{'sponsoringOrg' | i18n}}
-
+ +
+ + + + + + + + + + + + + +
{{'recipient' | i18n}}{{'sponsoringOrg' | i18n}}
+
+ {{'sponsoredFamiliesLeaveCopy' | i18n}} +
diff --git a/src/app/settings/sponsoring-org-row.component.html b/src/app/settings/sponsoring-org-row.component.html index 497abe5c58c..6aceee2d92b 100644 --- a/src/app/settings/sponsoring-org-row.component.html +++ b/src/app/settings/sponsoring-org-row.component.html @@ -3,16 +3,24 @@ {{sponsoringOrg.name}} - - + diff --git a/src/app/settings/sponsoring-org-row.component.ts b/src/app/settings/sponsoring-org-row.component.ts index ff774666b58..c5ed67bd18f 100644 --- a/src/app/settings/sponsoring-org-row.component.ts +++ b/src/app/settings/sponsoring-org-row.component.ts @@ -32,8 +32,6 @@ export class SponsoringOrgRowComponent { try { this.revokeSponsorshipPromise = this.doRevokeSponsorship(); await this.revokeSponsorshipPromise; - this.toasterService.popAsync('success', null, this.i18nService.t('reclaimedFreePlan')); - this.sponsorshipRemoved.emit(); } catch (e) { this.logService.error(e); } @@ -59,5 +57,7 @@ export class SponsoringOrgRowComponent { } await this.apiService.deleteRevokeSponsorship(this.sponsoringOrg.id); + this.toasterService.popAsync('success', null, this.i18nService.t('reclaimedFreePlan')); + this.sponsorshipRemoved.emit(); } } diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 8b117d232be..74d61382589 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -4525,7 +4525,7 @@ "message": "Enter your personal email to redeem Bitwarden Families" }, "sponsoredFamiliesLeaveCopy": { - "message": "If you leave or are removed from this organization, your Families plan will expire at the end of the billing period." + "message": "If you leave or are removed from the sponsoring organization, your Families plan will expire at the end of the billing period." }, "acceptBitwardenFamiliesHelp": { "message": "Accept offer for an existing organization or create a new Families organization."