18 Commits

Author SHA1 Message Date
0d39ea810b feat: déploiement Docker en conteneur unique (API + UI)
Le backend FastAPI sert déjà le SPA buildé : on abandonne le duo
nginx + backend au profit d'une seule image multi-stage (build Vue
puis service par le backend). docker-compose passe à un service
unique, avec PLESNA_DATA_DIR déclarant le stockage persistant.

- backend.Dockerfile : stage node build -> copie frontend/dist,
  CMD en `uv run --no-sync` (plus de resync des deps dev au démarrage)
- docker-compose.yml : service unique `app`, volume ./data,
  PLESNA_DATA_DIR=/app/data
- supprime frontend/Dockerfile, frontend/nginx.conf, frontend/.dockerignore
- .dockerignore : ignore **/node_modules, data, data_bck
- README : section Production mise à jour

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 22:14:56 +02:00
c79ecc45ff feat: extraction locataires et opérations par cellules de tableau
Remplace les parseurs texte+regex (fragiles sur l'alignement en colonnes des
PDF Oralia mal construits) par une extraction géométrique : reconstruction des
lignes visuelles par regroupement vertical tolérant des mots, puis affectation
de chaque valeur à sa colonne via les filets du tableau (pdfplumber find_tables).

Corrections apportées :
- locataires : montant/libellé « divers » dans la bonne colonne (plus le total
  cumulé du lot), nom de locataire correct (le logo/en-tête hors filets est
  ignoré), lignes multi-période et pages recollées.
- opérations : fournisseur séparé de la description (TOTALENERGIES ≠ DIDIER
  NETTOYAGE, PPR ≠ BOUVARD), colonne Déductible remplie, Débit/Crédit distingués,
  fournisseur des honoraires reporté sur le bloc, fragments de description
  recollés (LATAPY, AUDOUIN).
- code lot : gère « S10 - », « S 17 - » (espace) et « S01 SOLDE » (sans tiret).

Branchés dans extractor.py avec repli sur les anciens parseurs si un tableau n'a
pas de filets détectables. Validés par réconciliation comptable : locataires
124/124 lots, opérations 7/7 PDF et 25/25 catégories, au centime.

Ajoute le bouton « Relancer l'extraction » dans l'écran d'édition : re-extrait
depuis le PDF stocké et met en évidence les différences avec la version
précédente (panneau récapitulatif + anneaux « modifié » sur les cartes). Le diff
des opérations s'aligne par contenu (robuste aux changements d'ordre/nombre).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 21:29:04 +02:00
2d8b2ff42f feat: apercu PDF via PDF.js (rendu portable, build legacy)
Remplace l'<iframe> (lecteur PDF natif du moteur) par un rendu PDF.js
sur <canvas>, une page par canvas empilee et scrollable. Rendu
identique partout (Qt WebEngine, WebView2, navigateur), worker bundle
localement par Vite -> fonctionne hors-ligne.

