cf46790ed8
feat(pwa): improve service worker with background sync, push, IndexedDB
...
- Bumped cache version to nexus-pos-v3
- Background sync for cart (nexus-cart-sync): replays pending
requests from IndexedDB, clears queue on success
- Push notifications: parse payload, show notification, focus/open
/pos/sale on click
- Offline cart strategy: queue failed POST /pos/api/cart/* in
IndexedDB, return queued JSON response
- Message handlers: SKIP_WAITING (preserved) + CLEAR_CACHES
- Periodic background sync stub commented for future cache warming
2026-04-29 07:10:47 +00:00
32581739ad
feat(pos): PWA con Service Worker + sync offline
...
- Add manifest.json, sw.js with cache-first/network-first strategies
- Add sync-engine.js with IndexedDB queue for offline operations
- Add /pos/api/sync/inventory endpoint for offline inventory cache
- Add /pos/sw.js route for proper SW scope registration
- Generate PWA icons (192x192, 512x512)
- Update all 10 HTML templates with manifest link, theme-color meta,
SW registration, and sync-engine script
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-02 07:18:01 +00:00