|
|
|
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
|
|
import { CommonService } from '../../services/common/common.service';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-generic-header',
|
|
|
|
|
templateUrl: './generic-header.component.html',
|
|
|
|
|
styleUrls: ['./generic-header.component.scss'],
|
|
|
|
|
})
|
|
|
|
|
export class GenericHeaderComponent implements OnInit {
|
|
|
|
|
@Input() userImage = '';
|
|
|
|
|
@Input() showImage = false;
|
|
|
|
|
@Input() showMenu = false;
|
|
|
|
|
@Input() showBack = false;
|
|
|
|
|
@Input() navigate = true;
|
|
|
|
|
@Input() showClose = false;
|
|
|
|
|
@Input() updateDirection = false;
|
|
|
|
|
@Input() headerText = '';
|
|
|
|
|
@Input() backLink: string;
|
|
|
|
|
@Output() trigger= new EventEmitter();
|
|
|
|
|
|
|
|
|
|
public close = 'assets/imgs/cancel.png';
|
|
|
|
|
constructor(public common: CommonService) { }
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
|
|
console.log(this.updateDirection);
|
|
|
|
|
console.log(this.showClose);
|
|
|
|
|
console.log(this.showBack);
|
|
|
|
|
if(this.updateDirection){
|
|
|
|
|
this.showBack=false;
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openProfilePage() {
|
|
|
|
|
this.common.openEditProfile();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
closeModal(){
|
|
|
|
|
console.log("closeModal");
|
|
|
|
|
this.trigger.emit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|