From 2a71ffa8900d1b8f273df11d354d08351f5cde3b Mon Sep 17 00:00:00 2001 From: Bogdans Ozerkins Date: Thu, 12 Oct 2023 19:11:59 -0700 Subject: [PATCH] implement proper duration calculation for in-progress tasks --- web/src/Components/TasksTable.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/Components/TasksTable.js b/web/src/Components/TasksTable.js index 721e9f49..725aca61 100644 --- a/web/src/Components/TasksTable.js +++ b/web/src/Components/TasksTable.js @@ -353,10 +353,12 @@ function TasksTable({ )} - {task.updated && ( - {taskDuration(task.created, task.updated)} + {task.status === 'in progress' && ( + {taskDuration(task.created, null)} + )} + {task.status !== 'in progress' && ( + {taskDuration(task.created, task?.updated)} )} - {!task.updated && -} {task.images.map((item, index) => {