@dcrackel/hematournamentui 1.0.230 → 1.0.232

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.
@@ -9,8 +9,8 @@
9
9
  <img :src="missingPortrait" alt="Portrait" class="w-12 h-12 rounded-full" />
10
10
  </div>
11
11
  <div>
12
- <BaseText text="Waiting to be selected" size="md" color="primary" weight="bold" />
13
- <BaseText text="starting soon" size="xs" color="quaternary" />
12
+ <BaseText text="Waiting to be selected" size="md" color="quaternary" weight="bold" />
13
+ <BaseText text="starting soon" size="xs" color="quinary" />
14
14
  </div>
15
15
  </div>
16
16
  <BaseText text="" size="3xl" weight="bold" :class="`align-middle pr-3 pt-0.5`"/>
@@ -23,8 +23,8 @@
23
23
  <div class="flex justify-between shadow-lg drop-shadow p-2 rounded-xl bg-poolBox w-5/12">
24
24
  <div class="flex justify-end space-x-4 ml-4 w-full">
25
25
  <div>
26
- <BaseText text="Waiting to be selected" size="md" color="primary" weight="bold" class="text-right" />
27
- <BaseText text="starting soon" size="xs" color="quaternary" class="text-right" />
26
+ <BaseText text="Waiting to be selected" size="md" color="quaternary" weight="bold" class="text-right" />
27
+ <BaseText text="starting soon" size="xs" color="quinary" class="text-right" />
28
28
  </div>
29
29
  <div>
30
30
  <div :class="`w-4 h-4 rounded-full bg-${hostingClubColors.Color2} absolute top-10 right-12`"></div>
@@ -49,8 +49,8 @@
49
49
  <img :src="fencer1.portrait" alt="Portrait" class="w-12 h-12 rounded-full" />
50
50
  </div>
51
51
  <div>
52
- <BaseText :text="fencer1.name" size="md" color="primary" weight="bold" />
53
- <BaseText :text="fencer1.team" size="xs" color="quaternary" />
52
+ <BaseText :text="fencer1.name" size="md" color="quaternary" weight="bold" />
53
+ <BaseText :text="fencer1.team" size="xs" color="quinary" />
54
54
  </div>
55
55
  </div>
56
56
  <BaseText :text="fencer1Score" size="3xl" weight="bold" :class="`align-middle pr-3 pt-0.5`"/>
@@ -58,7 +58,7 @@
58
58
 
59
59
  <!-- Timer -->
60
60
  <div v-if="bout.Status === 'Active'" class="text-center mx-8 ">
61
- <p class="text-xl font-bold">{{ displayTime }}</p>
61
+ <BaseText :text="displayTime" size="lg" color="quinary" weight="bold" />
62
62
  </div>
63
63
 
64
64
  <!-- Fencer 2 -->
@@ -66,8 +66,8 @@
66
66
  <div class="flex space-x-4 justify-between w-full">
67
67
  <BaseText :text="fencer2Score" size="3xl" weight="bold" :class="`align-middle pl-3 pt-0.5`"/>
68
68
  <div class="w-full">
69
- <BaseText :text="fencer2.name" size="md" color="primary" weight="bold" class="text-right" />
70
- <BaseText :text="fencer2.team" size="xs" color="quaternary" class="text-right" />
69
+ <BaseText :text="fencer2.name" size="md" color="quaternary" weight="bold" class="text-right" />
70
+ <BaseText :text="fencer2.team" size="xs" color="quinary" class="text-right" />
71
71
  </div>
72
72
  <div class="w-20">
73
73
  <div :class="`w-4 h-4 rounded-full bg-${hostingClubColors.Color2} absolute top-10 right-12`"></div>
@@ -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="primary" weight="bold" class="text-left" />
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="primary" class="text-left" />
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>
@@ -13,17 +13,17 @@
13
13
  </div>
14
14
  <div class="flex flex-col w-4/12 justify-star">
15
15
  <span class="w-full flex justify-start">
16
- <BaseText :text="fullName" size="xl" color="primary" weight="bold"/>
16
+ <BaseText :text="fullName" size="xl" color="quaternary" weight="bold"/>
17
17
  </span>
18
18
  <span class="w-full flex justify-start">
19
- <BaseText :text="person.Person.Club.Name" size="sm" color="primary" weight="normal"/>
19
+ <BaseText :text="person.Person.Club.Name" size="sm" color="quinary" weight="normal"/>
20
20
  </span>
