tods-competition-factory 2.0.45 → 2.0.46

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.45';
6
+ return '2.0.46';
7
7
  }
8
8
 
9
9
  function isFunction(obj) {
@@ -55357,15 +55357,15 @@ function setTournamentName({ tournamentRecord, promotionalName, tournamentName,
55357
55357
  return { error: MISSING_TOURNAMENT_RECORD };
55358
55358
  const tournamentId = tournamentRecord.tournamentId;
55359
55359
  const detailUpdates = { tournamentId };
55360
- if (tournamentName) {
55360
+ if (tournamentName && tournamentName !== tournamentRecord.tournamentName) {
55361
55361
  tournamentRecord.tournamentName = tournamentName;
55362
55362
  detailUpdates.tournamentName = tournamentName;
55363
55363
  }
55364
- if (promotionalName) {
55364
+ if (promotionalName && promotionalName !== tournamentRecord.promotionalName) {
55365
55365
  tournamentRecord.promotionalName = promotionalName;
55366
55366
  detailUpdates.promotionalName = promotionalName;
55367
55367
  }
55368
- if (formalName) {
55368
+ if (formalName && formalName !== tournamentRecord.formalName) {
55369
55369
  tournamentRecord.formalName = formalName;
55370
55370
  detailUpdates.formalName = formalName;
55371
55371
  }
@@ -55378,7 +55378,14 @@ function setTournamentName({ tournamentRecord, promotionalName, tournamentName,
55378
55378
  detailUpdates.formalName = '';
55379
55379
  }
55380
55380
  if (Object.keys(detailUpdates).length > 1) {
55381
- addNotice({ topic: MODIFY_TOURNAMENT_DETAIL, payload: { tournamentId, ...detailUpdates } });
55381
+ addNotice({
55382
+ topic: MODIFY_TOURNAMENT_DETAIL,
55383
+ payload: {
55384
+ parentOrganisation: tournamentRecord.parentOrganisation,
55385
+ tournamentId,
55386
+ ...detailUpdates,
55387
+ },
55388
+ });
55382
55389
  }
55383
55390
  return { ...SUCCESS };
55384
55391
  }
@@ -55475,7 +55482,12 @@ function setTournamentDates(params) {
55475
55482
  const unscheduledMatchUpIds = checkScheduling && removeInvalidScheduling({ tournamentRecord })?.unscheduledMatchUpIds;
55476
55483
  updateCourtAvailability({ tournamentRecord });
55477
55484
  addNotice({
55478
- payload: { tournamentId: tournamentRecord.tournamentId, startDate, endDate },
55485
+ payload: {
55486
+ parentOrganisation: tournamentRecord.parentOrganisation,
55487
+ tournamentId: tournamentRecord.tournamentId,
55488
+ startDate,
55489
+ endDate,
55490
+ },
55479
55491
  topic: MODIFY_TOURNAMENT_DETAIL,
55480
55492
  });
55481
55493
  return { ...SUCCESS, unscheduledMatchUpIds, datesAdded, datesRemoved };