- updates from lifecyle component.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-26 17:46:37 -05:00
parent 86c3806e28
commit 76b25a716c
3 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import React, {useCallback, useEffect, useState} from 'react';
import moment from "moment";
import day from '../../utils/day';
import axios from 'axios';
import {Badge, Card, Space, Table, Tag} from 'antd';
import {gql, useQuery} from "@apollo/client";
@@ -69,7 +69,7 @@ export function JobLifecycleComponent({job, statuses, ...rest}) {
dataIndex: 'start',
key: 'start',
render: (text) => DateTimeFormatterFunction(text),
sorter: (a, b) => moment(a.start).unix() - moment(b.start).unix(),
sorter: (a, b) => day(a.start).unix() - day(b.start).unix(),
},
{
title: t('job_lifecycle.columns.relative_start'),
@@ -87,7 +87,7 @@ export function JobLifecycleComponent({job, statuses, ...rest}) {
}
return isEmpty(a.end) ? 1 : -1;
}
return moment(a.end).unix() - moment(b.end).unix();
return day(a.end).unix() - day(b.end).unix();
},
render: (text) => isEmpty(text) ? t('job_lifecycle.content.not_available') : DateTimeFormatterFunction(text)
},