diff --git a/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.html b/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.html index 9db7eecaa5..150c2eb234 100644 --- a/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.html +++ b/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.html @@ -34,7 +34,7 @@

{{ file.data.fileType | bulkUploadFileTypePipe }} diff --git a/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.ts b/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.ts index ccab6af55e..1968649f3f 100644 --- a/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.ts +++ b/src/app/features/bulk-upload/last-bulk-upload/last-bulk-upload.component.ts @@ -42,16 +42,16 @@ export class LastBulkUploadComponent implements OnInit { return encodeURI(url); } - public downloadFile(event: Event, key: string): void { + public downloadFile(event: Event, key: string, fileType: string): void { event.preventDefault(); let type: BulkUploadFileType = null; - if (key.includes('staff')) { + if (fileType === 'Worker') { type = this.sanitise ? BulkUploadFileType.WorkerSanitise : BulkUploadFileType.Worker; - } else if (key.includes('workplace')) { + } else if (fileType === 'Establishment') { type = BulkUploadFileType.Establishment; - } else if (key.includes('training')) { + } else if (fileType === 'Training') { type = BulkUploadFileType.Training; }