gigafibre-fsm/docs/features/README.md
louispaulb 70bf25ea84 feat(dispatch): pont legacy(osTicket)→Dispatch Job pour les tickets « Tech Targo »
Tire régulièrement les tickets ouverts assignés au compte « Tech Targo » (staff 3301)
de la DB legacy MariaDB et crée/maj un Dispatch Job ERPNext (pool à répartir).

- lib/legacy-dispatch-sync.js : fetch (status=open AND assign_to=3301) + mapping
  customer (legacy_account_id) / Service Location (coords) / job_type (dept) /
  scheduled_date (epoch→America/Toronto) / start_time (am|pm|HH:MM) / priority
- Idempotent via Custom Field Dispatch Job.legacy_ticket_id (lookup avant create) ;
  ne clobbe pas le travail du répartiteur (maj date seulement si encore open+non assigné)
- SÉQUENTIEL (frappe_pg) ; endpoints GET preview (dry-run) + POST run
- Récurrence opt-in : startSync() au boot, LEGACY_DISPATCH_SYNC=on + _MIN=15
- server.js : route /dispatch/legacy-sync + startSync()
- doc docs/features/legacy-dispatch-bridge.md + index

Mise en service : 70 tickets importés (0 erreur), récurrence 15 min active.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 09:33:53 -04:00

2.5 KiB
Raw Blame History

Features

One doc per business capability. Each describes the user-facing behaviour, the ERPNext doctypes touched, the API endpoints involved, and the failure modes. Open the one that matches the feature you're changing.

Doc Owns
dispatch.md Ops dispatch board: drag-and-drop scheduling, tech assignment with skill tags, travel-time optimization, magic-link SMS issuance, live SSE updates
roster.md Planification (Roster AI): grille hebdo ressources × jours, garde live, solveur OR-Tools, scoring priorité (maîtrise⊕vitesse⊕coût), panneau « jobs à assigner » (drag-drop + aperçu occupation), timeline ressource, dialogues d'impact, booking roster-aware
legacy-dispatch-bridge.md Pont legacy→dispatch: tire régulièrement les tickets osTicket « Tech Targo » (staff 3301) de la MariaDB legacy → Dispatch Job ERPNext (idempotent via legacy_ticket_id), mapping client/Service Location/type/date, endpoints preview/run, scheduler opt-in
tech-mobile.md Field tech app (three surfaces: SSR /t/{jwt}, transitional apps/field/, unified /ops/#/j/*). Native camera → Gemini scanner, equipment install/remove, JWT auth, offline queue
customer-portal.md Passwordless customer self-service at portal.gigafibre.ca: magic-link email (24h JWT), invoice + ticket view, Stripe-linked payment flows
billing-payments.md Stripe integration (Checkout, Billing Portal, webhook), subscription lifecycle, invoice generation, payment reconciliation, PPA (Plan de paiement automatique), Klarna BNPL
cpe-management.md CPE fleet: GenieACS (TR-069) provisioning + diagnostics, TP-Link XX230v / Deco deep probe via modem-bridge, 3-way diagnostic-swap workflow
vision-ocr.md Camera-based scanning via Gemini 2.5 Flash — barcode, equipment label, invoice OCR. Hub endpoints /vision/*, useScanner composable, offline queue, AI_API_KEY rotation policy, ERPNext relationships triggered by a scan
flow-editor.md Agent-flows module: Flow Template + Flow Run doctypes, trigger catalogue, step types, runtime contract, UI editor at /ops/#/agent-flows

Cross-module map: see ../architecture/module-interactions.md for the full call graph + sequence diagrams.

Back to docs/README.md · roadmap.md