added duration
parent
4e4dc6d7e9
commit
0406b89c7f
|
@ -1,7 +1,7 @@
|
||||||
import { PlusOutlined, ReloadOutlined } from "@ant-design/icons";
|
import { PlusOutlined, ReloadOutlined } from "@ant-design/icons";
|
||||||
import { Badge, Button, Divider, Popconfirm, Space, Table } from "antd";
|
import { Badge, Button, Divider, Popconfirm, Space, Table } from "antd";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Constants, FormatDatetime } from "../../utils";
|
import { Constants, FormatDatetime, GetDuration } from "../../utils";
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -34,6 +34,11 @@ const columns = [
|
||||||
dataIndex: "endedAt",
|
dataIndex: "endedAt",
|
||||||
key: "endedAt",
|
key: "endedAt",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "Duration",
|
||||||
|
dataIndex: "duration",
|
||||||
|
key: "duration",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Action",
|
title: "Action",
|
||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
|
@ -84,10 +89,8 @@ export default function GroupTaskTableList({
|
||||||
step: `${groupTask.CurrentTasksStep} / ${groupTask.NumberOfSteps}`,
|
step: `${groupTask.CurrentTasksStep} / ${groupTask.NumberOfSteps}`,
|
||||||
status: getStatusBadge(groupTask.Status),
|
status: getStatusBadge(groupTask.Status),
|
||||||
startedAt: FormatDatetime(groupTask.StartedAt),
|
startedAt: FormatDatetime(groupTask.StartedAt),
|
||||||
endedAt:
|
duration: GetDuration(groupTask.StartedAt, groupTask.EndedAt),
|
||||||
groupTask.EndedAt !== "0001-01-01T00:00:00Z"
|
endedAt: FormatDatetime(groupTask.EndedAt),
|
||||||
? FormatDatetime(groupTask.EndedAt)
|
|
||||||
: Constants.TEXT_EMPTY_PLACEHOLDER,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue