Enhance Exercise Progression Graph Panel and Path Builder with New Features
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m16s
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m16s
- Added `ProgressionChainEditor` to the Exercise Progression Graph Panel for improved management of exercise chains. - Refactored state management to utilize `useRef` for chain editor references and removed unused sequence step logic. - Introduced a path insert notice in the Exercise Progression Path Builder to inform users about unsaved changes. - Updated UI elements to enhance clarity regarding the status of paths before saving. - Incremented application version to reflect these updates.
This commit is contained in:
1 parent
3be7606d90
commit
800189ff8f
3 files changed
+657
-346
No files matched your search
@@ -2,7 +2,7 @@
|
||||
* Progressionsgraphen: Sequenz-Editor (mehrere Nachfolger auf einmal), Ketten-Ansicht,
|
||||
* Varianten als eigene Knoten-Endpunkte, Schwester-Kanten gesondert, Tabelle als Fallback.
|
||||
*/
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import api from '../utils/api'
|
||||
import SkillProfilePanel from './skills/SkillProfilePanel'
|
||||
@@ -10,6 +10,7 @@ import { useAuth } from '../context/AuthContext'
|
||||
import { getTenantClubDependencyKey } from '../utils/activeClub'
|
||||
import ExercisePickerModal from './ExercisePickerModal'
|
||||
import ExerciseProgressionPathBuilder from './ExerciseProgressionPathBuilder'
|
||||
import ProgressionChainEditor from './ProgressionChainEditor'
|
||||
import { EXERCISE_VISIBILITY_FIELD_LABEL } from '../constants/exerciseGovernanceLabels'
|
||||
|
||||
const VIS_OPTIONS = [
|
||||
@@ -92,10 +93,6 @@ function maximalLinearChains(nextEdges) {
|
||||
return chains
|
||||
}
|
||||
|
||||
function emptySeqStep() {
|
||||
return { exerciseId: null, exerciseTitle: '', variantId: null, variants: [] }
|
||||
}
|
||||
|
||||
function emptyEndpoint() {
|
||||
return { exerciseId: null, exerciseTitle: '', variantId: null, variants: [] }
|
||||
}
|
||||
@@ -126,9 +123,8 @@ export default function ExerciseProgressionGraphPanel({
|
||||
const [metaDescription, setMetaDescription] = useState('')
|
||||
const [metaVisibility, setMetaVisibility] = useState('private')
|
||||
|
||||
const [sequenceSteps, setSequenceSteps] = useState([emptySeqStep(), emptySeqStep()])
|
||||
const [sequenceBulkNotes, setSequenceBulkNotes] = useState('')
|
||||
const [pickContext, setPickContext] = useState(null)
|
||||
const chainEditorRef = useRef(null)
|
||||
|
||||
const [relationKind, setRelationKind] = useState('progression')
|
||||
const [firstEp, setFirstEp] = useState(emptyEndpoint)
|
||||
@@ -138,7 +134,6 @@ export default function ExerciseProgressionGraphPanel({
|
||||
const [filterAnchorOnly, setFilterAnchorOnly] = useState(!!anchorExerciseId)
|
||||
const [editingEdgeNotes, setEditingEdgeNotes] = useState(null)
|
||||
const [notesDraft, setNotesDraft] = useState('')
|
||||
const [uiTab, setUiTab] = useState('overview')
|
||||
const [skillProfileData, setSkillProfileData] = useState(null)
|
||||
const [skillProfileLoading, setSkillProfileLoading] = useState(false)
|
||||
const [skillProfileError, setSkillProfileError] = useState('')
|
||||
@@ -343,81 +338,6 @@ export default function ExerciseProgressionGraphPanel({
|
||||
}
|
||||
}
|
||||
|
||||
const patchSeqStep = (idx, patch) => {
|
||||
setSequenceSteps((prev) => prev.map((s, i) => (i === idx ? { ...s, ...patch } : s)))
|
||||
}
|
||||
|
||||
const addSeqStep = () => setSequenceSteps((prev) => [...prev, emptySeqStep()])
|
||||
|
||||
const removeSeqStep = (idx) => {
|
||||
setSequenceSteps((prev) => {
|
||||
if (prev.length <= 2) return prev
|
||||
return prev.filter((_, i) => i !== idx)
|
||||
})
|
||||
}
|
||||
|
||||
const moveSeqStep = (idx, dir) => {
|
||||
setSequenceSteps((prev) => {
|
||||
const j = idx + dir
|
||||
if (j < 0 || j >= prev.length) return prev
|
||||
const next = [...prev]
|
||||
const t = next[idx]
|
||||
next[idx] = next[j]
|
||||
next[j] = t
|
||||
return next
|
||||
})
|
||||
}
|
||||
|
||||
const submitSequence = async () => {
|
||||
if (!selectedGraphId) {
|
||||
alert('Zuerst einen Graphen wählen.')
|
||||
return
|
||||
}
|
||||
const steps = sequenceSteps.filter((s) => s.exerciseId != null)
|
||||
if (steps.length < 2) {
|
||||
alert('Mindestens zwei Schritte mit gewählter Übung.')
|
||||
return
|
||||
}
|
||||
const n = steps.length - 1
|
||||
const noteRaw = sequenceBulkNotes.trim()
|
||||
const segment_notes = Array.from({ length: n }, () => (noteRaw ? noteRaw : null))
|
||||
|
||||
setBusy(true)
|
||||
try {
|
||||
await api.createExerciseProgressionSequence(selectedGraphId, {
|
||||
steps: steps.map((s) => ({
|
||||
exercise_id: s.exerciseId,
|
||||
variant_id: s.variantId || null,
|
||||
})),
|
||||
segment_notes,
|
||||
})
|
||||
setSequenceBulkNotes('')
|
||||
await refreshEdges(selectedGraphId)
|
||||
alert(`${n} Nachfolger-Kante(n) angelegt.`)
|
||||
} catch (err) {
|
||||
alert(err.message || String(err))
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const deleteChain = async (edgeObjs) => {
|
||||
if (!selectedGraphId || !edgeObjs?.length) return
|
||||
if (!confirm(`${edgeObjs.length} Kante(n) dieser Reihe löschen?`)) return
|
||||
setBusy(true)
|
||||
try {
|
||||
await api.deleteExerciseProgressionEdgesBatch(
|
||||
selectedGraphId,
|
||||
edgeObjs.map((e) => e.id),
|
||||
)
|
||||
await refreshEdges(selectedGraphId)
|
||||
} catch (err) {
|
||||
alert(err.message || String(err))
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleAddEdge = async () => {
|
||||
if (!selectedGraphId) {
|
||||
alert('Zuerst einen Graphen wählen.')
|
||||
@@ -507,13 +427,16 @@ export default function ExerciseProgressionGraphPanel({
|
||||
const variantId =
|
||||
ex.exercise_variant_id ?? ex.suggested_variant_id ?? null
|
||||
|
||||
if (pickContext?.kind === 'sequence') {
|
||||
patchSeqStep(pickContext.index, {
|
||||
exerciseId: ex.id,
|
||||
exerciseTitle: title,
|
||||
variantId: variantId != null ? Number(variantId) : null,
|
||||
variants,
|
||||
})
|
||||
if (pickContext?.kind === 'chain') {
|
||||
await chainEditorRef.current?.applyExercise(
|
||||
pickContext.draftKey,
|
||||
pickContext.nodeIndex,
|
||||
{
|
||||
...ex,
|
||||
variants,
|
||||
exercise_variant_id: variantId,
|
||||
},
|
||||
)
|
||||
setPickContext(null)
|
||||
return
|
||||
}
|
||||
@@ -555,10 +478,9 @@ export default function ExerciseProgressionGraphPanel({
|
||||
)}
|
||||
|
||||
<p style={{ fontSize: '13px', color: 'var(--text2)', marginBottom: '16px' }}>
|
||||
Pro Graph mehrere <strong>Reihen</strong> und <strong>Alternativen</strong>: eine{' '}
|
||||
<strong>Sequenz</strong> legt automatisch alle Schritte Übung1 → Übung2 → … als Nachfolger-Kanten an.
|
||||
Optional pro Schritt eine <strong>Variante</strong> — sie wirkt wie ein eigener Knoten. Verzweigungen und
|
||||
Schwestern trennst du weiterhin mit Einzelkanten oder mehreren Sequenzen aus dem gleichen Knoten.
|
||||
Ein Graph enthält eine oder mehrere <strong>Reihen</strong> (lineare Pfade Übung → Übung) sowie optional{' '}
|
||||
<strong>Schwester-Alternativen</strong>. Reihen bearbeiten Sie direkt in der Liste; mit dem KI-Planer legen
|
||||
Sie neue Pfade in vier Schritten an.
|
||||
</p>
|
||||
|
||||
{loadErr && (
|
||||
@@ -631,236 +553,30 @@ export default function ExerciseProgressionGraphPanel({
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{selectedGraphId && (
|
||||
<div className="card" style={{ marginBottom: '12px' }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Graph bearbeiten</h3>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Name</label>
|
||||
<input className="form-input" value={metaName} onChange={(e) => setMetaName(e.target.value)} />
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Beschreibung</label>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
value={metaDescription}
|
||||
onChange={(e) => setMetaDescription(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">{EXERCISE_VISIBILITY_FIELD_LABEL}</label>
|
||||
<select className="form-input" value={metaVisibility} onChange={(e) => setMetaVisibility(e.target.value)}>
|
||||
{filteredGraphVisOptions.map((o) => (
|
||||
<option key={o.value} value={o.value}>
|
||||
{o.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" className="btn btn-secondary" disabled={busy} onClick={handleSaveMeta}>
|
||||
Metadaten speichern
|
||||
</button>
|
||||
</div>
|
||||
{selectedGraphId && anchorExerciseId != null && (
|
||||
<label style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '12px', fontSize: '13px' }}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={filterAnchorOnly}
|
||||
onChange={(e) => setFilterAnchorOnly(e.target.checked)}
|
||||
/>
|
||||
Nur Reihen und Kanten, die diese Übung betreffen
|
||||
</label>
|
||||
)}
|
||||
|
||||
{selectedGraphId && (
|
||||
<div
|
||||
role="tablist"
|
||||
style={{ display: 'flex', gap: '8px', marginBottom: '12px', flexWrap: 'wrap' }}
|
||||
aria-label="Darstellung"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className={uiTab === 'overview' ? 'btn btn-primary' : 'btn btn-secondary'}
|
||||
onClick={() => setUiTab('overview')}
|
||||
>
|
||||
Übersicht & Sequenz
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={uiTab === 'table' ? 'btn btn-primary' : 'btn btn-secondary'}
|
||||
onClick={() => setUiTab('table')}
|
||||
>
|
||||
Alle Kanten (Tabelle)
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{selectedGraphId && uiTab === 'overview' && (
|
||||
<>
|
||||
<SkillProfilePanel
|
||||
title="Fähigkeiten entlang des Pfads"
|
||||
hint="Alle Übungen als Knoten im Graph (Standardgewicht pro Übung; Intensität und Stufen aus der Übungsverknüpfung)."
|
||||
profile={skillProfileData?.overall}
|
||||
loading={skillProfileLoading}
|
||||
error={skillProfileError}
|
||||
defaultExpanded
|
||||
artifactType="progression_graph"
|
||||
/>
|
||||
<ExerciseProgressionPathBuilder
|
||||
<ProgressionChainEditor
|
||||
ref={chainEditorRef}
|
||||
graphId={selectedGraphId}
|
||||
disabled={busy}
|
||||
onSaved={async () => {
|
||||
await refreshEdges(selectedGraphId)
|
||||
}}
|
||||
chains={flowChains}
|
||||
busy={busy}
|
||||
anchorExerciseId={anchorExerciseId}
|
||||
anchorTitle={anchorTitle}
|
||||
onRefresh={async () => refreshEdges(selectedGraphId)}
|
||||
onPickExercise={setPickContext}
|
||||
loadVariantsForExercise={loadVariantsForExercise}
|
||||
/>
|
||||
<div className="card" style={{ marginBottom: '12px' }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Sequenz / Reihe anlegen</h3>
|
||||
<p style={{ fontSize: '12px', color: 'var(--text3)', marginTop: 0 }}>
|
||||
Reihenfolge von links nach rechts: jede Zeile ein Schritt. Es werden automatisch alle Nachfolger-Kanten
|
||||
zwischen benachbarten Schritten erzeugt (ein API-Vorgang).
|
||||
</p>
|
||||
{sequenceSteps.map((step, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))',
|
||||
gap: '10px',
|
||||
alignItems: 'end',
|
||||
marginBottom: '12px',
|
||||
paddingBottom: '12px',
|
||||
borderBottom: idx < sequenceSteps.length - 1 ? '1px dashed var(--border)' : 'none',
|
||||
}}
|
||||
>
|
||||
<div className="form-row" style={{ marginBottom: 0 }}>
|
||||
<label className="form-label">Schritt {idx + 1}</label>
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px', alignItems: 'center' }}>
|
||||
<span style={{ fontSize: '13px', flex: '1 1 140px' }}>
|
||||
{step.exerciseId ? (
|
||||
<>
|
||||
<strong>{step.exerciseTitle}</strong>
|
||||
<span style={{ color: 'var(--text3)' }}> (#{step.exerciseId})</span>
|
||||
</>
|
||||
) : (
|
||||
<span style={{ color: 'var(--text3)' }}>Übung wählen</span>
|
||||
)}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
style={{ fontSize: '12px', padding: '4px 10px' }}
|
||||
onClick={() => setPickContext({ kind: 'sequence', index: idx })}
|
||||
>
|
||||
Übung…
|
||||
</button>
|
||||
{anchorExerciseId != null && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn"
|
||||
style={{ fontSize: '12px', padding: '4px 10px' }}
|
||||
onClick={async () => {
|
||||
const variants = await loadVariantsForExercise(anchorExerciseId)
|
||||
patchSeqStep(idx, {
|
||||
exerciseId: anchorExerciseId,
|
||||
exerciseTitle: anchorTitle?.trim() || `Übung #${anchorExerciseId}`,
|
||||
variantId: null,
|
||||
variants,
|
||||
})
|
||||
}}
|
||||
>
|
||||
Diese Übung
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row" style={{ marginBottom: 0 }}>
|
||||
<label className="form-label">Variante (optional)</label>
|
||||
<select
|
||||
className="form-input"
|
||||
disabled={!step.exerciseId}
|
||||
value={step.variantId ?? ''}
|
||||
onChange={(e) =>
|
||||
patchSeqStep(idx, {
|
||||
variantId: e.target.value === '' ? null : parseInt(e.target.value, 10),
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="">Gesamte Übung (ohne feste Variante)</option>
|
||||
{(step.variants || []).map((v) => (
|
||||
<option key={v.id} value={v.id}>
|
||||
{v.variant_name || `Variante #${v.id}`}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap' }}>
|
||||
<button type="button" className="btn" style={{ fontSize: '12px', padding: '4px 8px' }} onClick={() => moveSeqStep(idx, -1)}>
|
||||
↑
|
||||
</button>
|
||||
<button type="button" className="btn" style={{ fontSize: '12px', padding: '4px 8px' }} onClick={() => moveSeqStep(idx, 1)}>
|
||||
↓
|
||||
</button>
|
||||
<button type="button" className="btn" style={{ fontSize: '12px', padding: '4px 8px' }} onClick={() => removeSeqStep(idx)}>
|
||||
Zeile entfernen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
<button type="button" className="btn btn-secondary" style={{ marginBottom: '12px' }} onClick={addSeqStep}>
|
||||
+ Schritt
|
||||
</button>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Entwicklungsziel für alle neuen Zwischen-Kanten (optional)</label>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
value={sequenceBulkNotes}
|
||||
onChange={(e) => setSequenceBulkNotes(e.target.value)}
|
||||
placeholder="wird auf jedes neue Segment der Sequenz kopiert"
|
||||
/>
|
||||
</div>
|
||||
<button type="button" className="btn btn-primary" disabled={busy} onClick={submitSequence}>
|
||||
Sequenz als Nachfolger-Kanten speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ marginBottom: '12px' }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Nachfolger als Reihen (Lesart)</h3>
|
||||
{flowChains.length === 0 ? (
|
||||
<p style={{ color: 'var(--text2)', margin: 0 }}>Keine Nachfolger-Kanten im aktuellen Filter.</p>
|
||||
) : (
|
||||
flowChains.map((chain, ci) => (
|
||||
<div
|
||||
key={ci}
|
||||
style={{
|
||||
marginBottom: '14px',
|
||||
padding: '12px',
|
||||
borderRadius: '10px',
|
||||
border: '1px solid var(--border)',
|
||||
background: 'var(--surface2)',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
alignItems: 'center',
|
||||
gap: '6px 10px',
|
||||
fontSize: '13px',
|
||||
lineHeight: 1.5,
|
||||
}}
|
||||
>
|
||||
{chain.nodes.map((n, ni) => (
|
||||
<React.Fragment key={`${n.exercise_id}-${n.variant_id}-${ni}`}>
|
||||
{ni > 0 && (
|
||||
<span style={{ color: 'var(--accent)', fontWeight: 700 }} aria-hidden>
|
||||
→
|
||||
</span>
|
||||
)}
|
||||
<span style={{ fontWeight: 600 }}>{formatNodeLine(n)}</span>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
<div style={{ marginTop: '10px', display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
||||
<button type="button" className="btn btn-secondary" disabled={busy} onClick={() => deleteChain(chain.edges)}>
|
||||
Diese Reihe löschen ({chain.edges.length} Kante(n))
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ marginBottom: '12px' }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>Schwestern & Alternativen</h3>
|
||||
@@ -919,6 +635,65 @@ export default function ExerciseProgressionGraphPanel({
|
||||
)}
|
||||
</div>
|
||||
|
||||
<details className="card" style={{ marginBottom: '12px' }}>
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 600 }}>Graph-Einstellungen (Name, Sichtbarkeit)</summary>
|
||||
<div style={{ marginTop: '14px' }}>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Name</label>
|
||||
<input className="form-input" value={metaName} onChange={(e) => setMetaName(e.target.value)} />
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Beschreibung</label>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
value={metaDescription}
|
||||
onChange={(e) => setMetaDescription(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">{EXERCISE_VISIBILITY_FIELD_LABEL}</label>
|
||||
<select
|
||||
className="form-input"
|
||||
value={metaVisibility}
|
||||
onChange={(e) => setMetaVisibility(e.target.value)}
|
||||
>
|
||||
{filteredGraphVisOptions.map((o) => (
|
||||
<option key={o.value} value={o.value}>
|
||||
{o.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" className="btn btn-secondary" disabled={busy} onClick={handleSaveMeta}>
|
||||
Metadaten speichern
|
||||
</button>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details className="card" style={{ marginBottom: '12px' }}>
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 600 }}>KI: Neuen Pfad planen (4 Schritte)</summary>
|
||||
<div style={{ marginTop: '14px' }}>
|
||||
<ExerciseProgressionPathBuilder
|
||||
graphId={selectedGraphId}
|
||||
disabled={busy}
|
||||
onSaved={async () => {
|
||||
await refreshEdges(selectedGraphId)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<SkillProfilePanel
|
||||
title="Fähigkeiten entlang des Pfads"
|
||||
hint="Alle Übungen als Knoten im Graph (Standardgewicht pro Übung; Intensität und Stufen aus der Übungsverknüpfung)."
|
||||
profile={skillProfileData?.overall}
|
||||
loading={skillProfileLoading}
|
||||
error={skillProfileError}
|
||||
defaultExpanded={false}
|
||||
artifactType="progression_graph"
|
||||
/>
|
||||
|
||||
<details className="card" style={{ marginBottom: '12px' }}>
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 600 }}>Einzelkante (Nachfolger oder Schwester)</summary>
|
||||
<div style={{ marginTop: '14px' }}>
|
||||
@@ -1010,26 +785,13 @@ export default function ExerciseProgressionGraphPanel({
|
||||
</button>
|
||||
</div>
|
||||
</details>
|
||||
</>
|
||||
)}
|
||||
|
||||
{selectedGraphId && anchorExerciseId != null && (
|
||||
<label style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '12px', fontSize: '13px' }}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={filterAnchorOnly}
|
||||
onChange={(e) => setFilterAnchorOnly(e.target.checked)}
|
||||
/>
|
||||
Nur Kanten, die diese Übung betreffen (Übersicht & Tabelle)
|
||||
</label>
|
||||
)}
|
||||
|
||||
{selectedGraphId && uiTab === 'table' && (
|
||||
<div className="card">
|
||||
<h3 style={{ marginTop: 0, fontSize: '1rem' }}>
|
||||
Alle Kanten ({filteredEdges.length}
|
||||
{edges.length !== filteredEdges.length ? ` von ${edges.length}` : ''})
|
||||
</h3>
|
||||
<details className="card" style={{ marginBottom: '12px' }}>
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 600 }}>
|
||||
Technische Kantenliste ({filteredEdges.length}
|
||||
{edges.length !== filteredEdges.length ? ` von ${edges.length}` : ''})
|
||||
</summary>
|
||||
<div style={{ marginTop: '14px' }}>
|
||||
{filteredEdges.length === 0 ? (
|
||||
<p style={{ color: 'var(--text2)', margin: 0 }}>Keine Kanten.</p>
|
||||
) : (
|
||||
@@ -1111,7 +873,9 @@ export default function ExerciseProgressionGraphPanel({
|
||||
</table>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</>
|
||||
)}
|
||||
|
||||
<ExercisePickerModal
|
||||
|
||||
Reference in new issue
Block a user