feat: implement portal shell layout with user authentication, sidebar navigation, and progress tracking

This commit is contained in:
Poyraz Avsever
2026-06-08 13:56:06 +03:00
parent 47b9f728e6
commit d41267c29b
17 changed files with 582 additions and 130 deletions
+20
View File
@@ -121,3 +121,23 @@ export async function archiveClientRecord(formData: FormData) {
revalidatePath("/clients");
}
export async function updateClientPipelineStage(id: string, stage: string) {
const { supabase, userId } = await getCurrentUserId();
if (!id || !stage) {
throw new Error("Eksik bilgi.");
}
const { error } = await supabase
.from("clients")
.update({ pipeline_stage: stage })
.eq("id", id)
.eq("user_id", userId);
if (error) {
throw new Error(`Aşama güncellenemedi: ${error.message}`);
}
revalidatePath("/clients");
}