feat(training-unit-editor): enhance combo planning UI and functionality
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / playwright-tests (push) Successful in 1m2s
Test Suite / pytest-backend (pull_request) Successful in 33s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 10s
Test Suite / playwright-tests (pull_request) Successful in 1m2s
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / playwright-tests (push) Successful in 1m2s
Test Suite / pytest-backend (pull_request) Successful in 33s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 10s
Test Suite / playwright-tests (pull_request) Successful in 1m2s
- Updated CSS for the combo planning strip to improve layout and visual consistency. - Refactored `compactComboPlanningCaption` to simplify the display of planning status. - Introduced a new utility function to infer advance mode from stored slot rows, enhancing profile handling. - Improved merging logic for slot profiles to ensure accurate representation of advance modes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
3898e8bc2c
commit
81fd7d9b3b
4 files changed
+96
-19
No files matched your search
@@ -65,18 +65,13 @@ function gatherPlanningModuleOutline(items, startIdx, moduleId) {
|
||||
|
||||
const MODULE_OUTLINE_PREVIEW_MAX = 8
|
||||
|
||||
/** Statuszeile: Planungs‑Override vs. Katalog, inkl. Archetyp‑Label wenn bekannt. */
|
||||
/** Statuszeile: nur Planungs‑Override vs. Katalog (Archetyp steht bereits links). */
|
||||
function compactComboPlanningCaption(it) {
|
||||
const overridden =
|
||||
it.planning_method_profile != null &&
|
||||
typeof it.planning_method_profile === 'object' &&
|
||||
!Array.isArray(it.planning_method_profile)
|
||||
const archRaw = String(it.catalog_method_archetype || '').trim()
|
||||
const archLbl = archRaw ? combinationArchetypeLabel(archRaw) : null
|
||||
if (overridden) {
|
||||
return archLbl ? `${archLbl} · Planung angepasst` : 'Planung angepasst'
|
||||
}
|
||||
return archLbl ? `${archLbl} · wie Katalog` : 'wie im Katalog'
|
||||
return overridden ? 'Planung angepasst' : 'wie Katalog'
|
||||
}
|
||||
|
||||
/** Globale Eckdaten aus effective profile (optional unter Stationenliste). */
|
||||
@@ -1223,10 +1218,6 @@ export default function TrainingUnitSectionsEditor({
|
||||
<div
|
||||
className="tu-combo-planning-strip"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
alignItems: 'flex-start',
|
||||
gap: '10px',
|
||||
padding: '8px 12px 10px',
|
||||
paddingLeft: enableItemDragReorder ? 44 : 12,
|
||||
borderTop: '1px solid var(--border)',
|
||||
@@ -1234,9 +1225,8 @@ export default function TrainingUnitSectionsEditor({
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className="tu-combo-planning-strip__meta"
|
||||
style={{
|
||||
flex: '1 1 200px',
|
||||
minWidth: 0,
|
||||
fontSize: '0.78rem',
|
||||
color: 'var(--text2)',
|
||||
lineHeight: 1.45,
|
||||
@@ -1248,7 +1238,9 @@ export default function TrainingUnitSectionsEditor({
|
||||
<span style={{ color: 'var(--text1)' }}>
|
||||
{stripArchLbl || stripArchRaw || '—'}
|
||||
</span>
|
||||
<span style={{ marginLeft: 10, fontWeight: 500 }}>{compactComboPlanningCaption(it)}</span>
|
||||
<span style={{ marginLeft: 10, fontWeight: 500, whiteSpace: 'nowrap' }}>
|
||||
{compactComboPlanningCaption(it)}
|
||||
</span>
|
||||
</div>
|
||||
{stripGlobalRough ? (
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user