diff --git a/project/ws/app/src/lib/routes/home/routes/designation/components/bulk-upload/bulk-upload.component.ts b/project/ws/app/src/lib/routes/home/routes/designation/components/bulk-upload/bulk-upload.component.ts index 7c2950a9..703cc6c7 100644 --- a/project/ws/app/src/lib/routes/home/routes/designation/components/bulk-upload/bulk-upload.component.ts +++ b/project/ws/app/src/lib/routes/home/routes/designation/components/bulk-upload/bulk-upload.component.ts @@ -32,6 +32,7 @@ export class BulkUploadComponent implements OnInit, OnDestroy, AfterViewInit { showFileError = false public fileName: any + public fileType: any fileSelected!: any userProfile: any fileUploadDialogInstance: any @@ -140,9 +141,9 @@ export class BulkUploadComponent implements OnInit, OnDestroy, AfterViewInit { const file: File = fileList[0] if (file) { this.fileName = file.name - const fileType = file.type + this.fileType = file.type this.fileSelected = file - if (this.fileService.validateExcelFile(fileType)) { + if (this.fileService.validateExcelFile(this.fileType)) { this.verifyOTP(this.userProfile.email ? 'email' : 'phone') // this.showFileUploadProgress() // this.uploadCSVFile() @@ -170,7 +171,7 @@ export class BulkUploadComponent implements OnInit, OnDestroy, AfterViewInit { } uploadCSVFile(): void { - if (this.fileService.validateFile(this.fileName)) { + if (this.fileService.validateExcelFile(this.fileType)) { if (this.fileSelected) { const formData: FormData = new FormData() formData.append('file', this.fileSelected) diff --git a/project/ws/app/src/lib/routes/home/routes/odcs-mapping/bulk-upload-odcs/bulk-upload-odcs.component.ts b/project/ws/app/src/lib/routes/home/routes/odcs-mapping/bulk-upload-odcs/bulk-upload-odcs.component.ts index 00697caf..6656284a 100644 --- a/project/ws/app/src/lib/routes/home/routes/odcs-mapping/bulk-upload-odcs/bulk-upload-odcs.component.ts +++ b/project/ws/app/src/lib/routes/home/routes/odcs-mapping/bulk-upload-odcs/bulk-upload-odcs.component.ts @@ -31,6 +31,7 @@ export class BulkUploadOdcsComponent implements OnInit, OnDestroy, AfterViewInit showFileError = false public fileName: any + public fileType: any fileSelected!: any userProfile: any fileUploadDialogInstance: any @@ -138,9 +139,9 @@ export class BulkUploadOdcsComponent implements OnInit, OnDestroy, AfterViewInit const file: File = fileList[0] if (file) { this.fileName = file.name - const fileType = file.type + this.fileType = file.type this.fileSelected = file - if (this.fileService.validateExcelFile(fileType)) { + if (this.fileService.validateExcelFile(this.fileType)) { this.verifyOTP(this.userProfile.email ? 'email' : 'phone') } else { this.showFileError = true @@ -166,7 +167,7 @@ export class BulkUploadOdcsComponent implements OnInit, OnDestroy, AfterViewInit } uploadCSVFile(): void { - if (this.fileService.validateFile(this.fileName)) { + if (this.fileService.validateExcelFile(this.fileType)) { if (this.fileSelected) { const formData: FormData = new FormData() formData.append('file', this.fileSelected)