Skip to content

Commit b7272dd

Browse files
committed
making assembly the original color
1 parent 689b626 commit b7272dd

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

  • src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM/BOMTable.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ const BOMTable: React.FC<BOMTableProps> = ({ setHideColumn, assignMaterial, colu
110110

111111
'& .MuiDataGrid-row:hover': {
112112
backgroundColor: 'rgba(239, 67, 69, 0.6)'
113+
},
114+
115+
'& .super-app-theme--assembly': {
116+
backgroundColor: theme.palette.grey[600],
117+
'&:hover': {
118+
backgroundColor: 'rgba(239, 67, 69, 0.6)'
119+
},
120+
'&:focus': {
121+
backgroundColor: '#997570'
122+
}
113123
}
114124
}}
115125
>
@@ -128,7 +138,8 @@ const BOMTable: React.FC<BOMTableProps> = ({ setHideColumn, assignMaterial, colu
128138
rows={rows.concat(materialsWithAssemblies.filter(isAssemblyOpen))}
129139
getRowClassName={(params) => {
130140
const stripe = params.indexRelativeToCurrentPage % 2 === 0 ? 'even' : 'odd';
131-
return `super-app-theme--${stripe}`;
141+
const isAssemblyRow = String(params.row.id).startsWith('assembly-');
142+
return `super-app-theme--${stripe}${isAssemblyRow ? ' super-app-theme--assembly' : ''}`;
132143
}}
133144
rowsPerPageOptions={[100]}
134145
sx={bomTableStyles.datagrid}

0 commit comments

Comments
 (0)