From 8ac9ba43661132af445e0112d8dd96f540cbaebd Mon Sep 17 00:00:00 2001 From: Alma Date: Sat, 12 Apr 2025 16:04:08 +0200 Subject: [PATCH] working leantime widget 62 --- components/flow.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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() {

{task.headline}

+ {task.dateToFinish && task.dateToFinish !== '0000-00-00 00:00:00' && ( +

+ Due: {formatDate(task.dateToFinish)} +

+ )} ))}