Commit 62dc6b82 by Nattana Chaiyamat

import upload

parent 36919723
...@@ -62,7 +62,7 @@ export class SetApproversComponent { ...@@ -62,7 +62,7 @@ export class SetApproversComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.groupapprove_listLoading = true this.groupapprove_listLoading = true
this.fileService.uploadExcel(formData, '').subscribe({ this.fileService.uploadExcel(formData, 'COMPETENCY_GROUP_APPROVE').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -80,7 +80,7 @@ export class SetApproversComponent { ...@@ -80,7 +80,7 @@ export class SetApproversComponent {
}) })
} }
downloadFile() { downloadFile() {
const fileName = '.xlsx' const fileName = 'IMPORT_COMPETENCY_GROUP_APPROVE.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
......
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