gigafibre-fsm/apps/ops/src/composables
louispaulb 1186e50bbe fix(ops/client): cancelled subs no longer inflate monthly total + Lieu link in-app
Three connected dispatcher-facing issues from C-LPB4 audit:

1. **Monthly total was wrong on customer cards.** Section subtotal and
   `locSubsMonthlyTotal` summed `actual_price` for ALL subscriptions
   regardless of status, so cancelled rows (rendered with strikethrough)
   still pumped up the displayed billing figure. C-LPB4 showed
   "Total mensuel: 86,10$" computed as `196.05 - 109.95 = 86.10`,
   where 196.05 included 3 cancelled internet plans (Megafibre 80,
   TEST-E2E-FTTH, FTTH100 — all struck through in the UI). Real
   active monthly is 5.00$ (109.95 active + 5 frais réseau − 109.95
   loyalty rebate). Fixed both `sectionTotal` and `locSubsMonthlyTotal`
   /`locSubsAnnualTotal` to filter on `status === 'Active'`.

2. **"Lieu" link from a dispatch task pointed to ERPNext desk** which
   shows a raw doctype form (no abonnements, no totals, no contacts —
   just the bare fields). Now points in-app to
   `#/clients/<customer>?location=<SL>`. ClientDetailPage reads the
   query string on mount and:
     • scrolls the matching `loc-card` into view
     • pulses an indigo halo around it for ~2s so the rep finds it
       immediately even when the customer has many service locations.

3. **The shipping/billing distinction was invisible** on the customer
   page. Added an "Adresses de livraison" badge next to the "Lieux de
   service" section title — clarifies that this section IS the
   shipping address, distinct from the (future) billing address that
   will live on the Customer record. Cosmetic for now; the data
   migration to formalize that distinction is the next step.

These three round out the C-LPB4 audit triggered by the wrong
mapbox-pin location: now the customer card on the dispatcher's
screen shows correct totals, the dispatch link drops them right at
the spot they're trying to reach, and the role of each address-bearing
record is named explicitly.
2026-05-08 11:21:18 -04:00
..
useAbsenceResize.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
useAddressPricing.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
useAddressSearch.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
useAutoDispatch.js feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
useBestTech.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
useBottomPanel.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
useClientData.js feat(ops/client): contract-aware sub delete with termination preview 2026-04-23 13:47:53 -04:00
useContextMenus.js feat: nested tasks, project wizard, n8n webhooks, inline task editing 2026-04-01 13:01:20 -04:00
useConversations.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
useCustomerNotes.js feat: nested tasks, project wizard, n8n webhooks, inline task editing 2026-04-01 13:01:20 -04:00
useDetailModal.js feat: nested tasks, project wizard, n8n webhooks, inline task editing 2026-04-01 13:01:20 -04:00
useDeviceStatus.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
useDragDrop.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
useEquipmentActions.js refactor: extract composables from 5 largest files — net -1950 lines from main components 2026-04-08 17:57:24 -04:00
useFlowEditor.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
useFormatters.js feat: nested tasks, project wizard, n8n webhooks, inline task editing 2026-04-01 13:01:20 -04:00
useGpsTracking.js refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
useHelpers.js refactor(ops/dispatch): single-color Lucide icons + tech-first resource filter 2026-05-05 14:31:00 -04:00
useInlineEdit.js feat: inline editing, search, notifications + full repo cleanup 2026-03-31 07:34:41 -04:00
useJobOffers.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
useLegacySync.js refactor: extract composables from 5 largest files — net -1950 lines from main components 2026-04-08 17:57:24 -04:00
useMap.js fix(ops/dispatch): top bar polish — visible ⋯ menu, collapsed AI, fly-to tech, views dropdown 2026-05-05 14:17:33 -04:00
useModemDiagnostic.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
usePaymentActions.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
usePeriodNavigation.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
usePermissionMatrix.js refactor: extract composables from 5 largest files — net -1950 lines from main components 2026-04-08 17:57:24 -04:00
usePermissions.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
usePhone.js feat: telephony UI, performance indexes, Twilio softphone, lazy-load invoices 2026-04-02 13:59:59 -04:00
useResourceFilter.js refactor(ops/dispatch): single-color Lucide icons + tech-first resource filter 2026-05-05 14:31:00 -04:00
useScanner.js fix(tech): restore Gemini-native scanner + port equipment UX into ops 2026-04-22 15:56:38 -04:00
useScheduler.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
useSelection.js feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
useSSE.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
useStatusClasses.js feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
useSubscriptionActions.js feat(ops/client): edit/delete/reorder subscriptions + rebate nesting 2026-04-23 11:21:41 -04:00
useSubscriptionGroups.js fix(ops/client): cancelled subs no longer inflate monthly total + Lieu link in-app 2026-05-08 11:21:18 -04:00
useTagManagement.js feat: nested tasks, project wizard, n8n webhooks, inline task editing 2026-04-01 13:01:20 -04:00
useTechManagement.js feat(ops/dispatch): editable tech home base + new default at Gigafibre HQ 2026-05-05 13:53:14 -04:00
useUndo.js feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
useUnifiedCreate.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
useUserGroups.js feat(hub+ops): user invite flow sends temp password via Mailjet + dev .env.example 2026-05-05 19:50:06 -04:00
useWifiDiagnostic.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
useWizardCatalog.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
useWizardPublish.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00