@dcrackel/hematournamentui 1.0.124 → 1.0.126
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 +8331 -8210
- package/dist/HemaTournamentUI-lib.umd.js +28 -28
- package/package.json +1 -1
- package/src/mocks/getDEWithBouts.js +852 -0
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +6 -2
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.stories.js +42 -0
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.vue +32 -0
- package/src/stories/Molecules/Inputs/Toggle/Toggle.stories.js +42 -0
- package/src/stories/Molecules/Inputs/Toggle/Toggle.vue +56 -0
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResults.stories.js +17 -7
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue +6 -3
- package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +27 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +98 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +162 -0
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +93 -0
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +95 -0
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.stories.js +10 -0
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +3 -3
- package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +34 -0
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +68 -0
- package/src/stories/Organisms/Containers/TableauColumn/TabeauColumn.stories.js +37 -0
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +68 -0
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +29 -0
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +23 -0
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +80 -0
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.stories.js +6 -11
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +7 -3
- package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.vue +28 -5
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +39 -0
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +211 -0
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +4 -7
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +9 -0
- package/tailwind.config.js +23 -2
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section>
|
|
3
|
+
<EditEventsTopMenu :currentTab="'Bracket'" :tabs="tabs" @tabMenuClick="handleTabMenuClick"/>
|
|
4
|
+
<ToggleHeader :currentSelection="viewName"
|
|
5
|
+
firstButtonLabel="List View"
|
|
6
|
+
secondButtonLabel="Tableau"
|
|
7
|
+
:showToggle="true"
|
|
8
|
+
:largeCards="largeCards"
|
|
9
|
+
:connectedToServer="connectedToServer"
|
|
10
|
+
@update:selection="handleViewChange"
|
|
11
|
+
@update:cardSize="handleCardSizeToggle"/>
|
|
12
|
+
|
|
13
|
+
<Tableau :bouts="sortedBouts"
|
|
14
|
+
:hostingClubColors="hostingClubColors"
|
|
15
|
+
:bracketSize="bracketSize"
|
|
16
|
+
:largeCards="largeCards"
|
|
17
|
+
@action:editBout="editBout"
|
|
18
|
+
@action:directingBout="directBout" />
|
|
19
|
+
|
|
20
|
+
<DirectorModal :bout="selectedBout"
|
|
21
|
+
:eventRules="eventRules"
|
|
22
|
+
:hostingClubColors="hostingClubColors"
|
|
23
|
+
:show="showDirectorModal" ringName="RingName"
|
|
24
|
+
@update:closeModal="handleCloseModal"
|
|
25
|
+
@update:bout="handleUpdateBout"
|
|
26
|
+
@submit:bout="handleSubmitBout"/>
|
|
27
|
+
|
|
28
|
+
<EditBoutModal :bout="selectedBout" :eventRules="eventRules" :hostingClubColors="hostingClubColors"
|
|
29
|
+
:show="showEditBoutModal"
|
|
30
|
+
@update:closeModal="handleCloseModal"
|
|
31
|
+
@submit:bout="handleSubmitBout"/>
|
|
32
|
+
|
|
33
|
+
</section>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import EditEventsTopMenu from "../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue";
|
|
38
|
+
import ToggleHeader from "../../../Organisms/Headers/ToggleHeader/ToggleHeader.vue";
|
|
39
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
40
|
+
import BoutCard from "../../../Organisms/Cards/BoutCard/BoutCard.vue";
|
|
41
|
+
import DirectorModal from "../../../Molecules/Modals/DirectorModal/DirectorModal.vue";
|
|
42
|
+
import EditBoutModal from "../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue";
|
|
43
|
+
import Tableau from "../../../Organisms/Containers/Tableau/Tableau.vue";
|
|
44
|
+
import TableauColumn from "../../../Organisms/Containers/TableauColumn/TableauColumn.vue";
|
|
45
|
+
import ServerConnected from "../../../Molecules/Indicators/ServerConnected/ServerConnected.vue";
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
components: {
|
|
49
|
+
ServerConnected,
|
|
50
|
+
TableauColumn,
|
|
51
|
+
Tableau,
|
|
52
|
+
EditBoutModal,
|
|
53
|
+
DirectorModal,
|
|
54
|
+
BoutCard,
|
|
55
|
+
BaseText,
|
|
56
|
+
ToggleHeader,
|
|
57
|
+
EditEventsTopMenu
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
bouts: {
|
|
61
|
+
type: Array,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
eventRules: {
|
|
65
|
+
type: Object,
|
|
66
|
+
required: true
|
|
67
|
+
},
|
|
68
|
+
hostingClubColors: {
|
|
69
|
+
type: Object,
|
|
70
|
+
required: true
|
|
71
|
+
},
|
|
72
|
+
connectedToServer: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
required: true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
// upcomingBouts() {
|
|
79
|
+
// return this.bouts.filter(bout =>
|
|
80
|
+
// bout.Status === 'Scheduled' &&
|
|
81
|
+
// bout.Person1Id !== 0 &&
|
|
82
|
+
// bout.Person2Id !== 0
|
|
83
|
+
// ).map(bout => this.updateBoutStatus(bout));
|
|
84
|
+
// },
|
|
85
|
+
// completedBouts() {
|
|
86
|
+
// return this.bouts.filter(bout => bout.Status === 'Completed');
|
|
87
|
+
// },
|
|
88
|
+
bracketSize() {
|
|
89
|
+
return this.bouts[0].RoundLabel
|
|
90
|
+
},
|
|
91
|
+
activeBouts() {
|
|
92
|
+
return this.bouts.filter(bout => bout.Status === 'Active');
|
|
93
|
+
},
|
|
94
|
+
sortedBouts() {
|
|
95
|
+
return this.bouts.sort((a, b) => {
|
|
96
|
+
if (a.DEBoutId < b.DEBoutId) {
|
|
97
|
+
return -1;
|
|
98
|
+
}
|
|
99
|
+
if (a.DEBoutId > b.DEBoutId) {
|
|
100
|
+
return 1;
|
|
101
|
+
}
|
|
102
|
+
return 0;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
data() {
|
|
107
|
+
return {
|
|
108
|
+
showDirectorModal: false,
|
|
109
|
+
showEditBoutModal: false,
|
|
110
|
+
selectedBout: {},
|
|
111
|
+
tabs: [
|
|
112
|
+
{id: 'Staff', label: 'Staff', color: 'primaryHighlight'},
|
|
113
|
+
{id: 'Checkin', label: 'Seeding & Checkin', color: 'primaryHighlight'},
|
|
114
|
+
{id: 'Pools', label: 'Pools', color: 'primaryHighlight'},
|
|
115
|
+
{id: 'Pool Results', label: 'Pool Results', color: 'primaryHighlight'},
|
|
116
|
+
{id: 'Bracket', label: 'Bracket', color: 'primaryHighlight'},
|
|
117
|
+
{id: 'Final', label: 'Final Results', color: 'primaryHighlight'}
|
|
118
|
+
],
|
|
119
|
+
viewName: "Tableau",
|
|
120
|
+
largeCards: true
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
watch: {
|
|
124
|
+
bouts: {
|
|
125
|
+
handler() { //newBouts
|
|
126
|
+
this.$forceUpdate();
|
|
127
|
+
},
|
|
128
|
+
deep: true,
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
methods: {
|
|
132
|
+
updateBoutStatus(bout) {
|
|
133
|
+
return {
|
|
134
|
+
...bout,
|
|
135
|
+
customStatus: bout.Status
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
handleCloseModal(bout) {
|
|
139
|
+
this.showDirectorModal = false;
|
|
140
|
+
this.showEditBoutModal = false;
|
|
141
|
+
|
|
142
|
+
if (bout.Status !== 'Completed') {
|
|
143
|
+
const updatedBout = this.bouts.find(b => b.BoutId === bout.BoutId);
|
|
144
|
+
if (updatedBout) {
|
|
145
|
+
updatedBout.Status = 'Scheduled';
|
|
146
|
+
updatedBout.Score1 = 0;
|
|
147
|
+
updatedBout.Score2 = 0;
|
|
148
|
+
}
|
|
149
|
+
this.$emit('update:bout', updatedBout);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
handleTabMenuClick(value) {
|
|
153
|
+
this.$emit('tab:menu-click', value);
|
|
154
|
+
},
|
|
155
|
+
handleViewChange() {
|
|
156
|
+
console.log('handleViewChange')
|
|
157
|
+
},
|
|
158
|
+
handleUpdateBout(bout) {
|
|
159
|
+
if (!this.activeBouts || this.activeBouts.length === 0) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const updatedBout = this.activeBouts.find(b => b.BoutId === bout.BoutId);
|
|
164
|
+
|
|
165
|
+
if (!updatedBout) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
Object.assign(updatedBout, bout);
|
|
170
|
+
updatedBout.Status = 'Active';
|
|
171
|
+
this.$emit('update:bout', updatedBout);
|
|
172
|
+
},
|
|
173
|
+
handleSubmitBout(bout) {
|
|
174
|
+
this.showEditBoutModal = false;
|
|
175
|
+
this.showDirectorModal = false;
|
|
176
|
+
const updatedBout = this.bouts.find(b => b.BoutId === bout.BoutId);
|
|
177
|
+
|
|
178
|
+
Object.assign(updatedBout, bout);
|
|
179
|
+
updatedBout.Status = 'Completed';
|
|
180
|
+
updatedBout.Ended = new Date().toISOString();
|
|
181
|
+
|
|
182
|
+
this.$emit('submit:bout', updatedBout);
|
|
183
|
+
},
|
|
184
|
+
directBout(bout) {
|
|
185
|
+
console.log('Bracket: updatedBout', bout)
|
|
186
|
+
console.log('Bracket: updatedBout', bout.Person1.PersonId)
|
|
187
|
+
//can not edit a BYE round or future round
|
|
188
|
+
if (bout.Person1.PersonId === 0 || bout.Person2.PersonId === 0) {
|
|
189
|
+
console.log('BYE BYE BYE BYE BYE')
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
bout.Status = 'Active';
|
|
194
|
+
this.showDirectorModal = true;
|
|
195
|
+
this.selectedBout = bout;
|
|
196
|
+
this.$emit('update:directing-bout', bout)
|
|
197
|
+
},
|
|
198
|
+
editBout(bout) {
|
|
199
|
+
console.log('Bracket: editBout', bout)
|
|
200
|
+
const updatedBout = this.bouts.find(b => b.BoutId === bout.BoutId);
|
|
201
|
+
if (updatedBout) {
|
|
202
|
+
this.showEditBoutModal = true;
|
|
203
|
+
this.selectedBout = bout;
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
handleCardSizeToggle(value){
|
|
207
|
+
this.largeCards = value
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
</script>
|
|
@@ -2,16 +2,11 @@
|
|
|
2
2
|
<section>
|
|
3
3
|
<EditEventsTopMenu :currentTab="'Pools'" :tabs="tabs" @tabMenuClick="handleTabMenuClick"/>
|
|
4
4
|
<ToggleHeader :currentSelection="viewName" firstButtonLabel="List View" secondButtonLabel="Pool Grid"
|
|
5
|
-
@update:selection="handleViewChange"/>
|
|
5
|
+
@update:selection="handleViewChange" :connectedToServer="connectedToServer"/>
|
|
6
6
|
|
|
7
7
|
<!-- active bout -->
|
|
8
8
|
<section v-if="remainingBoutsCount > 0">
|
|
9
|
-
<
|
|
10
|
-
<div class="w-5 h-5 rounded-full border-2 mt-5 mr-2">
|
|
11
|
-
<div :class="connectedToServer ? 'bg-green' : 'bg-red'" class="w-3 h-3 rounded-full mt-0.5 ml-0.5"></div>
|
|
12
|
-
</div>
|
|
13
|
-
<BaseText class="mt-5" color="primaryHighlight" size="md" text="Connected" weight="bold"/>
|
|
14
|
-
</div>
|
|
9
|
+
<ServerConnected :connectedToServer="connectedToServer" />
|
|
15
10
|
<div class="border-b border-dropdownSelect mb-8"></div>
|
|
16
11
|
|
|
17
12
|
<div class="w-full flex flex-col items-center">
|
|
@@ -76,9 +71,11 @@ import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
|
76
71
|
import BoutCard from "../../../Organisms/Cards/BoutCard/BoutCard.vue";
|
|
77
72
|
import DirectorModal from "../../../Molecules/Modals/DirectorModal/DirectorModal.vue";
|
|
78
73
|
import EditBoutModal from "../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue";
|
|
74
|
+
import ServerConnected from "../../../Molecules/Indicators/ServerConnected/ServerConnected.vue";
|
|
79
75
|
|
|
80
76
|
export default {
|
|
81
77
|
components: {
|
|
78
|
+
ServerConnected,
|
|
82
79
|
EditBoutModal,
|
|
83
80
|
DirectorModal,
|
|
84
81
|
BoutCard,
|
|
@@ -29,6 +29,15 @@ export const Default = {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "de"}
|
|
33
|
+
export const EventIsInDE = {
|
|
34
|
+
args: {
|
|
35
|
+
event: modifiedEvent,
|
|
36
|
+
poolResults: getPoolResults.report,
|
|
37
|
+
numPromoted: '100%'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
32
41
|
|
|
33
42
|
modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "planning"}
|
|
34
43
|
export const EventIsInPlanning = {
|
package/tailwind.config.js
CHANGED
|
@@ -92,7 +92,7 @@ module.exports = {
|
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
plugins: [
|
|
95
|
-
function ({addBase, theme}) {
|
|
95
|
+
function ({ addBase, theme }) {
|
|
96
96
|
addBase({
|
|
97
97
|
h1: {
|
|
98
98
|
fontSize: theme('fontSize.3xl'),
|
|
@@ -108,5 +108,26 @@ module.exports = {
|
|
|
108
108
|
},
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
|
+
function ({ addUtilities }) {
|
|
112
|
+
const newUtilities = {
|
|
113
|
+
'.scrollbar-thin': {
|
|
114
|
+
'&::-webkit-scrollbar': {
|
|
115
|
+
width: '8px',
|
|
116
|
+
height: '8px',
|
|
117
|
+
},
|
|
118
|
+
'&::-webkit-scrollbar-track': {
|
|
119
|
+
background: '#f1f1f1',
|
|
120
|
+
},
|
|
121
|
+
'&::-webkit-scrollbar-thumb': {
|
|
122
|
+
background: '#888',
|
|
123
|
+
borderRadius: '9999px',
|
|
124
|
+
},
|
|
125
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
126
|
+
background: '#555',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
addUtilities(newUtilities, ['responsive', 'hover'])
|
|
131
|
+
}
|
|
111
132
|
],
|
|
112
|
-
};
|
|
133
|
+
};
|