gigafibre-fsm/services/targo-hub/lib
louispaulb dec8321823 feat(ops): unified staff identity (label + email aliases + tech link + departed flag)
One person = one identity { label, primary_email (SSO login), alias_emails[],
tech_id, active, kind }. Every email + tech ID resolves to it.

Hub: lib/identity.js (NEW, SOURCE UNIQUE) — resolver + secured endpoints
(/identity/map|resolve read; upsert/alias/merge/delete admin-only). server.js
mounts /identity. auth.getDisplayNameByEmail consults the identity label first
(any alias → full name everywhere). Seed: Louis-Paul Bourdon, Louis Morneau.

SPA: composables/useIdentity + api/identity. IssueDetail dedupes assignment by
identity (m'ajouter + search = same person → no double chip), shows full names,
and hides departed people (active:false) from the picker. IdentityManager.vue
(Settings → Identités tab): edit label/aliases/tech link, merge duplicates,
block/reactivate (departed = non-destructive: hidden from pickers, history kept).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 12:22:48 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -04:00
agent.js consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 feat(ops): unified staff identity (label + email aliases + tech link + departed flag) 2026-07-10 12:22:48 -04:00
avatars.js consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 fix(ops): slot finder respects untimed load (humanly possible) 2026-07-09 14:43:21 -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: personal rsvp_url per-language, address field, logo spacing 2026-07-09 13:26:45 -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
identity.js feat(ops): unified staff identity (label + email aliases + tech link + departed flag) 2026-07-10 12:22:48 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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): quick filler job from cell menu (blocks tech from dispatch) 2026-07-09 19:58:18 -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 fix(ops): accurate occupancy denominator + editable skills + support filter 2026-07-09 14:28:42 -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
staff-agent.js consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -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 consolidate uncommitted multi-session work (NL staff-agent, user avatars/profil, HelpHint, ticket detail modules, skill icons, hub agent/payments/sync) 2026-07-09 20:43:50 -04:00