added shipping note service worker

This commit is contained in:
Luca Haid
2025-04-09 22:06:15 +02:00
parent 264e2f31bc
commit 5f2e5d2b0c
4 changed files with 64 additions and 0 deletions
@@ -460,3 +460,15 @@ Vue.component('warehouse-shipping-note', {
},
}
})
window.addEventListener('DOMContentLoaded', () => {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/WarehouseShippingNote/sw', { scope: '/' })
.then(registration => {
console.log('Patching PWA Service Worker registered with scope:', registration.scope);
})
.catch(error => {
console.error('Patching PWA Service Worker registration failed:', error);
});
}
})