feat(manifest): improve PDF extraction workflow and fix delivery lines rendering
- Fix SSE 'result' event handling in delivery creation and stop circular progress - Directly populate deliveryEditorSlice with parsed header, line items, and notes - Simplify ManifestPdfDialog to display LLM protocol log and status only - Render PDF analysis notes at the bottom of the delivery page - Keep article lines visible when imported items exist even if partyId is not yet selected - Bind handleEdit and handleDelete in ManifestList constructor to fix row click TypeError - Support delivery columns (name, pu, netprice, taxrate) in ManifestForm and lineFromApi - Remove obsolete Unit column from delivery lines
This commit is contained in:
@@ -176,7 +176,16 @@ class ManifestForm extends PureComponent {
|
||||
handleLineChange(key, field, value) {
|
||||
this.setState((prev) => ({
|
||||
lines: prev.lines.map((line) =>
|
||||
line.key === key ? { ...line, [field]: value } : line,
|
||||
line.key === key
|
||||
? {
|
||||
...line,
|
||||
[field]: value,
|
||||
...(field === 'net' ? { netprice: value } : {}),
|
||||
...(field === 'netprice' ? { net: value } : {}),
|
||||
...(field === 'tax' ? { taxrate: value } : {}),
|
||||
...(field === 'taxrate' ? { tax: value } : {}),
|
||||
}
|
||||
: line,
|
||||
),
|
||||
}));
|
||||
}
|
||||
@@ -260,7 +269,14 @@ class ManifestForm extends PureComponent {
|
||||
},
|
||||
}));
|
||||
} finally {
|
||||
if (!this._cancelled) this.setState({ pdfUploading: false });
|
||||
if (!this._cancelled) {
|
||||
this.setState((prev) => ({
|
||||
pdfUploading: false,
|
||||
pdfDialogData: prev.pdfDialogData
|
||||
? { ...prev.pdfDialogData, streaming: false }
|
||||
: null,
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,6 +374,7 @@ class ManifestForm extends PureComponent {
|
||||
|
||||
return (
|
||||
<ManifestLines
|
||||
columns={cfg.columns}
|
||||
lines={lines}
|
||||
saving={saving}
|
||||
linesColor={cfg.linesColor}
|
||||
|
||||
Reference in New Issue
Block a user