2 Commits 4aa04377f5 ... c28bc9e0a1

Autor SHA1 Mensaje Fecha
  IbrahimNour c28bc9e0a1 contractor and employee hace 8 meses
  IbrahimNour 4aa04377f5 contractor and employee hace 8 meses

+ 5 - 2
src/app/authentication/auth-sign-up/signup-contractor/signup-contractor.component.ts

@@ -18,7 +18,7 @@ import {
   UNIVERISTY,
 } from '@core/models/authenticcation.model';
 import { takeUntil } from 'rxjs';
-import { ActivatedRoute, Params } from '@angular/router';
+import { ActivatedRoute, Params, Router } from '@angular/router';
 import { ToastrService } from 'ngx-toastr';
 import { SharedService } from '../../../core/services/shared.service';
 
@@ -43,7 +43,8 @@ export class SignupContractorComponent
     private readonly authService: AuthService,
     private readonly route: ActivatedRoute,
     private readonly toastr: ToastrService,
-    private readonly sharedService: SharedService
+    private readonly sharedService: SharedService,
+    private readonly router: Router
   ) {
     super();
   }
@@ -170,6 +171,8 @@ export class SignupContractorComponent
   }
 
   onSubmit(): void {
+    this.router.navigate(['/auth']);
+
     const multiPartForm = new FormData();
     if (this.submitValidity(this.form)) {
       for (const key in { ...this.form.value }) {

+ 4 - 2
src/app/authentication/auth-sign-up/signup-employee/signup-employee.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { ActivatedRoute, Params } from '@angular/router';
+import { ActivatedRoute, Params, Router } from '@angular/router';
 import { ComponentBase } from '@core/base/common-base';
 import { from, take, takeUntil } from 'rxjs';
 import { BaseForm } from '@core/base/base-form';
@@ -44,7 +44,8 @@ export class SignupEmployeeComponent
     private readonly route: ActivatedRoute,
     private readonly authService: AuthService,
     private readonly toastr: ToastrService,
-    private readonly sharedService: SharedService
+    private readonly sharedService: SharedService,
+    private readonly router: Router
   ) {
     super();
   }
@@ -186,6 +187,7 @@ export class SignupEmployeeComponent
         .pipe(takeUntil(this.destroy$))
         .subscribe((res) => {
           this.toastr.success('Registeration Successfully !');
+          this.router.navigate(['/auth']);
         });
     }
   }