From 4e4466ff11bf84c3a259f33fd81b9be105e0ba2e Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sun, 6 Sep 2026 21:35:35 +0200 Subject: [PATCH] KI-AGENT: Termin- und Aufgabenaktionen in Phasen repariert --- frontend/components/EntityShowSubPhases.vue | 22 ++++++++++++++++++- frontend/pages/projecttypes/[mode]/[[id]].vue | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/frontend/components/EntityShowSubPhases.vue b/frontend/components/EntityShowSubPhases.vue index 9ef46d6..aac7ce9 100644 --- a/frontend/components/EntityShowSubPhases.vue +++ b/frontend/components/EntityShowSubPhases.vue @@ -96,6 +96,26 @@ const togglePhasePanel = (phase) => { openPhaseKey.value = openPhaseKey.value === phase.key ? null : phase.key } +const getQuickActionTarget = (link) => { + const [configuredPath, configuredQuery = ""] = String(link || "").split("?") + const query = Object.fromEntries(new URLSearchParams(configuredQuery)) + let path = configuredPath + + // Bereits gespeicherte Phasenvorlagen können noch die alten Routen enthalten. + if (configuredPath === "/tasks/create") { + path = "/tasks" + query.mode = "create" + } else if (configuredPath === "/events/edit") { + path = "/standardEntity/events/create" + } + + new URLSearchParams(props.queryStringData || "").forEach((value, key) => { + query[key] = value + }) + + return { path, query } +} + const changeActivePhase = async (key) => { console.log(props.item) let item = await useEntities("projects").selectSingle(props.item.id,'*') @@ -175,7 +195,7 @@ const changeActivePhase = async (key) => { {{button.label}} diff --git a/frontend/pages/projecttypes/[mode]/[[id]].vue b/frontend/pages/projecttypes/[mode]/[[id]].vue index c7af80a..b7c895f 100644 --- a/frontend/pages/projecttypes/[mode]/[[id]].vue +++ b/frontend/pages/projecttypes/[mode]/[[id]].vue @@ -279,10 +279,10 @@ const addPhase = () => { @click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Rechnung',link:'/createDocument/edit/?type=invoices'})">Rechnung Erstellen Aufgabe Erstellen + @click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Aufgabe',link:'/tasks?mode=create'})">Aufgabe Erstellen Termin Erstellen + @click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Termin',link:'/standardEntity/events/create'})">Termin Erstellen