tods-competition-factory 1.6.17 → 1.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forge/generate.mjs +11 -4
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/transform.mjs +11 -4
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +1532 -1482
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +6130 -6088
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +1 -1
package/dist/forge/generate.mjs
CHANGED
|
@@ -11431,8 +11431,9 @@ function consolationCleanup({
|
|
|
11431
11431
|
return { ...SUCCESS };
|
|
11432
11432
|
}
|
|
11433
11433
|
|
|
11434
|
-
function
|
|
11434
|
+
function resetLineUps({
|
|
11435
11435
|
inContextDrawMatchUps,
|
|
11436
|
+
inheritance = true,
|
|
11436
11437
|
tournamentRecord,
|
|
11437
11438
|
drawDefinition,
|
|
11438
11439
|
matchUpsMap,
|
|
@@ -11440,6 +11441,8 @@ function cleanupLineUps({
|
|
|
11440
11441
|
structure,
|
|
11441
11442
|
event
|
|
11442
11443
|
}) {
|
|
11444
|
+
if (!drawDefinition)
|
|
11445
|
+
return { error: MISSING_DRAW_DEFINITION };
|
|
11443
11446
|
const { drawPositions, matchUps, targetMatchUps } = getTargetMatchUps({
|
|
11444
11447
|
inContextDrawMatchUps,
|
|
11445
11448
|
matchUpsMap,
|
|
@@ -11455,10 +11458,14 @@ function cleanupLineUps({
|
|
|
11455
11458
|
({ matchUpId }) => matchUpId === inContextMatchUp.matchUpId
|
|
11456
11459
|
);
|
|
11457
11460
|
if (matchUp?.sides?.[sideIndex]) {
|
|
11458
|
-
|
|
11461
|
+
if (inheritance) {
|
|
11462
|
+
delete matchUp.sides[sideIndex].lineUp;
|
|
11463
|
+
} else {
|
|
11464
|
+
matchUp.sides[sideIndex].lineUp = [];
|
|
11465
|
+
}
|
|
11459
11466
|
modifyMatchUpNotice({
|
|
11460
11467
|
tournamentId: tournamentRecord?.tournamentId,
|
|
11461
|
-
context: "
|
|
11468
|
+
context: "resetLineUps",
|
|
11462
11469
|
eventId: event?.eventId,
|
|
11463
11470
|
drawDefinition,
|
|
11464
11471
|
matchUp
|
|
@@ -11578,7 +11585,7 @@ function assignDrawPosition({
|
|
|
11578
11585
|
if (drawPositionIsActive) {
|
|
11579
11586
|
return decorateResult({ result: { error: DRAW_POSITION_ACTIVE }, stack });
|
|
11580
11587
|
}
|
|
11581
|
-
|
|
11588
|
+
resetLineUps({
|
|
11582
11589
|
assignments: [positionAssignment],
|
|
11583
11590
|
inContextDrawMatchUps,
|
|
11584
11591
|
tournamentRecord,
|