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/index.mjs CHANGED
@@ -2380,7 +2380,7 @@ const matchUpFormatCode = {
2380
2380
  };
2381
2381
 
2382
2382
  function factoryVersion() {
2383
- return "1.8.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 validDate = !scheduleDate || event?.startDate && event?.endDate && new Date(scheduleDate) >= new Date(event?.startDate) && new Date(scheduleDate) <= new Date(event?.endDate);
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: INVALID_END_TIME };
57651
+ return { error: INVALID_VALUES };
57648
57652
  const flightProfile = getFlightProfile({ event }).flightProfile;
57649
57653
  const nameResult = drawUpdates.drawName && modifyDrawName({
57650
57654
  drawName: drawUpdates.drawName,