From 7a9a9a0c22242599b3a59788c2ac7cbf400395ea Mon Sep 17 00:00:00 2001
From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Date: Thu, 22 Feb 2024 20:52:05 +0100
Subject: [PATCH] Add copy to subscription page indicating free Password
Manager for a year (#8010)
* Initial commit
* refactoring the code
* resolve pr comment
---
.../organization-subscription-cloud.component.html | 12 +++++++++++-
.../organization-subscription-cloud.component.ts | 5 +++++
apps/web/src/locales/en/messages.json | 3 +++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html
index 290433ccf1..87035c6d01 100644
--- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html
+++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html
@@ -76,7 +76,17 @@
{{ i.amount | currency: "$" }}
- {{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }}
+
+ {{ "freeForOneYear" | i18n }}
+
+
+ {{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }}
+
|
diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts
index c4c6bde9b7..45c7ea1a21 100644
--- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts
+++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts
@@ -111,6 +111,10 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
})
.sort(sortSubscriptionItems);
}
+
+ if (this.sub?.customerDiscount?.percentOff == 100) {
+ this.lineItems.reverse();
+ }
}
const apiKeyResponse = await this.organizationApiService.getApiKeyInformation(
@@ -152,6 +156,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
sponsoredSubscriptionItem: lineItem.sponsoredSubscriptionItem,
addonSubscriptionItem: lineItem.addonSubscriptionItem,
productName: lineItem.productName,
+ productId: lineItem.productId,
}));
}
diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json
index 80e74c8f65..80033157a5 100644
--- a/apps/web/src/locales/en/messages.json
+++ b/apps/web/src/locales/en/messages.json
@@ -7584,5 +7584,8 @@
"tooExpensive": {
"message": "Too expensive",
"description": "An option for the offboarding survey shown when a user cancels their subscription."
+ },
+ "freeForOneYear": {
+ "message": "Free for 1 year"
}
}