mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 11:12:16 +01:00
add trial banners and unblock member invite modal during trial
This commit is contained in:
committed by
Constantin Graf
parent
2bad9eaa3c
commit
30ed47d3fb
@@ -8,6 +8,29 @@ export function isBillingActivated() {
|
||||
return page.props.has_billing_extension;
|
||||
}
|
||||
|
||||
export function isInTrial() {
|
||||
const page = usePage<{
|
||||
billing: {
|
||||
has_trial: boolean;
|
||||
};
|
||||
}>();
|
||||
|
||||
return page.props.billing.has_trial;
|
||||
}
|
||||
export function isBlocked() {
|
||||
const page = usePage<{
|
||||
billing: {
|
||||
is_blocked: boolean;
|
||||
};
|
||||
}>();
|
||||
|
||||
return page.props.billing.is_blocked;
|
||||
}
|
||||
|
||||
export function isFreePlan() {
|
||||
return !hasActiveSubscription() && !isInTrial();
|
||||
}
|
||||
|
||||
export function hasActiveSubscription() {
|
||||
const page = usePage<{
|
||||
billing: {
|
||||
|
||||
Reference in New Issue
Block a user