Major dispatch/task system overhaul: - Project templates with 3-step wizard (choose template → edit steps → publish) - 4 built-in templates: phone service, fiber install, move, repair - Nested task tree with recursive TaskNode component (parent_job hierarchy) - n8n webhook integration (on_open_webhook, on_close_webhook per task) - Inline task editing: status, priority, type, tech assignment, tags, delete - Tech assignment + tags from ticket modal → jobs appear on dispatch timeline - ERPNext custom fields: parent_job, on_open_webhook, on_close_webhook, step_order - Refactored ClientDetailPage, ChatterPanel, DetailModal, dispatch store - CSS consolidation, dead code cleanup, composable extraction - Dashboard KPIs with dispatch integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
492 B
JavaScript
20 lines
492 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 silently (no reload)
|
|
if (reg && reg.waiting) {
|
|
reg.waiting.postMessage({ type: 'SKIP_WAITING' })
|
|
}
|
|
},
|
|
offline () {},
|
|
error () {}
|
|
})
|