Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Aug 14, 2023
2 parents 576db3e + 7367162 commit 9f7ce69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import { Tooltip, Icon } from '@equinor/eds-core-react';
import { check, clear } from '@equinor/eds-icons';
Icon.add({ check, clear });
type AvailableItemCellProps = {
available: string | null;
available: boolean | null;
};
export const AvailableItemCell = ({
available,
}: AvailableItemCellProps): JSX.Element | null => {
if (available === null) {
return null;
}
const refTitle = available === 'Y' ? 'Available' : 'Not Available';
const refTitle = available ? 'Available' : 'Not Available';

return (
<Tooltip title={refTitle}>
{available === 'Y' ? (
{available ? (
<Icon color="green" name="check" />
) : (
<Icon color="red" name="clear" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const columns: ColDef<MaterialBase>[] = [
{
field: 'Available',
valueGetter: (pkg) => pkg.data?.available,
cellRenderer: (props: ICellRendererProps<MaterialBase, string | null>) => {
cellRenderer: (props: ICellRendererProps<MaterialBase, boolean | null>) => {
return <AvailableItemCell available={props.value} />;
},
minWidth: 120,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packageManager": "pnpm@8.0.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"first-time-setup": "npm i -g vite pnpm@8.0.0 @equinor/fusion-framework-cli turbo && pnpm i && pnpm build",
"first-time-setup": "npm i -g vite pnpm@8.0.0 @equinor/fusion-framework-cli turbo && pnpm i && pnpm ci:build",
"serve": "turbo run dev --filter",
"ci:build": "turbo run build --output-logs errors-only",
"build": "turbo run build --output-logs errors-only --parallel",
Expand Down

0 comments on commit 9f7ce69

Please sign in to comment.