tods-competition-factory 2.0.28 → 2.0.30

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.0.28';
6
+ return '2.0.30';
7
7
  }
8
8
 
9
9
  function isFunction(obj) {
@@ -23068,7 +23068,7 @@ function deleteAdHocMatchUps(params) {
23068
23068
  const matchUpsToDelete = existingMatchUps?.filter(({ matchUpId, score, winningSide }) => {
23069
23069
  if (winningSide && !removeCompleted)
23070
23070
  return false;
23071
- if (checkScoreHasValue({ score })) {
23071
+ if (winningSide || checkScoreHasValue({ score })) {
23072
23072
  if (!winningSide && !removeIncomplete)
23073
23073
  return false;
23074
23074
  matchUpIdsWithScoreValue.push(matchUpId);
@@ -55003,10 +55003,14 @@ function setTournamentDates(params) {
55003
55003
  const datesRemoved = initialDateRange.filter((date) => !resultingDateRange.includes(date));
55004
55004
  const datesAdded = resultingDateRange.filter((date) => !initialDateRange.includes(date));
55005
55005
  for (const event of tournamentRecord.events ?? []) {
55006
- if (startDate && event.startDate && new Date(startDate) > new Date(event.startDate))
55006
+ if (startDate && event.startDate && new Date(event.startDate) < new Date(startDate))
55007
55007
  event.startDate = startDate;
55008
- if (endDate && event.endDate && new Date(endDate) < new Date(event.endDate))
55008
+ if (endDate && event.startDate && new Date(event.startDate) > new Date(endDate))
55009
+ event.startDate = startDate ?? endDate;
55010
+ if (endDate && event.endDate && new Date(event.endDate) > new Date(endDate))
55009
55011
  event.endDate = endDate;
55012
+ if (startDate && event.endDate && new Date(event.endDate) < new Date(startDate))
55013
+ event.endDate = endDate ?? startDate;
55010
55014
  }
55011
55015
  if (startDate && tournamentRecord.endDate && new Date(startDate) > new Date(tournamentRecord.endDate)) {
55012
55016
  tournamentRecord.endDate = startDate;
@@ -56462,7 +56466,7 @@ async function asyncExecutionQueue(engine, directives, rollbackOnError) {
56462
56466
  }
56463
56467
  const timeStamp = Date.now();
56464
56468
  const mutationStatus = getMutationStatus({ timeStamp });
56465
- notifySubscribersAsync({ directives, mutationStatus, timeStamp });
56469
+ await notifySubscribersAsync({ directives, mutationStatus, timeStamp });
56466
56470
  deleteNotices();
56467
56471
  const success = results.every((r) => r.success);
56468
56472
  return { success, results };