[init] init version
This commit is contained in:
40
src/app/pages/dashboard/index/index.component.ts
Normal file
40
src/app/pages/dashboard/index/index.component.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: "app-index",
|
||||
templateUrl: "./index.component.html",
|
||||
styleUrls: []
|
||||
})
|
||||
export class IndexComponent implements OnInit {
|
||||
|
||||
title = "";
|
||||
auth : any = {};
|
||||
|
||||
constructor(public router: Router,
|
||||
private route: ActivatedRoute,
|
||||
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"]);
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user