diff --git a/components/flow.tsx b/components/flow.tsx index 2e1a1bbd..fd56aac0 100644 --- a/components/flow.tsx +++ b/components/flow.tsx @@ -16,6 +16,7 @@ interface Task { date: string; editFrom: string; editTo: string; + editorId: string; authorFirstname?: string; authorLastname?: string; tags?: string; @@ -114,7 +115,11 @@ export function Flow() { // Sort tasks by date (oldest first) const sortedTasks = data.tasks - .filter((task: Task) => task.headline && typeof task.headline === 'string') + .filter((task: Task) => + task.headline && + typeof task.headline === 'string' && + task.editorId // Only show tasks assigned to the current user + ) .sort((a: Task, b: Task) => getDateToSort(a) - getDateToSort(b)); // Limit to 6 tasks @@ -166,6 +171,11 @@ export function Flow() {
+ Due: {formatDate(task.dateToFinish)} +
+ )} ))}