Skip to content

Commit a7599a7

Browse files
committed
fix skip registration func
1 parent 076b5c1 commit a7599a7

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

projects/social_platform/src/app/office/onboarding/stage-one/stage-one.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class OnboardingStageOneComponent implements OnInit, OnDestroy {
9797
return;
9898
}
9999

100-
this.completeRegistration(null);
100+
this.completeRegistration(3);
101101
}
102102

103103
onSubmit(): void {
@@ -129,11 +129,13 @@ export class OnboardingStageOneComponent implements OnInit, OnDestroy {
129129
});
130130
}
131131

132-
private completeRegistration(stage: number | null): void {
132+
private completeRegistration(stage: number): void {
133133
this.skipSubmitting.set(true);
134134
this.onboardingService.setFormValue(this.stageForm.value);
135135
this.authService.setOnboardingStage(stage).subscribe(() => {
136-
this.router.navigateByUrl(stage !== null ? "/office/onboarding/stage-2" : "/office/feed");
136+
this.router.navigateByUrl(
137+
stage !== 3 ? "/office/onboarding/stage-2" : "/office/onboarding/stage-3"
138+
);
137139
});
138140
this.skipSubmitting.set(false);
139141
}

projects/social_platform/src/app/office/onboarding/stage-two/stage-two.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class OnboardingStageTwoComponent implements OnInit, OnDestroy {
8888
return;
8989
}
9090

91-
this.completeRegistration(null);
91+
this.completeRegistration(3);
9292
}
9393

9494
onSubmit(): void {
@@ -143,11 +143,11 @@ export class OnboardingStageTwoComponent implements OnInit, OnDestroy {
143143
.subscribe(({ results }) => this.searchedSkills.set(results));
144144
}
145145

146-
private completeRegistration(stage: number | null): void {
146+
private completeRegistration(stage: number): void {
147147
this.skipSubmitting.set(true);
148148
this.onboardingService.setFormValue(this.stageForm.value);
149149
this.authService.setOnboardingStage(stage).subscribe(() => {
150-
this.router.navigateByUrl(stage !== null ? "/office/onboarding/stage-3" : "/office/feed");
150+
this.router.navigateByUrl("/office/onboarding/stage-3");
151151
});
152152
this.skipSubmitting.set(false);
153153
}

projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ export class OnboardingStageZeroComponent implements OnInit, OnDestroy {
574574
return;
575575
}
576576

577-
this.completeRegistration(null);
577+
this.completeRegistration(3);
578578
}
579579

580580
onSubmit(): void {
@@ -601,11 +601,13 @@ export class OnboardingStageZeroComponent implements OnInit, OnDestroy {
601601
});
602602
}
603603

604-
private completeRegistration(stage: number | null): void {
604+
private completeRegistration(stage: number): void {
605605
this.skipSubmitting.set(true);
606606
this.onboardingService.setFormValue(this.stageForm.value);
607607
this.authService.setOnboardingStage(stage).subscribe(() => {
608-
this.router.navigateByUrl(stage !== null ? "/office/onboarding/stage-1" : "/office/feed");
608+
this.router.navigateByUrl(
609+
stage !== 3 ? "/office/onboarding/stage-1" : "/office/onboarding/stage-3"
610+
);
609611
});
610612
this.skipSubmitting.set(false);
611613
}

0 commit comments

Comments
 (0)