diff --git a/src/components/CaseCardComponent/CaseCardComponent.tsx b/src/components/CaseCardComponent/CaseCardComponent.tsx index bda9a7d8..97891f51 100644 --- a/src/components/CaseCardComponent/CaseCardComponent.tsx +++ b/src/components/CaseCardComponent/CaseCardComponent.tsx @@ -3,6 +3,7 @@ import { Typography } from '@equinor/eds-core-react'; import { ComputeCaseDto } from '../../api/generated'; import { AddCaseButtons } from '../AddCaseButtons/AddCaseButtons'; import * as Styled from './CaseCardComponent.styled'; +import { titleMapping } from './FormattedMethodNames'; export const CaseCardComponent = ({ children, @@ -24,7 +25,7 @@ export const CaseCardComponent = ({ - {title} + {titleMapping[title]} {subTitle} = { + Indicator: 'Indicator', + 'Net-To-Gross': 'Net-to-gross', + ContiniousParameter: 'Continious parameter', +}; diff --git a/src/components/ConfirmDialog/ConfirmDialog.styled.ts b/src/components/ConfirmDialog/ConfirmDialog.styled.ts new file mode 100644 index 00000000..59012203 --- /dev/null +++ b/src/components/ConfirmDialog/ConfirmDialog.styled.ts @@ -0,0 +1,11 @@ +import { Dialog } from '@equinor/eds-core-react'; +import styled from 'styled-components'; +import { spacings } from '../../tokens/spacings'; + +export const Actions = styled(Dialog.Actions)` + display: flex; + flex: row; + flex-direction: row; + column-gap: ${spacings.SMALL}; + align-items: start; +`; diff --git a/src/components/ConfirmDialog/ConfirmDialog.tsx b/src/components/ConfirmDialog/ConfirmDialog.tsx index 6987b2fd..6b004e9b 100644 --- a/src/components/ConfirmDialog/ConfirmDialog.tsx +++ b/src/components/ConfirmDialog/ConfirmDialog.tsx @@ -1,30 +1,36 @@ import { Button, Dialog, Typography } from '@equinor/eds-core-react'; +import * as Styled from './ConfirmDialog.styled'; export const ConfirmDialog = ({ isOpen, message, + danger, confirmAction, setIsOpen, }: { isOpen: boolean; message: string; + danger: boolean; confirmAction: () => void; setIsOpen: React.Dispatch>; }) => { return ( - - Confirm - {message} - - - - + + ); }; diff --git a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.styled.tsx b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.styled.tsx index 33a464bc..e0a70cfc 100644 --- a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.styled.tsx +++ b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.styled.tsx @@ -1,3 +1,4 @@ +import { Button } from '@equinor/eds-core-react'; import styled from 'styled-components'; import { spacings } from '../../../../tokens/spacings'; @@ -9,3 +10,10 @@ export const ButtonDiv = styled.div` align-items: start; padding-top: ${spacings.MEDIUM}; `; + +const StyledButton = styled(Button)` + white-space: nowrap; + width: 100px; +`; + +export { StyledButton as Button }; diff --git a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx index 594fb4b2..93c646a6 100644 --- a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx +++ b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx @@ -7,6 +7,7 @@ import { save as SAVE, } from '@equinor/eds-icons'; import { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { ComputeJobStatus, ListComputeCasesByAnalogueModelIdQueryResponse, @@ -43,7 +44,7 @@ export const CaseButtons = ({ }) => { const [deleteConfirm, setDeleteConfirm] = useState(false); const [saveConfirm, setSaveConfirm] = useState(false); - + const navigate = useNavigate(); const handleConfirmSave = () => { saveCase(); setSaveConfirm(false); @@ -110,7 +111,16 @@ export const CaseButtons = ({ {caseType === 'Object' ? ( <> - {saved ? ( + {caseStatus === 'Succeeded' ? ( + { + navigate('../results/object'); + }} + > + View Results{' '} + + ) : saved ? ( @@ -167,31 +173,38 @@ export const CaseButtons = ({ : '' } > - + {caseStatus === 'Created' || + caseStatus === 'Waiting' || + caseStatus === 'Running' + ? 'Running ... ' + : caseStatus === 'Failed' + ? 'Re-run' + : 'Run'} + + )} diff --git a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts index cb239588..4ca337ea 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.styled.ts @@ -10,20 +10,16 @@ export const Table = styled.div` overflow-y: hidden; > table { - min-width: 1150px; + > thead { + > tr { + > th { + vertical-align: baseline !important; + } + } + } } > div { margin-top: 2rem; - min-width: 1150px; - } - - @media (max-width: 1750px) { - > table { - min-width: 100% !important; - } - > div { - min-width: 100% !important; - } } } `; @@ -33,11 +29,15 @@ export const StyledDialog = styled(Dialog)` min-height: 500px; `; -export const Content = styled(Dialog.CustomContent)` +export const Column = styled.span` + white-space: nowrap; +`; + +export const Quality = styled.span` display: flex; flex-direction: column; - - row-gap: ${spacings.SMALL}; + align-items: end; + font-family: Equinor Mono; `; 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 index 23e986ec..337fd7f0 100644 --- a/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx +++ b/src/features/Results/CaseResult/CaseResultView/VariogramCaseResult/VariogramResultTable/VariogramResultTable.tsx @@ -86,31 +86,31 @@ export const VariogramResultTable = ({ emptyMessage="No results to show" columnResizeMode="onChange" rows={resultElementsList} - pageSize={50} + pageSize={20} columns={[ { accessorKey: 'method', - header: 'Compute method', + header: () => Compute method, id: 'method', }, { accessorKey: 'parameter', - header: 'Parameter', + header: () => Parameter, id: 'parameter', }, { accessorKey: 'archelFilter', - header: 'Archel Filter', + header: () => Archel Filter, id: 'archelFilter', }, { accessorKey: 'modelArea', - header: 'Model Area', + header: () => Model Area, id: 'modelArea', }, { accessorKey: 'variogramModel', - header: 'Variogram model', + header: () => Variogram model, id: 'variogramModel', cell: ({ row }) => (
@@ -127,9 +127,12 @@ export const VariogramResultTable = ({ }, { accessorKey: 'quality', - header: 'Quality factor', + header: () => Quality factor, id: 'quality', enableColumnFilter: false, + cell: ({ row }) => ( + {row.original.quality} + ), }, ]} /> diff --git a/src/pages/ModelPages/Compute/Compute.styled.tsx b/src/pages/ModelPages/Compute/Compute.styled.tsx index 747da511..08bd5586 100644 --- a/src/pages/ModelPages/Compute/Compute.styled.tsx +++ b/src/pages/ModelPages/Compute/Compute.styled.tsx @@ -13,7 +13,7 @@ export const Case = styled.div` width: 70vw; max-width: 1400px; - @media (max-width: 1725px) { + @media (max-width: 1800px) { width: 100%; } diff --git a/src/pages/ModelPages/Compute/ComputeVariogram/ComputeVariogram.tsx b/src/pages/ModelPages/Compute/ComputeVariogram/ComputeVariogram.tsx index 085bd2b0..721e0231 100644 --- a/src/pages/ModelPages/Compute/ComputeVariogram/ComputeVariogram.tsx +++ b/src/pages/ModelPages/Compute/ComputeVariogram/ComputeVariogram.tsx @@ -117,7 +117,7 @@ export const ComputeVariogram = () => { } > - Net-To-Gross + Net-to-gross