gigafibre-fsm/apps/field/src-pwa/register-service-worker.js
louispaulb 11cd38f93c feat: add field tech app — barcode scanner, tasks, diagnostics, offline
Mobile-first Quasar PWA for field technicians at erp.gigafibre.ca/field/:
- Multi-barcode scanner (photo + live + manual) with device lookup
- Tasks page: today's Dispatch Jobs + assigned tickets
- Diagnostic: speed test, HTTP resolve, batch service check
- Device detail with customer linking
- Offline support: IndexedDB queue, API cache, auto-sync
- Standalone nginx container with Traefik StripPrefix + Authentik SSO

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 23:00:44 -04:00

12 lines
438 B
JavaScript

import { register } from 'register-service-worker'
register(process.env.SERVICE_WORKER_FILE, {
ready () { console.log('SW active') },
registered () {},
cached () { console.log('Content cached for offline') },
updatefound () {},
updated () { console.log('New content available, refresh') },
offline () { console.log('No internet, running in offline mode') },
error (err) { console.error('SW registration error:', err) },
})