Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/model result veiw #128

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/components/CaseCardComponent/CaseCardComponent.styled.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import styled from 'styled-components';
import { spacings } from '../../tokens/spacings';
import { theme } from '../../tokens/theme';

export const Wrapper = styled.div`
border-left: solid;
border-width: ${spacings.SMALL};
border-color: ${theme.light.primary.resting};
border-radius: ${spacings.BORDER_ROUNDED};
`;

export const Title = styled.div`
display: flex;
flex-direction: column;

padding: ${spacings.LARGE} 0 0 ${spacings.LARGE};
column-gap: ${spacings.MEDIUM};
`;

export const CaseBorder = styled.div`
display: flex;
flex-direction: column;
row-gap: ${spacings.XXX_LARGE};

border-radius: ${spacings.CARD_ROUNDED};
border: solid 1px ${theme.light.ui.background.medium};
`;
21 changes: 21 additions & 0 deletions src/components/CaseCardComponent/CaseCardComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Typography } from '@equinor/eds-core-react';
import * as Styled from './CaseCardComponent.styled';

export const CaseCardComponent = ({
children,
title,
}: {
children: React.ReactNode;
title: string;
}) => {
return (
<Styled.CaseBorder>
<Styled.Wrapper>
<Styled.Title>
<Typography variant="h4">{title}</Typography>
</Styled.Title>
{children}
</Styled.Wrapper>
</Styled.CaseBorder>
);
};
12 changes: 4 additions & 8 deletions src/features/Compute/ComputeVariogram/CaseCard/CaseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { ModelSelect } from './CaseCardParameters/ModelSelect/ModelSelect';
import { GrainSizeSelect } from './CaseCardParameters/GrainSizeSelect/GrainSizeSelect';
import { ParameterSelect } from './CaseCardParameters/ParameterSelect/ParameterSelect';

import { CaseCardComponent } from '../../../../components/CaseCardComponent/CaseCardComponent';

export default interface optionTypes {
id: number;
name: string;
Expand Down Expand Up @@ -57,11 +59,6 @@ export const CaseCard = ({
{ id: 7, name: 'General exponential' },
];

// const parameterOptions: optionTypes[] = [
// { id: 8, name: 'Porosity' },
// { id: 9, name: 'Permeability' },
// ];

const modelAreas: optionTypes[] = [
{ id: 10, name: 'Proximal' },
{ id: 11, name: 'Left' },
Expand All @@ -87,9 +84,8 @@ export const CaseCard = ({
};

return (
<Styled.Wrapper>
<CaseCardComponent title={name}>
<Styled.Case>
<Typography variant="h4">{name}</Typography>
<Styled.CaseCard>
{caseType === 'variogram' ? (
<VariogramCaseCardInputs
Expand Down Expand Up @@ -158,6 +154,6 @@ export const CaseCard = ({
</Styled.Parameters>
)}
</div>
</Styled.Wrapper>
</CaseCardComponent>
);
};

This file was deleted.

17 changes: 0 additions & 17 deletions src/features/Results/CaseResult/CaseResultCard/CaseResultCard.tsx

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions src/features/Results/CaseResult/CaseResultList/CaseResultList.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,77 +1,19 @@
import styled from 'styled-components';
import { spacings } from '../../../../tokens/spacings';
import { theme } from '../../../../tokens/theme';

export const CaseResultView = styled.div`
display: flex;
flex-direction: column;

row-gap: ${spacings.MEDIUM};
padding-left: ${spacings.LARGE};
padding-bottom: ${spacings.LARGE};
row-gap: ${spacings.XXX_LARGE};
padding: ${spacings.LARGE};

> h2 {
margin-bottom: ${spacings.SMALL};
}
> h3 {
margin: ${spacings.SMALL};
}
width: 75vw;
`;

export const CaseResultList = styled.div`
display: flex;
flex-direction: column;

row-gap: ${spacings.LARGE};
`;

export const CaseResultCard = styled.div`
display: flex;
flex-direction: row;
row-gap: ${spacings.LARGE};

width: 60vw;
padding: ${spacings.X_LARGE};

border-radius: ${spacings.CARD_ROUNDED};
box-shadow: ${theme.light.ui.elevation.raised};

> div {
width: 50%;
}
`;
export const CaseResultStatus = styled.div`
display: flex;
flex-direction: column;

padding: ${spacings.SMALL};
row-gap: ${spacings.SMALL};
`;

export const CaseLeftDiv = styled.div`
display: flex;
flex-direction: column;
row-gap: ${spacings.LARGE};

> table {
width: 80%;
}
`;

export const CaseStatusDisplay = styled.div`
display: flex;
flex-direction: row;
align-items: center;
column-gap: ${spacings.LARGE};
`;

export const CaseStatusButtons = styled.div`
display: flex;
flex-direction: row;
column-gap: ${spacings.SMALL};
padding-top: ${spacings.SMALL};

> button {
width: ${spacings.COMPUTE_BUTTON};
}
row-gap: ${spacings.XXX_LARGE};
`;
Loading