working leantime widget 133
This commit is contained in:
parent
f00089de74
commit
85a1bbc584
@ -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(),
|
||||
|
||||
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user