OSS (Operations Support Systems) and BSS (Business Support Systems) for resources optimization
Go to file
louispaulb af42c6082e feat: auth gate, GPS hybrid tracking, tech CRUD modal, ERPNext API proxy
Authentication:
- Add App.vue login gate (v-if auth.loading / v-else-if !auth.user / router-view)
- Fix auth.checkSession with try/finally to always reset loading
- Fix generate_keys method name for Frappe v16 (generate_keys, not generate_keys_for_api_user)
- Auto-generate API token on cookie-based auth (Authentik SSO support)
- Remove duplicate checkSession from DispatchV2Page (was causing infinite mount/unmount loop)

GPS Tracking — Hybrid REST + WebSocket:
- Initial REST fetch per-device in parallel (Traccar API only supports one deviceId per request)
- WebSocket real-time updates via wss://dispatch.gigafibre.ca/traccar/api/socket
- Auto-fallback to 30s polling if WebSocket fails, with exponential backoff reconnect
- Module-level guards (__gpsStarted, __gpsPolling) to prevent loops on component remount
- Only update tech.gpsCoords when value actually changes (prevents unnecessary reactive triggers)

Tech Management (GPS Modal):
- Add/delete technicians directly from GPS modal → persists to ERPNext
- Inline edit: double-click name to rename, phone field, status select
- Auto-generate technician_id (TECH-N+1)
- Unlink jobs before delete to avoid ERPNext LinkExistsError
- Added phone/email custom fields to Dispatch Technician doctype

Infrastructure:
- Nginx proxy: /api/ → ERPNext (same-origin, eliminates all CORS issues)
- Nginx proxy: /traccar/ WebSocket support (Upgrade headers, 86400s timeout)
- No-cache headers on index.html and sw.js for instant PWA updates
- BASE_URL switched to empty string in production (same-origin via proxy)

Bug fixes:
- ERPNext Number Card PostgreSQL fix (ORDER BY on aggregate queries)
- Traccar fetchPositions: parallel per-device calls (API ignores multiple deviceId params)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 12:02:04 -04:00
frappe-setup Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
infra Refactor: modular architecture — extract composables & components 2026-03-24 16:08:56 -04:00
public/icons Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
scripts Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
src feat: auth gate, GPS hybrid tracking, tech CRUD modal, ERPNext API proxy 2026-03-27 12:02:04 -04:00
src-pwa Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
.dockerignore Refactor: modular architecture — extract composables & components 2026-03-24 16:08:56 -04:00
.eslintrc.cjs Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
.gitignore Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
deploy-fast.sh Add deploy-fast.sh — local build + docker cp (~5s vs ~30s) 2026-03-24 16:12:07 -04:00
deploy.sh Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
Dockerfile Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
index.html Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
package-lock.json Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
package.json Initial commit — OSS/BSS Field Dispatch app 2026-03-24 14:11:40 -04:00
quasar.config.js feat: auth gate, GPS hybrid tracking, tech CRUD modal, ERPNext API proxy 2026-03-27 12:02:04 -04:00