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/forge/query.mjs
CHANGED
|
@@ -11106,7 +11106,11 @@ function getRounds({
|
|
|
11106
11106
|
const keepComplete = !excludeCompletedRounds || !isComplete;
|
|
11107
11107
|
const keepScheduled = !excludeScheduledRounds || !isScheduled;
|
|
11108
11108
|
const event = venueId || scheduleDate ? events?.find(({ eventId }) => eventId === round.eventId) : void 0;
|
|
11109
|
-
const
|
|
11109
|
+
const startDate = event?.startDate || tournamentRecord?.startDate;
|
|
11110
|
+
const endDate = event?.endDate || tournamentRecord?.endDate;
|
|
11111
|
+
const validStartDate = !scheduleDate || !startDate || new Date(scheduleDate) >= new Date(startDate);
|
|
11112
|
+
const validEndDate = !scheduleDate || !endDate || new Date(scheduleDate) <= new Date(endDate);
|
|
11113
|
+
const validDate = validStartDate && validEndDate;
|
|
11110
11114
|
const validVenue = !venueId || event?.validVenueIds.includes(venueId);
|
|
11111
11115
|
const keepRound = keepComplete && keepScheduled && validVenue && validDate;
|
|
11112
11116
|
if (!keepRound)
|