Docker build uses `npm ci` which requires package-lock.json in sync with
package.json. Add httpntlm, ws, @types/ws to the npm lockfile (were only in
pnpm-lock.yaml), fixing the failed deploy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Le build Docker échouait sur le fetch de la police Inter via next/font/google
(accès réseau/TLS indisponible pendant 'next build').
- layout.tsx : charge Inter via <link> côté navigateur (plus de fetch au build),
avec fallback système ; --font-sans défini dans globals.css (@theme).
- /commandes-auto : export dynamic = 'force-dynamic' (données live DB + API,
jamais prérendues au build).
- listCadences : résilient si la DB est injoignable (retourne []).
Ajoute un onglet "Cadencier / Alertes" dans la page Commandes auto.
Depuis la liste des fournisseurs, on active un fournisseur en alerte de
commande sur un magasin (292/579) avec une fréquence en X semaines,
gérée indépendamment par magasin.
L'échéance est calculée à partir de la dernière réception réelle
(mvtart, genremvt 1/2, fournisseur principal artfou1.preference=1) +
X semaines. Statut: à commander / bientôt / OK, avec temps restant.
- Table commande_cadences (schema + db-init)
- pgGetDerniereReceptionParFournisseur (mvtart par fournisseur/site)
- Server actions CRUD (list/upsert/toggle/remove)
- UI à onglets + cadencier (ajout, édition intervalle, activer/supprimer)
Exports the currently filtered and sorted table (including totals row) to an .xlsx file named with the selected date range. Uses the xlsx library.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unsupported `eslint` key from next.config.ts (Next.js 16)
- Wrap dashboard DB enrichment in try/catch so the dashboard renders
even when PostgreSQL is unavailable, preventing the
"Impossible de charger le tableau de bord" error
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Enrich DashboardTopItem with stock and fournisseur fields via PostgreSQL,
then display them under each article in the dashboard top CA/Qte/Marge tables.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Exclude products with a stock entry in the last 6 months (NOT EXISTS subquery)
- Add derniere_entree subquery to SQL (last genremvt 1/2 movement date)
- Display derniere_entree column in table and Excel export
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New SQL query pgGetSansVente6Mois returns products with available
stock (qte > 0) whose last sale was over 6 months ago or never.
Third tab added with filtering by supplier, search, sort, and Excel export.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a second tab "Sans vente 6 mois" on the grid page listing all
products with no sale in the last 6 months, sorted by oldest last
sale first. Resolves merge conflicts from upstream refactor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace SQL tools with call_api tool hitting FF Nancy REST endpoints
- Add Google AI Studio provider support alongside OpenRouter
- Load AI provider config (openrouter/google) from saved settings
- Add model selector loaded dynamically from OpenRouter and Google AI APIs
- Add HTML-to-Markdown conversion for models that return HTML
- Enrich system prompt with full FF Nancy API docs, PA/PRMP field locations
- Fix streaming: single generateContentStream pass for Google AI (no double call)
- Increase max_tokens to 8192 and tool loop to 10 rounds
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>