diff --git a/src/app/authentication/authentication.component.css b/src/app/authentication/authentication.component.css index e330521..306bac0 100644 --- a/src/app/authentication/authentication.component.css +++ b/src/app/authentication/authentication.component.css @@ -1,12 +1,8 @@ -a -{ +a { text-decoration: none; color: white; } -/* -.login -{ - box-shadow: 1px 1px 1px 1px grey; - padding: 20px; + +.alert { + color: red; } -*/ diff --git a/src/app/authentication/authentication.component.html b/src/app/authentication/authentication.component.html index 92a4a26..026dcc6 100644 --- a/src/app/authentication/authentication.component.html +++ b/src/app/authentication/authentication.component.html @@ -16,8 +16,9 @@ - Submit + Submit +


The Kinsley Group is a leading energy solutions supplier with a 50 plus year legacy of sales, rental and diff --git a/src/app/authentication/authentication.component.ts b/src/app/authentication/authentication.component.ts index 255bea9..aacb6fa 100644 --- a/src/app/authentication/authentication.component.ts +++ b/src/app/authentication/authentication.component.ts @@ -3,6 +3,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { LoginService } from '../services/login.service'; import { Router } from '@angular/router'; + @Injectable() @Component({ @@ -26,15 +27,19 @@ export class AuthenticationComponent implements OnInit { }; this.data.authorizeUser(loginjson).subscribe((data) => { - const token = data['token']; - const message = data['message']; - if (message === 'Authorized') { - // Authorized - // console.log(token); - localStorage.setItem('auth_token', token); - // window.open(); - this.router.navigateByUrl('/generator-search'); - } + if (data) { + const token = data['token']; + const message = data['message']; + if (message === 'Authorized') { + // Authorized + // console.log(token); + localStorage.setItem('auth_token', token); + this.router.navigateByUrl('/generator-search'); + } + } else { + document.getElementById('peep').innerHTML = 'Username or Password is Invalid'; + } + }); }