diff --git a/src/app/index.tsx b/src/app/index.tsx index 391ea34693..878b5fc008 100644 --- a/src/app/index.tsx +++ b/src/app/index.tsx @@ -126,6 +126,9 @@ const client = new ApolloClient({ OperationalSolution: { keyFields: ['key', 'nameOther', 'id'] }, + MTOSubcategory: { + keyFields: ['milestones'] + }, LockableSectionLockStatus: { keyFields: ['lockedByUserAccount', ['id'], 'section', 'modelPlanID'] } diff --git a/src/features/ModelPlan/ModelToOperations/_components/Table/columns.tsx b/src/features/ModelPlan/ModelToOperations/_components/Table/columns.tsx index e1412398a6..61783cc68f 100644 --- a/src/features/ModelPlan/ModelToOperations/_components/Table/columns.tsx +++ b/src/features/ModelPlan/ModelToOperations/_components/Table/columns.tsx @@ -133,6 +133,14 @@ export const columns: ColumnType[] = [ Cell: ({ row, rowType, expanded }: RowProps) => { const { riskIndicator } = row; + if ('subCategories' in row) { + if (row.subCategories.length === 0) return <>; + } + + if ('milestones' in row) { + if (row.milestones.length === 0) return <>; + } + if (rowType !== 'milestone') return (