@dcrackel/hematournamentui 1.0.231 → 1.0.233
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 +31 -15
- package/dist/HemaTournamentUI-lib.umd.js +20 -20
- package/package.json +1 -1
- package/src/mocks/eventPersonGetInitialPoolAssignments2.js +569 -1030
- package/src/mocks/getDeBouts-15fencers.js +931 -0
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +2 -2
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +25 -2
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +11 -4
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +1 -1
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +13 -3
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +1 -1
- package/tailwind.config.js +9 -0
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<div class="w-full flex flex-row justify-between">
|
|
4
4
|
<section class="flex flex-row justify-start">
|
|
5
5
|
<div class="flex flex-col pl-4">
|
|
6
|
-
<BaseText :text="event.EventName" size="xl" color="
|
|
6
|
+
<BaseText :text="event.EventName" size="xl" color="quaternary" weight="bold" class="text-left" />
|
|
7
7
|
<BaseText :text="`${event.Date} ${event.StartTime}`" size="md" color="quinary" class="text-left" />
|
|
8
8
|
<p class="mt-4">
|
|
9
|
-
<BaseText :text="event.Status" size="md" color="
|
|
9
|
+
<BaseText :text="event.Status" size="md" color="quaternary" class="text-left" />
|
|
10
10
|
<BaseText :text="event.RuleSummary" size="sm" color="quinary" class="text-left" />
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
:scoreColor="getScoreColor(true)"
|
|
17
17
|
:large="large"
|
|
18
18
|
:highLight="highlight"
|
|
19
|
+
:faded="shouldFade(bout, true)"
|
|
19
20
|
@action:highLight="handleHighlight"
|
|
20
21
|
/>
|
|
21
22
|
</section>
|
|
22
23
|
<!-- Card break -->
|
|
23
24
|
<div :class="getCardSpace"></div>
|
|
24
25
|
<!-- Card break -->
|
|
25
|
-
<section>
|
|
26
|
+
<section @click="handleBoutClick(bout)">
|
|
26
27
|
<TableauFencerCard
|
|
27
28
|
:fencer="person2Display"
|
|
28
29
|
:score="score2"
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
:scoreColor="getScoreColor(false)"
|
|
32
33
|
:large="large"
|
|
33
34
|
:highLight="highlight"
|
|
35
|
+
:faded="shouldFade(bout, false)"
|
|
34
36
|
@action:highLight="handleHighlight"
|
|
35
37
|
/>
|
|
36
38
|
</section>
|
|
@@ -102,6 +104,8 @@ export default {
|
|
|
102
104
|
},
|
|
103
105
|
getScoreColor(isPerson1) {
|
|
104
106
|
if (isPerson1) {
|
|
107
|
+
if (this.bout.Person2.DisplayName === 'BYE' && !((this.bout.Person1.DisplayName === 'BYE') && (this.bout.Person2.DisplayName === 'BYE'))) return 'bg-winGreen'
|
|
108
|
+
|
|
105
109
|
if (this.bout.Score1 > this.bout.Score2) {
|
|
106
110
|
return 'bg-winGreen';
|
|
107
111
|
}
|
|
@@ -109,7 +113,11 @@ export default {
|
|
|
109
113
|
if (this.bout.Score1 < this.bout.Score2 && this.bout.Status === 'Active') {
|
|
110
114
|
return 'bg-lossRed';
|
|
111
115
|
}
|
|
112
|
-
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (!isPerson1) {
|
|
119
|
+
if (this.bout.Person1.DisplayName === 'BYE' && !((this.bout.Person1.DisplayName === 'BYE') && (this.bout.Person2.DisplayName === 'BYE'))) return 'bg-winGreen'
|
|
120
|
+
|
|
113
121
|
if (this.bout.Score1 < this.bout.Score2) {
|
|
114
122
|
return 'bg-winGreen';
|
|
115
123
|
}
|
|
@@ -124,6 +132,21 @@ export default {
|
|
|
124
132
|
if (this.bout.Person1.DisplayName.length < 1 || this.bout.Person2.DisplayName.length < 1) return;
|
|
125
133
|
if (this.bout.Person1.DisplayName === 'BYE' || this.bout.Person2.DisplayName === 'BYE') return;
|
|
126
134
|
this.highlight = value;
|
|
135
|
+
},
|
|
136
|
+
shouldFade(bout, person1){
|
|
137
|
+
if (this.bout.Person1.DisplayName === 'BYE' && this.bout.Person2.DisplayName === 'BYE') return false;
|
|
138
|
+
|
|
139
|
+
if (person1) {
|
|
140
|
+
if (bout.Person1.DisplayName === 'BYE') return true;
|
|
141
|
+
if (parseInt(bout.Score1) < parseInt(bout.Score2)) return true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!person1) {
|
|
145
|
+
if (bout.Person2.DisplayName === 'BYE') return true;
|
|
146
|
+
if (parseInt(bout.Score2) < parseInt(bout.Score1)) return true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return false
|
|
127
150
|
}
|
|
128
151
|
},
|
|
129
152
|
computed: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- TableauFencerCard.vue -->
|
|
2
2
|
<template>
|
|
3
|
-
<section class="bg-poolSetup flex
|
|
3
|
+
<section class="bg-poolSetup flex rounded-md border" @mouseover="handleHighLight(true)" @mouseout="handleHighLight(false)" :class="[width, highLighted, opacity]">
|
|
4
4
|
<!-- Left position -->
|
|
5
|
-
<div class="text-center px-1 w-5 flex items-center justify-center rounded-l-md z-50" :class="`bg-${color}`">
|
|
5
|
+
<div class="text-center px-1 w-5 flex items-center justify-center rounded-l-md z-50" :class="[`bg-${color}`]">
|
|
6
6
|
<BaseText :text="position" size="xs" color="neutral"/>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
<img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-9 h-9 rounded-r-md">
|
|
17
17
|
</div>
|
|
18
18
|
<div class="flex flex-col justify-center ml-2">
|
|
19
|
-
<BaseText :text="name" :size="large ? 'sm' : 'xs'" :weight="large ? 'bold' : 'normal'" color="quaternary" class="text-nowrap overflow-hidden"/>
|
|
20
|
-
<BaseText v-if="club.length > 1 && large" color="quinary" :text="club" size="xs"/>
|
|
19
|
+
<BaseText :text="name" :size="large ? 'sm' : 'xs'" :weight="large ? 'bold' : 'normal'" color="quaternary" class="truncate text-nowrap overflow-hidden"/>
|
|
20
|
+
<BaseText v-if="club.length > 1 && large" color="quinary" :text="club.substring(0,28)" size="xs" class="truncate text-nowrap overflow-hidden"/>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -63,6 +63,10 @@ export default {
|
|
|
63
63
|
highLight: {
|
|
64
64
|
type: Boolean,
|
|
65
65
|
default: false
|
|
66
|
+
},
|
|
67
|
+
faded: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
66
70
|
}
|
|
67
71
|
},
|
|
68
72
|
computed: {
|
|
@@ -84,6 +88,9 @@ export default {
|
|
|
84
88
|
},
|
|
85
89
|
highLighted() {
|
|
86
90
|
return this.highLight ? 'border-bright' : 'border-poolSetup';
|
|
91
|
+
},
|
|
92
|
+
opacity() {
|
|
93
|
+
return this.faded ? 'opacity-60 shadow-md' : 'shadow-xl';
|
|
87
94
|
}
|
|
88
95
|
},
|
|
89
96
|
methods: {
|
|
@@ -36,7 +36,7 @@ export const spacingConfig = {
|
|
|
36
36
|
'Table of 8': { getTopSpace: 'mt-[1.3rem]', getConnectorHeight: 'h-[7rem]', getTopSpaceForLine: 'mt-[3.25rem]' },
|
|
37
37
|
Quarterfinal: { getTopSpace: 'mt-[4.7rem]', getConnectorHeight: 'h-[14rem]', getTopSpaceForLine: 'mt-[7rem]' },
|
|
38
38
|
Semifinal: { getTopSpace: 'mt-[12.7rem]', getConnectorHeight: 'h-[28.3rem]', getTopSpaceForLine: '' },
|
|
39
|
-
Final: { getTopSpace: 'h-[
|
|
39
|
+
Final: { getTopSpace: 'h-[30rem] mt-[25rem] -ml-[309px]', getBottomLine: 'h-[30rem] mt-[2.5rem] -ml-[309px]' },
|
|
40
40
|
'Third Place': { getTopSpace: 'hidden', getConnectorHeight: 'hidden', getTopSpaceForLine: 'hidden' },
|
|
41
41
|
},
|
|
42
42
|
small: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Bracket from './Bracket.vue';
|
|
2
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
5
|
import getDEWithBouts22Fencers from '../../../../mocks/getDeBouts-22fencers.js';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
@@ -32,9 +33,9 @@ export default {
|
|
|
32
33
|
|
|
33
34
|
export const Default = {
|
|
34
35
|
args: {
|
|
35
|
-
bouts:
|
|
36
|
-
eventRules:
|
|
37
|
-
hostingClubColors:
|
|
36
|
+
bouts: getDEWithBouts15Fencers.pools[0].Bouts,
|
|
37
|
+
eventRules: getDEWithBouts15Fencers.eventRules,
|
|
38
|
+
hostingClubColors: getDEWithBouts15Fencers.hostingClubColors,
|
|
38
39
|
connectedToServer: true
|
|
39
40
|
}
|
|
40
41
|
};
|
|
@@ -48,3 +49,12 @@ export const TableOfEight = {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
|
|
52
|
+
export const TableWithTwentyTwo = {
|
|
53
|
+
args: {
|
|
54
|
+
bouts: getDEWithBouts22Fencers.pools[0].Bouts,
|
|
55
|
+
eventRules: getDEWithBouts22Fencers.eventRules,
|
|
56
|
+
hostingClubColors: getDEWithBouts22Fencers.hostingClubColors,
|
|
57
|
+
connectedToServer: true
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-secondary min-h-screen flex flex-col justify-between">
|
|
2
|
+
<div class="bg-secondary min-h-screen flex flex-col justify-between w-[150]">
|
|
3
3
|
<section class="h-28 border-b border-neutral">
|
|
4
4
|
<div class="flex flex-col justify-center h-28">
|
|
5
5
|
<div class="flex justify-center">
|
package/tailwind.config.js
CHANGED
|
@@ -39,6 +39,12 @@ module.exports = {
|
|
|
39
39
|
],
|
|
40
40
|
theme: {
|
|
41
41
|
extend: {
|
|
42
|
+
scrollbar: {
|
|
43
|
+
DEFAULT: {
|
|
44
|
+
thumb: 'bg-gray-800 rounded-full',
|
|
45
|
+
track: 'bg-gray-300',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
42
48
|
fontFamily: {
|
|
43
49
|
sans: ['Inter', 'system-ui', '-apple-system', 'BlinkMacSystemFont'],
|
|
44
50
|
'roboto-mono': ['Roboto Mono', 'monospace'],
|
|
@@ -94,6 +100,9 @@ module.exports = {
|
|
|
94
100
|
},
|
|
95
101
|
},
|
|
96
102
|
},
|
|
103
|
+
variants: {
|
|
104
|
+
scrollbar: ['rounded'],
|
|
105
|
+
},
|
|
97
106
|
plugins: [
|
|
98
107
|
function ({ addBase, theme }) {
|
|
99
108
|
addBase({
|