mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
set all automatic tags to readonly, add icon lock to automatic tags
This commit is contained in:
+14
-14
@@ -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],
|
||||
];
|
||||
|
||||
@@ -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 = "<i class='fa-solid fa-lock'></i> " + tag.beschreibung;
|
||||
else
|
||||
tagElement.innerText = tag.beschreibung;
|
||||
tagElement.title = tag.notiz;
|
||||
tagElement.className = "tag " + tag.style;
|
||||
|
||||
|
||||
@@ -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 = "<i class='fa-solid fa-lock'></i> " + 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();
|
||||
|
||||
Reference in New Issue
Block a user