Skip to content

Commit

Permalink
add note to footer for grace period of subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jan 26, 2024
1 parent 9f4fc88 commit 90b3a96
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -335,6 +335,15 @@ public String getObject() {
return " " + createStringResource("PageBase.nonActiveSubscriptionMessage").getString();
} else if (subscription.isDemo()) {
return " " + createStringResource("PageBase.demoSubscriptionMessage").getString();
} else if (subscription.isInGracePeriod()) {
int daysToGracePeriodGone = subscription.getDaysToGracePeriodGone();
if(daysToGracePeriodGone < 2) {
return " " + createStringResource("PageBase.gracePeriodSubscriptionMessage.lastDay").getString();
}
return " " + createStringResource(
"PageBase.gracePeriodSubscriptionMessage",
subscription.getDaysToGracePeriodGone())
.getString();
} else {
return "";
}
Expand All @@ -361,7 +370,8 @@ public boolean isVisible() {
}

private boolean isFooterVisible() {
return getSubscriptionState().isInactiveOrDemo();
SubscriptionState subscription = getSubscriptionState();
return subscription.isInactiveOrDemo() || subscription.isInGracePeriod();
}

/**
Expand Down

0 comments on commit 90b3a96

Please sign in to comment.