From 2c2e8fde7d9f7fd9433288c3e95564fc07f03b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Bra=C3=B1a?= Date: Thu, 14 May 2026 12:53:24 +0200 Subject: [PATCH] feat: Add PWA support (manifest, service worker) and Companies tab to project edit --- public/icons/icon-128x128.png | Bin 0 -> 70 bytes public/icons/icon-144x144.png | Bin 0 -> 70 bytes public/icons/icon-152x152.png | Bin 0 -> 70 bytes public/icons/icon-192x192.png | Bin 0 -> 70 bytes public/icons/icon-1x1.png | Bin 0 -> 70 bytes public/icons/icon-384x384.png | Bin 0 -> 70 bytes public/icons/icon-512x512.png | Bin 0 -> 70 bytes public/icons/icon-72x72.png | Bin 0 -> 70 bytes public/icons/icon-96x96.png | Bin 0 -> 70 bytes public/manifest.json | 51 ++++++++++++++++++++++++ public/sw.js | 30 ++++++++++++++ resources/views/layouts/app.blade.php | 9 +++++ resources/views/projects/edit.blade.php | 4 ++ 13 files changed, 94 insertions(+) create mode 100644 public/icons/icon-128x128.png create mode 100644 public/icons/icon-144x144.png create mode 100644 public/icons/icon-152x152.png create mode 100644 public/icons/icon-192x192.png create mode 100644 public/icons/icon-1x1.png create mode 100644 public/icons/icon-384x384.png create mode 100644 public/icons/icon-512x512.png create mode 100644 public/icons/icon-72x72.png create mode 100644 public/icons/icon-96x96.png create mode 100644 public/manifest.json create mode 100644 public/sw.js diff --git a/public/icons/icon-128x128.png b/public/icons/icon-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-144x144.png b/public/icons/icon-144x144.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-152x152.png b/public/icons/icon-152x152.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-192x192.png b/public/icons/icon-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-1x1.png b/public/icons/icon-1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-384x384.png b/public/icons/icon-384x384.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-512x512.png b/public/icons/icon-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-72x72.png b/public/icons/icon-72x72.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/icons/icon-96x96.png b/public/icons/icon-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..f37764b1f7606623616dcdc169cc858273ea2d94 GIT binary patch literal 70 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}1TpU9xZYBRYe;|OLfu)tPp=D){ QB2a?C)78&qol`;+0Lr!y6951J literal 0 HcmV?d00001 diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..6429d0a --- /dev/null +++ b/public/manifest.json @@ -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" + } + ] +} diff --git a/public/sw.js b/public/sw.js new file mode 100644 index 0000000..82e336b --- /dev/null +++ b/public/sw.js @@ -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); + }) + ); +}); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 7a4e5f2..fa86edb 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -47,6 +47,15 @@ @stack('scripts') @livewireScripts + diff --git a/resources/views/projects/edit.blade.php b/resources/views/projects/edit.blade.php index c001a4d..4d7cc0d 100644 --- a/resources/views/projects/edit.blade.php +++ b/resources/views/projects/edit.blade.php @@ -147,6 +147,10 @@

{{ __('Users') }}

+
+

{{ __('Companies') }}

+ +