-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Split result tab into Variogram and Object results. * refactor: Adapted Object case result table and view. * fix: remove logging for debugging. * refactor: Adjust responsiveness to screen width. * refactor: Moved fetch results into own hook. Add variogramResult component. * refactor: Refactor VariogramResult component to match data structure. * fix: typo in filename.
- Loading branch information
1 parent
1735b62
commit 4584090
Showing
16 changed files
with
359 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResult.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import styled from 'styled-components'; | ||
import { spacings } from '../../../../../tokens/spacings'; | ||
|
||
export const Wrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
export const InnerWrapper = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
column-gap: ${spacings.SMALL}; | ||
width: 100%; | ||
`; | ||
|
||
export const Info = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 150px; | ||
`; |
37 changes: 37 additions & 0 deletions
37
src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResult.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Typography } from '@equinor/eds-core-react'; | ||
import { ComputeCaseDto, GetResultDto } from '../../../../../api/generated'; | ||
import * as Styled from './ChannelResult.styled'; | ||
import { ChannelResultTable } from './ChannelResultTable'; | ||
|
||
export const ChannelResult = ({ | ||
data, | ||
computeCase, | ||
}: { | ||
data: GetResultDto; | ||
computeCase?: ComputeCaseDto[]; | ||
}) => { | ||
let modelArea = ''; | ||
if ( | ||
computeCase && | ||
computeCase[0] && | ||
computeCase[0].modelArea !== undefined && | ||
computeCase[0].modelArea !== null | ||
) | ||
modelArea = computeCase && computeCase[0].modelArea.name; | ||
|
||
if (modelArea === '') modelArea = 'Whole model'; | ||
const caseFilter = computeCase && computeCase[0]; | ||
const computeMethod = caseFilter && caseFilter.computeMethod.name; | ||
|
||
return ( | ||
<Styled.Wrapper> | ||
<Styled.InnerWrapper> | ||
<Styled.Info> | ||
<Typography variant="h5"> {computeMethod}</Typography> | ||
<Typography variant="body_short"> {modelArea}</Typography> | ||
</Styled.Info> | ||
<ChannelResultTable data={data}></ChannelResultTable> | ||
</Styled.InnerWrapper> | ||
</Styled.Wrapper> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.