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

@@ -18,8 +18,8 @@ import { PanelTile, PanelTileGrid } from 'dashgui/panels';
import withNavigate from '../../components/withNavigate';
import { backendErrorFrom } from '../../utils/backendError';
import { notifyError } from '../../utils/notify';
import { setLastDeliveryPath } from '../../automats';
import supplierAutomat from '../../automats/supplierAutomat';
import { setLastDeliveryPath } from '../../automats/navigationAutomat';
import companyAutomat from '../../automats/companyAutomat';
import { deliveryDraftAutomat } from '../../automats/deliveryEditorAutomat';
import {
GREEN_PANEL,
@@ -109,7 +109,7 @@ class LieferungLieferantenPage extends PureComponent {
async loadSuppliers() {
this.setState({ status: 'loading', error: null });
try {
const list = await supplierAutomat.actions.load();
const list = await companyAutomat.actions.loadSuppliers();
if (this._cancelled) return;
this.applySuppliers(list);
} catch (err) {
@@ -123,7 +123,7 @@ class LieferungLieferantenPage extends PureComponent {
}
async refreshFromServer() {
const list = await supplierAutomat.actions.reload();
const list = await companyAutomat.actions.reloadSuppliers();
if (this._cancelled) return;
this.applySuppliers(list);
}
@@ -136,7 +136,7 @@ class LieferungLieferantenPage extends PureComponent {
this.setState({ busyKey: 'new' });
try {
const newSupplier = await supplierAutomat.actions.create({ name });
const newSupplier = await companyAutomat.actions.createSupplier({ name });
// Assign the new supplier to the active delivery draft & clear unmatched name
deliveryDraftAutomat.actions.setDeliveryEntity(newSupplier.id);
@@ -170,7 +170,7 @@ class LieferungLieferantenPage extends PureComponent {
this.setState({ busyKey: supplier.id });
try {
await supplierAutomat.actions.update(supplier.id, { name: draft });
await companyAutomat.actions.updateSupplier(supplier.id, { name: draft });
await this.refreshFromServer();
if (this._cancelled) return;
this.setState({ busyKey: null });
@@ -193,7 +193,7 @@ class LieferungLieferantenPage extends PureComponent {
this.setState({ busyKey: supplier.id });
try {
await supplierAutomat.actions.remove(supplier.id);
await companyAutomat.actions.removeSupplier(supplier.id);
await this.refreshFromServer();
if (this._cancelled) return;
this.setState({ busyKey: null });