This commit is contained in:
seb
2026-10-16 16:03:31 +02:00
parent f5a5cb51e3
commit 99d95ee234
7 changed files with 377 additions and 103 deletions

View File

@@ -35,7 +35,7 @@ import supplierAutomat from './supplierAutomat';
import orderAutomat from './orderAutomat';
import quoteAutomat from './quoteAutomat';
import shipmentAutomat from './shipmentAutomat';
import { handleDraftRequest, handleDraftEvent } from './draftSync';
import { handleDraftEvent } from './draftSync';
/**
@@ -265,14 +265,7 @@ function connect() {
});
});
addTrackedListener(es, 'draft:request', (event) => {
try {
const payload = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;
void handleDraftRequest(payload);
} catch (err) {
console.error('[sse] draft:request handling failed', err);
}
});
addTrackedListener(es, 'draft', (event) => {
try {