This commit is contained in:
seb
2026-10-14 23:24:45 +02:00
parent eb4654dfbf
commit e2a2d02cb4
8 changed files with 170 additions and 71 deletions

View File

@@ -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;