@dcrackel/hematournamentui 1.0.360 → 1.0.362
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/HemaTournamentUI-lib.es.js +257 -231
- package/dist/HemaTournamentUI-lib.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/mocks/getDEBouts-DoubleElim.js +780 -0
- package/src/mocks/getPoolsWithBoutsByPoolId.js +252 -947
- package/src/stories/Organisms/Cards/Director/DirectorCard.vue +1 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +2 -0
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +44 -13
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +1 -0
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +2 -0
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +3 -2
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +13 -13
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +4 -1
|
@@ -68,6 +68,7 @@ export default {
|
|
|
68
68
|
return rule ? parseInt(rule.RuleValue) : 90;
|
|
69
69
|
},
|
|
70
70
|
maxPoints() {
|
|
71
|
+
console.log(this.eventRules);
|
|
71
72
|
if (this.localBout.DEBoutId) {
|
|
72
73
|
const rule = this.eventRules.find(rule => rule.Rules.RuleName === "DEMaxPoints");
|
|
73
74
|
return rule ? parseInt(rule.RuleValue) : 7;
|
|
@@ -17,6 +17,8 @@ export const spacingConfig = {
|
|
|
17
17
|
Semifinal: { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
|
|
18
18
|
Final: { getTopSpace: 'mt-[11rem]', getCardSpace: 'mt-1' },
|
|
19
19
|
'Third Place': { getTopSpace: '-mt-[2rem] -ml-[19.2rem]', getCardSpace: 'mt-1' },
|
|
20
|
+
'Consolation Round 1': { getTopSpace: 'mt-[0rem] mb-[2rem]', getCardSpace: 'mt-1' },
|
|
21
|
+
'Consolation Round 2': { getTopSpace: 'mt-[1.34rem] mb-[3.4rem]', getCardSpace: 'mt-[4.5rem]' },
|
|
20
22
|
},
|
|
21
23
|
small: {
|
|
22
24
|
'Table of 8': { getTopSpace: 'mt-[0rem] mb-4', getCardSpace: 'mt-1' },
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="w-full overflow-x-auto mt-4 scrollbar-thin">
|
|
3
3
|
<div class="min-w-full flex">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
<div v-for="(bouts, roundName) in groupedBouts.winnerBouts" :key="roundName">
|
|
5
|
+
<TableauColumn :bouts="bouts"
|
|
6
|
+
:hostingClubColors="hostingClubColors"
|
|
7
|
+
:roundName="roundName"
|
|
8
|
+
:bracketSize="bracketSize"
|
|
9
|
+
:largeCards="largeCards"
|
|
10
|
+
@action:editBout="handleEditBout"
|
|
11
|
+
@action:directingBout="handleDirectorBout"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
</div>
|
|
13
16
|
</div>
|
|
17
|
+
|
|
18
|
+
<!-- loser bracket-->
|
|
19
|
+
<div class="min-w-full flex">
|
|
20
|
+
<div v-for="(bouts, roundName) in groupedBouts.loserBouts" :key="roundName">
|
|
21
|
+
<TableauColumn :bouts="bouts"
|
|
22
|
+
:hostingClubColors="hostingClubColors"
|
|
23
|
+
:roundName="roundName"
|
|
24
|
+
:bracketSize="bracketSize"
|
|
25
|
+
:largeCards="largeCards"
|
|
26
|
+
@action:editBout="handleEditBout"
|
|
27
|
+
@action:directingBout="handleDirectorBout"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
14
30
|
</div>
|
|
15
31
|
</section>
|
|
16
32
|
</template>
|
|
@@ -21,7 +37,7 @@ import TableauBoutCard from "../../Cards/TableauBoutCard/TableauBoutCard.vue";
|
|
|
21
37
|
|
|
22
38
|
export default {
|
|
23
39
|
name: 'Tableau',
|
|
24
|
-
components: {TableauBoutCard, TableauColumn
|
|
40
|
+
components: {TableauBoutCard, TableauColumn},
|
|
25
41
|
props: {
|
|
26
42
|
bouts: {
|
|
27
43
|
type: Array,
|
|
@@ -42,8 +58,23 @@ export default {
|
|
|
42
58
|
},
|
|
43
59
|
computed: {
|
|
44
60
|
groupedBouts() {
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
const grouped = this.groupBoutsByRound(this.bouts);
|
|
62
|
+
|
|
63
|
+
// Separate bouts into winnerBouts and loserBouts based on RoundLabel
|
|
64
|
+
const { winnerBouts, loserBouts } = Object.entries(grouped).reduce(
|
|
65
|
+
(acc, [roundName, bouts]) => {
|
|
66
|
+
if (roundName.includes('Consolation')) {
|
|
67
|
+
acc.loserBouts[roundName] = bouts;
|
|
68
|
+
} else {
|
|
69
|
+
acc.winnerBouts[roundName] = bouts;
|
|
70
|
+
}
|
|
71
|
+
return acc;
|
|
72
|
+
},
|
|
73
|
+
{ winnerBouts: {}, loserBouts: {} } // Initial empty objects for each category
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
return { winnerBouts, loserBouts };
|
|
77
|
+
}
|
|
47
78
|
},
|
|
48
79
|
methods: {
|
|
49
80
|
handleEditBout(bout) {
|
|
@@ -87,4 +118,4 @@ export default {
|
|
|
87
118
|
::-webkit-scrollbar-thumb:hover {
|
|
88
119
|
background: #c3cce0;
|
|
89
120
|
}
|
|
90
|
-
</style>
|
|
121
|
+
</style>
|
|
@@ -18,6 +18,8 @@ export const spacingConfig = {
|
|
|
18
18
|
Semifinal: { getTopSpace: 'mt-[2.5rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
|
|
19
19
|
Final: { getTopSpace: 'h-[6rem] mt-[22rem] -ml-[309px]', getBottomLine: 'h-[6rem] mt-[2.5rem] -ml-[309px]' },
|
|
20
20
|
'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' },
|
|
21
|
+
'Consolation Round 1': { getTopSpace: 'mt-[0rem]', getConnectorHeight: 'h-[2.7rem]', getTopSpaceForLine: 'mt-[1.2rem]' },
|
|
22
|
+
'Consolation Round 2': { getTopSpace: 'mt-[1.5rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
|
|
21
23
|
},
|
|
22
24
|
'small': {
|
|
23
25
|
'Table of 8': { getTopSpace: '-mt-[0.6rem]', getConnectorHeight: 'h-[1.5rem]', getTopSpaceForLine: 'mt-[0.6rem]' },
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Bracket from './Bracket.vue';
|
|
2
|
-
import getDEWithBouts from '../../../../mocks/getDEWithBouts.js';
|
|
2
|
+
//import getDEWithBouts from '../../../../mocks/getDEWithBouts.js';
|
|
3
3
|
import getDEWithBouts6Fencers from '../../../../mocks/getDeBouts-6fencers.js';
|
|
4
|
-
import getDEWithBouts15Fencers from '../../../../mocks/getDeBouts-15fencers.js';
|
|
4
|
+
//import getDEWithBouts15Fencers from '../../../../mocks/getDeBouts-15fencers.js';
|
|
5
5
|
import getDEWithBouts22Fencers from '../../../../mocks/getDeBouts-22fencers.js';
|
|
6
6
|
import getDEWithBouts67Fencers from '../../../../mocks/getDeBouts-67fencers.js';
|
|
7
7
|
import getDEWithBouts128Fencers from '../../../../mocks/getDeBouts-128fencers.js';
|
|
8
|
+
import getDEWithBouts from '../../../../mocks/getDEBouts-DoubleElim.js';
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
title: 'Templates/EventManagement/Bracket',
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
tags: ['PoolLive'],
|
|
9
9
|
args: {
|
|
10
10
|
bouts: getPoolsWithBoutsByPoolId.pools[0].Bouts,
|
|
11
|
-
|
|
11
|
+
event: getPoolsWithBoutsByPoolId.event,
|
|
12
12
|
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
13
13
|
connectedToServer: true,
|
|
14
14
|
editMode: true
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
bouts: {
|
|
18
18
|
control: Object
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
event: {
|
|
21
21
|
control: Object
|
|
22
22
|
},
|
|
23
23
|
hostingClubColors: {
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
export const Default = {
|
|
36
36
|
args: {
|
|
37
37
|
bouts: getPoolsWithBoutsByPoolId.pools[0].Bouts,
|
|
38
|
-
|
|
38
|
+
event: getPoolsWithBoutsByPoolId.event,
|
|
39
39
|
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
40
40
|
connectedToServer: true
|
|
41
41
|
}
|
|
@@ -49,20 +49,20 @@ const modifiedBouts = getPoolsWithBoutsByPoolId.pools[0].Bouts.map(bout => ({
|
|
|
49
49
|
export const allBoutsComplete = {
|
|
50
50
|
args: {
|
|
51
51
|
bouts: modifiedBouts,
|
|
52
|
-
|
|
52
|
+
event: getPoolsWithBoutsByPoolId.event,
|
|
53
53
|
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
54
54
|
connectedToServer: false,
|
|
55
55
|
editMode: false
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
export const eventWithPasses = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
59
|
+
// export const eventWithPasses = {
|
|
60
|
+
// args: {
|
|
61
|
+
// bouts: getPoolsWithBouts6ByPoolId139.pools[0].Bouts,
|
|
62
|
+
// eventRules: getPoolsWithBouts6ByPoolId139.eventRules,
|
|
63
|
+
// hostingClubColors: getPoolsWithBouts6ByPoolId139.hostingClubColors,
|
|
64
|
+
// connectedToServer: false,
|
|
65
|
+
// editMode: true
|
|
66
|
+
// }
|
|
67
|
+
// };
|
|
68
68
|
|
|
@@ -95,7 +95,7 @@ export default {
|
|
|
95
95
|
type: Array,
|
|
96
96
|
required: true
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
event: {
|
|
99
99
|
type: Object,
|
|
100
100
|
required: true
|
|
101
101
|
},
|
|
@@ -113,6 +113,9 @@ export default {
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
computed: {
|
|
116
|
+
eventRules() {
|
|
117
|
+
return this.event?.EventRules || {};
|
|
118
|
+
},
|
|
116
119
|
upcomingBouts() {
|
|
117
120
|
return this.bouts.filter(bout => bout.Status === 'Scheduled');
|
|
118
121
|
},
|