tods-competition-factory 2.1.21 → 2.1.23
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 +3 -3
- package/dist/tods-competition-factory.development.cjs.js +7 -9
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.1.
|
|
6
|
+
return '2.1.23';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -36309,8 +36309,8 @@ function participantScheduledMatchUps({ scheduleAttributes = ['scheduledDate', '
|
|
|
36309
36309
|
}
|
|
36310
36310
|
|
|
36311
36311
|
function getCompetitionPublishedDrawDetails({ tournamentRecords }) {
|
|
36312
|
-
const drawIds = [];
|
|
36313
36312
|
const detailsMap = {};
|
|
36313
|
+
const drawIds = [];
|
|
36314
36314
|
for (const tournamentRecord of Object.values(tournamentRecords)) {
|
|
36315
36315
|
for (const event of tournamentRecord.events ?? []) {
|
|
36316
36316
|
const eventPubStatus = getEventPublishStatus({ event });
|
|
@@ -36593,9 +36593,7 @@ function competitionScheduleMatchUps(params) {
|
|
|
36593
36593
|
}
|
|
36594
36594
|
let publishedDrawIds, detailsMap;
|
|
36595
36595
|
if (usePublishState) {
|
|
36596
|
-
({ drawIds: publishedDrawIds, detailsMap } = getCompetitionPublishedDrawDetails({
|
|
36597
|
-
tournamentRecords,
|
|
36598
|
-
}));
|
|
36596
|
+
({ drawIds: publishedDrawIds, detailsMap } = getCompetitionPublishedDrawDetails({ tournamentRecords }));
|
|
36599
36597
|
}
|
|
36600
36598
|
if (publishedDrawIds?.length) {
|
|
36601
36599
|
if (!params.contextFilters)
|
|
@@ -36655,10 +36653,10 @@ function competitionScheduleMatchUps(params) {
|
|
|
36655
36653
|
contextFilters: params.contextFilters,
|
|
36656
36654
|
});
|
|
36657
36655
|
let relevantMatchUps = [...(upcomingMatchUps ?? []), ...(pendingMatchUps ?? [])];
|
|
36658
|
-
if (detailsMap && Object.keys(detailsMap).length) {
|
|
36656
|
+
if (detailsMap && (!publishedDrawIds?.length || Object.keys(detailsMap).length)) {
|
|
36659
36657
|
relevantMatchUps = relevantMatchUps.filter((matchUp) => {
|
|
36660
36658
|
const { drawId, structureId, stage } = matchUp;
|
|
36661
|
-
if (!detailsMap[drawId])
|
|
36659
|
+
if (!detailsMap?.[drawId]?.publishingDetail?.published)
|
|
36662
36660
|
return false;
|
|
36663
36661
|
if (detailsMap[drawId].stageDetails) {
|
|
36664
36662
|
const stageKeys = Object.keys(detailsMap[drawId].stageDetails);
|
|
@@ -46726,7 +46724,6 @@ function getVenueSchedulingDetails({ matchUpPotentialParticipantIds, individualP
|
|
|
46726
46724
|
garmanSinglePass: true,
|
|
46727
46725
|
});
|
|
46728
46726
|
let dateScheduledMatchUpIds;
|
|
46729
|
-
let dateScheduledMatchUps;
|
|
46730
46727
|
let scheduleTimes = [];
|
|
46731
46728
|
if (useGarman) {
|
|
46732
46729
|
({ scheduleTimes, dateScheduledMatchUpIds } = generateScheduleTimes({
|
|
@@ -46752,7 +46749,8 @@ function getVenueSchedulingDetails({ matchUpPotentialParticipantIds, individualP
|
|
|
46752
46749
|
minutesMap,
|
|
46753
46750
|
matchUps,
|
|
46754
46751
|
});
|
|
46755
|
-
({ dateScheduledMatchUpIds
|
|
46752
|
+
({ dateScheduledMatchUpIds } = processResult);
|
|
46753
|
+
const dateScheduledMatchUps = processResult;
|
|
46756
46754
|
const { byeScheduledMatchUpDetails, clearDate } = processResult;
|
|
46757
46755
|
if (byeScheduledMatchUpDetails?.length)
|
|
46758
46756
|
allDateScheduledByeMatchUpDetails.push(...byeScheduledMatchUpDetails);
|