gigafibre-fsm/apps/ops/src
louispaulb 94ebb822db feat(reports/legacy): data-freshness banner + recently-expired-discount column
User correctly spotted that Julie Dupuis shows 114.95$ but actually pays
69.95$ — investigation revealed the legacy COPY (legacy-db container) is a
one-shot snapshot from 2026-05-05 with data through 2026-04-30 and NO
auto-sync. She renegotiated in May (a -50$ discount on service 50999) which
the copy never received. The report was correct vs the copy, but the copy
is ~1 month stale.

Two changes (data-source strategy still pending operator decision —
prod 10.100.80.100:3306 is reachable for a future live/refresh option):

1. data_as_of — the report now reports MAX(invoice.date_orig) from the
   copy and the Ops page shows a banner ("Données legacy au 30 avril —
   copie figée, N jours"). Turns orange past 7 days so nobody acts on
   stale prices unknowingly.

2. recent_expired_discount column — per-address sum of deactivated credit
   lines (status=0, price<0) whose actif_until fell in the last 180 days.
   Surfaces clients whose discount just lapsed (Julie's RAB24M -15 + RAB_X
   -35 expired 2026-03-01), i.e. the prime retention targets whose bill is
   about to jump. Shown in amber with a warning icon + tooltip; included in
   the CSV.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 19:31:41 -04:00
..
api feat(ops/reports): "Internet trop cher" legacy report 2026-06-01 19:06:05 -04:00
boot feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
components feat(ops): Service Contract detail view + sub-delete redirects there 2026-04-23 14:46:34 -04:00
composables fix(ops/client): cancelled subs no longer inflate monthly total + Lieu link in-app 2026-05-08 11:21:18 -04:00
config feat(ops/campaigns): UI module for gift campaigns + GrapesJS template editor 2026-05-21 19:08:04 -04:00
css feat: contract → chain → subscription → prorated invoice lifecycle + tech group claim 2026-04-22 20:40:54 -04:00
data docs: reorganize into architecture/features/reference/archive folders 2026-04-22 11:51:33 -04:00
layouts feat(ops/campaigns): UI module for gift campaigns + GrapesJS template editor 2026-05-21 19:08:04 -04:00
modules feat(campaigns/reminder): cascade clicks to parent + family banner 2026-06-01 15:24:52 -04:00
pages feat(reports/legacy): data-freshness banner + recently-expired-discount column 2026-06-01 19:31:41 -04:00
router feat(ops/reports): "Internet trop cher" legacy report 2026-06-01 19:06:05 -04:00
stores fix(ops/dispatch): surface customer + service-location links from a job + fix bad coords 2026-05-08 10:29:59 -04:00
utils refactor: extract composables from 5 largest files — net -1950 lines from main components 2026-04-08 17:57:24 -04:00
App.vue feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00