mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 04:55:30 +03:00
Fix onboarding status refacto (#6533)
see comments in https://github.com/twentyhq/twenty/pull/6531#pullrequestreview-2217807413 - rename method - add check before setting create profile pending user var
This commit is contained in:
parent
8408cf6d19
commit
10817c5388
@ -73,7 +73,7 @@ export class BackfillNewOnboardingUserVarsCommand extends CommandRunner {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (const user of workspace.users) {
|
for (const user of workspace.users) {
|
||||||
await this.onboardingService.setOnboardingCreateProfileCompletion({
|
await this.onboardingService.setOnboardingCreateProfilePending({
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
workspaceId: workspace.id,
|
workspaceId: workspace.id,
|
||||||
value: true,
|
value: true,
|
||||||
|
@ -197,11 +197,13 @@ export class SignInUpService {
|
|||||||
value: true,
|
value: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.onboardingService.setOnboardingCreateProfileCompletion({
|
if (firstName === '' && lastName === '') {
|
||||||
|
await this.onboardingService.setOnboardingCreateProfilePending({
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
workspaceId: workspace.id,
|
workspaceId: workspace.id,
|
||||||
value: true,
|
value: true,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
@ -257,11 +259,13 @@ export class SignInUpService {
|
|||||||
value: true,
|
value: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.onboardingService.setOnboardingCreateProfileCompletion({
|
if (firstName === '' && lastName === '') {
|
||||||
|
await this.onboardingService.setOnboardingCreateProfilePending({
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
workspaceId: workspace.id,
|
workspaceId: workspace.id,
|
||||||
value: true,
|
value: true,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await this.onboardingService.setOnboardingInviteTeamPending({
|
await this.onboardingService.setOnboardingInviteTeamPending({
|
||||||
workspaceId: workspace.id,
|
workspaceId: workspace.id,
|
||||||
|
@ -131,7 +131,7 @@ export class OnboardingService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async setOnboardingCreateProfileCompletion({
|
async setOnboardingCreateProfilePending({
|
||||||
userId,
|
userId,
|
||||||
workspaceId,
|
workspaceId,
|
||||||
value,
|
value,
|
||||||
|
@ -36,7 +36,7 @@ export class WorkspaceWorkspaceMemberListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.onboardingService.setOnboardingCreateProfileCompletion({
|
await this.onboardingService.setOnboardingCreateProfilePending({
|
||||||
userId: payload.userId,
|
userId: payload.userId,
|
||||||
workspaceId: payload.workspaceId,
|
workspaceId: payload.workspaceId,
|
||||||
value: false,
|
value: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user