Ops app (Vue/Quasar PWA) with dispatch V2 integration, tag system, customer 360, tickets, and dashboard. Served via standalone nginx container at erp.gigafibre.ca/ops/ with Traefik StripPrefix + Authentik SSO. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
511 B
JavaScript
21 lines
511 B
JavaScript
import { register } from 'register-service-worker'
|
|
|
|
register(process.env.SERVICE_WORKER_FILE, {
|
|
ready () {},
|
|
registered (reg) {
|
|
// Check for updates every 5 minutes
|
|
setInterval(() => { reg.update() }, 5 * 60 * 1000)
|
|
},
|
|
cached () {},
|
|
updatefound () {},
|
|
updated (reg) {
|
|
// New service worker available — activate it and reload
|
|
if (reg && reg.waiting) {
|
|
reg.waiting.postMessage({ type: 'SKIP_WAITING' })
|
|
}
|
|
window.location.reload()
|
|
},
|
|
offline () {},
|
|
error () {}
|
|
})
|