diff --git a/Customizations/Layers/Bookcases.ts b/Customizations/Layers/Bookcases.ts
index 16f78d95bc..7a2311c7af 100644
--- a/Customizations/Layers/Bookcases.ts
+++ b/Customizations/Layers/Bookcases.ts
@@ -119,7 +119,10 @@ export class Bookcases extends LayerDefinition {
key: "ref",
template: "Het referentienummer is $$$",
renderTemplate: "Gekend als {brand} {ref}"
- }
+ },
+ mappings: [
+ {k: new And([new Tag("brand",""), new Tag("nobrand","yes"), new Tag("ref", "")]), txt: "Maakt geen deel uit van een groter netwerk"}
+ ]
}).OnlyShowIf(new Tag("brand","*")),
new TagRenderingOptions({
diff --git a/Customizations/Questions/NameInline.ts b/Customizations/Questions/NameInline.ts
index 83458a5b75..5c9d4e69aa 100644
--- a/Customizations/Questions/NameInline.ts
+++ b/Customizations/Questions/NameInline.ts
@@ -1,5 +1,6 @@
import {TagRenderingOptions} from "../TagRendering";
import {And, Tag} from "../../Logic/TagsFilter";
+import {UIElement} from "../../UI/UIElement";
export class NameInline extends TagRenderingOptions{
@@ -8,7 +9,7 @@ export class NameInline extends TagRenderingOptions{
return string.charAt(0).toUpperCase() + string.slice(1);
}
- constructor(category: string) {
+ constructor(category: string ) {
super({
question: "",
diff --git a/Customizations/TagRendering.ts b/Customizations/TagRendering.ts
index 2be71e0290..231c820528 100644
--- a/Customizations/TagRendering.ts
+++ b/Customizations/TagRendering.ts
@@ -262,8 +262,8 @@ class TagRendering extends UIElement implements TagDependantUIElement {
if (this._question !== undefined) {
this._editButton = new FixedUiElement("")
.onClick(() => {
- self._questionElement.GetValue().setData(self.CurrentValue());
self._editMode.setData(true);
+ self._questionElement.ShowValue(self.CurrentValue());
});
}
@@ -297,7 +297,6 @@ class TagRendering extends UIElement implements TagDependantUIElement {
const previousTexts= [];
for (const mapping of options.mappings) {
- console.log(mapping);
if(mapping.k === null){
continue;
}
@@ -306,7 +305,6 @@ class TagRendering extends UIElement implements TagDependantUIElement {
}
previousTexts.push(mapping.txt);
- console.log("PUshed")
elements.push(this.InputElementForMapping(mapping));
}
}
@@ -349,8 +347,8 @@ class TagRendering extends UIElement implements TagDependantUIElement {
return tag;
}
return new And([
- freeform.extraTags,
- tag
+ tag,
+ freeform.extraTags
]
);
};
@@ -362,7 +360,6 @@ class TagRendering extends UIElement implements TagDependantUIElement {
} else if (tag instanceof Tag) {
return tag.value
}
- console.log("Could not decode tag to string", tag)
return undefined;
}
@@ -392,10 +389,11 @@ class TagRendering extends UIElement implements TagDependantUIElement {
}
private CurrentValue(): TagsFilter {
+ console.log("Creating a current value...")
const tags = TagUtils.proprtiesToKV(this._source.data);
for (const oneOnOneElement of this._mapping.concat(this._renderMapping)) {
- if (oneOnOneElement.k === null || oneOnOneElement.k.matches(tags)) {
+ if (oneOnOneElement.k !== null && oneOnOneElement.k.matches(tags)) {
return oneOnOneElement.k;
}
}
@@ -403,6 +401,7 @@ class TagRendering extends UIElement implements TagDependantUIElement {
return undefined;
}
+ console.log("Got a freeform tag:", new Tag(this._freeform.key, this._source.data[this._freeform.key]))
return new Tag(this._freeform.key, this._source.data[this._freeform.key]);
}
@@ -469,7 +468,7 @@ class TagRendering extends UIElement implements TagDependantUIElement {
return "