Commit a34155c2 authored by Almouhannad's avatar Almouhannad

(F) Add scolling behavoir when login

parent cf59987b
......@@ -62,7 +62,7 @@
<section id="doctors" class="doctors section">
<div class="container section-title">
<h2>الفريق الطبي</h2>
<h2 style="margin-top: 1em;">الفريق الطبي</h2>
</div>
<div class="container mt">
......@@ -148,7 +148,7 @@
</div>
<div class="col-lg-6 content" data-aos="fade-up" data-aos-delay="100">
<h3 class="text-center">عن المستوصف</h3>
<h3 class="text-center" style="margin-top:1em">عن المستوصف</h3>
<p class="text-center" style="font-weight: 600;">
يوفر مستوصف مركز الدراسات والبحوث العلمية الخدمات الطبية لموظفي المركز
</p>
......
......@@ -5,6 +5,7 @@ import { Router } from '@angular/router';
import { Roles } from '../../../../classes/authentication/roles';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr';
import { ViewportScroller } from '@angular/common';
@Component({
selector: 'app-header',
......@@ -17,7 +18,9 @@ export class HeaderComponent {
constructor(private authenticationService: AuthenticationService,
private router: Router,
private modalService: NgbModal,
private toastrService: ToastrService) { }
private toastrService: ToastrService,
private scroller: ViewportScroller
) { }
//#endregion
//#region Inputs
......@@ -51,6 +54,9 @@ export class HeaderComponent {
onLogin(userData: UserData)
{
this.userData = userData;
this.router.navigate(['']);
this.selectedButton = 'Home';
this.scroller.scrollToPosition([0,0]);
}
//#endregion
......@@ -62,7 +68,9 @@ export class HeaderComponent {
this.toastrService.success("تم تسجيل الخروج بنجاح ✔");
this.userData = null;
this.showDropdown = false;
this.selectedButton = 'Home';
this.router.navigate(['']);
this.scroller.scrollToPosition([0,0]);
}
//#endregion
......
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