Refactor onboarding user vars to be absent when user is fully onboarded (#6531)

In this PR:
- take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 /
https://github.com/twentyhq/twenty/pull/6529 /
https://github.com/twentyhq/twenty/pull/6526 /
https://github.com/twentyhq/twenty/pull/6512
- refactor onboarding uservars to be absent when the user is fully
onboarded: isStepComplete ==> isStepIncomplete
- introduce a new workspace.activationStatus: CREATION_ONGOING

I'm retesting the whole flow:
- with/without BILLING
- sign in with/without SSO
- sign up with/without SSO
- another workspaceMembers join the team
- subscriptionCanceled
- access to billingPortal
This commit is contained in:
Charles Bochet
2024-08-04 20:37:36 +02:00
committed by GitHub
parent c543716381
commit 03204021cb
49 changed files with 517 additions and 364 deletions

View File

@ -1,4 +1,4 @@
import { Injectable } from '@nestjs/common';
import { Injectable, Logger } from '@nestjs/common';
import {
QueryRunner,
@ -32,6 +32,8 @@ import { customTableDefaultColumns } from './utils/custom-table-default-column.u
@Injectable()
export class WorkspaceMigrationRunnerService {
private readonly logger = new Logger(WorkspaceMigrationRunnerService.name);
constructor(
private readonly workspaceDataSourceService: WorkspaceDataSourceService,
private readonly workspaceMigrationService: WorkspaceMigrationService,
@ -87,7 +89,7 @@ export class WorkspaceMigrationRunnerService {
await queryRunner.commitTransaction();
} catch (error) {
console.error('Error executing migration', error);
this.logger.error('Error executing migration', error);
await queryRunner.rollbackTransaction();
throw error;
} finally {