diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx index a8f8043..0e4bf07 100644 --- a/src/pages/Cluster/ClusterWells.jsx +++ b/src/pages/Cluster/ClusterWells.jsx @@ -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( "Продолжительность",