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
+25
View File
@@ -336,3 +336,28 @@ export async function updateRevisionStatus(id: string, projectId: string, status
revalidatePath(`/projects/${projectId}`);
}
export async function updateProjectSettings(projectId: string, progressType: "manual" | "auto", progress: number, revisionQuota: number) {
const { supabase, userId } = await getCurrentUserId();
if (!projectId) {
throw new Error("Proje ID zorunludur.");
}
const { error } = await supabase
.from("projects")
.update({
progress_type: progressType,
progress: progress,
revision_quota: revisionQuota
})
.eq("id", projectId)
.eq("user_id", userId);
if (error) {
throw new Error(`Ayarlar güncellenemedi: ${error.message}`);
}
revalidatePath("/projects");
revalidatePath(`/projects/${projectId}`);
}