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.
mohemmhmg/Mohem/src/app/absence/view-attachments/view-attachments.component.ts

40 lines
1.4 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { AbsenceAttahcment } from '../models/abs.attach';
import { AbsenceAttahcmentResponse } from '../models/abs.attach.response';
@Component({
selector: 'app-view-attachments',
templateUrl: './view-attachments.component.html',
styleUrls: ['./view-attachments.component.scss']
})
export class ViewAttachmentsComponent implements OnInit {
AttachmentList: AbsenceAttahcment[];
constructor(
public common: CommonService,
public modalCtrl: ModalController,
public ts: TranslatorService
) {}
ngOnInit() {
this.AttachmentList = this.common.sharedService.getSharedData(
AbsenceAttahcmentResponse.SHARED_DATA
);
}
async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData(
{ displayData: value, TypeData: Type },
'WorkListAttachViewPage'
);
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});
modal.onDidDismiss().then(data => {});
return await modal.present();
}
}