Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(export): added possibility of exporting merged CSV files #949

Merged
merged 19 commits into from
Dec 13, 2021

Conversation

LAMM26
Copy link
Contributor

@LAMM26 LAMM26 commented Nov 24, 2021

Please check if the PR fulfills these requirements

What is the current behavior? (You can also link to an open issue here)
When exporting multiple layers, if the comma separated CSV or Excel compatible CSV option is selected, one CSV file is exported per layer.

What is the new behavior?

  • When the comma separated CSV or Excel compatible CSV option and two or more layers are selected, a toggle gives the option to combine all layers into one file.
  • When the above toggle is toggled, another toggle gives the option to add an empty line between layers in the file.
  • A layer column has been added to CSV files.
  • When the user uses the Spatial Filter tool and clicks the Export results button, the "Zone" layer is unselected by default.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Other information:

filename = data.name;
}
} else {
filename = "combinedLayers";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translation would be better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
});
};
if ((data.format === ExportFormat.CSVsemicolon || data.format === ExportFormat.CSVcomma) && data.combineLayers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be put into else condition (line 561) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

() => {
this.onFileExportSuccess();

featuresCSV.forEach(feature => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create method instead ? Could be also use for geomType at line 609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants