Add shared Manifest UI for delivery, quote, and order.

Wire quote/order API clients and routes, then unify list/create/edit behind ManifestList/Form tiles so Lieferungen and Auftrag share one stack.
This commit is contained in:
seb
2026-08-06 20:08:56 +02:00
parent 8d50d083f5
commit 4896b1dc36
26 changed files with 1356 additions and 1103 deletions

View File

@@ -0,0 +1,83 @@
import { PureComponent } from 'react';
import IconButton from '@mui/material/IconButton';
import TableCell from '@mui/material/TableCell';
import TableRow from '@mui/material/TableRow';
import TextField from '@mui/material/TextField';
import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined';
import { LINE_COLUMNS } from './manifestConfig';
class ManifestFormLine extends PureComponent {
constructor(props) {
super(props);
this.handleRemove = this.handleRemove.bind(this);
}
handleRemove() {
this.props.onRemove(this.props.line.key);
}
renderField(column) {
const { id, align, type } = column;
const { line, saving, onChange } = this.props;
return (
<TextField
size="small"
fullWidth
type={type}
value={line[id]}
disabled={saving}
autoComplete="off"
onChange={(e) => onChange(line.key, id, e.target.value)}
slotProps={{
htmlInput: {
inputMode: type === 'number' ? 'decimal' : 'text',
style: { textAlign: align },
spellCheck: false,
autoComplete: 'off',
step: type === 'number' ? 'any' : undefined,
},
}}
sx={{
'& input[type=number]': {
MozAppearance: 'textfield',
},
'& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button':
{
WebkitAppearance: 'none',
margin: 0,
},
}}
/>
);
}
render() {
const { columns = LINE_COLUMNS, saving } = this.props;
return (
<TableRow>
{columns.map((col) => (
<TableCell
key={col.id}
align={col.align}
sx={{ py: 0.75, verticalAlign: 'middle' }}
>
{this.renderField(col)}
</TableCell>
))}
<TableCell padding="checkbox" sx={{ py: 0.75 }}>
<IconButton
size="small"
aria-label="Zeile entfernen"
disabled={saving}
onClick={this.handleRemove}
>
<DeleteOutlinedIcon fontSize="small" />
</IconButton>
</TableCell>
</TableRow>
);
}
}
export default ManifestFormLine;