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>
24 lines
867 B
JavaScript
24 lines
867 B
JavaScript
// Route API calls through ops-frontend nginx (which injects the ERPNext token)
|
|
// In production: /ops/api/... → Traefik strips /ops → nginx proxies to ERPNext with token
|
|
// In dev: '' (uses VITE_ERP_TOKEN or devServer proxy)
|
|
const viteBase = import.meta.env.BASE_URL || '/'
|
|
export const BASE_URL = viteBase === '/' ? '' : viteBase.replace(/\/$/, '')
|
|
|
|
// Direct link to ERPNext desk (for admin actions like user management)
|
|
export const ERP_DESK_URL = 'https://erp.gigafibre.ca'
|
|
|
|
export const MAPBOX_TOKEN = 'pk.eyJ1IjoidGFyZ29pbnRlcm5ldCIsImEiOiJjbW13Z3lwMXAwdGt1MnVvamsxNWkybzFkIn0.rdYB17XUdfn96czdnnJ6eg'
|
|
|
|
export const TECH_COLORS = [
|
|
'#6366f1', // Indigo
|
|
'#10b981', // Emerald
|
|
'#f59e0b', // Amber
|
|
'#8b5cf6', // Violet
|
|
'#06b6d4', // Cyan
|
|
'#f43f5e', // Rose
|
|
'#f97316', // Orange
|
|
'#14b8a6', // Teal
|
|
'#d946ef', // Fuchsia
|
|
'#3b82f6', // Blue
|
|
]
|