From 85a1bbc584c2b0abee8455f1310583c108d4468f Mon Sep 17 00:00:00 2001 From: Alma Date: Sat, 12 Apr 2025 23:29:13 +0200 Subject: [PATCH] working leantime widget 133 --- app/api/leantime/tasks/route.ts | 4 ++-- components/flow.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/leantime/tasks/route.ts b/app/api/leantime/tasks/route.ts index ff6442f7..e248b103 100644 --- a/app/api/leantime/tasks/route.ts +++ b/app/api/leantime/tasks/route.ts @@ -161,8 +161,8 @@ export async function GET(request: NextRequest) { const taskEditorId = String(task.editorId).trim(); const currentUserId = String(userId).trim(); - // Show tasks where the user is the editor or the task is unassigned - return taskEditorId === currentUserId || taskEditorId === ''; + // Only show tasks where the user is the editor + return taskEditorId === currentUserId; }) .map((task: any) => ({ id: task.id.toString(), diff --git a/components/flow.tsx b/components/flow.tsx index c5ca6e50..00d19c6f 100644 --- a/components/flow.tsx +++ b/components/flow.tsx @@ -129,7 +129,7 @@ export function Flow() { }); console.log('Sorted tasks:', sortedTasks); - setTasks(sortedTasks.slice(0, 6)); + setTasks(sortedTasks.slice(0, 7)); } catch (error) { console.error('Error fetching tasks:', error); setError(error instanceof Error ? error.message : 'Failed to fetch tasks');