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