@dcrackel/hematournamentui 1.0.688 → 1.0.690
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 +6958 -6940
- package/dist/HemaTournamentUI-lib.umd.js +21 -21
- package/dist/hematournamentui.css +1 -1
- package/package.json +1 -1
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +1 -1
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +168 -108
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +31 -10
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +79 -22
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +0 -2
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +11 -102
|
@@ -60,40 +60,6 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
</section>
|
|
62
62
|
|
|
63
|
-
<!-- Assigned Bouts -->
|
|
64
|
-
<section v-if="hasAssignedBout && !fencerList && !reorderMode">
|
|
65
|
-
<div class="flex flex-row justify-between">
|
|
66
|
-
<BaseText class="mt-5" color="primaryHighlight" size="md" text="Assigned Bouts" weight="bold"/>
|
|
67
|
-
<div class="flex mr-1">
|
|
68
|
-
<BaseText class="mt-5 ml-5" color="primaryHighlight" size="md" text="Assigned:"/>
|
|
69
|
-
<BaseText :text="assignedBoutsToMe.length" class="mt-5 ml-2" color="primaryHighlight" size="md" weight="bold"/>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="border-b border-bright mb-5"></div>
|
|
73
|
-
|
|
74
|
-
<div class="w-full flex flex-col items-center">
|
|
75
|
-
<div
|
|
76
|
-
v-for="bout in assignedBoutsToMe"
|
|
77
|
-
:key="bout.BoutId"
|
|
78
|
-
class="w-full md:w-3/4 my-4 flex items-stretch"
|
|
79
|
-
>
|
|
80
|
-
<div class="flex-1">
|
|
81
|
-
<BoutCard
|
|
82
|
-
:bout="bout"
|
|
83
|
-
:hostingClubColors="hostingClubColors"
|
|
84
|
-
:editMode="editMode"
|
|
85
|
-
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
86
|
-
:reorderMode="false"
|
|
87
|
-
:isAdmin="isAdmin"
|
|
88
|
-
@action:startBout="directBout"
|
|
89
|
-
@action:resumeBout="directBout"
|
|
90
|
-
@action:assignDirector="handleAssignClick"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</section>
|
|
96
|
-
|
|
97
63
|
<!-- Upcoming -->
|
|
98
64
|
<section v-if="remainingBoutsCount > 0 && !fencerList && !reorderMode">
|
|
99
65
|
<div class="flex flex-row justify-between">
|
|
@@ -113,9 +79,7 @@
|
|
|
113
79
|
:editMode="editMode"
|
|
114
80
|
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
115
81
|
:reorderMode="false"
|
|
116
|
-
:isAdmin="isAdmin"
|
|
117
82
|
@action:startBout="directBout"
|
|
118
|
-
@action:assignDirector="handleAssignClick"
|
|
119
83
|
/>
|
|
120
84
|
</div>
|
|
121
85
|
|
|
@@ -233,14 +197,6 @@
|
|
|
233
197
|
@submit:bout="handleEditBout"
|
|
234
198
|
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"/>
|
|
235
199
|
|
|
236
|
-
<AssignDirectorModal
|
|
237
|
-
:show="showAssignDirectorModal"
|
|
238
|
-
:bout="assigningBout || {}"
|
|
239
|
-
:directors="directors"
|
|
240
|
-
@update:closeModal="closeAssignDirectorModal"
|
|
241
|
-
@assign="handleAssignDirector"
|
|
242
|
-
/>
|
|
243
|
-
|
|
244
200
|
</section>
|
|
245
201
|
</template>
|
|
246
202
|
|
|
@@ -260,12 +216,10 @@ import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
|
260
216
|
import FencerFinalResultCard from "../../../Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.vue";
|
|
261
217
|
import ReorderableShell from "../../../Molecules/Reorder/ReorderableShell.vue";
|
|
262
218
|
import {getPoolOrder} from '../../../Util/seeding.js';
|
|
263
|
-
import AssignDirectorModal from "../../../Molecules/Modals/AssignDirectorModal/AssignDirectorModal.vue";
|
|
264
219
|
|
|
265
220
|
export default {
|
|
266
221
|
name: "PoolLive",
|
|
267
222
|
components: {
|
|
268
|
-
AssignDirectorModal,
|
|
269
223
|
ReorderableShell,
|
|
270
224
|
FencerFinalResultCard,
|
|
271
225
|
BaseButton,
|
|
@@ -305,16 +259,7 @@ export default {
|
|
|
305
259
|
role: {
|
|
306
260
|
type: String,
|
|
307
261
|
default: 'admin'
|
|
308
|
-
}
|
|
309
|
-
directors: {
|
|
310
|
-
type: Array,
|
|
311
|
-
required: true
|
|
312
|
-
},
|
|
313
|
-
currentUserId: {
|
|
314
|
-
type: [Number, String],
|
|
315
|
-
required: true
|
|
316
|
-
},
|
|
317
|
-
|
|
262
|
+
}
|
|
318
263
|
},
|
|
319
264
|
data() {
|
|
320
265
|
return {
|
|
@@ -327,9 +272,7 @@ export default {
|
|
|
327
272
|
reorderMode: false,
|
|
328
273
|
tabs,
|
|
329
274
|
windowWidth: window.innerWidth,
|
|
330
|
-
selectedReorderId: null
|
|
331
|
-
showAssignDirectorModal: false,
|
|
332
|
-
assigningBout: null
|
|
275
|
+
selectedReorderId: null
|
|
333
276
|
};
|
|
334
277
|
},
|
|
335
278
|
watch: {
|
|
@@ -349,19 +292,6 @@ export default {
|
|
|
349
292
|
window.removeEventListener('resize', this.handleResize);
|
|
350
293
|
},
|
|
351
294
|
computed: {
|
|
352
|
-
isAdmin() {
|
|
353
|
-
return String(this.role || '').toLowerCase() === 'admin';
|
|
354
|
-
},
|
|
355
|
-
assignedBoutsToMe() {
|
|
356
|
-
const me = Number(this.currentUserId);
|
|
357
|
-
return this.localBouts
|
|
358
|
-
.filter(b => Number(b.RefereeId) === me && (b.Status || '').toLowerCase() !== 'completed')
|
|
359
|
-
.slice()
|
|
360
|
-
.sort((a, b) => Number(a.OrderIndex ?? 0) - Number(b.OrderIndex ?? 0));
|
|
361
|
-
},
|
|
362
|
-
hasAssignedBout() {
|
|
363
|
-
return this.assignedBoutsToMe.length > 0;
|
|
364
|
-
},
|
|
365
295
|
currentSelectedBout() {
|
|
366
296
|
return this.localBouts.find(b => b.BoutId === this.selectedBout.BoutId) || this.selectedBout;
|
|
367
297
|
},
|
|
@@ -380,15 +310,19 @@ export default {
|
|
|
380
310
|
completedBouts() {
|
|
381
311
|
return this.localBouts.filter(bout => bout.Status === 'Completed');
|
|
382
312
|
},
|
|
313
|
+
hasCompletedBout() {
|
|
314
|
+
return this.completedBouts.length > 0;
|
|
315
|
+
},
|
|
383
316
|
activeBouts() {
|
|
384
|
-
return this.localBouts
|
|
317
|
+
return this.localBouts
|
|
318
|
+
.filter(b => String(b?.Status || '').toLowerCase() === 'active')
|
|
319
|
+
.slice()
|
|
320
|
+
.sort((a, b) => Number(a?.OrderIndex ?? 0) - Number(b?.OrderIndex ?? 0));
|
|
385
321
|
},
|
|
322
|
+
|
|
386
323
|
hasActiveBout() {
|
|
387
324
|
return this.activeBouts.length > 0;
|
|
388
325
|
},
|
|
389
|
-
hasCompletedBout() {
|
|
390
|
-
return this.completedBouts.length > 0;
|
|
391
|
-
},
|
|
392
326
|
remainingBoutsCount() {
|
|
393
327
|
return this.upcomingBouts.length;
|
|
394
328
|
},
|
|
@@ -528,7 +462,7 @@ export default {
|
|
|
528
462
|
this.$emit('submit:bout', updatedBout);
|
|
529
463
|
},
|
|
530
464
|
directBout(bout) {
|
|
531
|
-
const activeBouts = this.localBouts.filter(b => b.
|
|
465
|
+
const activeBouts = this.localBouts.filter(b => String(b?.Status || '').toLowerCase() === 'active');
|
|
532
466
|
activeBouts.forEach(b => b.Status = 'scheduled');
|
|
533
467
|
|
|
534
468
|
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId);
|
|
@@ -607,31 +541,6 @@ export default {
|
|
|
607
541
|
});
|
|
608
542
|
this.localBouts = [...this.localBouts];
|
|
609
543
|
},
|
|
610
|
-
handleAssignClick(ids) {
|
|
611
|
-
const bout = this.localBouts.find(b => b.BoutId === ids.BoutId);
|
|
612
|
-
if (!bout) return;
|
|
613
|
-
this.openAssignDirector(bout);
|
|
614
|
-
},
|
|
615
|
-
openAssignDirector(bout) {
|
|
616
|
-
this.assigningBout = bout;
|
|
617
|
-
this.showAssignDirectorModal = true;
|
|
618
|
-
},
|
|
619
|
-
closeAssignDirectorModal() {
|
|
620
|
-
this.showAssignDirectorModal = false;
|
|
621
|
-
this.assigningBout = null;
|
|
622
|
-
},
|
|
623
|
-
handleAssignDirector({bout, director}) {
|
|
624
|
-
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId) || bout;
|
|
625
|
-
|
|
626
|
-
// only change these two fields
|
|
627
|
-
updatedBout.RefereeId = director.PersonId;
|
|
628
|
-
updatedBout.RefName = director.DisplayName;
|
|
629
|
-
|
|
630
|
-
// emit to parent, parent will call socket emit/save
|
|
631
|
-
this.$emit('update:bout', updatedBout);
|
|
632
|
-
|
|
633
|
-
this.closeAssignDirectorModal();
|
|
634
|
-
},
|
|
635
544
|
// --- helpers ---
|
|
636
545
|
_idOf(bout) {
|
|
637
546
|
return bout?.BoutId ?? bout?.boutId;
|