Checkpoint: Ajout de l'onglet "Paramétrage" dans la page Ventilation FreePro :

- Table DB freeproSettings (URL portail, credentials, fréquence, date antériorité, statut dernière récupération)
- Service freeproAutoImport.ts : connexion HTTP au portail FreePro, téléchargement CSV, pipeline d'import
- Procédures tRPC : getSettings, saveSettings, testConnection, forceImport
- Job périodique en mémoire (daily/weekly/monthly) via setInterval
- Frontend : wrapper Tabs (onglet 1 = Import & Historique, onglet 2 = Paramétrage)
- Onglet Paramétrage : credentials, fréquence, date antériorité, bouton "Forcer récupération", statut
- Tests unitaires : 8 tests passés
This commit is contained in:
Manus
2026-06-08 09:24:05 -04:00
parent 51830b88be
commit e32d540bc9
10 changed files with 3615 additions and 295 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE `freeproSettings` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`portalUrl` varchar(255) NOT NULL DEFAULT 'https://pro.free.fr',
`loginEmail` varchar(320),
`loginPassword` text,
`frequency` enum('manual','daily','weekly','monthly') NOT NULL DEFAULT 'manual',
`maxAnteriority` int,
`autoEnabled` int NOT NULL DEFAULT 0,
`lastSuccessAt` timestamp,
`lastStatus` text,
`lastImportCount` int DEFAULT 0,
`createdAt` timestamp NOT NULL DEFAULT (now()),
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `freeproSettings_id` PRIMARY KEY(`id`),
CONSTRAINT `freeproSettings_userId_unique` UNIQUE(`userId`)
);