patch oko teksta PDFa i UI tablica
Some checks failed
ERP CI/CD Pipeline / test (push) Has been cancelled
ERP CI/CD Pipeline / Deploy (server git pull + compose) (push) Has been cancelled

This commit is contained in:
mariomitte
2026-07-12 03:25:03 +02:00
parent 3b54499b17
commit 4e3bf6dab0
40 changed files with 2149 additions and 331 deletions

View File

@@ -85,6 +85,16 @@ const isDev = import.meta.env.DEV;
navigator.serviceWorker.register('/service-worker.js').catch(function (error) {
console.error('Service worker registration failed:', error);
});
window.addEventListener('online', function () {
navigator.serviceWorker.ready
.then(function (registration) {
if (!registration.active) return;
registration.active.postMessage('FLUSH_WRITE_QUEUE');
})
.catch(function () {
// no-op, SW may not be ready yet
});
});
return;
}
@@ -94,7 +104,7 @@ const isDev = import.meta.env.DEV;
const keys = await caches.keys();
await Promise.all(
keys
.filter((key) => key.startsWith('erp-shell-'))
.filter((key) => key.startsWith('erp-shell-') || key.startsWith('erp-api-'))
.map((key) => caches.delete(key))
);
}