This commit is contained in:
seb
2026-10-08 18:48:28 +02:00
parent 30b573cc63
commit b165f86811
10 changed files with 139 additions and 30 deletions

View File

@@ -352,6 +352,17 @@ class ArtikelKategorienPage extends PureComponent {
}
};
handleDeleteCategoryRecursive = async (cat) => {
const name = cat.name || `Kategorie #${cat.id}`;
if (!window.confirm(`Kategorie „${name}“ und alle Unterkategorien wirklich rekursiv löschen?`)) return;
try {
await categoryAutomat.actions.deleteCategoryRecursive(cat.id);
enqueueSnackbar(`Kategorie „${name}“ und alle Unterkategorien gelöscht.`, { variant: 'success' });
} catch (err) {
notifyError(err);
}
};
render() {
const {
companyId,
@@ -495,6 +506,7 @@ class ArtikelKategorienPage extends PureComponent {
.catch(notifyError);
},
onDelete: () => this.handleDeleteCategory(item),
onDeleteRecursive: () => this.handleDeleteCategoryRecursive(item),
nameInput: (
<TextField
value={draftName}