gigafibre-fsm/services/targo-hub/lib
louispaulb 3aa59adec3 Events: creation, capacity cap, language-tagged attachments, additive audience list
Ops event page overhaul (hub lib/events.js + email.js, ops EventsPage.vue + api):

- Create/edit/delete events (persisted config shadowing the seeded SEED_CONTENT);
  labels factored into shared LABELS, content editable bilingual (EN falls back to FR).
- Capacity cap by headcount: public RSVP form closes with a "booking is full" message
  when reached (server-enforced); existing registrants can still update.
- Email attachments (image/PDF, <=4MB, <=6), tagged per language (fr/en/both) so each
  customer gets files in their account language; optional Gemini auto-detect on images.
  email.sendEmail gains a generic attachments[] param.
- Additive main audience list (persisted per event): build one deduped list by appending
  batches from filters, manual picks, or CSV; per-source breakdown, remove/clear.
- Filters: name-contains (customer_name like) and city (Service Location.city, resolved
  accent/case-insensitively via PG with REST fallback), intersected with other criteria.
- Manual picker + fuzzy search reuse app-wide /collab/customer-search (pg_trgm), so
  "repa" finds "Réparation …".
- nginx /hub/ proxy: client_max_body_size 8m for base64 attachment uploads.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 10:10:43 -04:00
..
ui refactor(targo-hub): extract ui/ kit, migrate tech-mobile to it 2026-04-22 22:47:19 -04:00
util Phase 1 (hygiène) : utils partagés + logique pure testable + observabilité erp + 1ers tests 2026-06-07 10:36:41 -04:00
acceptance.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
acte-form.html feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
address-conformity.js Conformité : repli « centre du code postal / ville » pour les unmatched restants (statut 'area') 2026-06-07 17:14:41 -04:00
address-db.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
address-search.js Recherche d'adresses : base LOCALE (Postgres ERPNext) au lieu du Supabase cloud externe 2026-06-06 15:46:47 -04:00
address-validate.js hub: reverse geocoding infra-first (fibre field-pins -> RQA fallback); address resolution + geotagged field photos 2026-07-06 21:52:14 -04:00
agent-flows.json refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
agent-tools.json refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
agent.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
ai.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
auth.js fix(ops): fail-loud when OPS perms don't load + username fallback (supersede 96da97b session overlay) 2026-07-03 16:49:26 -04:00
billing-approvals.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
campaigns.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
categories.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
chatwoot-panel.html feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
chatwoot.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
checkout.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
client-diag.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
cloud-ips.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
config.js feat(dispatch): OSRM road-time matrix for the VRP optimizer (Phase 2) 2026-07-02 13:48:43 -04:00
contracts.js Wizard: 2 cases génériques Prix marketing / Prix original (barré) sur toutes les lignes + aperçu client WYSIWYG 2026-06-03 18:31:54 -04:00
conversation.js feat(ops): champ d'assignation MULTIFONCTION (À / CC / #) partagé 2026-07-08 16:49:57 -04:00
coupon-triage.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
device-extractors.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
device-hosts.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
devices.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
dispatch-audit.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
dispatch.js feat(ops): reason → skill → skill-aware availability module 2026-07-08 18:33:30 -04:00
email-queue.js feat(ops): Email Queue admin page (view/delete/purge ERPNext outbound) 2026-06-02 17:29:33 -04:00
email-templates.js refactor: extract composables from 5 largest files — net -1950 lines from main components 2026-04-08 17:57:24 -04:00
email.js Events: creation, capacity cap, language-tagged attachments, additive audience list 2026-07-09 10:10:43 -04:00
erp.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
events.js Events: creation, capacity cap, language-tagged attachments, additive audience list 2026-07-09 10:10:43 -04:00
flow-api.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
flow-runtime.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
flow-templates.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
geofence.js feat(planif): géofencing des jobs — timeline En route/Arrivé/Reparti (suivi façon colis) 2026-07-03 18:34:55 -04:00
giftbit.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
gmail.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
helpers.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
holidays-qc.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
ical.js refactor(targo-hub): add erp.js wrapper + migrate 7 lib files to it 2026-04-22 23:01:27 -04:00
inbox-triage.js fix(inbox): never resolve our own domains to a customer (wrong sender names) 2026-06-15 06:51:04 -04:00
legacy-dispatch-sync.js hub+solveur : compétences multi par job + réservation + matérialisation quarts + app terrain natif 2026-07-07 20:46:42 -04:00
legacy-payments.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
legacy-reports.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
legacy-sync.js sync-legacy: scoreboard abos = F brut status=1 (écart positif = fantômes retirés d'ERPNext) + note clarifiée 2026-07-06 20:23:21 -04:00
magic-link.js refactor(targo-hub): add erp.js wrapper + migrate 7 lib files to it 2026-04-22 23:01:27 -04:00
modem-bridge.js security: harden payments/hub auth + remove leaked ERPNext token from source 2026-06-16 06:17:17 -04:00
municipality.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
network-intel.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
oktopus-mqtt.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
oktopus.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
olt-snmp.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
otp.js refactor(targo-hub): add erp.js wrapper + migrate 7 lib files to it 2026-04-22 23:01:27 -04:00
outage-monitor.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
outbox.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
payments.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
pbx.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
poller-control.js feat: contract → chain → subscription → prorated invoice lifecycle + tech group claim 2026-04-22 20:40:54 -04:00
portal-auth.js feat(portal): passwordless magic-link login — retire ERPNext /login 2026-04-22 13:25:28 -04:00
project-templates.js fix(contracts): create pending Service Subscription on signing + test templates 2026-04-23 10:03:49 -04:00
proration.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
provision.js chore(hub): gate Oktopus integration behind OKTOPUS_DISABLED flag 2026-05-04 10:34:36 -04:00
ratelimit.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
rating.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
referral.js refactor(targo-hub): add erp.js wrapper + migrate 7 lib files to it 2026-04-22 23:01:27 -04:00
reports.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
roster-assistant.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
roster.js feat(ops): reason → skill → skill-aware availability module 2026-07-08 18:33:30 -04:00
serviceability.js feat(ops): per-address competitor column via Québec IHV open data 2026-06-01 22:40:47 -04:00
signup.js Install: prix barré 360$ → 240$ (ancre de valeur) + 'financement crédité chaque mois 24 mois' dans contrat + portail signup 2026-06-03 18:22:22 -04:00
skill-resolver.js feat(ops): reason → skill → skill-aware availability module 2026-07-08 18:33:30 -04:00
sla.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
sse.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
store-pg.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
store.js Store: prix barré par produit via champ Item.store_regular_price 2026-06-03 21:55:57 -04:00
subcontractor.js feat(acte): barème sous-traitant — transport/jour + FTTH 250m+ (base + $/m) 2026-07-02 09:04:11 -04:00
supplier-invoices.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
sync-orchestrator.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
tech-absence-sms.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
tech-mobile.js refactor(targo-hub): add types.js, migrate acceptance+payments, drop apps/field 2026-04-22 23:18:25 -04:00
telephony.js security: harden payments/hub auth + remove leaked ERPNext token from source 2026-06-16 06:17:17 -04:00
ticket-collab.js hub: reverse geocoding infra-first (fibre field-pins -> RQA fallback); address resolution + geotagged field photos 2026-07-06 21:52:14 -04:00
traccar.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
twilio.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
types.js refactor(targo-hub): add types.js, migrate acceptance+payments, drop apps/field 2026-04-22 23:18:25 -04:00
user-prefs.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
vacation-import.js feat(hub): lib/vacation-import — lecteur .xlsx (ZIP/zlib, sans dép) + parseur vacances + matcher techs 2026-07-04 09:26:57 -04:00
vision.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
voice-agent.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00