From fb3de2865f50903bf9ff259f246bb9dee1a0e45f Mon Sep 17 00:00:00 2001 From: Hermann_Kitio Date: Mon, 20 Apr 2026 06:01:29 +0300 Subject: [PATCH] =?UTF-8?q?fix(report):=20aligner=20types=20sur=20backend?= =?UTF-8?q?=20=E2=80=94=20note=E2=86=92score,=20exercices=20string[],=20su?= =?UTF-8?q?pprimer=20Exercice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/report/types.ts | 9 ++------- src/features/simulations/pages/RapportPage.tsx | 13 ++++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/entities/report/types.ts b/src/entities/report/types.ts index 4a3d59f..c420de7 100644 --- a/src/entities/report/types.ts +++ b/src/entities/report/types.ts @@ -18,15 +18,10 @@ export interface Critere { nom: string - note: number + score: number commentaire: string } -export interface Exercice { - titre: string - contenu: string -} - /** * Rapport de correction renvoyé par `POST /corrections/ee` ou `POST /corrections/eo`. * Timeout 30 s (DeepSeek/Gemini — cf. api.ts). @@ -40,7 +35,7 @@ export interface Report { erreurs: string[] // feature : detailed_report modele: string // feature : tips — 1re phrase visible pour Free idees: string[] // feature : tips — 1er item visible pour Free - exercices: Exercice[] // feature : tips — titre visible pour Free + exercices: string[] // feature : tips — 1er item visible pour Free } /** Corps de `POST /corrections/ee`. */ diff --git a/src/features/simulations/pages/RapportPage.tsx b/src/features/simulations/pages/RapportPage.tsx index 50a40ae..2a8f5ed 100644 --- a/src/features/simulations/pages/RapportPage.tsx +++ b/src/features/simulations/pages/RapportPage.tsx @@ -21,7 +21,7 @@ import { useRapport } from '../hooks/useRapport' import { Card } from '@/shared/ui/Card' import { Badge } from '@/shared/ui/Badge' import { Button } from '@/shared/ui/Button' -import type { Critere, Exercice } from '@/entities/report/types' +import type { Critere } from '@/entities/report/types' // ── Composants internes ────────────────────────────────────────────────────── @@ -73,7 +73,7 @@ function CritereRow({ critere }: { critere: Critere }) {
  • {critere.nom} - {critere.note} + {critere.score}
    -

    {exercice.titre}

    - {exercice.contenu} + {exercice}
  • @@ -278,8 +277,8 @@ export function RapportPage() { onUpgrade={onUpgrade} >