tods-competition-factory 1.6.26 → 1.6.27

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.
@@ -14187,6 +14187,7 @@ function getEventData(params) {
14187
14187
  // order is important!!
14188
14188
  tournamentRecord
14189
14189
  });
14190
+ const stageFilter = ({ stage }) => !usePublishState || !publishStatus?.stages?.length || publishStatus.stages.includes(stage);
14190
14191
  const structureFilter = ({ structureId }) => !usePublishState || !publishStatus?.structureIds?.length || publishStatus.structureIds.includes(structureId);
14191
14192
  const drawFilter = ({ drawId }) => !usePublishState || !publishStatus?.drawIds?.length || publishStatus.drawIds.includes(drawId);
14192
14193
  const drawDefinitions = event.drawDefinitions || [];
@@ -14209,7 +14210,7 @@ function getEventData(params) {
14209
14210
  )
14210
14211
  ).map(({ structures, ...drawData }) => ({
14211
14212
  ...drawData,
14212
- structures: structures?.filter(structureFilter)
14213
+ structures: structures?.filter(structureFilter)?.filter(stageFilter)
14213
14214
  })).filter((drawData) => drawData.structures?.length);
14214
14215
  const { tournamentInfo } = getTournamentInfo({ tournamentRecord });
14215
14216
  const venues = tournamentRecord.venues || [];