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 taskEditorId = String(task.editorId).trim();
|
||||||
const currentUserId = String(userId).trim();
|
const currentUserId = String(userId).trim();
|
||||||
|
|
||||||
// Show tasks where the user is the editor or the task is unassigned
|
// Only show tasks where the user is the editor
|
||||||
return taskEditorId === currentUserId || taskEditorId === '';
|
return taskEditorId === currentUserId;
|
||||||
})
|
})
|
||||||
.map((task: any) => ({
|
.map((task: any) => ({
|
||||||
id: task.id.toString(),
|
id: task.id.toString(),
|
||||||
|
|||||||
@ -129,7 +129,7 @@ export function Flow() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log('Sorted tasks:', sortedTasks);
|
console.log('Sorted tasks:', sortedTasks);
|
||||||
setTasks(sortedTasks.slice(0, 6));
|
setTasks(sortedTasks.slice(0, 7));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching tasks:', error);
|
console.error('Error fetching tasks:', error);
|
||||||
setError(error instanceof Error ? error.message : 'Failed to fetch tasks');
|
setError(error instanceof Error ? error.message : 'Failed to fetch tasks');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user