Commit f00f0e06 by Nattana Chaiyamat

import upload

parent 0da98657
......@@ -54,7 +54,7 @@ export class GroupCompetenciesComponent {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.dataLoading = true
this.fileService.uploadExcel(formData, '').subscribe({
this.fileService.uploadExcel(formData, 'COMPETENCY_GROUP_ASSESSMENT').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -73,7 +73,7 @@ export class GroupCompetenciesComponent {
}
downloadFile() {
const fileName = '.xlsx'
const fileName = 'IMPORT_COMPETENCY_GROUP_ASSESSMENT.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: response => {
const url = window.URL.createObjectURL(response);
......
......@@ -89,7 +89,7 @@ export class EditGroupIndicators implements OnInit {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.dataLoading = true
this.fileService.uploadExcel(formData, '').subscribe({
this.fileService.uploadExcel(formData, 'COMPETENCY_INDICATORS_COURSES').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -108,7 +108,7 @@ export class EditGroupIndicators implements OnInit {
}
downloadFile() {
const fileName = '.xlsx'
const fileName = 'IMPORT_COMPETENCY_INDICATORS.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: response => {
const url = window.URL.createObjectURL(response);
......
......@@ -62,7 +62,7 @@ export class SetApproversComponent {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.groupapprove_listLoading = true
this.fileService.uploadExcel(formData, '').subscribe({
this.fileService.uploadExcel(formData, 'COMPETENCY_GROUP_APPROVE').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -80,7 +80,7 @@ export class SetApproversComponent {
})
}
downloadFile() {
const fileName = '.xlsx'
const fileName = 'IMPORT_COMPETENCY_GROUP_APPROVE.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: response => {
const url = window.URL.createObjectURL(response);
......
......@@ -42,7 +42,7 @@ export class DevelopmentCourseComponent {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.competencyCourse.loading = true
this.fileService.uploadExcel(formData, '').subscribe({
this.fileService.uploadExcel(formData, 'COMPETENCY_COURSE').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -60,7 +60,7 @@ export class DevelopmentCourseComponent {
})
}
downloadFile() {
const fileName = '.xlsx'
const fileName = 'IMPORT_COMPETENCY_COURSE.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: response => {
const url = window.URL.createObjectURL(response);
......
......@@ -48,7 +48,7 @@ export class AssessmentToolComponent {
const formData = new FormData();
formData.append('file', this.selectedFile);
this.assessment.loading = true
this.fileService.uploadExcel(formData, '').subscribe({
this.fileService.uploadExcel(formData, 'COMPETENCY_ASSESSMENT').subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
......@@ -66,7 +66,7 @@ export class AssessmentToolComponent {
})
}
downloadFile() {
const fileName = '.xlsx'
const fileName = 'IMPORT_COMPETENCY_ASSESSMENT.xlsx'
this.fileService.downloadTemplate(fileName).subscribe({
next: 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