From 40afc348e163ec86325a6b7a80ceb46a4db757e5 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Tue, 11 Aug 2020 16:25:09 +0200 Subject: [PATCH] added condition checkbox in JSON download link dialog --- src/app/samples/samples.component.html | 5 ++++- src/app/samples/samples.component.ts | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/samples/samples.component.html b/src/app/samples/samples.component.html index 224fc8c..5c6acf2 100644 --- a/src/app/samples/samples.component.html +++ b/src/app/samples/samples.component.html @@ -111,7 +111,10 @@ add spectra - + + add conditions + + flatten object Copy to clipboard diff --git a/src/app/samples/samples.component.ts b/src/app/samples/samples.component.ts index 03266c6..db184fe 100644 --- a/src/app/samples/samples.component.ts +++ b/src/app/samples/samples.component.ts @@ -34,7 +34,8 @@ export class SamplesComponent implements OnInit { @ViewChild('pageSizeSelection') pageSizeSelection: ElementRef; @ViewChild('linkarea') linkarea: ElementRef; - downloadSpectra = false; + downloadSpectra = false; // TODO: streamline these options after csv option handling is clear + downloadCondition = false; downloadFlatten = true; samples: SampleModel[] = []; totalSamples = 0; // total number of samples @@ -236,6 +237,9 @@ export class SamplesComponent implements OnInit { if (this.downloadSpectra) { query.push('fields[]=measurements.spectrum.dpt'); } + if (this.downloadCondition) { + query.push('fields[]=condition'); + } } return (options.host && isDevMode() ? window.location.host : '') + (options.export ? this.api.hostName : '') +