Skip to content

Commit

Permalink
fixed error exporting filtered data in CSV including files (#3697)
Browse files Browse the repository at this point in the history
* fixed error exporting filtered data in CSV including files

* layout adjustments (data export options: limit height)

---------

Co-authored-by: Stefano Ricci <[email protected]>
  • Loading branch information
SteRiccio and SteRiccio authored Dec 20, 2024
1 parent eb3d56c commit b903d8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Objects } from '@openforis/arena-core'

import * as Survey from '@core/survey/survey'

import Job from '@server/job/job'
Expand All @@ -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(
{
Expand All @@ -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()
}
}
Expand Down
5 changes: 5 additions & 0 deletions webapp/views/App/views/Data/DataExport/DataExport.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b903d8e

Please sign in to comment.