louispaulb
91da480aeb
perf: memoize dispatch timeline segments + load/capacity as computed Maps
...
Before: techDayJobsWithTravel(tech), periodLoadH(tech), techPeriodCapacityH(tech)
were called as functions in the template v-for — recalculated on EVERY render
for every tech (10 techs × 3 functions = 30 expensive recomputations per render).
After: Pre-computed as Vue computed Maps (segmentsMap, loadMap, capMap) that
only recompute when their reactive dependencies actually change. Template
reads from map[tech.id] — instant O(1) lookup, no recalculation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 18:24:16 -04:00
louispaulb
24b5644da4
refactor: extract composables from 5 largest files — net -1950 lines from main components
...
DispatchPage.vue: 1320→1217 lines
- Extract SbModal.vue + SbContextMenu.vue reusable components
- Extract useAbsenceResize composable
- Extract dispatch constants to config/dispatch.js
ProjectWizard.vue: 1185→673 lines (-43%)
- Extract useWizardPublish composable (270-line publish function)
- Extract useWizardCatalog composable
- Extract wizard-constants.js (step labels, options, categories)
SettingsPage.vue: 1172→850 lines (-27%)
- Extract usePermissionMatrix composable
- Extract useUserGroups composable
- Extract useLegacySync composable
ClientDetailPage.vue: 1169→864 lines (-26%)
- Extract useClientData composable (loadCustomer broken into sub-functions)
- Extract useEquipmentActions composable
- Extract client-constants.js + erp-pdf.js utility
checkout.js: 639→408 lines (-36%)
- Extract address-search.js module
- Extract otp.js module
- Extract email-templates.js module
- Extract project-templates.js module
- Add erpQuery() helper to DRY repeated URL construction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 17:57:24 -04:00
louispaulb
a8eeb1b77d
refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables
...
- Remove apps/dispatch/ (100% replaced by ops dispatch module, unmaintained)
- Commit services/targo-hub/lib/ (24 modules, 6290 lines — was never tracked)
- Commit services/docuseal + services/legacy-db docker-compose configs
- Extract client app composables: useOTP, useAddressSearch, catalog data, format utils
- Refactor CartPage.vue 630→175 lines, CatalogPage.vue 375→95 lines
- Clean hardcoded credentials from config.js fallback values
- Add client portal: catalog, cart, checkout, OTP verification, address search
- Add ops: NetworkPage, AgentFlowsPage, ConversationPanel, UnifiedCreateModal
- Add ops composables: useBestTech, useConversations, usePermissions, useScanner
- Add field app: scanner composable, docker/nginx configs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 17:38:38 -04:00
louispaulb
43d5ca2e4e
feat: nested tasks, project wizard, n8n webhooks, inline task editing
...
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>
2026-04-01 13:01:20 -04:00
louispaulb
35b7ea57d7
feat: add ops app + CONTEXT.md, simplify URL to /ops/
...
Ops app (Vue/Quasar PWA) with dispatch V2 integration, tag system,
customer 360, tickets, and dashboard. Served via standalone nginx
container at erp.gigafibre.ca/ops/ with Traefik StripPrefix + Authentik SSO.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:41:58 -04:00