mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4838] Upload Dialog - canceling a pending file cancels the file in progress (#5063)
* add automation id * call cancel upload api only if file is not pending * tests * e2e
This commit is contained in:
committed by
Eugenio Romano
parent
4de00fd6ca
commit
5b9f37d01f
@@ -65,7 +65,11 @@ export class FileUploadingListComponent {
|
||||
* @memberOf FileUploadingListComponent
|
||||
*/
|
||||
cancelFile(file: FileModel): void {
|
||||
this.uploadService.cancelUpload(file);
|
||||
if (file.status === FileUploadStatus.Pending) {
|
||||
file.status = FileUploadStatus.Cancelled;
|
||||
} else {
|
||||
this.uploadService.cancelUpload(file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,8 +165,9 @@ export class FileUploadingListComponent {
|
||||
this.files
|
||||
.filter(
|
||||
(item) =>
|
||||
item.data.entry.id === file.data.entry.id &&
|
||||
item.options.newVersion
|
||||
item.options.newVersion &&
|
||||
item.data.entry.id === file.data.entry.id
|
||||
|
||||
)
|
||||
.map((item) => {
|
||||
item.status = FileUploadStatus.Deleted;
|
||||
|
Reference in New Issue
Block a user