@dcrackel/hematournamentui 1.0.207 → 1.0.210

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/hematournamentui",
3
3
  "private": false,
4
- "version": "1.0.207",
4
+ "version": "1.0.210",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTournamentUI-lib.umd.js",
7
7
  "module": "dist/HemaTournamentUI-lib.es.js",
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-white hover:border-bright">
3
3
  <div class="mr-4 border-r border-dropdownSelect h-20 w-8 items-center text-center">
4
- <BaseText :text="person.Seed" size="lg" color="quaternary" weight="bold" class="pt-6" />
4
+ <BaseIcon icon-name="fa-caret-up" size="xl" :color="person.Seed === 1 ? 'neutral' : 'quinary'" :hover="person.Seed === 1 ? 'neutral' : 'bright'" class="m-0" @click="handelMoveUp" />
5
+ <BaseText :text="person.Seed" size="lg" color="quaternary" weight="bold" class="-mt-0.5 -mb-0.5" />
6
+ <BaseIcon icon-name="fa-caret-down" size="xl" :color="isLast ? 'neutral' : 'quinary'" :hover="isLast ? 'neutral' : 'bright'" @click="handelMoveDown" />
5
7
  </div>
6
8
  <div class="mr-4">
7
9
  <div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
@@ -49,6 +51,11 @@ export default {
49
51
  person: {
50
52
  type: Object,
51
53
  required: true
54
+ },
55
+ isLast: {
56
+ type: Boolean,
57
+ required: false,
58
+ default: false
52
59
  }
53
60
  },
54
61
  computed: {
@@ -95,7 +102,13 @@ export default {
95
102
  handlerRemoveFencer(){
96
103
  this.showSpinner = true;
97
104
  this.$emit('remove:fencer', this.person);
98
- }
105
+ },
106
+ handelMoveUp(){
107
+ if (this.person.Seed > 1) this.$emit('update:moveUp', this.person);
108
+ },
109
+ handelMoveDown(){
110
+ if(!this.isLast) this.$emit('update:moveDown', this.person);
111
+ },
99
112
  }
100
113
  };
101
114
  </script>
@@ -34,7 +34,12 @@
34
34
  </div>
35
35
 
36
36
  <section v-for="person in sortedPersons" class="w-full">
37
- <FencerCard :person="person" class="mb-4" @update:status="handleStatus" @remove:fencer="handleRemoveFencer"/>
37
+ <FencerCard :person="person" class="mb-4"
38
+ :isLast="index === sortedPersons.length - 1"
39
+ @update:status="handleStatus"
40
+ @remove:fencer="handleRemoveFencer"
41
+ @update:moveUp="handleMoveUp"
42
+ @update:moveDown="handleMoveDown"/>
38
43
  </section>
39
44
  </div>
40
45
  </section>
@@ -143,7 +148,13 @@ export default {
143
148
  },
144
149
  handleRemoveFencer(value) {
145
150
  this.$emit('remove:fencer', value);
146
- }
151
+ },
152
+ handleMoveUp(person){
153
+ this.$emit('updateMoveUp:fencer', person);
154
+ },
155
+ handleMoveDown(person){
156
+ this.$emit('updateMoveDown:fencer', person);
157
+ },
147
158
  }
148
159
  }
149
160
  </script>