feat: Add PWA support (manifest, service worker) and Companies tab to project edit

This commit is contained in:
2026-05-14 12:53:24 +02:00
parent 4f4e83bc66
commit 2c2e8fde7d
13 changed files with 94 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
const CACHE_NAME = 'construprogress-cache-v1';
const urlsToCache = [
'/',
'/dashboard',
'/projects',
'/projects-list',
'/projects/templates',
'/css/app.css',
'/js/app.js',
// Add other assets as needed
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => cache.addAll(urlsToCache))
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then((response) => {
if (response) {
return response;
}
return fetch(event.request);
})
);
});