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 {
|
import {
|
||||||
makeTextColumn,
|
makeTextColumn,
|
||||||
makeGroupColumn,
|
makeGroupColumn,
|
||||||
makeNumericColumn,
|
makeColumn,
|
||||||
makeNumericColumnPlanFact
|
makeNumericColumnPlanFact,
|
||||||
|
makeDateSorter
|
||||||
} from "../../components/Table";
|
} from "../../components/Table";
|
||||||
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from "./functions";
|
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from "./functions";
|
||||||
import { invokeWebApiWrapperAsync } from '../../components/factory';
|
import { invokeWebApiWrapperAsync } from '../../components/factory';
|
||||||
@ -128,8 +129,22 @@ export default function ClusterWells({ clusterData }) {
|
|||||||
(text) => text ?? '-'
|
(text) => text ?? '-'
|
||||||
),
|
),
|
||||||
makeGroupColumn("Фактические сроки", [
|
makeGroupColumn("Фактические сроки", [
|
||||||
makeNumericColumn("начало", "factStart", null, null, (dateString) => !Number.isNaN(new Date(dateString).getTime()) ? new Date(dateString).toLocaleString() : '-'),
|
makeColumn("начало", "factStart",
|
||||||
makeNumericColumn("окончание", "factEnd", null, null, (dateString) => !Number.isNaN(new Date(dateString).getTime()) ? new Date(dateString).toLocaleString() : '-'),
|
{
|
||||||
|
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(
|
makeNumericColumnPlanFact(
|
||||||
"Продолжительность",
|
"Продолжительность",
|
||||||
|
Loading…
Reference in New Issue
Block a user