diff --git a/src/pages/Cluster/ClusterSections.jsx b/src/pages/Cluster/ClusterSections.jsx
index 05c58de..21789a8 100644
--- a/src/pages/Cluster/ClusterSections.jsx
+++ b/src/pages/Cluster/ClusterSections.jsx
@@ -71,7 +71,7 @@ export default function ClusterSections({ clusterData }) {
let rows = [];
clusterData.statsWells?.forEach((well) => {
- well.sections.forEach((section) => {
+ well.sections?.forEach((section) => {
let row = {
key: well.caption + section.id,
id: well.id,
diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx
index d061796..777f320 100644
--- a/src/pages/Cluster/ClusterWells.jsx
+++ b/src/pages/Cluster/ClusterWells.jsx
@@ -45,19 +45,19 @@ export default function ClusterWells({clusterData}) {
setWellOperations(operations)
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)
setTvdDataPlan(tvdPlanData)
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)
setTvdDataFact(tvdFactData)
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)
setTvdDataForecast(tvdPredictData)
@@ -76,7 +76,7 @@ export default function ClusterWells({clusterData}) {
});
return {
- key: well.id,
+ key: well.caption,
id: well.id,
caption: well.caption,
wellType: well.wellType,
@@ -190,7 +190,7 @@ export default function ClusterWells({clusterData}) {
key: "companies",
dataIndex: "companies",
render: (item) =>
- item.map((company) => {company.caption}),
+ item?.map((company) => {company.caption}) ?? '-',
},
];
@@ -202,7 +202,7 @@ export default function ClusterWells({clusterData}) {
size={"small"}
bordered
pagination={false}
- rowKey={(record) => record.id}
+ rowKey={(record) => record.caption}
/>