u
This commit is contained in:
@@ -363,7 +363,7 @@ export function getManifestDirtyDetails(current, baseline) {
|
||||
const count = dirtyLineKeys.length;
|
||||
summary.push(count > 0 ? `${count} Artikelzeile${count === 1 ? '' : 'n'}` : 'Artikelzeilen');
|
||||
}
|
||||
if (fields.attachments) summary.push('Dateien');
|
||||
if (fields.attachments && current.kind !== 'quote') summary.push('Dateien');
|
||||
|
||||
const isDirty = summary.length > 0;
|
||||
|
||||
@@ -455,6 +455,16 @@ export function createManifestEditAutomat({ kind, name }) {
|
||||
});
|
||||
},
|
||||
|
||||
setAttachments(attachments) {
|
||||
const list = Array.isArray(attachments) ? attachments : [];
|
||||
const base = automat.state.baseline;
|
||||
const nextBaseline = base ? { ...base, attachments: [...list] } : null;
|
||||
automat.setState({
|
||||
attachments: list,
|
||||
baseline: nextBaseline,
|
||||
});
|
||||
},
|
||||
|
||||
restoreBaseline() {
|
||||
if (!automat.state.baseline) return;
|
||||
const base = automat.state.baseline;
|
||||
|
||||
Reference in New Issue
Block a user