Commit a04ed934 by Ooh-Ao

no message

parent 7ebf57cb
...@@ -14,12 +14,12 @@ export class LoginPageComponent { ...@@ -14,12 +14,12 @@ export class LoginPageComponent {
disabled = ''; disabled = '';
active: any; active: any;
constructor(@Inject(DOCUMENT) constructor(@Inject(DOCUMENT)
private document: Document, private document: Document,
private elementRef: ElementRef, private elementRef: ElementRef,
private renderer: Renderer2, private renderer: Renderer2,
private formBuilder: FormBuilder, private formBuilder: FormBuilder,
private router: Router, private router: Router,
private authservice: AuthService,) { private authservice: AuthService,) {
const bodyElement = this.renderer.selectRootElement('body', true); const bodyElement = this.renderer.selectRootElement('body', true);
this.renderer.setAttribute(bodyElement, 'class', 'cover1 justify-center'); this.renderer.setAttribute(bodyElement, 'class', 'cover1 justify-center');
...@@ -39,7 +39,7 @@ export class LoginPageComponent { ...@@ -39,7 +39,7 @@ export class LoginPageComponent {
const html : any = this.elementRef.nativeElement.ownerDocument.documentElement; const html : any = this.elementRef.nativeElement.ownerDocument.documentElement;
html.removeAttribute('data-header-styles', 'light'); html.removeAttribute('data-header-styles', 'light');
//html.removeAttribute('data-nav-layout','vertical'); //html.removeAttribute('data-nav-layout','vertical');
html.classList.add('h-full', 'light'); html.classList.add('h-full', 'light');
if (localStorage.getItem('synto-header-mode') == 'dark') { if (localStorage.getItem('synto-header-mode') == 'dark') {
...@@ -66,7 +66,7 @@ export class LoginPageComponent { ...@@ -66,7 +66,7 @@ export class LoginPageComponent {
this.authservice this.authservice
.loginWithEmail(this.email, this.password) .loginWithEmail(this.email, this.password)
.then(() => { .then(() => {
this.router.navigate(['/dashboard/sales']); this.router.navigate(['/self-evaluation']);
console.clear(); console.clear();
}) })
.catch((_error: any) => { .catch((_error: any) => {
...@@ -109,7 +109,7 @@ export class LoginPageComponent { ...@@ -109,7 +109,7 @@ export class LoginPageComponent {
this.loginForm.controls['username'].value === 'spruko@admin.com' && this.loginForm.controls['username'].value === 'spruko@admin.com' &&
this.loginForm.controls['password'].value === 'sprukoadmin' this.loginForm.controls['password'].value === 'sprukoadmin'
) { ) {
this.router.navigate(['/dashboard/sales']); this.router.navigate(['/self-evaluation']);
} else { } else {
this.error = 'Please check email and passowrd'; this.error = 'Please check email and passowrd';
} }
...@@ -130,8 +130,8 @@ export class LoginPageComponent { ...@@ -130,8 +130,8 @@ export class LoginPageComponent {
const html: any = this.elementRef.nativeElement.ownerDocument.documentElement; const html: any = this.elementRef.nativeElement.ownerDocument.documentElement;
html.classList.remove('h-full', 'dark'); html.classList.remove('h-full', 'dark');
} }
const authe: any = document.querySelector('.h-full'); const authe: any = document.querySelector('.h-full');
authe.removeAttribute('class', 'h-full'); authe.removeAttribute('class', 'h-full');
} }
} }
\ No newline at end of file
...@@ -87,6 +87,17 @@ export class NavService implements OnDestroy { ...@@ -87,6 +87,17 @@ export class NavService implements OnDestroy {
MENUITEMS: Menu[] = [ MENUITEMS: Menu[] = [
{ {
title: 'การประเมินผล',
type: 'sub',
selected: false,
active: false,
path: '/supervisor-evaluation',
children: [
{ path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link' },
{ path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link' },
],
},
{
title: 'การจัดการข้อมูลองค์กร', title: 'การจัดการข้อมูลองค์กร',
type: 'sub', type: 'sub',
selected: false, selected: false,
...@@ -148,17 +159,7 @@ export class NavService implements OnDestroy { ...@@ -148,17 +159,7 @@ export class NavService implements OnDestroy {
], ],
}, },
{
title: 'การประเมินผล',
type: 'sub',
selected: false,
active: false,
path: '/supervisor-evaluation',
children: [
{ path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link' },
{ path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link' },
],
},
]; ];
// Array // Array
items = new BehaviorSubject<Menu[]>(this.MENUITEMS); items = new BehaviorSubject<Menu[]>(this.MENUITEMS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment