Profile page #30

Open
Sieciech wants to merge 34 commits from 29-profile-page into dev
2 changed files with 8 additions and 10 deletions
Showing only changes of commit c2fc2734b5 - Show all commits

View File

@ -1,5 +1,3 @@
import { UserModel } from "./user.model";
export class PersonModel {
id: number;
name: string;

View File

@ -1,6 +1,6 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
import { ActivatedRoute, ActivatedRouteSnapshot, ActivationStart, Data, Router, RoutesRecognized } from '@angular/router';
import { ActivatedRoute, Data, Router, RoutesRecognized } from '@angular/router';
import { PersonModel } from 'src/app/modules/auth/models/person.model';
import { AuthService } from 'src/app/modules/auth/services/auth/auth.service';
import { ProfileTabEnum } from '../../enums/profile-tab.enum';
@ -83,7 +83,7 @@ export class ProfileEditComponent implements AfterViewInit {
});
}
loadPerson(personId: number) {
loadPerson(personId: number): void {
this.person = undefined;
this.loaded = false;
this.personService.get(personId).subscribe(person => {
@ -92,7 +92,7 @@ export class ProfileEditComponent implements AfterViewInit {
});
}
updateScroller() {
updateScroller(): void {
this.scrollHeader.nativeElement.style.height = '0px';
this.headerHeight = this.scrollHeader.nativeElement.scrollHeight;
this.maxHeaderMove = this.scrollHeader.nativeElement.firstChild.scrollHeight;
@ -106,7 +106,7 @@ export class ProfileEditComponent implements AfterViewInit {
}, 50);
}
activated(component) {
activated(component): void {
if (component.footerElement) {
this.footerElement = component.footerElement;
}
@ -118,14 +118,14 @@ export class ProfileEditComponent implements AfterViewInit {
}, 50);
}
deactivated(component) {
deactivated(component): void {
this.footerElement = undefined;
setTimeout(() => {
this.updateScroller();
}, 50);
}
onscrol(e) {
onscrol(e): void {
this.headerMove = Math.min(e.target.scrollTop, this.maxHeaderMove);
}