From 43af2d63fdfd323c63f52769dd975fa057b2bf29 Mon Sep 17 00:00:00 2001 From: mheggelund Date: Wed, 20 Nov 2024 10:54:13 +0100 Subject: [PATCH 1/6] Feat: Add expandable rows to variogram result. --- .../CaseResultView/CaseResultView.tsx | 6 +- .../ImageResult/ImageResult.tsx | 3 + .../SubRowResult/SubRowResult.styled.ts | 26 ++ .../SubRowResult/SubRowResult.tsx | 81 +++++ .../SubRowResult/SubRowResultItem.styled.ts | 14 + .../SubRowResult/SubRowResultItem.tsx | 41 +++ .../TanStackTable/TanStackTable.styled.ts | 72 ++++ .../TanStackTable/TanStackTable.tsx | 313 ++++++++++++++++++ .../VariogramResultTable.tsx | 46 +-- 9 files changed, 575 insertions(+), 27 deletions(-) create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.styled.ts create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.styled.ts create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.styled.ts create mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx diff --git a/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx b/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx index 40f1b3bf..74c29665 100644 --- a/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx +++ b/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx @@ -8,7 +8,7 @@ import { GetVariogramResultsDto, } from '../../../../api/generated'; import { ChannelResult } from './ObjectCaseResult/ChannelResult'; -import { VariogramResultTable } from './VariogramCaseResult/VariogramResultTable/VariogramResultTable'; +import { TanStackTable } from './VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable'; export const CaseResultView = ({ channelResultList, @@ -26,9 +26,7 @@ export const CaseResultView = ({ {type} results {variogramResultList && ( - + )} {channelResultList && channelResultList.map((obj) => ( diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx index 6f752260..f2b15e6a 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx @@ -1,16 +1,19 @@ import { Button, Dialog, Typography } from '@equinor/eds-core-react'; import { useQuery } from '@tanstack/react-query'; import { getVariogramImage } from '../../../../../../api/custom/getImageById'; +import { GetVariogramResultsVariogramResultFileDto } from '../../../../../../api/generated'; import * as Styled from './ImageResult.styled'; export const ImageResult = ({ imageId, open, setOpen, + resultImages, }: { imageId: string; open: boolean; setOpen: React.Dispatch>; + resultImages: GetVariogramResultsVariogramResultFileDto[]; }) => { const { data, isLoading } = useQuery({ queryKey: ['case-image', imageId], diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.styled.ts b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.styled.ts new file mode 100644 index 00000000..faaa1282 --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.styled.ts @@ -0,0 +1,26 @@ +import styled from 'styled-components'; +import { spacings } from '../../../../../../../tokens/spacings'; + +export const SubRowDiv = styled.div` + display: flex; + flex-direction: column; + row-gap: ${spacings.LARGE}; + padding: ${spacings.X_LARGE} ${spacings.XXXX_LARGE}; + + width: 100%; +`; + +export const SubRowInfo = styled.div` + display: flex; + flex-direction: row; + justify-content: space-between; + + width: 100%; +`; + +export const TableList = styled.div` + display: flex; + flex-direction: column; + row-gap: ${spacings.LARGE}; + width: 100%; +`; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx new file mode 100644 index 00000000..9c7200bb --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx @@ -0,0 +1,81 @@ +/* eslint-disable max-lines-per-function */ +import { Button, Icon, Typography } from '@equinor/eds-core-react'; +import { bar_chart as barChart } from '@equinor/eds-icons'; +import { useState } from 'react'; +import { + GetVariogramResultsDto, + GetVariogramResultsVariogramResultFileDto, +} from '../../../../../../../api/generated'; +import { ImageResult } from '../../ImageResult/ImageResult'; +import { ResultObjectType } from '../TanStackTable/TanStackTable'; +import * as Styled from './SubRowResult.styled'; +import { SubRowResultItem } from './SubRowResultItem'; + +export const SubRowResult = ({ + resultRows, + resultList, +}: { + resultRows: ResultObjectType[]; + resultList: GetVariogramResultsDto[]; +}) => { + const [open, setOpen] = useState(false); + const [resultImages, setResultImages] = useState< + GetVariogramResultsVariogramResultFileDto[] + >([]); + const [imageId, setImageId] = useState(''); + + const handleImageDialog = () => { + const computeCaseResults = resultList.filter( + (e) => e.computeCaseId === resultRows[0].computeCaseId, + ); + // const resultFile = computeCaseResults + // .find((r) => r.variogramResultId === resultRows[0].variogramResultId)! + // .variogramResultFiles.find((x) => + // x.fileName.includes('variogram_slices_'), + // ); + + const resultObject = computeCaseResults.find( + (r) => r.variogramResultId === resultRows[0].variogramResultId, + ); + const resultFiles = resultObject && resultObject.variogramResultFiles; + const variogramSlices = + resultFiles && + resultFiles.find((x) => x.fileName.includes('variogram_slices_')); + + console.log(resultFiles); + + const variogramSlicesImageId = variogramSlices + ? variogramSlices.variogramResultFileId + : ''; + setImageId(variogramSlicesImageId); + if (resultFiles && resultFiles.length > 0) setResultImages(resultFiles); + setOpen(!open); + }; + return ( + <> + + + Variogram model details + + + + {resultRows.map((r) => ( + + ))} + + + + + ); +}; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.styled.ts b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.styled.ts new file mode 100644 index 00000000..fb54c7a0 --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.styled.ts @@ -0,0 +1,14 @@ +import { Table } from '@equinor/eds-core-react'; +import styled from 'styled-components'; +import { spacings } from '../../../../../../../tokens/spacings'; + +export const HeaderContent = styled(Table.Row)` + height: ${spacings.MEDIUM}; +`; +export const TableWrapper = styled.div` + width: 100%; + > table { + width: 100%; + border: 1px solid #dcdcdc; + } +`; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx new file mode 100644 index 00000000..a2f0fbd2 --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx @@ -0,0 +1,41 @@ +import { Table } from '@equinor/eds-core-react'; +import { ResultObjectType } from '../TanStackTable/TanStackTable'; +import * as Styled from './SubRowResultItem.styled'; + +export const SubRowResultItem = ({ + resultItem, +}: { + resultItem: ResultObjectType; +}) => { + return ( + + + + + {resultItem.variogramModel} + + + + + + + Range major + Range minor + Azimuth + Range vertical + SILL/STD + + + + + {resultItem.rmajor} + {resultItem.rminor} + {resultItem.azimuth} + {resultItem.rvertical} + {resultItem.sigma} + + +
+
+ ); +}; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.styled.ts b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.styled.ts new file mode 100644 index 00000000..5d6b911b --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.styled.ts @@ -0,0 +1,72 @@ +import styled from 'styled-components'; + +export const TableWrapper = styled.div` + > div { + > table { + border: 1px solid #dcdcdc; + border-collapse: collapse; + + > thead { + border-bottom: 2px solid + var(--eds_ui_background__medium, rgba(220, 220, 220, 1)); + background: var( + --eds_interactive_table__header__fill_resting, + rgba(247, 247, 247, 1) + ); + > tr { + > th { + white-space: nowrap; + min-height: var(--eds_table__cell__height, 48px); + height: var(--eds_table__cell__height, 48px); + background: var( + --eds_interactive_table__header__fill_resting, + rgba(247, 247, 247, 1) + ); + box-sizing: border-box; + padding-left: var(--eds_table__cell__padding_x, 16px); + padding-top: var(--eds_table__cell__padding_y, 0); + padding-right: var(--eds_table__cell__padding_x, 16px); + padding-bottom: var(--eds_table__cell__padding_y, 0); + margin: 0; + color: var(--eds_text__static_icons__default, rgba(61, 61, 61, 1)); + font-family: Equinor; + font-size: var(--eds_table__font_size, 0.875rem); + font-weight: 700; + line-height: 1.429em; + text-align: left; + border-bottom: 2px solid + var(--eds_ui_background__medium, rgba(220, 220, 220, 1)); + } + } + } + + > tbody { + border-bottom: 2px solid + var(--eds_ui_background__medium, rgba(220, 220, 220, 1)); + + > tr { + > td { + white-space: nowrap; + min-height: var(--eds_table__cell__height, 48px); + height: var(--eds_table__cell__height, 48px); + vertical-align: var(--eds_table__cell__vertical_align, inherit); + box-sizing: border-box; + padding-left: var(--eds_table__cell__padding_x, 16px); + padding-top: var(--eds_table__cell__padding_y, 0); + padding-right: var(--eds_table__cell__padding_x, 16px); + padding-bottom: var(--eds_table__cell__padding_y, 0); + margin: 0; + color: var(--eds_text__static_icons__default, rgba(61, 61, 61, 1)); + font-family: Equinor; + font-size: var(--eds_table__font_size, 0.875rem); + font-weight: 500; + line-height: 1.429em; + text-align: left; + border-bottom: 1px solid + var(--eds_ui_background__medium, rgba(220, 220, 220, 1)); + } + } + } + } + } +`; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx new file mode 100644 index 00000000..70f56e50 --- /dev/null +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx @@ -0,0 +1,313 @@ +/* eslint-disable max-lines */ +/* eslint-disable sort-imports */ +/* eslint-disable max-lines-per-function */ +import { Fragment } from 'react'; + +import { Button, Icon, Typography } from '@equinor/eds-core-react'; +import { + chevron_down as DOWN, + chevron_right as RIGHT, +} from '@equinor/eds-icons'; +import { + ColumnDef, + Row, + flexRender, + getCoreRowModel, + getExpandedRowModel, + useReactTable, +} from '@tanstack/react-table'; +import { GetVariogramResultsDto } from '../../../../../../../api/generated'; +import { usePepmContextStore } from '../../../../../../../hooks/GlobalState'; +import { SubRowResult } from '../SubRowResult/SubRowResult'; +import * as Styled from './TanStackTable.styled'; + +const NumberOfDecimals = 3; + +export interface ResultObjectType { + variogramResultId: string; + computeCaseId: string; + rmajor: number; + rminor: number; + azimuth: number; + rvertical: number; + sigma: number; + quality: string | number; + qualityX: number; + qualityY: number; + qualityZ: number; + method: string; + parameter: string; + archelFilter: string; + modelArea: string; + variogramModel: string; + subRows?: ResultObjectType[]; +} + +type TableProps = { + data: TData[]; + columns: ColumnDef[]; + renderSubComponent: (props: { row: Row }) => React.ReactElement; + getRowCanExpand: (row: Row) => boolean; +}; + +function Table({ + data, + columns, + renderSubComponent, + getRowCanExpand, +}: TableProps): JSX.Element { + const table = useReactTable({ + data, + columns, + getRowCanExpand, + getCoreRowModel: getCoreRowModel(), + getExpandedRowModel: getExpandedRowModel(), + }); + + return ( +
+
+ + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + return ( + + ); + })} + + ))} + + + {table.getRowModel().rows.map((row) => { + return ( + + + {/* first row is a normal row */} + {row.getVisibleCells().map((cell) => { + return ( + + ); + })} + + {row.getIsExpanded() && ( + + + + )} + + ); + })} + +
+ {header.isPlaceholder ? null : ( +
+ {flexRender( + header.column.columnDef.header, + header.getContext(), + )} +
+ )} +
+ {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} +
+ {renderSubComponent({ row })} +
+
+
{table.getRowModel().rows.length} Rows
+
+ ); +} + +export const TanStackTable = ({ + resultList, +}: { + resultList: GetVariogramResultsDto[]; +}) => { + const { computeCases } = usePepmContextStore(); + + const getSubRows = (computeCaseId: string) => { + const subRowArray: ResultObjectType[] = []; + if (computeCaseId === undefined || resultList === undefined) + return subRowArray; + + resultList + .filter((c) => c.computeCaseId === computeCaseId) + .forEach((e) => { + const method = computeCases.filter( + (c) => c.computeCaseId === e.computeCaseId, + )[0]?.computeMethod?.name; + + let parameter = ''; + if (method === 'Indicator') { + parameter = e.indicator ? e.indicator : ''; + } else if (method === 'Net-To-Gross') { + parameter = e.customIndicator ? e.customIndicator : ''; + } else if (method === 'ContiniousParameter') { + parameter = e.attribute ? e.attribute : ''; + } + + const modelArea = computeCases.filter( + (c) => c.computeCaseId === e.computeCaseId, + )[0]?.modelArea; + + const element: ResultObjectType = { + variogramResultId: e.variogramResultId, + computeCaseId: e.computeCaseId, + rmajor: roundResultString(e.rmajor), + rminor: roundResultString(e.rminor), + azimuth: roundResultString(e.azimuth), + rvertical: roundResultString(e.rvertical), + sigma: roundResultString(e.sigma), + qualityX: roundResultString(e.qualityX), + qualityY: roundResultString(e.qualityY), + qualityZ: roundResultString(e.qualityZ), + method: method ? method : '', + parameter: parameter, + archelFilter: e.archelFilter ? e.archelFilter : '', + modelArea: modelArea ? modelArea.name : '', + variogramModel: e.family ? e.family : '', + quality: roundResultString(e.quality), + }; + + subRowArray.push(element); + }); + + return subRowArray; + }; + + const renderSubComponent = ({ row }: { row: Row }) => { + const sub = getSubRows(row.original.computeCaseId); + return ( +
+ +
+ ); + }; + + const columns: ColumnDef[] = [ + { + id: 'expand', + header: () => null, + cell: ({ row }) => { + return row.getCanExpand() ? ( + + ) : ( + '🔵' + ); + }, + }, + { + accessorKey: 'method', + header: () =>
Compute method
, + cell: ({ row, getValue }) =>
{getValue()}
, + id: 'method', + }, + { + accessorKey: 'parameter', + header: () =>
Parameter
, + id: 'parameter', + }, + { + accessorKey: 'archelFilter', + header: () =>
Archel Filter
, + id: 'archelFilter', + }, + { + accessorKey: 'modelArea', + header: () =>
Model Area
, + id: 'modelArea', + }, + { + accessorKey: 'variogramModel', + header: () =>
Variogram model
, + id: 'variogramModel', + cell: ({ row }) => ( +
+ {row.original.variogramModel} +
+ ), + }, + { + accessorKey: 'quality', + header: () =>
Quality factor
, + id: 'quality', + enableColumnFilter: false, + cell: ({ row }) =>
{row.original.quality}
, + }, + ]; + + const roundResultString = (value: number) => { + if (value) { + const res: string = value.toFixed(NumberOfDecimals); + return Number(res); + } else return value; + }; + + const getRows = () => { + const rowArray: ResultObjectType[] = []; + + resultList.forEach((e) => { + const res = rowArray.some( + (element) => element.computeCaseId === e.computeCaseId, + ); + + if (res) return; + + const method = computeCases.filter( + (c) => c.computeCaseId === e.computeCaseId, + )[0]?.computeMethod?.name; + let parameter = ''; + if (method === 'Indicator') { + parameter = e.indicator ? e.indicator : ''; + } else if (method === 'Net-To-Gross') { + parameter = e.customIndicator ? e.customIndicator : ''; + } else if (method === 'ContiniousParameter') { + parameter = e.attribute ? e.attribute : ''; + } + + const modelArea = computeCases.filter( + (c) => c.computeCaseId === e.computeCaseId, + )[0]?.modelArea; + + const element: ResultObjectType = { + variogramResultId: e.variogramResultId, + computeCaseId: e.computeCaseId, + rmajor: roundResultString(e.rmajor), + rminor: roundResultString(e.rminor), + azimuth: roundResultString(e.azimuth), + rvertical: roundResultString(e.rvertical), + sigma: roundResultString(e.sigma), + qualityX: roundResultString(e.qualityX), + qualityY: roundResultString(e.qualityY), + qualityZ: roundResultString(e.qualityZ), + method: method ? method : '', + parameter: parameter, + archelFilter: e.archelFilter ? e.archelFilter : '', + modelArea: modelArea ? modelArea.name : '', + variogramModel: e.family ? e.family : '', + quality: roundResultString(e.quality), + }; + rowArray.push(element); + }); + + return rowArray; + }; + + return ( + + true} + renderSubComponent={renderSubComponent} + /> + + ); +}; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx index 4b9d4f86..5e91f725 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx @@ -1,11 +1,9 @@ /* eslint-disable max-lines-per-function */ import { Typography } from '@equinor/eds-core-react'; import { EdsDataGrid } from '@equinor/eds-data-grid-react'; -import { useState } from 'react'; import { GetVariogramResultsDto } from '../../../../../../api/generated'; -import { ImageResult } from '../ImageResult/ImageResult'; -import * as Styled from './VariogramResultTable.styled'; import { usePepmContextStore } from '../../../../../../hooks/GlobalState'; +import * as Styled from './VariogramResultTable.styled'; interface ResultObjectType { variogramResultId: string; @@ -26,8 +24,8 @@ export const VariogramResultTable = ({ resultList: GetVariogramResultsDto[]; }) => { const { computeCases } = usePepmContextStore(); - const [open, setOpen] = useState(false); - const [imageId, setImageId] = useState(''); + // const [open, setOpen] = useState(false); + // const [imageId, setImageId] = useState(''); const roundResultString = (value: number) => { if (value) { @@ -67,18 +65,18 @@ export const VariogramResultTable = ({ return element; }); - const handleImageDialog = (id: string, variogramResultId: string) => { - const computeCaseResults = resultList.filter((e) => e.computeCaseId === id); - const resultFile = computeCaseResults - .find((r) => r.variogramResultId === variogramResultId)! - .variogramResultFiles.find((x) => - x.fileName.includes('variogram_slices_'), - ); + // const handleImageDialog = (id: string, variogramResultId: string) => { + // const computeCaseResults = resultList.filter((e) => e.computeCaseId === id); + // const resultFile = computeCaseResults + // .find((r) => r.variogramResultId === variogramResultId)! + // .variogramResultFiles.find((x) => + // x.fileName.includes('variogram_slices_'), + // ); - const imageId = resultFile ? resultFile.variogramResultFileId : ''; - setImageId(imageId); - setOpen(!open); - }; + // const imageId = resultFile ? resultFile.variogramResultFileId : ''; + // setImageId(imageId); + // setOpen(!open); + // }; return ( <> @@ -119,11 +117,13 @@ export const VariogramResultTable = ({ cell: ({ row }) => (
- handleImageDialog( - row.original.computeCaseId, - row.original.variogramResultId, - ) + onClick={ + () => console.log('click') + + // handleImageDialog( + // row.original.computeCaseId, + // row.original.variogramResultId, + // ) } link > @@ -144,11 +144,11 @@ export const VariogramResultTable = ({ ]} /> - + > */} ); }; From 82d5467239d28412a6e387e5647e6249522aac09 Mon Sep 17 00:00:00 2001 From: mheggelund Date: Thu, 28 Nov 2024 08:58:06 +0100 Subject: [PATCH 2/6] chore: Show dialog with result images for rows. --- .../ImageResult/ImageResult.tsx | 200 ++++++++++++++++-- .../SubRowResult/SubRowResult.tsx | 28 +-- .../TanStackTable/TanStackTable.tsx | 73 ++++--- .../VariogramResultTable.styled.ts | 42 ---- .../VariogramResultTable.tsx | 154 -------------- 5 files changed, 235 insertions(+), 262 deletions(-) delete mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts delete mode 100644 src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx index f2b15e6a..86705eab 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx @@ -1,36 +1,208 @@ -import { Button, Dialog, Typography } from '@equinor/eds-core-react'; +/* eslint-disable max-lines-per-function */ +import { Button, Dialog, Tabs } from '@equinor/eds-core-react'; import { useQuery } from '@tanstack/react-query'; +import { useState } from 'react'; import { getVariogramImage } from '../../../../../../api/custom/getImageById'; import { GetVariogramResultsVariogramResultFileDto } from '../../../../../../api/generated'; import * as Styled from './ImageResult.styled'; export const ImageResult = ({ - imageId, open, setOpen, resultImages, }: { - imageId: string; open: boolean; setOpen: React.Dispatch>; resultImages: GetVariogramResultsVariogramResultFileDto[]; }) => { - const { data, isLoading } = useQuery({ - queryKey: ['case-image', imageId], - queryFn: () => getVariogramImage(imageId), - enabled: open, + const [activeTab, setActiveTab] = useState(0); + const handleChange = (index: number) => { + setActiveTab(index); + }; + + const variogramSlices = + resultImages && + resultImages.find((x) => x.fileName.includes('variogram_slices_')); + const variogramSlicesImageId = + variogramSlices && variogramSlices.variogramResultFileId; + + const loadedVariogramSlicesImage = useQuery({ + queryKey: ['case-image', variogramSlicesImageId], + queryFn: () => getVariogramImage(variogramSlicesImageId as string), + enabled: !!variogramSlicesImageId, + }); + + const sphericalImage = + resultImages && resultImages.find((x) => x.fileName.includes('spherical-')); + const sphericalImageId = + sphericalImage && sphericalImage.variogramResultFileId; + + const loadedSphericalImage = useQuery({ + queryKey: ['case-image', sphericalImageId], + queryFn: () => getVariogramImage(sphericalImageId as string), + enabled: !!sphericalImageId, + }); + + const gaussianImage = + resultImages && resultImages.find((x) => x.fileName.includes('gaussian')); + const gaussianImageId = gaussianImage && gaussianImage.variogramResultFileId; + const loadedGaussianImage = useQuery({ + queryKey: ['case-image', gaussianImageId], + queryFn: () => getVariogramImage(gaussianImageId as string), + enabled: !!gaussianImageId, + }); + + const generalExponentialImage = + resultImages && + resultImages.find((x) => x.fileName.includes('general_exponential')); + const generalExponentialImageId = + generalExponentialImage && generalExponentialImage.variogramResultFileId; + const loadedGeneralExponentialImage = useQuery({ + queryKey: ['case-image', generalExponentialImageId], + queryFn: () => getVariogramImage(generalExponentialImageId as string), + enabled: !!generalExponentialImageId, + }); + + const exponentialImage = + resultImages && + resultImages.find((x) => x.fileName.includes('-exponential')); + const exponentialImageId = + exponentialImage && exponentialImage.variogramResultFileId; + const loadedExponentialImage = useQuery({ + queryKey: ['case-image', exponentialImageId], + queryFn: () => getVariogramImage(exponentialImageId as string), + enabled: !!exponentialImageId, }); return ( - {isLoading && <>Loading ...} - {data && ( - - Case results - Case results - - )} + + + Variogram slice + {/* {resultRows + .map((r) => r.variogramModel) + .filter((value, index, self) => self.indexOf(value) === index) + .map((uniqe) => { + console.log(uniqe); + + return {uniqe}; + })} */} + Spherical + Gaussian + General Exponential + Exponential + + + + {loadedVariogramSlicesImage.isLoading && <>Loading ...} + + {loadedVariogramSlicesImage.data && ( + + Case results + + )} + + + {loadedSphericalImage && loadedSphericalImage.data ? ( + <> + {loadedSphericalImage.isLoading && <>Loading ...} + {loadedSphericalImage.data && ( + + Spherical + + )} + + ) : ( + <>No Spherical + )} + + + {loadedGaussianImage && loadedGaussianImage.data ? ( + <> + {loadedGaussianImage.isLoading && <>Loading ...} + {loadedGaussianImage.data && ( + + Gaussian + + )} + + ) : ( + <>No Gaussian + )} + + + + {loadedGeneralExponentialImage && + loadedGeneralExponentialImage.data ? ( + <> + {loadedGeneralExponentialImage.isLoading && <>Loading ...} + {loadedGeneralExponentialImage.data && ( + + General Exponential + + )} + + ) : ( + <>No General Exponential + )} + + + {loadedExponentialImage && loadedExponentialImage.data ? ( + <> + {loadedExponentialImage.isLoading && <>Loading ...} + {loadedExponentialImage.data && ( + + Exponential + + )} + + ) : ( + <>No General Exponential + )} + + + diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx index 9c7200bb..6a4387a2 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx @@ -22,32 +22,19 @@ export const SubRowResult = ({ const [resultImages, setResultImages] = useState< GetVariogramResultsVariogramResultFileDto[] >([]); - const [imageId, setImageId] = useState(''); const handleImageDialog = () => { - const computeCaseResults = resultList.filter( - (e) => e.computeCaseId === resultRows[0].computeCaseId, - ); - // const resultFile = computeCaseResults - // .find((r) => r.variogramResultId === resultRows[0].variogramResultId)! - // .variogramResultFiles.find((x) => - // x.fileName.includes('variogram_slices_'), - // ); + const resultFiles: Array = []; + resultRows.forEach((row) => + row.variogramResultFiles.forEach((file) => { + const values = resultFiles.map((a) => a.fileName); + const has = values.find((str) => str === file.fileName); - const resultObject = computeCaseResults.find( - (r) => r.variogramResultId === resultRows[0].variogramResultId, + if (!has) resultFiles.push(file); + }), ); - const resultFiles = resultObject && resultObject.variogramResultFiles; - const variogramSlices = - resultFiles && - resultFiles.find((x) => x.fileName.includes('variogram_slices_')); - console.log(resultFiles); - const variogramSlicesImageId = variogramSlices - ? variogramSlices.variogramResultFileId - : ''; - setImageId(variogramSlicesImageId); if (resultFiles && resultFiles.length > 0) setResultImages(resultFiles); setOpen(!open); }; @@ -71,7 +58,6 @@ export const SubRowResult = ({ ; computeCaseId: string; rmajor: number; rminor: number; @@ -40,6 +44,7 @@ export interface ResultObjectType { archelFilter: string; modelArea: string; variogramModel: string; + identifier: number; subRows?: ResultObjectType[]; } @@ -118,7 +123,6 @@ function Table({
-
{table.getRowModel().rows.length} Rows
); } @@ -130,13 +134,24 @@ export const TanStackTable = ({ }) => { const { computeCases } = usePepmContextStore(); - const getSubRows = (computeCaseId: string) => { + const roundResultString = ( + value: number, + numberDecimals: number = NumberOfDecimals, + ) => { + if (value) { + const res: string = value.toFixed(numberDecimals); + return Number(res); + } else return value; + }; + + const getSubRows = (computeCaseId: string, identifier: number) => { const subRowArray: ResultObjectType[] = []; if (computeCaseId === undefined || resultList === undefined) return subRowArray; resultList .filter((c) => c.computeCaseId === computeCaseId) + .filter((c) => c.identifier === identifier) .forEach((e) => { const method = computeCases.filter( (c) => c.computeCaseId === e.computeCaseId, @@ -157,6 +172,7 @@ export const TanStackTable = ({ const element: ResultObjectType = { variogramResultId: e.variogramResultId, + variogramResultFiles: e.variogramResultFiles, computeCaseId: e.computeCaseId, rmajor: roundResultString(e.rmajor), rminor: roundResultString(e.rminor), @@ -172,6 +188,7 @@ export const TanStackTable = ({ modelArea: modelArea ? modelArea.name : '', variogramModel: e.family ? e.family : '', quality: roundResultString(e.quality), + identifier: e.identifier, }; subRowArray.push(element); @@ -181,7 +198,7 @@ export const TanStackTable = ({ }; const renderSubComponent = ({ row }: { row: Row }) => { - const sub = getSubRows(row.original.computeCaseId); + const sub = getSubRows(row.original.computeCaseId, row.original.identifier); return (
@@ -194,19 +211,19 @@ export const TanStackTable = ({ id: 'expand', header: () => null, cell: ({ row }) => { - return row.getCanExpand() ? ( - - ) : ( - '🔵' + return ( + row.getCanExpand() && ( + + ) ); }, }, { accessorKey: 'method', header: () =>
Compute method
, - cell: ({ row, getValue }) =>
{getValue()}
, + cell: ({ getValue }) =>
{getValue()}
, id: 'method', }, { @@ -224,38 +241,30 @@ export const TanStackTable = ({ header: () =>
Model Area
, id: 'modelArea', }, + { - accessorKey: 'variogramModel', - header: () =>
Variogram model
, - id: 'variogramModel', + accessorKey: 'quality', + header: () =>
X/Y/Z quality factor
, + id: 'quality', + enableColumnFilter: false, cell: ({ row }) => (
- {row.original.variogramModel} + {roundResultString(row.original.qualityX, 2)} {' / '} + {roundResultString(row.original.qualityY, 2)} {' / '} + {roundResultString(row.original.qualityZ, 2)}
), }, - { - accessorKey: 'quality', - header: () =>
Quality factor
, - id: 'quality', - enableColumnFilter: false, - cell: ({ row }) =>
{row.original.quality}
, - }, ]; - const roundResultString = (value: number) => { - if (value) { - const res: string = value.toFixed(NumberOfDecimals); - return Number(res); - } else return value; - }; - const getRows = () => { const rowArray: ResultObjectType[] = []; resultList.forEach((e) => { const res = rowArray.some( - (element) => element.computeCaseId === e.computeCaseId, + (element) => + element.computeCaseId === e.computeCaseId && + element.identifier === e.identifier, ); if (res) return; @@ -278,6 +287,7 @@ export const TanStackTable = ({ const element: ResultObjectType = { variogramResultId: e.variogramResultId, + variogramResultFiles: e.variogramResultFiles, computeCaseId: e.computeCaseId, rmajor: roundResultString(e.rmajor), rminor: roundResultString(e.rminor), @@ -293,6 +303,7 @@ export const TanStackTable = ({ modelArea: modelArea ? modelArea.name : '', variogramModel: e.family ? e.family : '', quality: roundResultString(e.quality), + identifier: e.identifier, }; rowArray.push(element); }); diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts deleted file mode 100644 index 30a7c8bf..00000000 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Dialog } from '@equinor/eds-core-react'; -import styled from 'styled-components'; -import { spacings } from '../../../../../../tokens/spacings'; - -export const Table = styled.div` - overflow-x: auto; - padding-bottom: ${spacings.MEDIUM}; - - > div { - overflow-y: hidden; - - > table { - > thead { - > tr { - > th { - vertical-align: baseline !important; - } - } - } - } - > div { - margin-top: 2rem; - } - } -`; - -export const StyledDialog = styled(Dialog)` - min-width: 500px; - min-height: 500px; -`; - -export const Column = styled.span` - white-space: nowrap; -`; - -export const Quality = styled.span` - display: flex; - flex-direction: column; - align-items: end; -`; - -export { StyledDialog as Dialog }; diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx deleted file mode 100644 index 5e91f725..00000000 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx +++ /dev/null @@ -1,154 +0,0 @@ -/* eslint-disable max-lines-per-function */ -import { Typography } from '@equinor/eds-core-react'; -import { EdsDataGrid } from '@equinor/eds-data-grid-react'; -import { GetVariogramResultsDto } from '../../../../../../api/generated'; -import { usePepmContextStore } from '../../../../../../hooks/GlobalState'; -import * as Styled from './VariogramResultTable.styled'; - -interface ResultObjectType { - variogramResultId: string; - computeCaseId: string; - method: string; - parameter: string; - archelFilter: string; - modelArea: string; - variogramModel: string; - quality: string | number; -} - -const NumberOfDecimals = 3; - -export const VariogramResultTable = ({ - resultList, -}: { - resultList: GetVariogramResultsDto[]; -}) => { - const { computeCases } = usePepmContextStore(); - // const [open, setOpen] = useState(false); - // const [imageId, setImageId] = useState(''); - - const roundResultString = (value: number) => { - if (value) { - return value.toFixed(NumberOfDecimals); - } else return value; - }; - - const resultElementsList: ResultObjectType[] = resultList.map((e) => { - const method = computeCases.filter( - (c) => c.computeCaseId === e.computeCaseId, - )[0]?.computeMethod?.name; - let parameter = ''; - if (method === 'Indicator') { - parameter = e.indicator ? e.indicator : ''; - } else if (method === 'Net-To-Gross') { - parameter = e.customIndicator ? e.customIndicator : ''; - } else if (method === 'ContiniousParameter') { - parameter = e.attribute ? e.attribute : ''; - } - - const modelArea = computeCases.filter( - (c) => c.computeCaseId === e.computeCaseId, - )[0]?.modelArea; - - const element: ResultObjectType = { - variogramResultId: e.variogramResultId, - computeCaseId: e.computeCaseId, - method: method ? method : '', - parameter: parameter, - archelFilter: e.archelFilter ? e.archelFilter : '', - modelArea: modelArea ? modelArea.name : '', - variogramModel: e.family ? e.family : '', - quality: roundResultString(e.quality) - ? roundResultString(e.quality) - : e.quality, - }; - return element; - }); - - // const handleImageDialog = (id: string, variogramResultId: string) => { - // const computeCaseResults = resultList.filter((e) => e.computeCaseId === id); - // const resultFile = computeCaseResults - // .find((r) => r.variogramResultId === variogramResultId)! - // .variogramResultFiles.find((x) => - // x.fileName.includes('variogram_slices_'), - // ); - - // const imageId = resultFile ? resultFile.variogramResultFileId : ''; - // setImageId(imageId); - // setOpen(!open); - // }; - - return ( - <> - - Compute method, - id: 'method', - }, - { - accessorKey: 'parameter', - header: () => Parameter, - id: 'parameter', - }, - { - accessorKey: 'archelFilter', - header: () => Archel Filter, - id: 'archelFilter', - }, - { - accessorKey: 'modelArea', - header: () => Model Area, - id: 'modelArea', - }, - { - accessorKey: 'variogramModel', - header: () => Variogram model, - id: 'variogramModel', - cell: ({ row }) => ( -
- console.log('click') - - // handleImageDialog( - // row.original.computeCaseId, - // row.original.variogramResultId, - // ) - } - link - > - {row.original.variogramModel} - -
- ), - }, - { - accessorKey: 'quality', - header: () => Quality factor, - id: 'quality', - enableColumnFilter: false, - cell: ({ row }) => ( - {row.original.quality} - ), - }, - ]} - /> -
- {/* */} - - ); -}; From c24f280582b3ea4aaa8e5090bd9b956754a6f22e Mon Sep 17 00:00:00 2001 From: mheggelund Date: Thu, 5 Dec 2024 08:36:03 +0100 Subject: [PATCH 3/6] chore: Refactor all case results to be in the same table. --- .../SubRowResult/SubRowResult.tsx | 8 +------ .../SubRowResult/SubRowResultItem.tsx | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx index 6a4387a2..a9d3bfa2 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResult.tsx @@ -33,7 +33,6 @@ export const SubRowResult = ({ if (!has) resultFiles.push(file); }), ); - console.log(resultFiles); if (resultFiles && resultFiles.length > 0) setResultImages(resultFiles); setOpen(!open); @@ -49,12 +48,7 @@ export const SubRowResult = ({ - {resultRows.map((r) => ( - - ))} + { return ( - {resultItem.variogramModel} + {resultList[0].variogramModel} @@ -27,13 +27,15 @@ export const SubRowResultItem = ({ - - {resultItem.rmajor} - {resultItem.rminor} - {resultItem.azimuth} - {resultItem.rvertical} - {resultItem.sigma} - + {resultList.map((resultItem) => ( + + {resultItem.rmajor} + {resultItem.rminor} + {resultItem.azimuth} + {resultItem.rvertical} + {resultItem.sigma} + + ))}
From ef8f9e2eedd63ec11d9eafc47a5cc367e98a1f51 Mon Sep 17 00:00:00 2001 From: mheggelund Date: Thu, 5 Dec 2024 08:42:05 +0100 Subject: [PATCH 4/6] chore: Refactor table columns, add variogram model. --- .../SubRowResult/SubRowResultItem.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx index 0b340b8d..4ac9b07d 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx @@ -11,24 +11,19 @@ export const SubRowResultItem = ({ - - {resultList[0].variogramModel} - - - - - - Range major - Range minor - Azimuth - Range vertical - SILL/STD + Variogram model + Range major (m) + Range minor (m) + Azimuth (deg) + Range vertical (m) + SILL/STD (m) {resultList.map((resultItem) => ( + {resultItem.variogramModel} {resultItem.rmajor} {resultItem.rminor} {resultItem.azimuth} From 3d4030c4c1778b280af7499eb3d7b275d1489c33 Mon Sep 17 00:00:00 2001 From: mheggelund Date: Thu, 5 Dec 2024 10:46:23 +0100 Subject: [PATCH 5/6] chore: Refactor quality factor level in results. --- .../SubRowResult/SubRowResultItem.tsx | 10 ++++++- .../TanStackTable/TanStackTable.tsx | 27 +------------------ src/utils/RoundResultString.ts | 11 ++++++++ 3 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 src/utils/RoundResultString.ts diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx index 4ac9b07d..2b9d5d8d 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/SubRowResult/SubRowResultItem.tsx @@ -1,7 +1,7 @@ import { Table } from '@equinor/eds-core-react'; +import { roundResultString } from '../../../../../../../utils/RoundResultString'; import { ResultObjectType } from '../TanStackTable/TanStackTable'; import * as Styled from './SubRowResultItem.styled'; - export const SubRowResultItem = ({ resultList, }: { @@ -18,6 +18,7 @@ export const SubRowResultItem = ({ Azimuth (deg) Range vertical (m) SILL/STD (m) + X/Y/Z quality factor @@ -29,6 +30,13 @@ export const SubRowResultItem = ({ {resultItem.azimuth} {resultItem.rvertical} {resultItem.sigma} + +
+ {roundResultString(resultItem.qualityX, 2)} {' / '} + {roundResultString(resultItem.qualityY, 2)} {' / '} + {roundResultString(resultItem.qualityZ, 2)} +
+
))}
diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx index befd6269..def237b2 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/TanStackTable/TanStackTable.tsx @@ -21,11 +21,10 @@ import { GetVariogramResultsVariogramResultFileDto, } from '../../../../../../../api/generated'; import { usePepmContextStore } from '../../../../../../../hooks/GlobalState'; +import { roundResultString } from '../../../../../../../utils/RoundResultString'; import { SubRowResult } from '../SubRowResult/SubRowResult'; import * as Styled from './TanStackTable.styled'; -const NumberOfDecimals = 3; - export interface ResultObjectType { variogramResultId: string; variogramResultFiles: Array; @@ -134,16 +133,6 @@ export const TanStackTable = ({ }) => { const { computeCases } = usePepmContextStore(); - const roundResultString = ( - value: number, - numberDecimals: number = NumberOfDecimals, - ) => { - if (value) { - const res: string = value.toFixed(numberDecimals); - return Number(res); - } else return value; - }; - const getSubRows = (computeCaseId: string, identifier: number) => { const subRowArray: ResultObjectType[] = []; if (computeCaseId === undefined || resultList === undefined) @@ -241,20 +230,6 @@ export const TanStackTable = ({ header: () =>
Model Area
, id: 'modelArea', }, - - { - accessorKey: 'quality', - header: () =>
X/Y/Z quality factor
, - id: 'quality', - enableColumnFilter: false, - cell: ({ row }) => ( -
- {roundResultString(row.original.qualityX, 2)} {' / '} - {roundResultString(row.original.qualityY, 2)} {' / '} - {roundResultString(row.original.qualityZ, 2)} -
- ), - }, ]; const getRows = () => { diff --git a/src/utils/RoundResultString.ts b/src/utils/RoundResultString.ts new file mode 100644 index 00000000..03b72a4a --- /dev/null +++ b/src/utils/RoundResultString.ts @@ -0,0 +1,11 @@ +const NumberOfDecimals = 3; + +export const roundResultString = ( + value: number, + numberDecimals: number = NumberOfDecimals, +) => { + if (value) { + const res: string = value.toFixed(numberDecimals); + return Number(res); + } else return value; +}; From 981ea159fd8aa2000c7d1759389859aa6505fddf Mon Sep 17 00:00:00 2001 From: mheggelund Date: Tue, 10 Dec 2024 09:05:37 +0100 Subject: [PATCH 6/6] chore: remove comment. --- .../VariogramCaseResult/ImageResult/ImageResult.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx index 86705eab..4d019a9c 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/ImageResult/ImageResult.tsx @@ -80,14 +80,6 @@ export const ImageResult = ({ Variogram slice - {/* {resultRows - .map((r) => r.variogramModel) - .filter((value, index, self) => self.indexOf(value) === index) - .map((uniqe) => { - console.log(uniqe); - - return {uniqe}; - })} */} Spherical Gaussian General Exponential