SUPPORT-8381: fix (2)
This commit is contained in:
parent
0558ac58e0
commit
82e8b11262
1 changed files with 9 additions and 4 deletions
|
|
@ -54,6 +54,7 @@ export class ErvuFileUpload extends InputControl {
|
|||
private fileInputEl: HTMLInputElement;
|
||||
private url: string = '/backend/employee/document';
|
||||
private messagesService: MessagesService;
|
||||
private isUploadErrorOccurred = false;
|
||||
|
||||
constructor(el: ElementRef, cd: ChangeDetectorRef) {
|
||||
super(el, cd);
|
||||
|
|
@ -135,14 +136,17 @@ export class ErvuFileUpload extends InputControl {
|
|||
this.isDropZoneVisible = true;
|
||||
this.isFilesListVisible = true;
|
||||
this.isProgressBarVisible = false;
|
||||
this.isUploadErrorOccurred = true;
|
||||
this.cd.markForCheck();
|
||||
};
|
||||
|
||||
this.uploader.onCompleteAll = () => {
|
||||
this.uploader.clearQueue();
|
||||
this.fileUploadEndEvent.trigger();
|
||||
this.isProgressBarVisible = false;
|
||||
this.cd.markForCheck();
|
||||
if (!this.isUploadErrorOccurred) {
|
||||
this.uploader.clearQueue();
|
||||
this.fileUploadEndEvent.trigger();
|
||||
this.isProgressBarVisible = false;
|
||||
this.cd.markForCheck();
|
||||
}
|
||||
};
|
||||
|
||||
this.uploader.onAfterAddingFile = (fileItem: FileItem) => {
|
||||
|
|
@ -220,6 +224,7 @@ export class ErvuFileUpload extends InputControl {
|
|||
this.isDropZoneVisible = true;
|
||||
this.isFilesListVisible = true;
|
||||
this.isProgressBarVisible = false;
|
||||
this.isUploadErrorOccurred = false;
|
||||
this.cd.markForCheck();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue