From 7d2661a8e8d1d6b360f9672bdc8878eb327ce4f1 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 16 May 2026 08:17:35 +0200 Subject: [PATCH] Remove redundant boundary checks for section movement in TrainingUnitSectionsEditor - Eliminated the checks that prevented section movement across slots when crossing the boundary between 'parallel' and 'whole_group' phases, streamlining the section management logic and improving code clarity. --- .../components/TrainingUnitSectionsEditor.jsx | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/frontend/src/components/TrainingUnitSectionsEditor.jsx b/frontend/src/components/TrainingUnitSectionsEditor.jsx index 99b4807..724545a 100644 --- a/frontend/src/components/TrainingUnitSectionsEditor.jsx +++ b/frontend/src/components/TrainingUnitSectionsEditor.jsx @@ -928,27 +928,6 @@ export default function TrainingUnitSectionsEditor({ } } - let crossesParallelWholePlanBoundary = false - if ( - enableParallelPhaseControls && - insertBeforeIdx >= 0 && - insertBeforeIdx < list.length - ) { - const fromK = list[fromSi]?.planLoc?.phaseKind - const toK = list[insertBeforeIdx]?.planLoc?.phaseKind - crossesParallelWholePlanBoundary = - (fromK === 'parallel' && toK === 'whole_group') || - (fromK === 'whole_group' && toK === 'parallel') - } - - if ( - enableParallelPhaseControls && - (insertBeforeIdx === fromSi || insertBeforeIdx === fromSi + 1) && - !crossesParallelWholePlanBoundary - ) { - return - } - if ( typeof onMoveSectionsAcrossSlots === 'function' && sectionToSlot >= 0 &&