Skip to content

Commit

Permalink
implement proper duration calculation for in-progress tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
bozerkins committed Oct 13, 2023
1 parent 8345512 commit 2a71ffa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/src/Components/TasksTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,12 @@ function TasksTable({
)}
</TableCell>
<TableCell>
{task.updated && (
<span>{taskDuration(task.created, task.updated)}</span>
{task.status === 'in progress' && (
<span>{taskDuration(task.created, null)}</span>
)}
{task.status !== 'in progress' && (
<span>{taskDuration(task.created, task?.updated)}</span>
)}
{!task.updated && <span>-</span>}
</TableCell>
<TableCell>
{task.images.map((item, index) => {
Expand Down

0 comments on commit 2a71ffa

Please sign in to comment.