new design repo

This commit is contained in:
2026-05-12 20:39:35 +02:00
parent 17ae5f5e5b
commit b06222506c
207 changed files with 3736 additions and 267 deletions

View File

@@ -19,7 +19,7 @@ const REVIEW_STATUS_OPTIONS = [
]
const REVIEW_ACTIVE_STATUSES = new Set(['needs_changes', 'to_review', 'blocked', 'draft', 'unreviewed'])
const REVIEW_NODE_TYPES = ['lesson', 'fiche', 'card', 'kit', 'diagnostic', 'parcours', 'support']
const REVIEW_NODE_TYPES = ['lesson', 'fiche', 'card', 'exercice', 'test', 'support']
const GRADE_SLUGS = new Set(['cp', 'ce1', 'ce2', 'cm1', 'cm2', '6e', '5e', '4e', '3e'])
async function parseApiResponse(res) {
@@ -263,15 +263,16 @@ function ProgramReviewPanel({ selectedNode, reviewForm, onReviewChange, onSaveRe
{Object.keys(status).length > 0 && (
<div className="program-status-grid">
<span>Micro-fiches: {status.micro_fiches ?? 0}</span>
<span>Lecon: {status.lesson_md ?? 0}</span>
<span>Fiches: {status.micro_fiches ?? 0}</span>
<span>SVG leçon: {status.lesson_svg ?? 0}</span>
<span>Cards: {status.cards ?? 0}</span>
<span>Contextes: {status.contexts ?? 0}</span>
<span>Exercices: {status.text_exercises ?? 0}</span>
<span>SVG exercices: {status.exercise_svg ?? 0}</span>
<span>Tests adaptatifs: {status.adaptive_tests ?? 0}</span>
<span>Parcours: {status.adaptive_profiles ?? 0}</span>
<span>SVG kit: {status.adaptive_svg ?? 0}</span>
<span>Tests: {status.tests ?? 0}</span>
<span>SVG tests: {status.test_svg ?? 0}</span>
<span>Parcours adaptes: {status.adaptive_profiles ?? 0}</span>
</div>
)}
@@ -282,7 +283,7 @@ function ProgramReviewPanel({ selectedNode, reviewForm, onReviewChange, onSaveRe
</button>
)}
{selectedNode.content && !selectedNode.url && (
{selectedNode.content && (
<div className="program-node-text-preview">
<pre>{selectedNode.content}</pre>
</div>
@@ -1766,7 +1767,7 @@ function TutorApp({ currentUser, onLogout }) {
const lastStudentWork = lastUserMessage?.content || 'Aucune réponse récente enregistrée.'
const nextLessonAdvice = studentProgram
? adaptiveKit
? `Conseil: si lélève hésite, lancer le diagnostic adaptatif ${adaptiveKit.title.toLowerCase()} avant de poursuivre.`
? `Conseil: si lélève hésite, lancer un test de diagnostic avant de choisir les exercices.`
: `Conseil: démarrer la leçon ${studentProgram.title} avec les fiches choisies par le professeur.`
: lessonFocus
? `Conseil: reprendre ${lessonFocus.label}, puis lancer un exercice court pour équilibrer la progression.`
@@ -2099,7 +2100,7 @@ function TutorApp({ currentUser, onLogout }) {
</button>
<button type="button" onClick={() => setActiveAdminTab('factory')}>
Préparer les prochaines générations
<span>Kits adaptatifs et intégration</span>
<span>Tests et exercices adaptés</span>
</button>
</div>
</div>
@@ -2189,7 +2190,7 @@ function TutorApp({ currentUser, onLogout }) {
<p>{remainingCards} card(s) encore à travailler</p>
</article>
<article>
<span>Kit adaptatif</span>
<span>Tests et exercices</span>
<strong>{adaptiveProfile?.profile_title || (adaptiveKit ? 'Disponible' : 'Absent')}</strong>
<p>
{adaptiveProfile
@@ -2253,7 +2254,7 @@ function TutorApp({ currentUser, onLogout }) {
<h2>Diagnostic et parcours disponibles</h2>
</div>
<button type="button" className="secondary-button" onClick={() => setActiveAdminTab('validation')}>
Valider le kit
Valider les tests
</button>
</div>
<div className="adaptive-kit-grid">
@@ -2310,7 +2311,7 @@ function TutorApp({ currentUser, onLogout }) {
/>
</label>
<button type="submit" disabled={!adaptiveProfileForm.profile_id}>
Enregistrer le profil adaptatif
Enregistrer l'orientation
</button>
</form>
</section>
@@ -2520,21 +2521,25 @@ function TutorApp({ currentUser, onLogout }) {
) : (
<div className="empty-preview">Aucun visuel direct pour cet élément.</div>
)}
{selectedProgramNode?.url && selectedProgramNode?.content && (
<pre className="validation-text-preview">{selectedProgramNode.content}</pre>
)}
</div>
</section>
<aside className="admin-panel validation-inspector">
<h2>Revue</h2>
<div className="program-status-grid compact">
<span>Micro: {selectedNodeStatus.micro_fiches ?? '-'}</span>
<span>Lecon: {selectedNodeStatus.lesson_md ?? '-'}</span>
<span>Fiches: {selectedNodeStatus.micro_fiches ?? '-'}</span>
<span>SVG: {selectedNodeStatus.lesson_svg ?? '-'}</span>
<span>Cards: {selectedNodeStatus.cards ?? '-'}</span>
<span>Contextes: {selectedNodeStatus.contexts ?? '-'}</span>
<span>Exercices: {selectedNodeStatus.text_exercises ?? '-'}</span>
<span>SVG ex.: {selectedNodeStatus.exercise_svg ?? '-'}</span>
<span>Tests: {selectedNodeStatus.adaptive_tests ?? '-'}</span>
<span>Parcours: {selectedNodeStatus.adaptive_profiles ?? '-'}</span>
<span>SVG kit: {selectedNodeStatus.adaptive_svg ?? '-'}</span>
<span>Tests: {selectedNodeStatus.tests ?? '-'}</span>
<span>SVG tests: {selectedNodeStatus.test_svg ?? '-'}</span>
<span>Parcours adaptes: {selectedNodeStatus.adaptive_profiles ?? '-'}</span>
</div>
<form className="admin-review-form" onSubmit={saveProgramReview}>
<label>
@@ -2562,7 +2567,7 @@ function TutorApp({ currentUser, onLogout }) {
<h2>Planifier une génération</h2>
<div className="student-settings-grid single">
<label><span>Niveau</span><select defaultValue="CM1"><option>CM1</option><option>CM2</option><option>6e</option></select></label>
<label><span>Production</span><select defaultValue="exercise_svg"><option value="micro">Micro-fiches</option><option value="lesson_svg">SVG leçon</option><option value="contexts">Contextes de cards</option><option value="exercises">Exercices textuels</option><option value="exercise_svg">SVG exercices</option><option value="adaptive">Kit adaptatif</option></select></label>
<label><span>Production</span><select defaultValue="exercise_svg"><option value="lesson">Lecon globale</option><option value="fiche">Fiches</option><option value="cards">Cards</option><option value="exercises">Exercices</option><option value="exercise_svg">SVG exercices</option><option value="tests">Tests</option></select></label>
<label><span>Créneau</span><select defaultValue="night"><option value="now">Lancer maintenant</option><option value="night">Cette nuit</option></select></label>
<button type="button" disabled>Planifier après branchement backend</button>
</div>