diff --git a/webapp/src/components/calculations/calculation.scss b/webapp/src/components/calculations/calculation.scss index 56afb6cce..b3100d526 100644 --- a/webapp/src/components/calculations/calculation.scss +++ b/webapp/src/components/calculations/calculation.scss @@ -5,6 +5,10 @@ cursor: pointer; transition: opacity 0.1s ease-in; + &.disabled { + cursor: unset; + } + &.none { opacity: 0; diff --git a/webapp/src/components/table/__snapshots__/table.test.tsx.snap b/webapp/src/components/table/__snapshots__/table.test.tsx.snap index 760d57b56..3b6d9a5c7 100644 --- a/webapp/src/components/table/__snapshots__/table.test.tsx.snap +++ b/webapp/src/components/table/__snapshots__/table.test.tsx.snap @@ -325,7 +325,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 1` class="CalculationRow octo-table-row" >
@@ -341,7 +341,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 1`
@@ -355,7 +355,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 1` />
@@ -369,7 +369,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 1` />
@@ -713,7 +713,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 2` class="CalculationRow octo-table-row" >
@@ -729,7 +729,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 2`
@@ -743,7 +743,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 2` />
@@ -757,7 +757,7 @@ exports[`components/table/Table extended should match snapshot with CreatedBy 2` />
@@ -1101,7 +1101,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedAt 1` class="CalculationRow octo-table-row" >
@@ -1117,7 +1117,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedAt 1`
@@ -1131,7 +1131,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedAt 1` />
@@ -1145,7 +1145,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedAt 1` />
@@ -1489,7 +1489,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedBy 1` class="CalculationRow octo-table-row" >
@@ -1505,7 +1505,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedBy 1`
@@ -1519,7 +1519,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedBy 1` />
@@ -1533,7 +1533,7 @@ exports[`components/table/Table extended should match snapshot with UpdatedBy 1` />
@@ -1755,7 +1755,7 @@ exports[`components/table/Table should match snapshot 1`] = ` class="CalculationRow octo-table-row" >
@@ -1771,7 +1771,7 @@ exports[`components/table/Table should match snapshot 1`] = `
@@ -1785,7 +1785,7 @@ exports[`components/table/Table should match snapshot 1`] = ` />
@@ -1989,7 +1989,7 @@ exports[`components/table/Table should match snapshot with GroupBy 1`] = ` class="CalculationRow octo-table-row" >
@@ -2005,7 +2005,7 @@ exports[`components/table/Table should match snapshot with GroupBy 1`] = `
@@ -2019,7 +2019,7 @@ exports[`components/table/Table should match snapshot with GroupBy 1`] = ` />
@@ -2224,7 +2224,7 @@ exports[`components/table/Table should match snapshot, read-only 1`] = ` class="CalculationRow octo-table-row" >
@@ -2240,7 +2240,7 @@ exports[`components/table/Table should match snapshot, read-only 1`] = `
@@ -2254,7 +2254,7 @@ exports[`components/table/Table should match snapshot, read-only 1`] = ` />
diff --git a/webapp/src/components/table/calculation/__snapshots__/calculationRow.test.tsx.snap b/webapp/src/components/table/calculation/__snapshots__/calculationRow.test.tsx.snap index 59e28bd07..a08d972d6 100644 --- a/webapp/src/components/table/calculation/__snapshots__/calculationRow.test.tsx.snap +++ b/webapp/src/components/table/calculation/__snapshots__/calculationRow.test.tsx.snap @@ -6,7 +6,7 @@ exports[`components/table/calculation/CalculationRow should match snapshot 1`] = class="CalculationRow octo-table-row" >
@@ -22,7 +22,7 @@ exports[`components/table/calculation/CalculationRow should match snapshot 1`] =
@@ -38,7 +38,7 @@ exports[`components/table/calculation/CalculationRow should match snapshot 1`] =
@@ -54,7 +54,7 @@ exports[`components/table/calculation/CalculationRow should match snapshot 1`] =
@@ -79,7 +79,7 @@ exports[`components/table/calculation/CalculationRow should render three calcula class="CalculationRow octo-table-row" >
@@ -95,7 +95,7 @@ exports[`components/table/calculation/CalculationRow should render three calcula
@@ -109,7 +109,7 @@ exports[`components/table/calculation/CalculationRow should render three calcula />
@@ -123,7 +123,7 @@ exports[`components/table/calculation/CalculationRow should render three calcula />
diff --git a/webapp/src/components/table/calculation/calculationRow.test.tsx b/webapp/src/components/table/calculation/calculationRow.test.tsx index 8e03784ce..0ec5f5cd6 100644 --- a/webapp/src/components/table/calculation/calculationRow.test.tsx +++ b/webapp/src/components/table/calculation/calculationRow.test.tsx @@ -73,6 +73,7 @@ describe('components/table/calculation/CalculationRow', () => { activeView={view} resizingColumn={''} offset={0} + readonly={false} />, ) @@ -94,6 +95,7 @@ describe('components/table/calculation/CalculationRow', () => { activeView={view} resizingColumn={''} offset={0} + readonly={false} />, ) diff --git a/webapp/src/components/table/calculation/calculationRow.tsx b/webapp/src/components/table/calculation/calculationRow.tsx index 216d6e5b9..d15369a25 100644 --- a/webapp/src/components/table/calculation/calculationRow.tsx +++ b/webapp/src/components/table/calculation/calculationRow.tsx @@ -20,6 +20,7 @@ type Props = { activeView: BoardView resizingColumn: string offset: number + readonly: boolean } const CalculationRow = (props: Props): JSX.Element => { @@ -46,7 +47,7 @@ const CalculationRow = (props: Props): JSX.Element => { return (
setHovered(true)} + onMouseEnter={() => setHovered(!props.readonly)} onMouseLeave={() => setHovered(false)} > { @@ -59,9 +60,9 @@ const CalculationRow = (props: Props): JSX.Element => { toggleOptions(template.id, false)} onMenuOpen={() => toggleOptions(template.id, true)} onChange={(v: string) => { diff --git a/webapp/src/components/table/table.tsx b/webapp/src/components/table/table.tsx index 9d6c5a024..018b8b402 100644 --- a/webapp/src/components/table/table.tsx +++ b/webapp/src/components/table/table.tsx @@ -397,6 +397,7 @@ const Table = (props: Props): JSX.Element => { activeView={activeView} resizingColumn={resizingColumn} offset={offset} + readonly={props.readonly} />