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
Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

+51
View File
@@ -0,0 +1,51 @@
{
"name": "ConstruProgress",
"short_name": "ConstruProg",
"description": "App para gestión de proyectos de construcción",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#000000",
"icons": [
{
"src": "/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
+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);
})
);
});
+9
View File
@@ -47,6 +47,15 @@
@stack('scripts')
@livewireScripts
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function(err) {
console.log('ServiceWorker registration failed: ', err);
});
}
</script>
</body>
</html>
+4
View File
@@ -147,6 +147,10 @@
<h2 class="text-xl font-bold mb-2">{{ __('Users') }}</h2>
<livewire:project-users :project="$project" />
</div>
<div class="py-4" x-show="tabActivo === 4">
<h2 class="text-xl font-bold mb-2">{{ __('Companies') }}</h2>
<livewire:project-companies :project="$project" />
</div>
</div>
</div>
</div>