From 39f1716ae2f3d7a61f4f6c288bbeb9190dd3fbc1 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 17 Apr 2026 10:47:45 +0200 Subject: [PATCH] set all automatic tags to readonly, add icon lock to automatic tags --- application/config/stv.php | 28 ++++++++++++------------ public/js/components/Tag/tagFormatter.js | 6 ++++- public/js/tabulator/formatter/tags.js | 17 ++------------ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/application/config/stv.php b/application/config/stv.php index 6aa621a84..a95bdca75 100644 --- a/application/config/stv.php +++ b/application/config/stv.php @@ -133,23 +133,23 @@ $config['students_tab_order'] = [ $config['stv_prestudent_tags'] = [ 'prioone' => ['readonly' => false], - 'priotwo' => ['readonly' => true], + 'priotwo' => ['readonly' => false], 'hinweis' => ['readonly' => false], - 'hinweis_assistenz' => ['readonly' => true], - 'hinweis_kf' => ['readonly' => true], + 'hinweis_assistenz' => ['readonly' => false], + 'hinweis_kf' => ['readonly' => false], 'hinweis_lehrende' => ['readonly' => false], - 'hinweis_stg_kf' => ['readonly' => true], + 'hinweis_stg_kf' => ['readonly' => false], 'finished_stg' => ['readonly' => false], 'finished_kf' => ['readonly' => false], 'inwork_kf' => ['readonly' => false], - 'dd_auto' => ['readonly' => false], - 'wh_auto' => ['readonly' => false], - 'prewh_auto' => ['readonly' => false], //when readonly kein rendering für automatisierte tags - 'out_auto' => ['readonly' => false], - 'zgv_auto' => ['readonly' => false], - 'wiedereinstieg_auto' => ['readonly' => false], - 'stbtr_erh_auto' => ['readonly' => false], - 'beitr_befr_auto' => ['readonly' => false], - 'jgv_auto' => ['readonly' => false], - 'nachteilausgl_auto' => ['readonly' => false], + 'dd_auto' => ['readonly' => true], + 'wh_auto' => ['readonly' => true], + 'prewh_auto' => ['readonly' => true], + 'out_auto' => ['readonly' => true], + 'zgv_auto' => ['readonly' => true], + 'wiedereinstieg_auto' => ['readonly' => true], + 'stbtr_erh_auto' => ['readonly' => true], + 'beitr_befr_auto' => ['readonly' => true], + 'jgv_auto' => ['readonly' => true], + 'nachteilausgl_auto' => ['readonly' => true], ]; diff --git a/public/js/components/Tag/tagFormatter.js b/public/js/components/Tag/tagFormatter.js index 03f067596..76471ec42 100644 --- a/public/js/components/Tag/tagFormatter.js +++ b/public/js/components/Tag/tagFormatter.js @@ -39,7 +39,11 @@ export function idTagFormatter (id, tagData, tagComponent, typeId) tagsToShow.forEach(tag => { let tagElement = document.createElement('span'); - tagElement.innerText = tag.beschreibung; + + if(tag.automatisiert) + tagElement.innerHTML = " " + tag.beschreibung; + else + tagElement.innerText = tag.beschreibung; tagElement.title = tag.notiz; tagElement.className = "tag " + tag.style; diff --git a/public/js/tabulator/formatter/tags.js b/public/js/tabulator/formatter/tags.js index 855bdba82..906f2fc6c 100644 --- a/public/js/tabulator/formatter/tags.js +++ b/public/js/tabulator/formatter/tags.js @@ -1,7 +1,5 @@ export function tagFormatter(cell, tagComponent) { - //TODO readOnlyComponents nicht in der TagComponent enthalten - //console.log(JSON.stringify(tagComponent)); const mappedData = tagComponent.tags.map(tag => ({ typ_kurzbz: tag.tag_typ_kurzbz, automatisiert: tag.automatisiert @@ -40,7 +38,6 @@ export function tagFormatter(cell, tagComponent) tagsToShow.forEach(tag => { if (!tag) return; - let tagElement = document.createElement('span'); tagElement.innerText = tag.beschreibung; tagElement.title = tag.notiz; @@ -49,20 +46,10 @@ export function tagFormatter(cell, tagComponent) const tagDef = mappedData.find(t => t.typ_kurzbz === tag.typ_kurzbz); - if (tagDef?.automatisiert) - tagElement.className += " tag_auto"; - -/* TODO delete Testoutputs - if (!tagDef) { - console.log(tag.typ_kurzbz + " nicht in TagComponent enthalten"); + if (!tagDef && tag.typ_kurzbz.includes("_auto") || tagDef?.automatisiert) { tagElement.className += " tag_auto"; + tagElement.innerHTML = " " + tag.beschreibung; } - else if (tagDef?.automatisiert) { - console.log(tag.typ_kurzbz + " ist automatisiert"); - tagElement.className += " tag_auto"; - } else - console.log (tag.typ_kurzbz + " nicht automatisiert"); -*/ tagElement.addEventListener('click', (event) => { event.stopPropagation();