21
21
  </div>
22
22
  <div class="grid grid-cols-2 gap-x-4 mr-10">
23
- <BaseText text="M2Rating" size="sm" color="primary" weight="normal" />
24
- <BaseText :text="M2Rating" size="sm" color="primary" weight="bold"/>
25
- <BaseText text="HemaRating" size="sm" color="primary" weight="normal" />
26
- <BaseText :text="HEMARating" size="sm" color="primary" weight="bold"/>
23
+ <BaseText text="M2Rating" size="sm" color="quaternary" weight="normal" />
24
+ <BaseText :text="M2Rating" size="sm" color="quinary" weight="bold"/>
25
+ <BaseText text="HemaRating" size="sm" color="quaternary" weight="normal" />
26
+ <BaseText :text="HEMARating" size="sm" color="quinary" weight="bold"/>
27
27
  </div>
28
28
  <div class="mr-4 ml-auto">
29
29
  <ButtonBar
@@ -13,10 +13,10 @@
13
13
  </div>
14
14
  <div class="flex flex-col w-5/12 justify-star">
15
15
  <span class="w-full flex justify-start">
16
- <BaseText :text="fullName" size="md" color="primary" weight="bold"/>
16
+ <BaseText :text="fullName" size="md" color="quaternary" weight="bold"/>
17
17
  </span>
18
18
  <span class="w-full flex justify-start">
19
- <BaseText :text="person.Club" size="xs" color="secondary" weight="normal"/>
19
+ <BaseText :text="person.Club" size="xs" color="quinary" weight="normal"/>
20
20
  </span>
21
21
  </div>
22
22
  <div class="flex flex-col w-5/12">
@@ -19,12 +19,12 @@
19
19
  </div>
20
20
  <div class="flex-1 ml-4">
21
21
  <p class="flex">
22
- <BaseText :text="name" size="md" />
22
+ <BaseText :text="name" size="md" weight="bold" color="quaternary" />
23
23
  <BaseText v-if="seed !== poolPosition" :text="`${seed}`" size="xs" class="ml-1" color="bright" />
24
24
  </p>
25
- <BaseText :text="club" size="xs" />
25
+ <BaseText :text="club" size="xs" color="quinary" />
26
26
  </div>
27
- <BaseIcon v-if="mode === 'preparation' || mode === 'planning'" icon-name="fa-grip-dots-vertical" size="2xl" />
27
+ <BaseIcon v-if="mode === 'preparation' || mode === 'planning'" icon-name="fa-grip-dots-vertical" size="2xl" color="quaternary" />
28
28
  </div>
29
29
  </template>
30
30
 
@@ -8,10 +8,10 @@
8
8
  </div>
9
9
  <div class="flex flex-col w-4/12 justify-star">
10
10
  <span class="w-full flex justify-start">
11
- <BaseText :text="fullName" size="md" color="primary" weight="bold"/>
11
+ <BaseText :text="fullName" size="md" color="quaternary" weight="bold"/>
12
12
  </span>
13
13
  <span class="w-full flex justify-start">
14
- <BaseText :text="staff.Person.Club.Name" size="xs" color="primary" weight="normal"/>
14
+ <BaseText :text="staff.Person.Club.Name" size="xs" color="quinary" weight="normal"/>
15
15
  </span>
16
16
  </div>
17
17
 
@@ -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
- } else {
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 shadow-lg rounded-md border" @mouseover="handleHighLight(true)" @mouseout="handleHighLight(false)" :class="[width, highLighted]">
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'" class="text-nowrap overflow-hidden"/>
20
- <BaseText v-if="club.length > 1 && large" :text="club" size="xs"/>
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.substring(0,36)" size="xs" class="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: {
@@ -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: getDEWithBouts22Fencers.pools[0].Bouts,
36
- eventRules: getDEWithBouts22Fencers.eventRules,
37
- hostingClubColors: getDEWithBouts22Fencers.hostingClubColors,
36
+ bouts: getDEWithBouts15Fencers.pools[0].Bouts,
37
+ eventRules: getDEWithBouts15Fencers.eventRules,
38
+ hostingClubColors: getDEWithBouts15Fencers.hostingClubColors,
38
39
  connectedToServer: true
39
40
  }
40
41
  };