diff --git a/src/pages/Cluster/ClusterSections.jsx b/src/pages/Cluster/ClusterSections.jsx index 7847b33..69241c7 100644 --- a/src/pages/Cluster/ClusterSections.jsx +++ b/src/pages/Cluster/ClusterSections.jsx @@ -157,28 +157,28 @@ export default function ClusterSections({ clusterData }) { id: well.id, caption: well.caption, sectionType: section.caption, - sectionWellDepthPlan: section.plan.wellDepthEnd, - sectionWellDepthFact: section.fact.wellDepthEnd, + sectionWellDepthPlan: section.plan?.wellDepthEnd, + sectionWellDepthFact: section.fact?.wellDepthEnd, sectionBuildDaysPlan: ( - (new Date(section.plan.end) - new Date(section.plan.start)) / + (new Date(section.plan?.end) - new Date(section.plan?.start)) / (1000 * 60 * 60 * 24) ).toFixed(2), sectionBuildDaysFact: ( - (new Date(section.fact.end) - new Date(section.fact.start)) / + (new Date(section.fact?.end) - new Date(section.fact?.start)) / (1000 * 60 * 60 * 24) ).toFixed(2), - sectionRateOfPenetrationPlan: section.plan.rop.toFixed(2), - sectionRateOfPenetrationFact: section.fact.rop.toFixed(2), - sectionRouteSpeedPlan: section.plan.routeSpeed.toFixed(2), - sectionRouteSpeedFact: section.fact.routeSpeed.toFixed(2), - sectionBhaDownSpeedPlan: section.plan.bhaDownSpeed.toFixed(2), - sectionBhaDownSpeedFact: section.fact.bhaDownSpeed.toFixed(2), - sectionBhaUpSpeedPlan: section.plan.bhaUpSpeed.toFixed(2), - sectionBhaUpSpeedFact: section.fact.bhaUpSpeed.toFixed(2), - sectionCasingDownSpeedPlan: section.plan.casingDownSpeed.toFixed(2), - sectionCasingDownSpeedFact: section.fact.casingDownSpeed.toFixed(2), - nonProductiveTimePlan: section.plan.nonProductiveHours.toFixed(2), - nonProductiveTimeFact: section.fact.nonProductiveHours.toFixed(2), + sectionRateOfPenetrationPlan: section.plan?.rop.toFixed(2), + sectionRateOfPenetrationFact: section.fact?.rop.toFixed(2), + sectionRouteSpeedPlan: section.plan?.routeSpeed.toFixed(2), + sectionRouteSpeedFact: section.fact?.routeSpeed.toFixed(2), + sectionBhaDownSpeedPlan: section.plan?.bhaDownSpeed.toFixed(2), + sectionBhaDownSpeedFact: section.fact?.bhaDownSpeed.toFixed(2), + sectionBhaUpSpeedPlan: section.plan?.bhaUpSpeed.toFixed(2), + sectionBhaUpSpeedFact: section.fact?.bhaUpSpeed.toFixed(2), + sectionCasingDownSpeedPlan: section.plan?.casingDownSpeed.toFixed(2), + sectionCasingDownSpeedFact: section.fact?.casingDownSpeed.toFixed(2), + nonProductiveTimePlan: section.plan?.nonProductiveHours.toFixed(2), + nonProductiveTimeFact: section.fact?.nonProductiveHours.toFixed(2), companies: well.companies, };