forked from ddrilling/asb_cloud_front
Changed ClusterInfo data's keys from data.id to data.caption
This commit is contained in:
parent
c288b45dab
commit
8560ce5f47
@ -71,7 +71,7 @@ export default function ClusterSections({ clusterData }) {
|
|||||||
let rows = [];
|
let rows = [];
|
||||||
|
|
||||||
clusterData.statsWells?.forEach((well) => {
|
clusterData.statsWells?.forEach((well) => {
|
||||||
well.sections.forEach((section) => {
|
well.sections?.forEach((section) => {
|
||||||
let row = {
|
let row = {
|
||||||
key: well.caption + section.id,
|
key: well.caption + section.id,
|
||||||
id: well.id,
|
id: well.id,
|
||||||
|
@ -45,19 +45,19 @@ export default function ClusterWells({clusterData}) {
|
|||||||
setWellOperations(operations)
|
setWellOperations(operations)
|
||||||
|
|
||||||
const tvdPlanData = operations.map(el => {
|
const tvdPlanData = operations.map(el => {
|
||||||
return {key: el.plan?.id, depth: el.plan?.wellDepth, date: el.plan?.startDate}
|
return {key: el.caption, depth: el.plan?.wellDepth, date: el.plan?.startDate}
|
||||||
}).filter(el => el.key)
|
}).filter(el => el.key)
|
||||||
|
|
||||||
setTvdDataPlan(tvdPlanData)
|
setTvdDataPlan(tvdPlanData)
|
||||||
|
|
||||||
const tvdFactData = operations.map(el => {
|
const tvdFactData = operations.map(el => {
|
||||||
return {key: el.fact?.id, depth: el.fact?.wellDepth, date: el.fact?.startDate}
|
return {key: el.caption, depth: el.fact?.wellDepth, date: el.fact?.startDate}
|
||||||
}).filter(el => el.key)
|
}).filter(el => el.key)
|
||||||
|
|
||||||
setTvdDataFact(tvdFactData)
|
setTvdDataFact(tvdFactData)
|
||||||
|
|
||||||
const tvdPredictData = operations.map(el => {
|
const tvdPredictData = operations.map(el => {
|
||||||
return {key: el.predict?.id, depth: el.predict?.wellDepth, date: el.predict?.startDate}
|
return {key: el.caption, depth: el.predict?.wellDepth, date: el.predict?.startDate}
|
||||||
}).filter(el => el.key)
|
}).filter(el => el.key)
|
||||||
|
|
||||||
setTvdDataForecast(tvdPredictData)
|
setTvdDataForecast(tvdPredictData)
|
||||||
@ -76,7 +76,7 @@ export default function ClusterWells({clusterData}) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
key: well.id,
|
key: well.caption,
|
||||||
id: well.id,
|
id: well.id,
|
||||||
caption: well.caption,
|
caption: well.caption,
|
||||||
wellType: well.wellType,
|
wellType: well.wellType,
|
||||||
@ -190,7 +190,7 @@ export default function ClusterWells({clusterData}) {
|
|||||||
key: "companies",
|
key: "companies",
|
||||||
dataIndex: "companies",
|
dataIndex: "companies",
|
||||||
render: (item) =>
|
render: (item) =>
|
||||||
item.map((company) => <Tag color="blue">{company.caption}</Tag>),
|
item?.map((company) => <Tag color="blue">{company.caption}</Tag>) ?? '-',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ export default function ClusterWells({clusterData}) {
|
|||||||
size={"small"}
|
size={"small"}
|
||||||
bordered
|
bordered
|
||||||
pagination={false}
|
pagination={false}
|
||||||
rowKey={(record) => record.id}
|
rowKey={(record) => record.caption}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
Loading…
Reference in New Issue
Block a user