You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm_moe/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.ts

52 lines
1.4 KiB
TypeScript

6 years ago
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { WorklistSettingComponent } from 'src/app/notification/worklist-setting/worklist-setting.component';
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;
6 years ago
@Input() showClose = false;
@Input() updateDirection = false;
@Input() headerText = '';
@Input() backLink: string;
@Input() worklistSetting = false;
6 years ago
@Output() trigger = new EventEmitter();
6 years ago
public close = 'assets/imgs/cancel.png';
constructor(
public common: CommonService,
public modalController: ModalController) { }
6 years ago
ngOnInit() {
6 years ago
if (this.updateDirection) {
this.showBack = false;
6 years ago
}
}
openProfilePage() {
this.common.openProfile('sideMenu');
}
6 years ago
closeModal() {
this.trigger.emit();
6 years ago
}
async openNotifictionSetting() {
const modal = await this.modalController.create({
component: WorklistSettingComponent,
cssClass: 'app-update-modal-css',
});
return await modal.present();
}
}