Enhance TrainingUnitSectionsEditor and TrainingFrameworkProgramEditPage with parallel stream support
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m8s
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m8s
- Updated the TrainingUnitSectionsEditor to include additional parameters for moving sections across slots, allowing for better handling of parallel streams. - Improved the removeSection function to ensure proper reordering and handling of sections in parallel phases. - Enhanced the moveSectionsAcrossFrameworkSlots function to apply changes to sections when moved into parallel streams, ensuring accurate updates. - Refactored the reorderBlocksImmutableWithPlanLoc function to accommodate new logic for managing phase orders and section types during reordering.
This commit is contained in:
1 parent
4902771772
commit
73975d3402
3 files changed
+53
-15
No files matched your search
@@ -816,19 +816,26 @@ export function reorderBlocksImmutableWithPlanLoc(prev, fromI, toBeforeIdx) {
|
||||
let planLocNext = null
|
||||
const belowKind = below?.planLoc?.phaseKind
|
||||
const aboveKind = above?.planLoc?.phaseKind
|
||||
const movedKind = moved?.planLoc?.phaseKind
|
||||
const belowPo = below?.planLoc?.phaseOrderIndex ?? 0
|
||||
const movedPo = moved?.planLoc?.phaseOrderIndex ?? 0
|
||||
|
||||
if (
|
||||
belowKind === 'parallel' &&
|
||||
(!above || aboveKind === 'whole_group')
|
||||
) {
|
||||
if (aboveKind === 'whole_group') {
|
||||
if (belowKind === 'parallel' && aboveKind === 'whole_group') {
|
||||
if (movedKind !== 'parallel') {
|
||||
planLocNext = { ...above.planLoc }
|
||||
} else {
|
||||
} else if (movedPo !== belowPo) {
|
||||
planLocNext = { ...below.planLoc }
|
||||
}
|
||||
} else if (belowKind === 'parallel' && !above) {
|
||||
if (movedKind !== 'parallel') {
|
||||
planLocNext = defaultPlanLocWholeGroup(0)
|
||||
}
|
||||
} else if (belowKind) {
|
||||
}
|
||||
|
||||
if (!planLocNext && belowKind) {
|
||||
planLocNext = { ...below.planLoc }
|
||||
} else if (insertAt === arr.length) {
|
||||
}
|
||||
if (!planLocNext && insertAt === arr.length) {
|
||||
if (!above) {
|
||||
planLocNext = defaultPlanLocWholeGroup(0)
|
||||
} else if (above.planLoc?.phaseKind === 'parallel') {
|
||||
@@ -837,9 +844,11 @@ export function reorderBlocksImmutableWithPlanLoc(prev, fromI, toBeforeIdx) {
|
||||
} else if (above.planLoc?.phaseKind === 'whole_group') {
|
||||
planLocNext = { ...above.planLoc }
|
||||
}
|
||||
} else if (above?.planLoc?.phaseKind === 'whole_group') {
|
||||
}
|
||||
if (!planLocNext && above?.planLoc?.phaseKind === 'whole_group') {
|
||||
planLocNext = { ...above.planLoc }
|
||||
} else if (above?.planLoc?.phaseKind === 'parallel') {
|
||||
}
|
||||
if (!planLocNext && above?.planLoc?.phaseKind === 'parallel') {
|
||||
const mx = maxPhaseOrderIndexFromSections(arr)
|
||||
planLocNext = defaultPlanLocWholeGroup(mx + 1)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user