From 4ccba24db42027e16e36290c3895731955caf5b8 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Tue, 31 Aug 2021 11:46:55 +0500 Subject: [PATCH] Fixed operations modal window in Cluster info table --- src/pages/Cluster/WellOperationsTable.jsx | 27 +++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/pages/Cluster/WellOperationsTable.jsx b/src/pages/Cluster/WellOperationsTable.jsx index ac5f24b..adb16e9 100644 --- a/src/pages/Cluster/WellOperationsTable.jsx +++ b/src/pages/Cluster/WellOperationsTable.jsx @@ -8,35 +8,34 @@ import { export default function WellOperationsTable({wellOperations}) { const columns = [ - makeTextColumn("","index"), makeTextColumn("Конструкция секции","sectionType"), makeTextColumn("Операция","operationName"), makeNumericColumnPlanFact("Глубина забоя", "depth"), - makeNumericColumnPlanFact("Часы", "durationHours") + makeNumericColumnPlanFact("Часы", "durationHours"), + makeNumericColumnPlanFact("Комментарий", "comment") ]; - let i = 1; - const operations = wellOperations.map(el => { return { - key: el.plan ? el.plan.id : el.fact.id, - index: i++, - sectionType: el.plan ? el.plan.wellSectionTypeName : el.fact.wellSectionTypeName, - operationName: el.plan ? el.plan.categoryName : el.fact.categoryName, - depthPlan: el.plan ? el.plan.wellDepth : '-', - depthFact: el.fact ? el.fact.wellDepth : '-', - durationHoursPlan: el.plan ? el.plan.durationHours : '-', - durationHoursFact: el.fact ? el.fact.durationHours : '-' + key: el.plan?.id ?? el.fact.id, + sectionType: el.plan?.wellSectionTypeName ?? el.fact.wellSectionTypeName, + operationName: el.plan?.categoryName ?? el.fact.categoryName, + depthPlan: el.plan?.wellDepth?.toFixed(2) ?? '-', + depthFact: el.fact?.wellDepth?.toFixed(2) ?? '-', + durationHoursPlan: el.plan?.durationHours ?? '-', + durationHoursFact: el.fact?.durationHours ?? '-', + commentPlan: el.plan?.comment ?? '-', + commentFact: el.fact?.comment ?? '-' } }) - return( + return( record.id} /> )