Fix Change Phase

This commit is contained in:
2025-10-06 15:49:23 +02:00
parent 02330e2173
commit 4054d1acf8

View File

@@ -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")