diff --git a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsCollapsedGrid.tsx b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsCollapsedGrid.tsx index 7ab300471..19f5cbf2c 100644 --- a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsCollapsedGrid.tsx +++ b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsCollapsedGrid.tsx @@ -49,6 +49,7 @@ const initialState = { 'varianceExplanation.reasons': false, 'engagement.project.isMember': false, 'engagement.project.pinned': false, + cumulativeSummary: false, }, }, } satisfies DataGridProps['initialState']; diff --git a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsGrid.tsx b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsGrid.tsx index e8c505398..4ec5f2083 100644 --- a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsGrid.tsx +++ b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsGrid.tsx @@ -4,6 +4,7 @@ import { DataGridPro, DataGridProProps as DataGridProps, GridColDef, + GridRenderCellParams as RenderCellParams, } from '@mui/x-data-grid-pro'; import { merge } from 'lodash'; import { useMemo } from 'react'; @@ -97,6 +98,24 @@ export const ProgressReportsColumnMap = { filterable: false, valueGetter: (_, row) => row.varianceExplanation.scheduleStatus, }, + cumulativeSummary: { + headerName: 'Cumulative Progress', + minWidth: 200, + sortable: false, + filterable: false, + renderCell: ({ + value, + }: RenderCellParams< + ProgressReport, + ProgressReport['cumulativeSummary'] + >) => ( + + + + + + ), + }, teamNews: { headerName: 'Team News', width: 400, @@ -213,3 +232,12 @@ export const ProgressReportsGrid = ({ /> ); }; + +const Metric = ({ label, value }: { label: string; value?: number }) => ( + + + {value === undefined ? '—' : `${(value * 100).toFixed(1)}%`} + +
{label}
+
+); diff --git a/src/scenes/Dashboard/ProgressReportsWidget/progressReportsDataGridRow.graphql b/src/scenes/Dashboard/ProgressReportsWidget/progressReportsDataGridRow.graphql index 72da09e6e..9125d5d18 100644 --- a/src/scenes/Dashboard/ProgressReportsWidget/progressReportsDataGridRow.graphql +++ b/src/scenes/Dashboard/ProgressReportsWidget/progressReportsDataGridRow.graphql @@ -39,6 +39,11 @@ fragment progressReportsDataGridRow on ProgressReport { value } } + cumulativeSummary { + planned + actual + variance + } teamNews { items { id