Add copy to subscription page indicating free Password Manager for a year (#8010)

* Initial commit

* refactoring the code

* resolve pr comment
This commit is contained in:
cyprain-okeke 2024-02-22 20:52:05 +01:00 committed by GitHub
parent e894ecda25
commit 7a9a9a0c22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -76,7 +76,17 @@
{{ i.amount | currency: "$" }} {{ i.amount | currency: "$" }}
</td> </td>
<td bitCell class="tw-text-right"> <td bitCell class="tw-text-right">
{{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }} <ng-container
*ngIf="
sub?.customerDiscount?.appliesTo?.includes(i.productId);
else calculateElse
"
>
{{ "freeForOneYear" | i18n }}
</ng-container>
<ng-template #calculateElse>
{{ i.quantity * i.amount | currency: "$" }} /{{ i.interval | i18n }}
</ng-template>
</td> </td>
</tr> </tr>
</ng-container> </ng-container>

View File

@ -111,6 +111,10 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
}) })
.sort(sortSubscriptionItems); .sort(sortSubscriptionItems);
} }
if (this.sub?.customerDiscount?.percentOff == 100) {
this.lineItems.reverse();
}
} }
const apiKeyResponse = await this.organizationApiService.getApiKeyInformation( const apiKeyResponse = await this.organizationApiService.getApiKeyInformation(
@ -152,6 +156,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
sponsoredSubscriptionItem: lineItem.sponsoredSubscriptionItem, sponsoredSubscriptionItem: lineItem.sponsoredSubscriptionItem,
addonSubscriptionItem: lineItem.addonSubscriptionItem, addonSubscriptionItem: lineItem.addonSubscriptionItem,
productName: lineItem.productName, productName: lineItem.productName,
productId: lineItem.productId,
})); }));
} }

View File

@ -7584,5 +7584,8 @@
"tooExpensive": { "tooExpensive": {
"message": "Too expensive", "message": "Too expensive",
"description": "An option for the offboarding survey shown when a user cancels their subscription." "description": "An option for the offboarding survey shown when a user cancels their subscription."
},
"freeForOneYear": {
"message": "Free for 1 year"
} }
} }