UX - Filter #12
|
|
@ -3445,22 +3445,60 @@ a.analysis-split__nav-item {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tu-ex-run-block {
|
.tu-ex-debrief {
|
||||||
display: block;
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 4.75rem;
|
||||||
|
gap: 10px 14px;
|
||||||
|
align-items: start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: 0.78rem;
|
padding-top: 10px;
|
||||||
|
border-top: 1px solid var(--border2, rgba(0, 0, 0, 0.08));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tu-ex-run-block__controls {
|
.tu-ex-debrief__grow {
|
||||||
|
min-width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 6px;
|
gap: 5px;
|
||||||
margin-top: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tu-ex-run-block__controls .form-input:first-of-type {
|
.tu-ex-debrief__textarea {
|
||||||
max-width: 120px;
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 4.75rem;
|
||||||
|
resize: vertical;
|
||||||
|
font-size: 0.88rem;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tu-ex-debrief__ist {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 5px;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-self: end;
|
||||||
|
width: 4.75rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tu-ex-debrief__ist .tu-ex-duration {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 520px) {
|
||||||
|
.tu-ex-debrief {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tu-ex-debrief__ist {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 10rem;
|
||||||
|
justify-self: start;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tu-textedit-backdrop {
|
.tu-textedit-backdrop {
|
||||||
|
|
|
||||||
|
|
@ -763,30 +763,34 @@ export default function TrainingUnitSectionsEditor({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showExecutionExtras ? (
|
{showExecutionExtras ? (
|
||||||
<label className="tu-ex-run-block form-label">
|
<div className="tu-ex-debrief">
|
||||||
Ist-Dauer / Anpassungen
|
<div className="tu-ex-debrief__grow">
|
||||||
<span className="tu-ex-run-block__controls">
|
<span className="tu-item-row__meta-label">Abweichungen beim Durchführen</span>
|
||||||
|
<textarea
|
||||||
|
className="form-input tu-ex-debrief__textarea"
|
||||||
|
rows={3}
|
||||||
|
value={it.modifications || ''}
|
||||||
|
onChange={(e) =>
|
||||||
|
updateItem(sIdx, iIdx, 'modifications', e.target.value)
|
||||||
|
}
|
||||||
|
placeholder="Was lief anders? Anpassungen für spätere Planung…"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="tu-ex-debrief__ist">
|
||||||
|
<span className="tu-item-row__meta-label">Ist (Min)</span>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
className="form-input"
|
className="form-input tu-ex-duration"
|
||||||
min={1}
|
min={1}
|
||||||
value={it.actual_duration_min}
|
value={it.actual_duration_min}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
updateItem(sIdx, iIdx, 'actual_duration_min', e.target.value)
|
updateItem(sIdx, iIdx, 'actual_duration_min', e.target.value)
|
||||||
}
|
}
|
||||||
placeholder="IST min"
|
placeholder="IST"
|
||||||
|
title="Tatsächliche Dauer (Minuten); dieselbe Spaltenbreite wie „Min“ (Plan) oben"
|
||||||
/>
|
/>
|
||||||
<textarea
|
</div>
|
||||||
className="form-input"
|
</div>
|
||||||
rows={2}
|
|
||||||
value={it.modifications || ''}
|
|
||||||
onChange={(e) =>
|
|
||||||
updateItem(sIdx, iIdx, 'modifications', e.target.value)
|
|
||||||
}
|
|
||||||
placeholder="Abweichungen beim Durchführen"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,8 @@ function TrainingPlanningPage() {
|
||||||
const [loading, setLoading] = useState(true)
|
const [loading, setLoading] = useState(true)
|
||||||
const [showModal, setShowModal] = useState(false)
|
const [showModal, setShowModal] = useState(false)
|
||||||
const [editingUnit, setEditingUnit] = useState(null)
|
const [editingUnit, setEditingUnit] = useState(null)
|
||||||
|
/** Abschnitts-Editor: Planung / strukturelle Überarbeitung (ohne Ist-Felder) / Nachbereitung (Ist & Abweichungen) */
|
||||||
|
const [sectionsEditMode, setSectionsEditMode] = useState('planning')
|
||||||
const [draftPlanTemplateId, setDraftPlanTemplateId] = useState('')
|
const [draftPlanTemplateId, setDraftPlanTemplateId] = useState('')
|
||||||
const [quickTemplateId, setQuickTemplateId] = useState('')
|
const [quickTemplateId, setQuickTemplateId] = useState('')
|
||||||
const [exercisePickerOpen, setExercisePickerOpen] = useState(false)
|
const [exercisePickerOpen, setExercisePickerOpen] = useState(false)
|
||||||
|
|
@ -505,6 +507,7 @@ function TrainingPlanningPage() {
|
||||||
sections: [defaultSection('Hauptteil')],
|
sections: [defaultSection('Hauptteil')],
|
||||||
...sessionAssignDefaults()
|
...sessionAssignDefaults()
|
||||||
})
|
})
|
||||||
|
setSectionsEditMode('planning')
|
||||||
setShowModal(true)
|
setShowModal(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -532,6 +535,7 @@ function TrainingPlanningPage() {
|
||||||
sections: [defaultSection('Hauptteil')],
|
sections: [defaultSection('Hauptteil')],
|
||||||
...sessionAssignDefaults()
|
...sessionAssignDefaults()
|
||||||
})
|
})
|
||||||
|
setSectionsEditMode('planning')
|
||||||
setShowModal(true)
|
setShowModal(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -593,6 +597,7 @@ function TrainingPlanningPage() {
|
||||||
return xs
|
return xs
|
||||||
})(),
|
})(),
|
||||||
})
|
})
|
||||||
|
setSectionsEditMode(fullUnit.status === 'completed' ? 'debrief' : 'planning')
|
||||||
setShowModal(true)
|
setShowModal(true)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('Fehler beim Laden: ' + err.message)
|
alert('Fehler beim Laden: ' + err.message)
|
||||||
|
|
@ -2254,6 +2259,67 @@ function TrainingPlanningPage() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: '2rem' }}>
|
<div style={{ marginTop: '2rem' }}>
|
||||||
|
{editingUnit ? (
|
||||||
|
<div style={{ marginBottom: '1rem' }}>
|
||||||
|
<div
|
||||||
|
role="radiogroup"
|
||||||
|
aria-label="Modus für Abschnitte und Übungen"
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '10px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="form-label" style={{ marginBottom: 0, fontSize: '0.82rem' }}>
|
||||||
|
Ablauf bearbeiten als
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
borderRadius: '10px',
|
||||||
|
border: '1.5px solid var(--border2)',
|
||||||
|
overflow: 'hidden',
|
||||||
|
background: 'var(--surface2)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{[
|
||||||
|
{ id: 'planning', label: 'Planung' },
|
||||||
|
{ id: 'refine', label: 'Überarbeiten' },
|
||||||
|
{ id: 'debrief', label: 'Nachbereitung' },
|
||||||
|
].map((opt, i) => (
|
||||||
|
<button
|
||||||
|
key={opt.id}
|
||||||
|
type="button"
|
||||||
|
role="radio"
|
||||||
|
aria-checked={sectionsEditMode === opt.id}
|
||||||
|
onClick={() => setSectionsEditMode(opt.id)}
|
||||||
|
style={{
|
||||||
|
border: 'none',
|
||||||
|
padding: '8px 14px',
|
||||||
|
fontWeight: 600,
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
cursor: 'pointer',
|
||||||
|
background: sectionsEditMode === opt.id ? 'var(--accent-dark)' : 'transparent',
|
||||||
|
color: sectionsEditMode === opt.id ? '#fff' : 'var(--text1)',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
...(i > 0 ? { borderLeft: '1.5px solid var(--border2)' } : {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{opt.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p style={{ margin: '0.35rem 0 0', fontSize: '0.82rem', color: 'var(--text3)', lineHeight: 1.45 }}>
|
||||||
|
{sectionsEditMode === 'debrief'
|
||||||
|
? 'Ist‑Minuten rechts in derselben Spaltenbreite wie „Min“ (Plan); Abweichungen als Text über die volle Breite.'
|
||||||
|
: sectionsEditMode === 'refine'
|
||||||
|
? 'Struktur, Übungen und geplante Zeiten anpassen — ohne Ist‑Angaben in den Zeilen (wie Planung).'
|
||||||
|
: 'Ablauf und geplante Minuten bearbeiten. Ist‑Werte und Abweichungen nur unter „Nachbereitung“.'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
<TrainingUnitSectionsEditor
|
<TrainingUnitSectionsEditor
|
||||||
heading="Abschnitte & Übungen"
|
heading="Abschnitte & Übungen"
|
||||||
headingAccessory={
|
headingAccessory={
|
||||||
|
|
@ -2279,7 +2345,7 @@ function TrainingPlanningPage() {
|
||||||
onPeekExercise={(id, variantId) =>
|
onPeekExercise={(id, variantId) =>
|
||||||
setPlanningPeekCtx({ exerciseId: id, variantId: variantId ?? null })
|
setPlanningPeekCtx({ exerciseId: id, variantId: variantId ?? null })
|
||||||
}
|
}
|
||||||
showExecutionExtras={!!editingUnit}
|
showExecutionExtras={Boolean(editingUnit) && sectionsEditMode === 'debrief'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user