From b903d8ebb1d2df9d8fe0e173c13a46ee861f2672 Mon Sep 17 00:00:00 2001 From: Stefano Ricci <1219739+SteRiccio@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:55:24 +0100 Subject: [PATCH] fixed error exporting filtered data in CSV including files (#3697) * fixed error exporting filtered data in CSV including files * layout adjustments (data export options: limit height) --------- Co-authored-by: Stefano Ricci --- .../service/DataExportJob/jobs/FilesExportJob.js | 9 +++++++-- webapp/views/App/views/Data/DataExport/DataExport.scss | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/modules/dataExport/service/DataExportJob/jobs/FilesExportJob.js b/server/modules/dataExport/service/DataExportJob/jobs/FilesExportJob.js index f08582d244..8586083efb 100644 --- a/server/modules/dataExport/service/DataExportJob/jobs/FilesExportJob.js +++ b/server/modules/dataExport/service/DataExportJob/jobs/FilesExportJob.js @@ -1,3 +1,5 @@ +import { Objects } from '@openforis/arena-core' + import * as Survey from '@core/survey/survey' import Job from '@server/job/job' @@ -14,7 +16,7 @@ export default class FilesExportJob extends Job { } async execute() { - const { survey, cycle, includeDataFromAllCycles, recordUuids } = this.context + const { survey, cycle, fileNamesByFileUuid, includeDataFromAllCycles, recordUuids } = this.context const { fileUuidsByCycle, total } = await SurveyRdbService.fetchEntitiesFileUuidsByCycle( { @@ -31,7 +33,10 @@ export default class FilesExportJob extends Job { // write the files in subfolders by cycle for await (const [cycle, fileUuids] of Object.entries(fileUuidsByCycle)) { for await (const fileUuid of fileUuids) { - await this.writeFile({ fileUuid, cycle }) + const exportedFileName = fileNamesByFileUuid[fileUuid] + if (Objects.isNotEmpty(exportedFileName)) { + await this.writeFile({ fileUuid, cycle }) + } this.incrementProcessedItems() } } diff --git a/webapp/views/App/views/Data/DataExport/DataExport.scss b/webapp/views/App/views/Data/DataExport/DataExport.scss index f1ca1e4dfa..18a4624b6d 100644 --- a/webapp/views/App/views/Data/DataExport/DataExport.scss +++ b/webapp/views/App/views/Data/DataExport/DataExport.scss @@ -4,6 +4,11 @@ align-items: center; gap: 2rem; + .expansion-panel__content { + overflow: auto; + max-height: calc(100vh - 30rem); + } + .form-item { .form-label { text-wrap: nowrap;