KI-AGENT: Termin- und Aufgabenaktionen in Phasen repariert

This commit is contained in:
2026-09-06 21:35:35 +02:00
parent b5419bb5ea
commit 4e4466ff11
2 changed files with 23 additions and 3 deletions

View File

@@ -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) => {
<UButton
v-if="item.active"
v-for="button in item.quickactions"
@click="router.push(`${button.link}&${props.queryStringData}`)"
@click="router.push(getQuickActionTarget(button.link))"
>
{{button.label}}
</UButton>