This commit is contained in:
seb
2026-10-28 19:32:19 +01:00
parent 3c51de06c2
commit 550586f46e
6 changed files with 113 additions and 137 deletions

View File

@@ -182,6 +182,15 @@ function connect() {
const es = new EventSource(url.href, { withCredentials: true });
addTrackedListener(es, 'company', () => {
const comp = Automat.get('company');
if (comp?.actions?.reload) {
void comp.actions.reload().catch((err) => {
console.error('[sse] company refresh failed', err);
});
}
});
// Category tree changed: refresh the tree and every open category view.
addTrackedListener(es, 'category', () => {
const cat = Automat.get('category');