@dcrackel/hematournamentui 1.0.113 → 1.0.114
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 +579 -552
- package/dist/HemaTournamentUI-lib.umd.js +2 -2
- package/package.json +1 -1
- package/src/mocks/eventPersonGetInitialPoolAssignments2.js +4 -2
- package/src/mocks/eventPersonGetPoolAssignmentEvent.js +1 -1
- package/src/stories/Organisms/Containers/Pool/Pool.vue +5 -1
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +20 -2
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +50 -35
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +1 -0
package/package.json
CHANGED
|
@@ -217,7 +217,8 @@ const eventPersonGetInitialPoolAssignments2 =
|
|
|
217
217
|
}
|
|
218
218
|
],
|
|
219
219
|
"poolStrength": 10,
|
|
220
|
-
"poolStrengthInd": 0
|
|
220
|
+
"poolStrengthInd": 0,
|
|
221
|
+
"BoutsLeft": 10
|
|
221
222
|
},
|
|
222
223
|
{
|
|
223
224
|
"PoolId": 138,
|
|
@@ -409,7 +410,8 @@ const eventPersonGetInitialPoolAssignments2 =
|
|
|
409
410
|
|
|
410
411
|
],
|
|
411
412
|
"poolStrength": 10,
|
|
412
|
-
"poolStrengthInd": 0
|
|
413
|
+
"poolStrengthInd": 0,
|
|
414
|
+
"BoutsLeft": 5
|
|
413
415
|
},
|
|
414
416
|
]
|
|
415
417
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
<div v-if="mode === 'live'" class="bg-eventBoxBlue w-40 h-9 rounded-lg my-1 pt-1.5 flex flex-row justify-between border border-dropdownSelect">
|
|
13
13
|
<BaseText text="BOUTS LEFT" size="sm" color="quinary" weight="bold" class="w-2/3 text-right"/>
|
|
14
|
-
<BaseText text="
|
|
14
|
+
<BaseText :text="boutsLeft" size="sm" color="primaryHighlight" weight="bold" class="w-1/3 text-left pl-2"/>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
@@ -73,6 +73,10 @@ export default {
|
|
|
73
73
|
type: [String, Number],
|
|
74
74
|
required: true
|
|
75
75
|
},
|
|
76
|
+
boutsLeft: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: 0
|
|
79
|
+
},
|
|
76
80
|
pool: {
|
|
77
81
|
type: Array,
|
|
78
82
|
required: true
|
|
@@ -8,7 +8,8 @@ export default {
|
|
|
8
8
|
args: {
|
|
9
9
|
bouts: getPoolsWithBoutsByPoolId.pools[0].Bouts,
|
|
10
10
|
eventRules: getPoolsWithBoutsByPoolId.eventRules,
|
|
11
|
-
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors
|
|
11
|
+
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
12
|
+
connectedToServer: true
|
|
12
13
|
},
|
|
13
14
|
argTypes: {
|
|
14
15
|
bouts: {
|
|
@@ -19,6 +20,9 @@ export default {
|
|
|
19
20
|
},
|
|
20
21
|
hostingClubColors: {
|
|
21
22
|
control: Object
|
|
23
|
+
},
|
|
24
|
+
connectedToServer: {
|
|
25
|
+
control: Boolean
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
};
|
|
@@ -27,6 +31,20 @@ export const Default = {
|
|
|
27
31
|
args: {
|
|
28
32
|
bouts: getPoolsWithBoutsByPoolId.pools[0].Bouts,
|
|
29
33
|
eventRules: getPoolsWithBoutsByPoolId.eventRules,
|
|
30
|
-
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors
|
|
34
|
+
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
35
|
+
connectedToServer: true
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const modifiedBouts = getPoolsWithBoutsByPoolId.pools[0].Bouts.map(bout => ({
|
|
40
|
+
...bout,
|
|
41
|
+
Status: 'Completed'
|
|
42
|
+
}));
|
|
43
|
+
export const allBoutsComplete = {
|
|
44
|
+
args: {
|
|
45
|
+
bouts: modifiedBouts,
|
|
46
|
+
eventRules: getPoolsWithBoutsByPoolId.eventRules,
|
|
47
|
+
hostingClubColors: getPoolsWithBoutsByPoolId.hostingClubColors,
|
|
48
|
+
connectedToServer: false
|
|
31
49
|
}
|
|
32
50
|
};
|
|
@@ -1,60 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section>
|
|
3
3
|
<EditEventsTopMenu :currentTab="'Pools'" :tabs="tabs" @tabMenuClick="handleTabMenuClick"/>
|
|
4
|
-
<ToggleHeader :currentSelection="viewName"
|
|
5
|
-
|
|
4
|
+
<ToggleHeader :currentSelection="viewName" firstButtonLabel="List View" secondButtonLabel="Pool Grid"
|
|
5
|
+
@update:selection="handleViewChange"/>
|
|
6
6
|
|
|
7
7
|
<!-- active bout -->
|
|
8
|
-
<section
|
|
9
|
-
<div class="
|
|
10
|
-
<div class="w-
|
|
8
|
+
<section v-if="remainingBoutsCount > 0">
|
|
9
|
+
<div class="flex flex-row">
|
|
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"/>
|
|
11
14
|
</div>
|
|
12
|
-
<
|
|
13
|
-
</section>
|
|
14
|
-
<div class="border-b border-dropdownSelect mb-8"></div>
|
|
15
|
+
<div class="border-b border-dropdownSelect mb-8"></div>
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
<div class="w-full flex flex-col items-center">
|
|
18
|
+
<div v-if="!hasActiveBout" class="w-3/4 my-4">
|
|
19
|
+
<BoutCard :bout="{}" :hostingClubColors="hostingClubColors" :isWaiting="true"/>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-for="bout in activeBouts" :key="bout.BoutId" class="w-3/4 my-4">
|
|
22
|
+
<BoutCard :bout="bout" :hostingClubColors="hostingClubColors"/>
|
|
23
|
+
</div>
|
|
22
24
|
</div>
|
|
23
25
|
</section>
|
|
24
26
|
|
|
25
27
|
<!-- Upcoming -->
|
|
26
|
-
<section
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
28
|
+
<section v-if="remainingBoutsCount > 0">
|
|
29
|
+
<div class="flex flex-row justify-between">
|
|
30
|
+
<BaseText class="mt-5" color="primaryHighlight" size="md" text="Upcoming" weight="bold"/>
|
|
31
|
+
<div class="flex mr-1">
|
|
32
|
+
<BaseText class="mt-5 ml-5" color="primaryHighlight" size="md" text="Remaining bouts:"/>
|
|
33
|
+
<BaseText :text="remainingBoutsCount" class="mt-5 ml-2" color="primaryHighlight" size="md" weight="bold"/>
|
|
34
|
+
</div>
|
|
31
35
|
</div>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
<div class="border-b border-dropdownSelect mb-5"></div>
|
|
37
|
+
<div class="w-full flex flex-col items-center">
|
|
38
|
+
<div v-for="bout in markedUpcomingBouts" :key="bout.BoutId" class="w-3/4 my-4">
|
|
39
|
+
<BoutCard :bout="bout" :hostingClubColors="hostingClubColors" @action:startBout="directBout"/>
|
|
40
|
+
</div>
|
|
37
41
|
</div>
|
|
38
42
|
</section>
|
|
39
43
|
|
|
40
44
|
<!-- Completed -->
|
|
41
|
-
<section
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div
|
|
47
|
-
|
|
45
|
+
<section v-if="hasCompletedBout > 0">
|
|
46
|
+
<div class="flex flex-row">
|
|
47
|
+
<BaseText v-if="remainingBoutsCount === 0" class="mt-8" color="primaryHighlight" size="md" text="All Bouts Are Complete" weight="bold" />
|
|
48
|
+
<BaseText v-if="remainingBoutsCount > 0" class="mt-5" color="primaryHighlight" size="md" text="Completed" weight="bold"/>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="border-b border-dropdownSelect mb-5"></div>
|
|
51
|
+
<div class="w-full flex flex-col items-center">
|
|
52
|
+
<div v-for="bout in completedBouts" :key="bout.BoutId" class="w-3/4 my-4">
|
|
53
|
+
<BoutCard :bout="bout" :hostingClubColors="hostingClubColors" @action:editBout="editBout"/>
|
|
54
|
+
</div>
|
|
48
55
|
</div>
|
|
49
56
|
</section>
|
|
50
57
|
|
|
51
|
-
<DirectorModal
|
|
52
|
-
:
|
|
58
|
+
<DirectorModal :bout="selectedBout" :eventRules="eventRules" :hostingClubColors="hostingClubColors"
|
|
59
|
+
:show="showDirectorModal" ringName="RingName"
|
|
53
60
|
@update:closeModal="handleCloseModal"
|
|
54
61
|
@update:bout="handleUpdateBout"
|
|
55
62
|
@submit:bout="handleSubmitBout"/>
|
|
56
63
|
|
|
57
|
-
<EditBoutModal :
|
|
64
|
+
<EditBoutModal :bout="selectedBout" :eventRules="eventRules" :hostingClubColors="hostingClubColors"
|
|
65
|
+
:show="showEditBoutModal"
|
|
58
66
|
@update:closeModal="handleCloseModal"
|
|
59
67
|
@submit:bout="handleSubmitBout"/>
|
|
60
68
|
|
|
@@ -90,6 +98,10 @@ export default {
|
|
|
90
98
|
hostingClubColors: {
|
|
91
99
|
type: Object,
|
|
92
100
|
required: true
|
|
101
|
+
},
|
|
102
|
+
connectedToServer: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
required: true
|
|
93
105
|
}
|
|
94
106
|
},
|
|
95
107
|
computed: {
|
|
@@ -105,6 +117,9 @@ export default {
|
|
|
105
117
|
hasActiveBout() {
|
|
106
118
|
return this.activeBouts.length > 0;
|
|
107
119
|
},
|
|
120
|
+
hasCompletedBout() {
|
|
121
|
+
return this.completedBouts.length > 0;
|
|
122
|
+
},
|
|
108
123
|
remainingBoutsCount() {
|
|
109
124
|
return this.upcomingBouts.length;
|
|
110
125
|
},
|
|
@@ -139,7 +154,7 @@ export default {
|
|
|
139
154
|
},
|
|
140
155
|
watch: {
|
|
141
156
|
bouts: {
|
|
142
|
-
handler(
|
|
157
|
+
handler() { //newBouts
|
|
143
158
|
this.$forceUpdate();
|
|
144
159
|
},
|
|
145
160
|
deep: true,
|