diff --git a/src/pages/Well/Measure/View.jsx b/src/pages/Well/Measure/View.jsx index 5f1b24d..59cbca7 100644 --- a/src/pages/Well/Measure/View.jsx +++ b/src/pages/Well/Measure/View.jsx @@ -10,7 +10,7 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? ( ) : ( - {columns.map((cols, i) => { + {columns.flatMap((cols, i) => { const columnPosition = 1 + i * 2 return cols.map((column, j) => ( @@ -46,6 +46,6 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? ( )) - }).flat()} + })} )) diff --git a/src/pages/Well/Telemetry/TelemetryView/dataset.js b/src/pages/Well/Telemetry/TelemetryView/dataset.js index 4e90c09..9ff5273 100644 --- a/src/pages/Well/Telemetry/TelemetryView/dataset.js +++ b/src/pages/Well/Telemetry/TelemetryView/dataset.js @@ -33,7 +33,7 @@ export const calcFlowData = (dataSaub, flowChart) => { if (depth > maxDepth) maxDepth = depth return { date: new Date(row.date), depth: row.wellDepth } }) - const out = flowChart.map((flow) => { + const out = flowChart.flatMap((flow) => { if (flow.depthStart > maxDepth || flow.depthEnd < minDepth) return [] const out = [] let i = 0, j = 0 @@ -50,7 +50,7 @@ export const calcFlowData = (dataSaub, flowChart) => { }) } return out - }).flat() + }) return out } diff --git a/src/pages/Well/WellOperations/Tvd/TLChart.jsx b/src/pages/Well/WellOperations/Tvd/TLChart.jsx index e34ba61..c2f3a7b 100644 --- a/src/pages/Well/WellOperations/Tvd/TLChart.jsx +++ b/src/pages/Well/WellOperations/Tvd/TLChart.jsx @@ -81,7 +81,7 @@ export const TLChart = memo(({ invokeWebApiWrapperAsync( async () => { const { operations } = await DetectedOperationService.get(well.id) - setData(operations.map((raw) => { + setData(operations.flatMap((raw) => { const startTime = moment(raw.dateStart) const endTime = moment(raw.dateEnd) return splitByDate(startTime, endTime).map((dt) => ({ @@ -89,7 +89,7 @@ export const TLChart = memo(({ startTime: dt.startTime, endTime: dt.endTime, })) - }).flat()) + })) }, setIsLoading, `Не удалось загрузить список операций`,