This commit is contained in:
seb
2026-10-14 14:46:44 +02:00
parent 49f8f2f93f
commit 4188d8f46f
6 changed files with 597 additions and 26 deletions

View File

@@ -838,18 +838,29 @@ class ManifestFormLine extends PureComponent {
}
render() {
const { columns = LINE_COLUMNS, saving } = this.props;
const { columns = LINE_COLUMNS, saving, isDirty } = this.props;
const secondLine = this.renderSecondLine();
return (
<Fragment>
{/* Row 1: Editable Line Inputs */}
<TableRow hover sx={{ '& > td': { borderBottom: 'none', p: 0 } }}>
<TableRow
hover
sx={{
'& > td': { borderBottom: 'none', p: 0 },
...(isDirty ? { bgcolor: 'rgba(237, 108, 2, 0.08)' } : {}),
}}
>
{columns.map((col, colIdx) => (
<TableCell
key={col.id}
align={col.align}
sx={{ p: 0, width: col.width, verticalAlign: 'middle' }}
sx={{
p: 0,
width: col.width,
verticalAlign: 'middle',
...(isDirty && colIdx === 0 ? { borderLeft: '3px solid', borderColor: 'warning.main' } : {}),
}}
>
{this.renderField(col, colIdx, columns.length)}
</TableCell>
@@ -868,13 +879,19 @@ class ManifestFormLine extends PureComponent {
{/* Row 2: Matched Supplier Article Details */}
{secondLine && (
<TableRow sx={{ '& > td': { pt: 0.25, pb: 0.75, borderBottom: 'none' } }}>
<TableRow
sx={{
'& > td': { pt: 0.25, pb: 0.75, borderBottom: 'none' },
...(isDirty ? { bgcolor: 'rgba(237, 108, 2, 0.04)' } : {}),
}}
>
<TableCell
colSpan={columns.length + 1}
sx={{
py: 0.4,
px: 1,
bgcolor: 'transparent',
...(isDirty ? { borderLeft: '3px solid', borderColor: 'warning.main' } : {}),
}}
>
{secondLine}