feat: redirect to Plan Required page if subscription status is not active (#2981)

* feat: redirect to Plan Required page if subscription status is not active

Closes #2934

* feat: navigate to Plan Required in PageChangeEffect

* feat: add Twenty logo to Plan Required modal

* test: add Storybook story

* Fix lint

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2023-12-14 12:39:22 +01:00
committed by GitHub
parent 8916dee352
commit a10f353a4c
37 changed files with 285 additions and 110 deletions

View File

@ -22,6 +22,14 @@ export class EnvironmentService {
return this.configService.get<boolean>('SIGN_IN_PREFILLED') ?? false;
}
isBillingEnabled() {
return this.configService.get<boolean>('IS_BILLING_ENABLED') ?? false;
}
getBillingUrl() {
return this.configService.get<string>('BILLING_PLAN_REQUIRED_LINK') ?? '';
}
isTelemetryEnabled(): boolean {
return this.configService.get<boolean>('TELEMETRY_ENABLED') ?? true;
}

View File

@ -38,6 +38,15 @@ export class EnvironmentVariables {
@IsBoolean()
SIGN_IN_PREFILLED?: boolean;
@CastToBoolean()
@IsOptional()
@IsBoolean()
IS_BILLING_ENABLED?: boolean;
@IsOptional()
@IsString()
BILLING_URL?: string;
@CastToBoolean()
@IsOptional()
@IsBoolean()