Skip to content

Commit

Permalink
CSV nettoyage
Browse files Browse the repository at this point in the history
  • Loading branch information
mayalb committed Nov 20, 2023
1 parent 14dcd8b commit 125c2e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ export default (class extends React.Component<Props, State> {
}
let ontologyData = ontology;
let textData = item.text !== '' ? item.text : 'none';
data +=
project.shareName +
if(!(item.startTime===0 && item.stopTime===0)){
data +=
project.title +
' , ' +
item.startTime +
' , ' +
Expand All @@ -131,6 +132,8 @@ export default (class extends React.Component<Props, State> {
relationConcept +
'\n';

}

this.setState((prevState) => ({ ...prevState, dat: data }));

return this.state;
Expand All @@ -145,12 +148,12 @@ export default (class extends React.Component<Props, State> {
if ((window.navigator as any).msSaveOrOpenBlob) {
(window.navigator as any).msSaveBlob(
blob,
'annotations_CSV_' + project.shareName
'annotations_CSV_' + project.title
);
} else {
var elem = window.document.createElement('a');
elem.href = window.URL.createObjectURL(blob);
elem.download = 'annotations_' + project.shareName + '.csv';
elem.download = 'annotations_' + project.title + '.csv';
document.body.appendChild(elem);
elem.click();
document.body.removeChild(elem);
Expand Down
2 changes: 1 addition & 1 deletion packages/client/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit 125c2e7

Please sign in to comment.