This commit is contained in:
seb
2026-10-28 00:08:45 +01:00
parent fab291f68e
commit 96d0ae6742
88 changed files with 3871 additions and 5334 deletions

View File

@@ -6,7 +6,7 @@ import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined';
import DragIndicatorIcon from '@mui/icons-material/DragIndicator';
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
import { enqueueSnackbar } from 'notistack';
import warehouseAutomat from '../../automats/warehouseAutomat';
import companyAutomat from '../../automats/companyAutomat';
import { notifyError } from '../../utils/notify';
class ArtikelLager extends PureComponent {
@@ -51,7 +51,7 @@ class ArtikelLager extends PureComponent {
async renameWarehouse(item, name) {
try {
await warehouseAutomat.actions.update(item.id, { name });
await companyAutomat.actions.updateWarehouse(item.id, { name });
enqueueSnackbar('Lager gespeichert.', { variant: 'success' });
} catch (err) {
this.setState({ draft: item.name ?? '' });
@@ -78,7 +78,7 @@ class ArtikelLager extends PureComponent {
if (!window.confirm(`Lager „${item.name}" wirklich löschen?`)) return;
void (async () => {
try {
await warehouseAutomat.actions.remove(item.id);
await companyAutomat.actions.removeWarehouse(item.id);
enqueueSnackbar('Lager gelöscht.', { variant: 'success' });
} catch (err) {
notifyError(err);