forked from ddrilling/asb_cloud_front
Changed well name to router link
This commit is contained in:
parent
dc5b96ccb0
commit
e33f45f119
@ -1,5 +1,5 @@
|
|||||||
import { Table, Tag, Button, Badge, Divider, Modal } from "antd";
|
import { Table, Tag, Button, Badge, Divider, Modal } from "antd";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams, Link } from "react-router-dom";
|
||||||
import { LineChartOutlined, ProfileOutlined } from "@ant-design/icons";
|
import { LineChartOutlined, ProfileOutlined } from "@ant-design/icons";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import {
|
import {
|
||||||
@ -61,7 +61,9 @@ const ModalWindowButton = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
makeTextColumn("скв №", "caption"),
|
makeTextColumn("скв №", "caption", null, null, (_, item) => (
|
||||||
|
<Link to={`/well/${item.id}`}>{item.caption}</Link>
|
||||||
|
)),
|
||||||
makeTextColumn("Секция", "sectionType", filtersSectionsType),
|
makeTextColumn("Секция", "sectionType", filtersSectionsType),
|
||||||
makeNumericColumnPlanFact("Глубина", "sectionWellDepth", filtersMinMax, makeFilterMinMaxFunction),
|
makeNumericColumnPlanFact("Глубина", "sectionWellDepth", filtersMinMax, makeFilterMinMaxFunction),
|
||||||
makeNumericColumnPlanFact(
|
makeNumericColumnPlanFact(
|
||||||
@ -152,7 +154,7 @@ export default function ClusterSections({ clusterData }) {
|
|||||||
well.sections.forEach((section) => {
|
well.sections.forEach((section) => {
|
||||||
let row = {
|
let row = {
|
||||||
key: well.caption + section.id,
|
key: well.caption + section.id,
|
||||||
id: well.caption + section.id,
|
id: well.id,
|
||||||
caption: well.caption,
|
caption: well.caption,
|
||||||
sectionType: section.caption,
|
sectionType: section.caption,
|
||||||
sectionWellDepthPlan: section.plan.wellDepthEnd,
|
sectionWellDepthPlan: section.plan.wellDepthEnd,
|
||||||
|
@ -18,8 +18,9 @@ export default function WellOperationsTable({wellOperations}) {
|
|||||||
const operations = wellOperations.map(el => {
|
const operations = wellOperations.map(el => {
|
||||||
return {
|
return {
|
||||||
key: el.plan?.id ?? el.fact.id,
|
key: el.plan?.id ?? el.fact.id,
|
||||||
sectionType: el.plan?.wellSectionTypeName ?? el.fact.wellSectionTypeName,
|
sectionType: el.plan?.wellSectionTypeName ?? el.fact?.wellSectionTypeName,
|
||||||
operationName: el.plan?.categoryName ?? el.fact.categoryName,
|
operationName: `${el.plan?.categoryName ?? el.fact?.categoryName} ${' '}
|
||||||
|
${el.plan?.categoryInfo ?? el.fact?.categoryInfo ?? ''}`,
|
||||||
depthPlan: el.plan?.wellDepth?.toFixed(0) ?? '-',
|
depthPlan: el.plan?.wellDepth?.toFixed(0) ?? '-',
|
||||||
depthFact: el.fact?.wellDepth?.toFixed(0) ?? '-',
|
depthFact: el.fact?.wellDepth?.toFixed(0) ?? '-',
|
||||||
durationHoursPlan: el.plan?.durationHours?.toFixed(2) ?? '-',
|
durationHoursPlan: el.plan?.durationHours?.toFixed(2) ?? '-',
|
||||||
|
Loading…
Reference in New Issue
Block a user