Commit ce6154cd by Natthaphat

เพิ่ม modal Excel Report, Table memployee

parent 8d6cbd3d
......@@ -148,12 +148,16 @@ export class ExcelListComponent implements OnInit {
modalRefaddChild: any;
modalRefexcel_portal: MatDialogRef<any>;
modalRefvideoModal: any;
modalRefprintModal: any;
modalRefmodalData: any;
searchText: string = '';
@ViewChild('addGroupModal') addGroupModal!: TemplateRef<any>;
@ViewChild('addChildModal') addChildModal!: TemplateRef<any>;
@ViewChild('excel_portalModal') excel_portalModal!: TemplateRef<any>;
@ViewChild('videoModal') videoModal!: TemplateRef<any>;
@ViewChild('printModal') printModal!: TemplateRef<any>;
@ViewChild('modalData') modalData!: TemplateRef<any>;
constructor(private excelReportService: ExcelReportService,
private modalService: NgbModal,
private customCubeService: CustomCubeService,
......@@ -352,13 +356,6 @@ export class ExcelListComponent implements OnInit {
}
});
}
// openVideoModal(targetModal: TemplateRef<any>, videoLink: string) {
// this.videoLink = this.convertToEmbedUrl(videoLink)
// this.modalService.open(targetModal, {
// centered: true,
// windowClass: 'my-dialog-video-preview'
// })
// }
openVideoModal(videoLink: string) {
this.videoLink = this.convertToEmbedUrl(videoLink);
this.modalRefvideoModal = this.modal.open(this.videoModal, {
......@@ -368,14 +365,6 @@ export class ExcelListComponent implements OnInit {
backdropClass: 'video-backdrop'
});
}
// openVideoModal(videoLink: string) {
// this.videoLink = this.convertToEmbedUrl(videoLink);
// this.modalRefvideoModal = this.modal.open(this.videoModal, {
// width: '100%',
// height: '100%',
// panelClass: 'video-dialog-custom'
// });
// }
convertToEmbedUrl(youtubeUrl: string): string {
try {
const url = new URL(youtubeUrl);
......@@ -559,12 +548,9 @@ export class ExcelListComponent implements OnInit {
this.openAlertModal(error.message)
})
}
openPrintModal(targetModal: TemplateRef<any>, templateFile: TemplateFileModel) {
openPrintModal(templateFile: TemplateFileModel) {
this.getTemplateFile(templateFile)
this.modalService.open(targetModal, {
centered: true,
size: 'lg'
})
this.openModalprintModal()
}
getTemplateFile(templateFile: TemplateFileModel) {
this.loading = true
......@@ -611,7 +597,7 @@ export class ExcelListComponent implements OnInit {
})
}
openModalData(data: any, modal: any) {
openModalData(data: any) {
this.searchModal = ''
this.page = 1
this.pageSize = 10
......@@ -624,7 +610,7 @@ export class ExcelListComponent implements OnInit {
tableHead: ['ID', 'detailTH', 'detailENG']
}
}
this.modalService.open(modal, { centered: true, size: 'lg' })
this.openModalmodalData()
}
valueDetailFilter(): ValueDetailItem[] {
......@@ -894,15 +880,37 @@ export class ExcelListComponent implements OnInit {
this.modalRefexcel_portal?.close()
}
openModvideoModal() {
openModalvideoModal() {
this.modalRefvideoModal = this.modal.open(this.videoModal, {
width: '1500px',
height: '700px'
})
}
closeModvideoModal() {
this.modalRefexcel_portal?.close()
closeModalvideoModal() {
this.modalRefvideoModal?.close()
}
openModalprintModal() {
this.modalRefprintModal = this.modal.open(this.printModal, {
width: '700px',
height: '300px'
})
}
closeModalprintModal() {
this.modalRefprintModal?.close()
}
openModalmodalData() {
this.modalRefmodalData = this.modal.open(this.modalData, {
width: '800px',
height: '580px'
})
}
closeModalmodalData() {
this.modalRefmodalData?.close()
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment