You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(audit): separate quick and advanced diagnosis (#48)
* feat(audit): separate quick diagnosis from advanced diagnosis (#46)
Add generic preliminary assessment support to the evaluation system.
EROOM quick diagnosis now has its own score card, intro modal, and
result modal with recommendation. Scoring formula aligned with the
official EROOM Excel template.
* fix(audit): hide advanced summary when only quick diagnosis answered
Advanced score, context and radar chart now stay hidden until at least
one category 1-6 question has an answer. Prevents step 0 alone from
displaying a misleading score of 0 ("Mature") and an empty radar.
Addresses remaining acceptance criteria of #46: "no detailed summary
for step 0 alone" and "synthesis progressively available during
advanced diagnosis".
# Plan : Issue #46 — Séparer diagnostic rapide et diagnostic avancé
2
+
3
+
## Contexte
4
+
5
+
L'audit EROOM a 2 niveaux : catégorie 0 (Quick Diagnosis, 1-5) et catégories 1-6 (Advanced Diagnosis, qualitatif). Actuellement, seul le score avancé est stocké et affiché. `calculateQuickDiagnosisScore()` existe déjà mais n'est jamais appelé dans le flux de sauvegarde.
6
+
7
+
**Objectif** : afficher les deux scores séparément sur la page projet, avec un message de recommandation pour le diagnostic rapide. L'approche doit être **générique** pour supporter d'autres types d'évaluation avec étape préliminaire à l'avenir.
8
+
9
+
## Architecture : étape préliminaire générique
10
+
11
+
### Configuration dans `EVALUATION_TYPES` (`src/types/evaluation.ts`)
12
+
13
+
Chaque type d'évaluation peut déclarer une étape préliminaire via sa config :
14
+
15
+
```typescript
16
+
preliminary?: {
17
+
label: string; // "Quick Diagnosis" pour EROOM
18
+
blocking: boolean; // true = score minimal requis pour continuer
19
+
minScore?:number; // seuil minimal (utilisé si blocking: true)
20
+
thresholds: { low: number; high: number };
21
+
recommendations: {
22
+
low: string; // score ≤ low
23
+
medium: string; // low < score ≤ high
24
+
high: string; // score > high
25
+
};
26
+
}
27
+
```
28
+
29
+
`blocking: false` → l'utilisateur peut toujours passer aux étapes avancées. Si un futur type d'évaluation a `blocking: true` avec `minScore: 40`, l'UI empêchera de continuer si le score préliminaire est en dessous.
30
+
31
+
## Ce qui a été fait
32
+
33
+
### 1. `src/types/evaluation.ts` — Types et config ✅
34
+
35
+
- Interface `PreliminaryConfig` avec `label`, `blocking`, `minScore?`, `thresholds`, `recommendations`
36
+
-`preliminary?: PreliminaryConfig` dans `EvaluationTypeInfo`
37
+
-`preliminaryScore?: number | null` dans `Evaluation`
0 commit comments