From 9df894b78e69dad6bb1c0f4afe343f5609dbd3ec Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 11 Sep 2025 14:11:44 +0300 Subject: [PATCH] SUPPORT-9339: Fix --- .../ErvuFileUploadWithAdditionalFiles.ts | 20 +++- .../Личный кабинет юр лица.page | 100 +----------------- 2 files changed, 20 insertions(+), 100 deletions(-) diff --git a/frontend/src/ts/ervu/component/fileupload/ErvuFileUploadWithAdditionalFiles.ts b/frontend/src/ts/ervu/component/fileupload/ErvuFileUploadWithAdditionalFiles.ts index 89877279..b69b6043 100644 --- a/frontend/src/ts/ervu/component/fileupload/ErvuFileUploadWithAdditionalFiles.ts +++ b/frontend/src/ts/ervu/component/fileupload/ErvuFileUploadWithAdditionalFiles.ts @@ -59,11 +59,21 @@ export class ErvuFileUploadWithAdditionalFiles extends ErvuFileUpload { response: string) => { this.fileUploadFailedEvent.trigger(); this.uploader.cancelAll(); - this.messagesService.error(`Не удалось отправить следующие файлы: ${item.file.name},` - + ` ${this.uploader.getNotUploadedItems() - .map(notUploadeditem => notUploadeditem.file.name) - .join(', ')}.`); + try { + var error = JSON.parse(response); + error.messages.forEach((errorMessage) => { + this.messagesService.error(errorMessage, error); + }) + } + catch (error) { + this.messagesService.error(`Не удалось отправить следующие файлы: ${item.file.name}` + + ` ${this.uploader.getNotUploadedItems() + .map(notUploadeditem => notUploadeditem.file.name) + .join(', ')}.`); + } this.uploader.clearQueue(); + this.mchdFileUploadRef.uploader.clearQueue(); + this.signFileUploadRef.uploader.clearQueue(); this.isDropZoneVisible = true; this.isFilesListVisible = true; this.isProgressBarVisible = false; @@ -74,6 +84,8 @@ export class ErvuFileUploadWithAdditionalFiles extends ErvuFileUpload { this.uploader.onCompleteAll = () => { if (!this.isUploadErrorOccurred) { this.uploader.clearQueue(); + this.mchdFileUploadRef.uploader.clearQueue(); + this.signFileUploadRef.uploader.clearQueue(); this.fileUploadEndEvent.trigger(); this.isProgressBarVisible = false; this.cd.markForCheck(); diff --git a/resources/src/main/resources/business-model/Личный кабинет юр лица.page b/resources/src/main/resources/business-model/Личный кабинет юр лица.page index 901c4492..20deeacb 100644 --- a/resources/src/main/resources/business-model/Личный кабинет юр лица.page +++ b/resources/src/main/resources/business-model/Личный кабинет юр лица.page @@ -3710,54 +3710,8 @@ - - - - - behavior - - {"objectId":"409c0323-011e-4416-a631-f8f852299e1f","packageName":"ervu.component.fileupload","className":"ErvuFileUpload","type":"TS"} - - - - method - - "clearValue" - - - - value - - null - - - - - - - - - - behavior - - {"objectId":"1dc25461-a60e-456b-93cb-cc0f28dc347b","packageName":"ervu.component.fileupload","className":"ErvuFileUpload","type":"TS"} - - - - method - - "clearValue" - - - - value - - null - - - - - + + @@ -3865,54 +3819,8 @@ - - - - - behavior - - {"objectId":"1dc25461-a60e-456b-93cb-cc0f28dc347b","packageName":"ervu.component.fileupload","className":"ErvuFileUpload","type":"TS"} - - - - method - - "clearValue" - - - - value - - null - - - - - - - - - - behavior - - {"objectId":"409c0323-011e-4416-a631-f8f852299e1f","packageName":"ervu.component.fileupload","className":"ErvuFileUpload","type":"TS"} - - - - method - - "clearValue" - - - - value - - null - - - - - + +