Skip to content

Commit

Permalink
🚀 client portal routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyul committed Oct 24, 2023
1 parent e4b287a commit ce13a1d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions frontend/src/app/client-login/client-login.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->
<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->
<div class="login-container">
<img src="/assets/client_background.svg" alt="background image" class="background-img">

Expand Down Expand Up @@ -31,6 +33,10 @@ <h1>Log in</h1>

</div>

<div class = "client-login-text">
<p (click) = "routeToLogin()">Internal Portal</p>
</div>

<!-- <p class="or">OR</p> -->

<div class="googleLogin">
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/app/client-login/client-login.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
left: 0;
}

.client-login-text {
// margin-left: 580px;
cursor: pointer;
text-decoration: underline white;
}

.background-img{
position: fixed;
bottom: 0em;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/app/client-login/client-login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export class ClientLoginComponent {

constructor(private router: Router, private clientService: ClientService, private authService: AuthService) { }

routeToLogin() {
this.router.navigate(['/login']);
}

loginUser(): void {
this.logInClicked = true;
this.clientService.loginClient({ email: this.email, password: this.password }).subscribe({
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/app/login-page/login-page.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->
<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->
<div class="login-container">
<img src="/assets/background2.svg" alt="background image" class="background-img">

Expand Down Expand Up @@ -29,6 +31,9 @@ <h1>Log in</h1>
<button type="button" class="btn" (click)="loginUser()">Log in <mat-spinner style="margin:0em 0.6em;" [diameter]="20" *ngIf="logInClicked"></mat-spinner></button>
</div>

<div class = "client-login-text">
<p (click) = "routeToClient()">Client Portal</p>
</div>
<!-- <p class="or">OR</p> -->

<div class="googleLogin">
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/app/login-page/login-page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ mat-slide-toggle{
width: 100%;
}

.client-login-text {
// margin-left: 580px;
cursor: pointer;
text-decoration: underline white;
}

.btn{
background-color: white;
width: 100%;
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/app/login-page/login-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ export class LoginPageComponent {

constructor(private router: Router, private userService: UserService, private authService: AuthService) { }



navigateToDashboard(event: Event) {
event.preventDefault();
this.router.navigate(['/dashboard']);
}

routeToClient() {
this.router.navigate(['/client-login']);
}

loginUser(): void {
this.logInClicked = true;
this.userService.loginUser({ emailAddress: this.email, password: this.password }).subscribe({
Expand Down

0 comments on commit ce13a1d

Please sign in to comment.