style: prettier format
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
79bbbdc4e8
commit
99617f117c
45 changed files with 229 additions and 302 deletions
|
|
@ -13,7 +13,7 @@ import type { CritereCode } from '@/entities/report/types'
|
|||
export interface Pattern {
|
||||
code: string
|
||||
critere: CritereCode
|
||||
frequency: number // 3, 4 ou 5 (seuil d'agrégation : ≥ 3)
|
||||
frequency: number // 3, 4 ou 5 (seuil d'agrégation : ≥ 3)
|
||||
description: string | null // non-null uniquement pour code === 'autre'
|
||||
}
|
||||
|
||||
|
|
@ -23,14 +23,14 @@ export interface PatternExercice {
|
|||
diagnostic: string
|
||||
exercice: {
|
||||
consigne: string
|
||||
exemple: string // phrase incorrecte générique (pas du candidat)
|
||||
correction: string // version correcte
|
||||
astuce: string // procédé mnémotechnique / réflexe de relecture
|
||||
exemple: string // phrase incorrecte générique (pas du candidat)
|
||||
correction: string // version correcte
|
||||
astuce: string // procédé mnémotechnique / réflexe de relecture
|
||||
}
|
||||
}
|
||||
|
||||
export interface PreparationIndex {
|
||||
score: number // 0-100 entier
|
||||
score: number // 0-100 entier
|
||||
message: string // interprétation textuelle fixée par le backend
|
||||
}
|
||||
|
||||
|
|
@ -40,13 +40,13 @@ export interface PatternsReady {
|
|||
exercises: PatternExercice[]
|
||||
preparation_index: PreparationIndex
|
||||
analyzed_productions: number
|
||||
last_analysis: string // ISO timestamp
|
||||
last_analysis: string // ISO timestamp
|
||||
}
|
||||
|
||||
export interface PatternsNotReady {
|
||||
ready: false
|
||||
minimum: number // toujours 5 côté backend actuel
|
||||
current: number // nb de productions corrigées déjà réalisées
|
||||
minimum: number // toujours 5 côté backend actuel
|
||||
current: number // nb de productions corrigées déjà réalisées
|
||||
}
|
||||
|
||||
export type PatternsResponse = PatternsReady | PatternsNotReady
|
||||
|
|
|
|||
|
|
@ -33,10 +33,7 @@ export function getSimulation(id: string): Promise<Production> {
|
|||
* Endpoint : `GET /simulations?page=X&limit=Y`. Tri `created_at DESC` côté backend.
|
||||
* Champs lourds exclus (contenu, rapport, exercices, modele) — cf. SimulationListItem.
|
||||
*/
|
||||
export function listSimulations(
|
||||
page: number,
|
||||
limit: number,
|
||||
): Promise<SimulationsListResponse> {
|
||||
export function listSimulations(page: number, limit: number): Promise<SimulationsListResponse> {
|
||||
const qs = new URLSearchParams({ page: String(page), limit: String(limit) })
|
||||
return apiFetch<SimulationsListResponse>(`/simulations?${qs.toString()}`)
|
||||
}
|
||||
|
|
@ -83,9 +80,7 @@ export async function updateSujet(id: string, sujetId: string): Promise<void> {
|
|||
* Retourne `null` pour les tâches sans catalogue de sujets côté base
|
||||
* (EO_T1 : sujet fixe connu, EO_T2_LIVE : interaction sans sujet).
|
||||
*/
|
||||
function mapTacheToSujetParams(
|
||||
tache: Tache,
|
||||
): { mode: 'EE' | 'EO'; tacheNumber: 1 | 2 | 3 } | null {
|
||||
function mapTacheToSujetParams(tache: Tache): { mode: 'EE' | 'EO'; tacheNumber: 1 | 2 | 3 } | null {
|
||||
switch (tache) {
|
||||
case 'EE_T1':
|
||||
return { mode: 'EE', tacheNumber: 1 }
|
||||
|
|
|
|||
|
|
@ -77,7 +77,10 @@ export function critereCodeFromNom(nom: string): CritereCode | null {
|
|||
*/
|
||||
const NCLC_MIN_SCORE: Record<number, number> = { 7: 10, 8: 12, 9: 14, 10: 16 }
|
||||
|
||||
export function ecartVsCible(score: number, nclcCible: number): {
|
||||
export function ecartVsCible(
|
||||
score: number,
|
||||
nclcCible: number,
|
||||
): {
|
||||
points: number
|
||||
atteint: boolean
|
||||
} {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export interface ErreurCode {
|
|||
|
||||
export interface Critere {
|
||||
nom: string
|
||||
score: number // 0-5
|
||||
score: number // 0-5
|
||||
commentaire: string
|
||||
exemple: string
|
||||
suggestion: string
|
||||
|
|
@ -42,7 +42,7 @@ export interface Revelation {
|
|||
}
|
||||
|
||||
export interface ConseilNclc {
|
||||
nclc_cible: string // ex. "NCLC 9"
|
||||
nclc_cible: string // ex. "NCLC 9"
|
||||
ecart: string
|
||||
action_prioritaire: string
|
||||
}
|
||||
|
|
@ -101,14 +101,14 @@ export type NclcCible = 9 | 10
|
|||
*/
|
||||
export interface Report {
|
||||
simulation_id: string
|
||||
score: number // /20
|
||||
nclc: number // NCLC atteint — ex. 8
|
||||
score: number // /20
|
||||
nclc: number // NCLC atteint — ex. 8
|
||||
nclc_cible: NclcCible
|
||||
revelation: Revelation
|
||||
diagnostic: string
|
||||
criteres: Critere[]
|
||||
conseil_nclc: ConseilNclc
|
||||
erreurs_codes: ErreurCode[] // top-level — regroupés par critère côté UI
|
||||
erreurs_codes: ErreurCode[] // top-level — regroupés par critère côté UI
|
||||
exercices: Exercice[] | null
|
||||
exercices_status: JobStatus
|
||||
modele: ProductionModele | null
|
||||
|
|
@ -120,7 +120,7 @@ export interface CorrectEePayload {
|
|||
simulationId: string
|
||||
contenu: string
|
||||
tache: string
|
||||
nclc_cible?: NclcCible // défaut backend : 9
|
||||
nclc_cible?: NclcCible // défaut backend : 9
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue