forked from ddrilling/asb_cloud_front
Fixed date sorter for dates in Cluster info table
This commit is contained in:
parent
a21e528f55
commit
22c242cd5e
@ -6,8 +6,9 @@ import { LineChartOutlined, ProfileOutlined } from "@ant-design/icons";
|
||||
import {
|
||||
makeTextColumn,
|
||||
makeGroupColumn,
|
||||
makeNumericColumn,
|
||||
makeNumericColumnPlanFact
|
||||
makeColumn,
|
||||
makeNumericColumnPlanFact,
|
||||
makeDateSorter
|
||||
} from "../../components/Table";
|
||||
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from "./functions";
|
||||
import { invokeWebApiWrapperAsync } from '../../components/factory';
|
||||
@ -128,8 +129,22 @@ export default function ClusterWells({ clusterData }) {
|
||||
(text) => text ?? '-'
|
||||
),
|
||||
makeGroupColumn("Фактические сроки", [
|
||||
makeNumericColumn("начало", "factStart", null, null, (dateString) => !Number.isNaN(new Date(dateString).getTime()) ? new Date(dateString).toLocaleString() : '-'),
|
||||
makeNumericColumn("окончание", "factEnd", null, null, (dateString) => !Number.isNaN(new Date(dateString).getTime()) ? new Date(dateString).toLocaleString() : '-'),
|
||||
makeColumn("начало", "factStart",
|
||||
{
|
||||
sorter: makeDateSorter('factStart'),
|
||||
render: (dateString) => !Number.isNaN(new Date(dateString).getTime())
|
||||
? new Date(dateString).toLocaleString()
|
||||
: '-'
|
||||
}
|
||||
),
|
||||
makeColumn("окончание", "factEnd",
|
||||
{
|
||||
sorter: makeDateSorter('factEnd'),
|
||||
render: (dateString) => !Number.isNaN(new Date(dateString).getTime())
|
||||
? new Date(dateString).toLocaleString()
|
||||
: '-'
|
||||
}
|
||||
),
|
||||
]),
|
||||
makeNumericColumnPlanFact(
|
||||
"Продолжительность",
|
||||
|
Loading…
Reference in New Issue
Block a user