Skip to content

Commit

Permalink
Narrow job dates in task job list (#8967)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max authored Jan 20, 2025
1 parent 6fead08 commit 39d4cb0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions cvat-ui/src/components/job-item/job-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import { useSelector } from 'react-redux';
import { CombinedState } from 'reducers';
import JobActionsMenu from './job-actions-menu';

function formatDate(value: moment.Moment): string {
return value.format('MMM Do YYYY HH:mm');
}

interface Props {
job: Job;
task: Task;
Expand Down Expand Up @@ -141,14 +145,14 @@ function JobItem(props: Props): JSX.Element {
</Row>
<Row className='cvat-job-item-dates-info'>
<Col>
<Text>Created on </Text>
<Text type='secondary'>{`${created.format('MMMM Do YYYY HH:mm')}`}</Text>
<Text>Created: </Text>
<Text type='secondary'>{`${formatDate(created)}`}</Text>
</Col>
</Row>
<Row>
<Col>
<Text>Last updated </Text>
<Text type='secondary'>{`${updated.format('MMMM Do YYYY HH:mm')}`}</Text>
<Text>Updated: </Text>
<Text type='secondary'>{`${formatDate(updated)}`}</Text>
</Col>
</Row>
</Col>
Expand Down Expand Up @@ -233,7 +237,11 @@ function JobItem(props: Props): JSX.Element {
<Col>
<Icon component={DurationIcon} />
<Text>Duration: </Text>
<Text type='secondary'>{`${moment.duration(now.diff(created)).humanize()}`}</Text>
<Text type='secondary'>
{`${moment
.duration(now.diff(created))
.humanize()}`}
</Text>
</Col>
</Row>
<Row>
Expand Down

0 comments on commit 39d4cb0

Please sign in to comment.