From 4054d1acf8208fbb287a1e2da9266f1281dc23d9 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Mon, 6 Oct 2025 15:49:23 +0200 Subject: [PATCH] Fix Change Phase --- components/EntityShowSubPhases.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/EntityShowSubPhases.vue b/components/EntityShowSubPhases.vue index 4e766be..ede77f7 100644 --- a/components/EntityShowSubPhases.vue +++ b/components/EntityShowSubPhases.vue @@ -58,7 +58,7 @@ const renderedPhases = computed(() => { }) const changeActivePhase = async (key) => { - let item = await useSupabaseSelectSingle("projects",props.item.id,'*') + let item = await useEntities("projects").selectSingle(props.item.id,'*') let phaseLabel = "" @@ -75,16 +75,18 @@ const changeActivePhase = async (key) => { return p }) - const {error:updateError} = await supabase.from("projects").update({phases: item.phases}).eq("id",item.id) + const res = await useEntities("projects").update(item.id, {phases:item.phases}) + + //const {error:updateError} = await supabase.from("projects").update({phases: item.phases}).eq("id",item.id) - const {error} = await supabase.from("historyitems").insert({ + /*const {error} = await supabase.from("historyitems").insert({ createdBy: profileStore.activeProfile.id, tenant: profileStore.currentTenant, text: `Aktive Phase zu "${phaseLabel}" gewechselt`, project: item.id - }) + })*/ emit("updateNeeded")