tods-competition-factory 1.8.8 → 1.8.9
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/query.mjs +5 -1
- package/dist/forge/query.mjs.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +11 -7
- 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/index.mjs
CHANGED
|
@@ -2380,7 +2380,7 @@ const matchUpFormatCode = {
|
|
|
2380
2380
|
};
|
|
2381
2381
|
|
|
2382
2382
|
function factoryVersion() {
|
|
2383
|
-
return "1.8.
|
|
2383
|
+
return "1.8.9";
|
|
2384
2384
|
}
|
|
2385
2385
|
|
|
2386
2386
|
function getObjectTieFormat(obj) {
|
|
@@ -36525,7 +36525,11 @@ function getRounds({
|
|
|
36525
36525
|
const keepComplete = !excludeCompletedRounds || !isComplete;
|
|
36526
36526
|
const keepScheduled = !excludeScheduledRounds || !isScheduled;
|
|
36527
36527
|
const event = venueId || scheduleDate ? events?.find(({ eventId }) => eventId === round.eventId) : void 0;
|
|
36528
|
-
const
|
|
36528
|
+
const startDate = event?.startDate || tournamentRecord?.startDate;
|
|
36529
|
+
const endDate = event?.endDate || tournamentRecord?.endDate;
|
|
36530
|
+
const validStartDate = !scheduleDate || !startDate || new Date(scheduleDate) >= new Date(startDate);
|
|
36531
|
+
const validEndDate = !scheduleDate || !endDate || new Date(scheduleDate) <= new Date(endDate);
|
|
36532
|
+
const validDate = validStartDate && validEndDate;
|
|
36529
36533
|
const validVenue = !venueId || event?.validVenueIds.includes(venueId);
|
|
36530
36534
|
const keepRound = keepComplete && keepScheduled && validVenue && validDate;
|
|
36531
36535
|
if (!keepRound)
|
|
@@ -57644,7 +57648,7 @@ function modifyDrawDefinition({
|
|
|
57644
57648
|
event
|
|
57645
57649
|
}) {
|
|
57646
57650
|
if (!isObject(drawUpdates))
|
|
57647
|
-
return { error:
|
|
57651
|
+
return { error: INVALID_VALUES };
|
|
57648
57652
|
const flightProfile = getFlightProfile({ event }).flightProfile;
|
|
57649
57653
|
const nameResult = drawUpdates.drawName && modifyDrawName({
|
|
57650
57654
|
drawName: drawUpdates.drawName,
|