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.
@@ -2903,7 +2903,7 @@ var matchUpFormatCode = {
2903
2903
  };
2904
2904
 
2905
2905
  function factoryVersion() {
2906
- return '1.8.8';
2906
+ return '1.8.9';
2907
2907
  }
2908
2908
 
2909
2909
  function getObjectTieFormat(obj) {
@@ -39519,11 +39519,15 @@ function getRounds(_a) {
39519
39519
  return eventId === round.eventId;
39520
39520
  })
39521
39521
  : undefined;
39522
- var validDate = !scheduleDate ||
39523
- ((event === null || event === void 0 ? void 0 : event.startDate) &&
39524
- (event === null || event === void 0 ? void 0 : event.endDate) &&
39525
- new Date(scheduleDate) >= new Date(event === null || event === void 0 ? void 0 : event.startDate) &&
39526
- new Date(scheduleDate) <= new Date(event === null || event === void 0 ? void 0 : event.endDate));
39522
+ var startDate = (event === null || event === void 0 ? void 0 : event.startDate) || (tournamentRecord === null || tournamentRecord === void 0 ? void 0 : tournamentRecord.startDate);
39523
+ var endDate = (event === null || event === void 0 ? void 0 : event.endDate) || (tournamentRecord === null || tournamentRecord === void 0 ? void 0 : tournamentRecord.endDate);
39524
+ var validStartDate = !scheduleDate ||
39525
+ !startDate ||
39526
+ new Date(scheduleDate) >= new Date(startDate);
39527
+ var validEndDate = !scheduleDate ||
39528
+ !endDate ||
39529
+ new Date(scheduleDate) <= new Date(endDate);
39530
+ var validDate = validStartDate && validEndDate;
39527
39531
  var validVenue = !venueId || (event === null || event === void 0 ? void 0 : event.validVenueIds.includes(venueId));
39528
39532
  var keepRound = keepComplete && keepScheduled && validVenue && validDate;
39529
39533
  if (!keepRound)
@@ -62402,7 +62406,7 @@ function modifyDrawDefinition(_a) {
62402
62406
  var _b;
62403
62407
  var tournamentRecord = _a.tournamentRecord, drawDefinition = _a.drawDefinition, drawUpdates = _a.drawUpdates, drawId = _a.drawId, event = _a.event;
62404
62408
  if (!isObject(drawUpdates))
62405
- return { error: INVALID_END_TIME };
62409
+ return { error: INVALID_VALUES };
62406
62410
  var flightProfile = getFlightProfile({ event: event }).flightProfile;
62407
62411
  var nameResult = drawUpdates.drawName &&
62408
62412
  modifyDrawName({