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