From 4a503a27ab7b980fdce2d5e31d6d3a3cac169a30 Mon Sep 17 00:00:00 2001 From: Dietrich Schulten Date: Mon, 18 Apr 2022 18:02:52 +0200 Subject: [PATCH 1/2] #3: Start work on profile-specific enrichment --- src/App.svelte | 12 +- src/Datenfeld.svelte | 4 + src/Datenfeldgruppe.svelte | 1 + src/profiles/seitenbau/Field.svelte | 264 ++++++++++++++++++++++++++++ 4 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 src/profiles/seitenbau/Field.svelte diff --git a/src/App.svelte b/src/App.svelte index f13ab29..0c2aee2 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -18,8 +18,14 @@ let formHandle; let stammdatenschemaValue; - // let stammdatenschemaElement = example; - let stammdatenschemaElement; + let stammdatenschemaElement = example; + // let stammdatenschemaElement; + + let maskInformation = { + profile: { + seitenbau: {} + } + }; $: if (stammdatenschemaElement) { stammdatenschemaValue = stammdatenschemaElement.value; @@ -113,7 +119,7 @@ {#if stammdatenschemaValue}

{stammdatenschemaValue.stammdatenschema.name}

- + {/if} \ No newline at end of file diff --git a/src/Struktur.svelte b/src/Struktur.svelte index 9f11ec5..1d011a1 100644 --- a/src/Struktur.svelte +++ b/src/Struktur.svelte @@ -133,7 +133,7 @@ if (window.confirm(`Möchten Sie das Element '${bezeichnungEingabe}' wirklich löschen?`)) { parentStructures.splice(index, 1) dispatch('structuresChanged') - dispatch('currentItemSelected', {enthaelt: {}}); + dispatch('currentItemSelected', {current:{enthaelt: {}}}); } } @@ -179,7 +179,7 @@ }; parentStructures.splice(index + 1, 0, newGroup) dispatch('structuresChanged') - dispatch('currentItemSelected', newGroup); + dispatch('currentItemSelected', {current:newGroup, fimIdPath: fimIdPath}); } function addField(index) { @@ -250,7 +250,7 @@ }; console.log(`new field: ${JSON.stringify(newField)}`) parentStructures.splice(index + 1, 0, newField) - dispatch('currentItemSelected', newField); + dispatch('currentItemSelected', {current:newField, fimIdPath: fimIdPath}); dispatch('structuresChanged') } @@ -296,7 +296,7 @@ }; parentStructures[index].enthaelt.datenfeldgruppe.struktur.splice(0, 0, newGroup) dispatch('structuresChanged') - dispatch('currentItemSelected', newGroup); + dispatch('currentItemSelected', {current:newGroup, fimIdPath: fimIdPath}); open = true; } @@ -368,7 +368,7 @@ }; parentStructures[index].enthaelt.datenfeldgruppe.struktur.splice(0, 0, newField) dispatch('structuresChanged') - dispatch('currentItemSelected', newField); + dispatch('currentItemSelected', {current:newField, fimIdPath: fimIdPath}); open = true; }