Remove redundant boundary checks for section movement in TrainingUnitSectionsEditor
All checks were successful
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
All checks were successful
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
- 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.
This commit is contained in:
parent
0fdee610ed
commit
7d2661a8e8
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user