mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 13:13:22 +00:00
[AC-358] SelfHosted update subscription page (#5101)
* [AC-358] Add selfHostSubscriptionExpiration property to organization-subscription.response.ts * [AC-358] Update selfHost org subscription template - Replace "Subscription" with "SubscriptionExpiration" - Add question mark help link - Add helper text for grace period - Add support for graceful fallback in case of missing grace period in subscription response * Update libs/common/src/billing/models/response/organization-subscription.response.ts Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> * [AC-358] Remove unnecessary hypen Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> * [AC-358] Introduce SelfHostedOrganizationSubscription view - Encapsulate expiration/grace period logic in the new view object. - Remove API response getters from the angular component - Replace the API response object with the new view * [AC-358] Clarify name for new expiration without grace period field * [AC-358] Update constructor parameter name * [AC-358] Simplify new selfhost subscription view - Make expiration date properties public - Remove obsolete expiration date getters - Update the component to use new properties - Add helper to component for determining if the subscription should be rendered as expired (red text) * [AC-358] Rename isExpired to isExpiredAndOutsideGracePeriod to be more explicit --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,7 @@ export class OrganizationSubscriptionResponse extends OrganizationResponse {
|
||||
subscription: BillingSubscriptionResponse;
|
||||
upcomingInvoice: BillingSubscriptionUpcomingInvoiceResponse;
|
||||
expiration: string;
|
||||
expirationWithoutGracePeriod: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
@@ -24,5 +25,6 @@ export class OrganizationSubscriptionResponse extends OrganizationResponse {
|
||||
? null
|
||||
: new BillingSubscriptionUpcomingInvoiceResponse(upcomingInvoice);
|
||||
this.expiration = this.getResponseProperty("Expiration");
|
||||
this.expirationWithoutGracePeriod = this.getResponseProperty("ExpirationWithoutGracePeriod");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user