Hide grace period note when in self-serve trial (#8768)
This commit is contained in:
parent
e7416384dc
commit
418d4642da
|
@ -42,7 +42,10 @@
|
|||
: subscription.expirationWithGracePeriod
|
||||
) | date: "mediumDate"
|
||||
}}
|
||||
<div *ngIf="subscription.hasSeparateGracePeriod" class="tw-text-muted">
|
||||
<div
|
||||
*ngIf="subscription.hasSeparateGracePeriod && !subscription.isInTrial"
|
||||
class="tw-text-muted"
|
||||
>
|
||||
{{
|
||||
"selfHostGracePeriodHelp"
|
||||
| i18n: (subscription.expirationWithGracePeriod | date: "mediumDate")
|
||||
|
|
|
@ -58,4 +58,16 @@ export class SelfHostedOrganizationSubscriptionView implements View {
|
|||
get isExpiredAndOutsideGracePeriod() {
|
||||
return this.hasExpiration && this.expirationWithGracePeriod < new Date();
|
||||
}
|
||||
|
||||
/**
|
||||
* In the case of a trial, where there is no grace period, the expirationWithGracePeriod and expirationWithoutGracePeriod will
|
||||
* be exactly the same. This can be used to hide the grace period note.
|
||||
*/
|
||||
get isInTrial() {
|
||||
return (
|
||||
this.expirationWithGracePeriod &&
|
||||
this.expirationWithoutGracePeriod &&
|
||||
this.expirationWithGracePeriod.getTime() === this.expirationWithoutGracePeriod.getTime()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue