This commit is contained in:
seb
2026-10-12 20:03:43 +02:00
parent 6b0839639d
commit 21663e4681
17 changed files with 2030 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ import warehouseAutomat from './warehouseAutomat';
import attributeAutomat from './attributeAutomat';
import propertyAutomat from './propertyAutomat';
import supplierAutomat from './supplierAutomat';
import orderAutomat from './orderAutomat';
/**
* @typedef {Object} SseState
@@ -236,6 +238,18 @@ function connect() {
});
});
addTrackedListener(es, 'order', () => {
void orderAutomat.actions.reload().catch((err) => {
console.error('[sse] order refresh failed', err);
});
});
addTrackedListener(es, 'shipment', () => {
void orderAutomat.actions.reload().catch((err) => {
console.error('[sse] shipment refresh failed', err);
});
});
addTrackedListener(es, 'open', () => {
sseAutomat.setState({ status: 'connected' });
});