diff --git a/rossa-tech-cli/src/app/components/login/login.component.html b/rossa-tech-cli/src/app/components/login/login.component.html deleted file mode 100644 index ed93a81..0000000 --- a/rossa-tech-cli/src/app/components/login/login.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
-

Login

-
-
-
-
{{errorMessage}}
-
{{successMessage}}
-
- - -
-
- - -
- -
-
-
-
\ No newline at end of file diff --git a/rossa-tech-cli/src/app/components/login/login.component.scss b/rossa-tech-cli/src/app/components/login/login.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/rossa-tech-cli/src/app/components/login/login.component.spec.ts b/rossa-tech-cli/src/app/components/login/login.component.spec.ts deleted file mode 100644 index 10eca24..0000000 --- a/rossa-tech-cli/src/app/components/login/login.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { LoginComponent } from './login.component'; - -describe('LoginComponent', () => { - let component: LoginComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ LoginComponent ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(LoginComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/rossa-tech-cli/src/app/components/login/login.component.ts b/rossa-tech-cli/src/app/components/login/login.component.ts deleted file mode 100644 index c16080a..0000000 --- a/rossa-tech-cli/src/app/components/login/login.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; -import { AuthenticationService } from 'src/app/services/auth.service'; - -@Component({ - selector: 'app-login', - templateUrl: './login.component.html', - styleUrls: ['./login.component.scss'], -}) -export class LoginComponent implements OnInit { - username: string; - password: string; - errorMessage = 'Invalid Credentials'; - successMessage: string; - invalidLogin = false; - loginSuccess = false; - - constructor( - private route: ActivatedRoute, - private router: Router, - private authenticationService: AuthenticationService - ) {} - - ngOnInit() {} - - handleLogin() { - this.authenticationService - .authenticationService(this.username, this.password) - .subscribe( - (result) => { - this.invalidLogin = false; - this.loginSuccess = true; - this.successMessage = 'Login Successful.'; - this.router.navigate(['/dashboard']); - }, - () => { - this.invalidLogin = true; - this.loginSuccess = false; - } - ); - } -}