diff --git a/components/EntityShow.vue b/components/EntityShow.vue index 25df1d4..2cae22e 100644 --- a/components/EntityShow.vue +++ b/components/EntityShow.vue @@ -101,13 +101,20 @@ const changeActivePhase = async (key) => { return p }) - await supabase.from("projects").update({phases: item.phases}).eq("id",item.id) + const {error:updateError} = await supabase.from("projects").update({phases: item.phases}).eq("id",item.id) + + console.log(updateError) + + 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") + } const invoiceDeliveryNotes = () => {