Utilise le build *legacy* de pdfjs-dist : il embarque les polyfills
requis par les Chromium embarques (Qt WebEngine, WebView2), plus
anciens que Chrome. Le build par defaut appelle
`Map.prototype.getOrInsertComputed` (proposition JS recente) sans
polyfill, ce qui cassait silencieusement le rendu dans la fenetre
bureau. Le catch logue desormais l'erreur au lieu de l'avaler.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 17:22:20 +02:00
bd8b9a044c feat: add config page with LLM settings and tag management
Add ConfigPage.vue with two sections: Ollama configuration (URL, model,
timeout) with source badges and per-field reset, and tag management with
inline rename and creation. Add /config route and nav link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:09:37 +01:00
4fe6a4b2c9 feat: first IA page 2026-02-13 12:18:24 +01:00
5c9a8c9b5e feat: highlight source element when navigating from tables to edit page
Clicking the pencil icon in revenus/depenses tables now passes query
params to identify the source row. The edit page auto-expands the
matching section, scrolls to the element, and briefly highlights it
with a blue ring that fades after 2 seconds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 06:16:29 +01:00
d8b2278491 feat: upload PDF file on save via multipart FormData
Switch save endpoint from JSON to multipart upload so the PDF file is
sent alongside extracted data and tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 05:34:34 +01:00
a119514319 refactor: replace pdfjs-dist with native browser iframe for PDF preview
Remove pdfjs-dist dependency and simplify PdfPreview component to use
a native browser iframe, reducing bundle size and complexity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 05:34:20 +01:00
d271697d43 feat: add Docker deployment configuration
Add backend and frontend Dockerfiles, docker-compose setup with nginx
reverse proxy, .dockerignore files and Makefile for dev/prod workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 05:33:41 +01:00
4f0ca67dc4 feat: reimport pdf 2026-01-22 21:23:46 +01:00
981fabcc27 feat: add rental income dashboard with comprehensive analytics
- Add new /api/revenus endpoints for rental income data
  - GET /summary: KPIs, monthly trends, breakdown by property, top unpaid
  - GET /details: detailed rental records with filtering
  - GET /by-lot: revenue aggregation by unit
  - GET /immeubles: properties list with revenue stats

- Add RevenusPage with full dashboard layout
  - 6 KPI cards: total revenue, payments, unpaid, collection rate, active tenants, occupied units
  - Monthly evolution chart (rent, payments, unpaid)
  - Property breakdown donut chart
  - Top unpaid tenants list
  - Detailed revenue table with pagination and CSV export

- Add filters panel (property, type, dates, unpaid only, history months)
- Display property address instead of code in all components
- Add navigation link in header (Revenus)
2026-01-20 10:05:57 +01:00
281f69f39e feat: enhance homepage with financial summary and sparklines
- Add dashboard API endpoints for financial summary, recent revenus, monthly trends, and immeuble shortcuts
- Create new dashboard components: FinancialSummary with sparklines, QuickActions, RecentRevenus, MiniTrendChart, ImmeubleShortcuts
- Refactor HomePage with prominent drag & drop zone and data-driven cards
- Financial cards now show last document data with 6-month trend sparklines in background
- Remove redundant import button, keep single upload zone at top
2026-01-20 04:53:04 +01:00
cae8d5b963 feat: add inline editing for extracted data and autocomplete for tagging
- Add EditableField component for inline editing of any field
- Update DataRow, LocataireCard, OperationCard to support inline editing
- Add CRUD operations for locataires and operations (add/remove)
- Update JsonViewer to propagate changes via v-model
- Add TagAutocomplete component with search/filter functionality
- Replace select dropdown with autocomplete in TaggingStep
2026-01-19 22:02:28 +01:00
aac4d194e3 feat: add analytics 2026-01-19 21:40:10 +01:00
0fd6bdaeb3 feat: add depense tagging 2026-01-19 05:19:11 +01:00
c5e51a7513 feat: add homepage 2026-01-18 21:11:35 +01:00
ee1db93298 feat: fix parsing 2026-01-18 10:33:09 +01:00
6bad5fbaf9 feat: init plesna-gerance - extracteur de comptes rendus de gerance
- Backend Python (uv + click + FastAPI)
  - CLI: plesna-gerance extract <pdf> pour extraire les donnees
  - CLI: plesna-gerance serve pour lancer le serveur API
  - API REST: POST /api/extract pour upload et extraction de PDF
  - Parsers modulaires: metadata, locataires, operations
  - Utilise pdftotext (poppler-utils) pour l'extraction de texte

- Frontend Vue.js + Tailwind CSS
  - Interface split-screen: PDF a gauche, donnees a droite
  - Preview PDF avec zoom et navigation pages (pdf.js)
  - Visualisation structuree des donnees extraites
  - Sections depliables: metadata, locataires, operations
  - Drag & drop pour upload de PDF
  - Extraction automatique a la selection du fichier
2026-01-18 05:36:27 +01:00