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