[update]
This commit is contained in:
@@ -1,40 +1,29 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { AppService } from "../../../app.service";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { API } from "../../../@config/app";
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AppService } from '../../../app.service';
|
||||
|
||||
@Component({
|
||||
selector: "app-index",
|
||||
templateUrl: "./index.component.html",
|
||||
styleUrls: []
|
||||
selector: 'app-index',
|
||||
templateUrl: './index.component.html',
|
||||
styleUrls: [],
|
||||
})
|
||||
export class IndexComponent implements OnInit {
|
||||
title = '';
|
||||
auth: any = {};
|
||||
|
||||
title = "";
|
||||
auth : any = {};
|
||||
|
||||
constructor(public router: Router,
|
||||
constructor(
|
||||
public router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private app: AppService) {
|
||||
}
|
||||
private app: AppService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.auth = this.app.auth();
|
||||
if (!this.auth) return;
|
||||
|
||||
|
||||
if (this.auth.userType === "ADMIN") {
|
||||
return this.router.navigate(["/pages/appraisal/1st-time"]);
|
||||
if (this.auth.userType === 'ADMIN') {
|
||||
return this.router.navigate(['/pages/manage/kyc']);
|
||||
}
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user