From bebc69afdee99c1242b1889b7dac63467af3337d Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Tue, 18 Aug 2020 08:06:59 +0200 Subject: [PATCH] fixed spaces in measurement name --- src/app/documentation/documentation.component.ts | 3 +++ src/app/samples/samples.component.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/documentation/documentation.component.ts b/src/app/documentation/documentation.component.ts index 58d7674..fa7cacb 100644 --- a/src/app/documentation/documentation.component.ts +++ b/src/app/documentation/documentation.component.ts @@ -1,6 +1,9 @@ import { Component, OnInit } from '@angular/core'; import {ApiService} from '../services/api.service'; +// TODO: links to BIC +// TODO: bic structure image + @Component({ selector: 'app-documentation', templateUrl: './documentation.component.html', diff --git a/src/app/samples/samples.component.ts b/src/app/samples/samples.component.ts index db131b9..993f2b3 100644 --- a/src/app/samples/samples.component.ts +++ b/src/app/samples/samples.component.ts @@ -132,7 +132,11 @@ export class SamplesComponent implements OnInit { const parameterName = encodeURIComponent(parameter.name); // exclude spectrum and duplicates if (parameter.name !== 'dpt' && !templateKeys.find(e => new RegExp('.' + parameterName + '$').test(e.id))) { - const collectionNames = {material: 'material.properties', condition: 'condition', measurement: 'measurements.' + item.name}; + const collectionNames = { + material: 'material.properties', + condition: 'condition', + measurement: 'measurements.' + encodeURIComponent(item.name) + }; templateKeys.push({ id: `${collectionNames[collection]}.${parameterName}`, label: `${this.ucFirst(item.name)} ${parameter.name}`,