@dcrackel/hematournamentui 1.0.698 → 1.0.701
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/AGENTS.md +3 -0
- package/dist/HemaTournamentUI-lib.es.js +10512 -10219
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +14 -0
- package/dist/hematournamentui.css +1 -1
- package/package.json +92 -92
- package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +1 -1
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +1 -1
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +2 -2
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +25 -22
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +31 -29
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.vue +2 -4
- package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +31 -31
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.stories.js +6 -6
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +64 -53
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.stories.js +6 -7
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.vue +18 -10
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +4 -4
- package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +64 -45
- package/src/stories/Organisms/Containers/Pool/Pool.vue +1 -1
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +35 -20
- package/src/stories/Templates/Assignment/Assignment.stories.js +17 -15
- package/src/stories/Templates/Assignment/Assignment.vue +71 -40
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.stories.js +49 -30
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.vue +29 -28
- package/src/stories/Templates/ClubManagement/{ClubMangement.stories.js → ClubManagement.stories.js} +74 -59
- package/src/stories/Templates/ClubManagement/ClubManagement.vue +104 -92
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +92 -97
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +37 -33
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +11 -14
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +34 -37
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js +11 -10
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +8 -8
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.stories.js +13 -16
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.vue +15 -19
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.stories.js +25 -24
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.vue +28 -34
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +54 -19
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +75 -68
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +55 -45
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +47 -55
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +56 -55
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +71 -73
- package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +18 -16
- package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +9 -6
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +22 -19
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +44 -36
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +30 -23
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +55 -58
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +67 -0
- package/src/stories/Templates/PersonManagement/Admin/{Administration.vue → Administration/Administration.vue} +94 -87
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -0
- package/src/stories/Templates/PersonManagement/Admin/{FencerAdmin.vue → FencerAdmin/FencerAdmin.vue} +90 -77
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -0
- package/src/stories/Templates/PersonManagement/Admin/{MergeAccounts.vue → MergeAccounts/MergeAccounts.vue} +258 -242
- package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +28 -28
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +1 -1
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +45 -28
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +22 -16
- package/src/stories/Templates/TournamentManagement/{TournamentMangement.stories.js → TournamentManagement.stories.js} +68 -39
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +199 -153
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +113 -0
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +123 -106
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.stories.js +76 -31
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/{TouranmentPageTwo.vue → TournamentPageTwo.vue} +63 -44
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin.stories.js +0 -48
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TouranmentPageOne.stories.js +0 -63
|
@@ -24,21 +24,25 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</section>
|
|
26
26
|
|
|
27
|
-
<section v-if="loading"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<section v-if="loading" class="w-full">
|
|
28
|
+
<div v-for="index in 6" :key="index">
|
|
29
|
+
<FencerCardSkeleton class="mb-4"/>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
<section v-if="!loading" class="w-full">
|
|
33
|
+
<div v-for="(person, index) in sortedPersons" :key="person.PersonId || person.Person?.PersonId || index">
|
|
34
|
+
<FencerCard :person="person" class="mb-4"
|
|
35
|
+
:isLast="index === sortedPersons.length - 1"
|
|
36
|
+
:isEdit="event.Status === 'planning' || event.Status === 'preparation'"
|
|
34
37
|
@forward:toProfile="handleForwardToProfile"
|
|
35
38
|
@update:status="handleStatus"
|
|
36
39
|
@remove:fencer="handleRemoveFencer"
|
|
37
40
|
@update:moveUp="handleMoveUp"
|
|
38
41
|
@update:moveDown="handleMoveDown"
|
|
39
|
-
@request:weaver-sign="openWeaverModal"
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
+
@request:weaver-sign="openWeaverModal"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
42
46
|
<div v-if="!loading && personsInTournament.length === 0" class="mb-10">
|
|
43
47
|
<div class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-poolBox">
|
|
44
48
|
<BaseText text="Remember to assign staff to your event!" size="lg" color="quaternary" weight="bold" class="w-full text-center py-2 px-8"/>
|
|
@@ -68,10 +72,8 @@
|
|
|
68
72
|
</template>
|
|
69
73
|
|
|
70
74
|
<script>
|
|
71
|
-
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
72
|
-
import
|
|
73
|
-
import EventCard from "../../../Organisms/Cards/EventCard/EventCard.vue";
|
|
74
|
-
import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
|
|
75
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
76
|
+
import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
|
|
75
77
|
import FencerCard from "../../../Organisms/Cards/FencerCard/FencerCard.vue";
|
|
76
78
|
import EditEventsTopMenu from "../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue";
|
|
77
79
|
import DropDownMenu from "../../../Organisms/ComplexInputs/DropDown/DropDownMenu.vue";
|
|
@@ -104,11 +106,9 @@ export default {
|
|
|
104
106
|
FindOrAddPerson,
|
|
105
107
|
DropDownMenu,
|
|
106
108
|
EditEventsTopMenu,
|
|
107
|
-
FencerCard,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
BaseButton,
|
|
111
|
-
BaseModal
|
|
109
|
+
FencerCard,
|
|
110
|
+
BaseText,
|
|
111
|
+
BaseModal
|
|
112
112
|
},
|
|
113
113
|
props: {
|
|
114
114
|
personsAll: Array,
|
|
@@ -159,9 +159,9 @@ export default {
|
|
|
159
159
|
},
|
|
160
160
|
computed: {
|
|
161
161
|
weaverModalBody() {
|
|
162
|
-
const p = this.pendingWeaverPerson?.Person;
|
|
163
|
-
const name = p?.DisplayName ?? 'This fencer';
|
|
164
|
-
return `Has ${name}
|
|
162
|
+
const p = this.pendingWeaverPerson?.Person;
|
|
163
|
+
const name = p?.DisplayName ?? 'This fencer';
|
|
164
|
+
return `Has ${name} completed signing the waiver?`;
|
|
165
165
|
},
|
|
166
166
|
isMobile() {
|
|
167
167
|
return this.windowWidth <= 748;
|
|
@@ -210,25 +210,22 @@ export default {
|
|
|
210
210
|
},
|
|
211
211
|
handleSelectedItem(selectedItem) {
|
|
212
212
|
this.localSelectedItem = selectedItem;
|
|
213
|
-
},
|
|
214
|
-
handleStatus(person) {
|
|
215
|
-
person
|
|
216
|
-
|
|
217
|
-
},
|
|
213
|
+
},
|
|
214
|
+
handleStatus(person) {
|
|
215
|
+
this.$emit('update:person', person);
|
|
216
|
+
},
|
|
218
217
|
handleNewPerson(value) {
|
|
219
218
|
this.$emit('add:person', value);
|
|
220
|
-
},
|
|
221
|
-
handleAddExistingPerson(value) {
|
|
222
|
-
this
|
|
223
|
-
|
|
224
|
-
},
|
|
219
|
+
},
|
|
220
|
+
handleAddExistingPerson(value) {
|
|
221
|
+
this.$emit('add:existing-person', value);
|
|
222
|
+
},
|
|
225
223
|
handleTabMenuClick(value) {
|
|
226
224
|
this.$emit('tab:menu-click', value);
|
|
227
|
-
},
|
|
228
|
-
handleRemoveFencer(value) {
|
|
229
|
-
this
|
|
230
|
-
|
|
231
|
-
},
|
|
225
|
+
},
|
|
226
|
+
handleRemoveFencer(value) {
|
|
227
|
+
this.$emit('remove:fencer', value);
|
|
228
|
+
},
|
|
232
229
|
handleMoveUp(person){
|
|
233
230
|
this.$emit('update:moveUp', person);
|
|
234
231
|
},
|
package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js
CHANGED
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
argTypes: {
|
|
15
15
|
event: {
|
|
16
16
|
control: {type: 'object'}
|
|
17
|
-
},
|
|
18
|
-
finalResults: {
|
|
19
|
-
control: {type: '
|
|
20
|
-
},
|
|
17
|
+
},
|
|
18
|
+
finalResults: {
|
|
19
|
+
control: {type: 'array'}
|
|
20
|
+
},
|
|
21
21
|
role: {
|
|
22
22
|
control: {type: 'text'}
|
|
23
23
|
}
|
|
@@ -32,9 +32,10 @@ export const Default = {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export const NoResultsYet = {
|
|
36
|
-
args: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
35
|
+
export const NoResultsYet = {
|
|
36
|
+
args: {
|
|
37
|
+
event: eventMock[0],
|
|
38
|
+
finalResults: [],
|
|
39
|
+
role: 'director'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -24,19 +24,19 @@ import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
|
24
24
|
import emptyDesertIcon from "../../../../assets/empty_desert_icon.png";
|
|
25
25
|
import { tabs } from '../../../Util/tabs.js';
|
|
26
26
|
|
|
27
|
-
export default {
|
|
28
|
-
name: '
|
|
27
|
+
export default {
|
|
28
|
+
name: 'EventFinalResults',
|
|
29
29
|
emits: ['export:HemaRatings', 'tab:menu-click'],
|
|
30
30
|
components: {BaseText, EventFinalResultsHeader, FinalResultsTable, EditEventsTopMenu},
|
|
31
31
|
props: {
|
|
32
32
|
event: {
|
|
33
33
|
type: Object,
|
|
34
34
|
required: true
|
|
35
|
-
},
|
|
36
|
-
finalResults: {
|
|
37
|
-
type:
|
|
38
|
-
required: true
|
|
39
|
-
},
|
|
35
|
+
},
|
|
36
|
+
finalResults: {
|
|
37
|
+
type: Array,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
40
|
role: {
|
|
41
41
|
type: String,
|
|
42
42
|
default: 'Admin'
|
|
@@ -72,4 +72,4 @@ export default {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
</script>
|
|
75
|
+
</script>
|
|
@@ -8,20 +8,17 @@ export default {
|
|
|
8
8
|
component: KioskDisplay,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
args: {
|
|
11
|
-
displays: getCLubDisplayByClubId,
|
|
12
|
-
staffDropDown: getAllStaffByTournamentId,
|
|
13
|
-
eventDropDown: getEventByTournamentId,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
clubs: { control: 'array '},
|
|
23
|
-
role: { control: 'text' }
|
|
24
|
-
},
|
|
11
|
+
displays: getCLubDisplayByClubId,
|
|
12
|
+
staffDropDown: getAllStaffByTournamentId,
|
|
13
|
+
eventDropDown: getEventByTournamentId,
|
|
14
|
+
role: 'Admin'
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
displays: { control: 'array' },
|
|
18
|
+
staffDropDown: { control: 'array' },
|
|
19
|
+
eventDropDown: { control: 'array' },
|
|
20
|
+
role: { control: 'text' }
|
|
21
|
+
},
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
|
|
@@ -43,7 +40,7 @@ export const isAdmin = {
|
|
|
43
40
|
}
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
export const
|
|
43
|
+
export const isDirector = {
|
|
47
44
|
args: {
|
|
48
45
|
displays: getCLubDisplayByClubId,
|
|
49
46
|
staffDropDown: getAllStaffByTournamentId,
|
|
@@ -59,4 +56,4 @@ export const isClub = {
|
|
|
59
56
|
eventDropDown: getEventByTournamentId,
|
|
60
57
|
role: 'Club'
|
|
61
58
|
}
|
|
62
|
-
};
|
|
59
|
+
};
|
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
@update:assignToMe="handleAssignToMe"
|
|
15
15
|
@submit:kiosk="handleSubmit"
|
|
16
16
|
/>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
|
|
24
|
-
import EditEventsTopMenu from "../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue";
|
|
25
|
-
import KioskContainer from "../../../Organisms/Containers/KioskContainer/KioskContainer.vue"
|
|
17
|
+
</section>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import EditEventsTopMenu from "../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue";
|
|
22
|
+
import KioskContainer from "../../../Organisms/Containers/KioskContainer/KioskContainer.vue"
|
|
26
23
|
|
|
27
24
|
import { tabs } from '../../../Util/tabs.js';
|
|
28
25
|
|
|
@@ -52,19 +49,18 @@ export default {
|
|
|
52
49
|
default: 'Director'
|
|
53
50
|
}
|
|
54
51
|
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
windowWidth: window.innerWidth,
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
tabs,
|
|
55
|
+
localDisplays: [...this.displays],
|
|
56
|
+
windowWidth: window.innerWidth,
|
|
61
57
|
}
|
|
62
58
|
},
|
|
63
59
|
watch: {
|
|
64
|
-
displays: {
|
|
65
|
-
handler(newDisplays) {
|
|
66
|
-
this.localDisplays = newDisplays
|
|
67
|
-
},
|
|
60
|
+
displays: {
|
|
61
|
+
handler(newDisplays) {
|
|
62
|
+
this.localDisplays = [...newDisplays]
|
|
63
|
+
},
|
|
68
64
|
deep: true
|
|
69
65
|
}
|
|
70
66
|
},
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import getPenaltiesByEvent from '../../../../mocks/getPenaltiesByEvent.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Templates/EventManagement/
|
|
6
|
-
component:
|
|
7
|
-
args: {
|
|
8
|
-
event: getPenaltiesByEvent.Event,
|
|
9
|
-
penalties: getPenaltiesByEvent.Penalties,
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
event: {
|
|
13
|
-
control:
|
|
14
|
-
},
|
|
15
|
-
penalties: {
|
|
16
|
-
control:
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
import PenaltyReport from './PenaltyReport.vue';
|
|
2
|
+
import getPenaltiesByEvent from '../../../../mocks/getPenaltiesByEvent.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/EventManagement/PenaltyReport',
|
|
6
|
+
component: PenaltyReport,
|
|
7
|
+
args: {
|
|
8
|
+
event: getPenaltiesByEvent.Event,
|
|
9
|
+
penalties: getPenaltiesByEvent.Penalties,
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
event: {
|
|
13
|
+
control: { type: 'object' },
|
|
14
|
+
},
|
|
15
|
+
penalties: {
|
|
16
|
+
control: { type: 'array' },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
20
|
|
|
21
21
|
export const Default = {
|
|
22
22
|
args: {
|
|
@@ -26,8 +26,9 @@ export const Default = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
export const NoPenalties = {
|
|
30
|
-
args: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
29
|
+
export const NoPenalties = {
|
|
30
|
+
args: {
|
|
31
|
+
event: getPenaltiesByEvent.Event,
|
|
32
|
+
penalties: [],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<div class="md:p-4"></div>
|
|
6
6
|
|
|
7
7
|
<div v-if="penalties.length > 0" class="mb-10">
|
|
8
|
-
<div v-for="
|
|
9
|
-
<PenaltyFencerCard eventName="
|
|
8
|
+
<div v-for="penaltiesSummary in penalties" :key="penaltiesSummary.PersonId">
|
|
9
|
+
<PenaltyFencerCard :eventName="event.EventName" :personPenalties="penaltiesSummary" @penalty:removal="penaltyRemoval" />
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
<div v-if="!Array.isArray(penalties) || penalties.length === 0" class="mb-10">
|
|
@@ -47,48 +47,42 @@ export default {
|
|
|
47
47
|
},
|
|
48
48
|
data() {
|
|
49
49
|
return {
|
|
50
|
-
emptyDesertIcon,
|
|
51
|
-
windowWidth: window.innerWidth,
|
|
52
|
-
|
|
53
|
-
tabs,
|
|
50
|
+
emptyDesertIcon,
|
|
51
|
+
windowWidth: window.innerWidth,
|
|
52
|
+
tabs,
|
|
54
53
|
};
|
|
55
54
|
},
|
|
56
55
|
computed: {
|
|
57
56
|
isMobile() {
|
|
58
57
|
return this.windowWidth <= 748;
|
|
59
58
|
},
|
|
60
|
-
totalYellowCards() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
totalBlackCards() {
|
|
73
|
-
if (!Array.isArray(this.penalties)) return 0;
|
|
74
|
-
return this.penalties.reduce((acc, person) => {
|
|
75
|
-
return acc + (Array.isArray(person?.Penalties) ? person.Penalties.filter(penalty => penalty?.PenaltyType === "Black").length : 0);
|
|
76
|
-
}, 0);
|
|
77
|
-
},
|
|
78
|
-
totalMedicalCalls() {
|
|
79
|
-
if (!Array.isArray(this.penalties)) return 0;
|
|
80
|
-
return this.penalties.reduce((acc, person) => {
|
|
81
|
-
return acc + (Array.isArray(person?.Penalties) ? person.Penalties.filter(penalty => penalty?.PenaltyType === "Medical").length : 0);
|
|
82
|
-
}, 0);
|
|
59
|
+
totalYellowCards() {
|
|
60
|
+
return this.countPenaltiesByType("Yellow");
|
|
61
|
+
},
|
|
62
|
+
totalRedCards() {
|
|
63
|
+
return this.countPenaltiesByType("Red");
|
|
64
|
+
},
|
|
65
|
+
totalBlackCards() {
|
|
66
|
+
return this.countPenaltiesByType("Black");
|
|
67
|
+
},
|
|
68
|
+
totalMedicalCalls() {
|
|
69
|
+
return this.countPenaltiesByType("Medical");
|
|
83
70
|
}
|
|
84
71
|
},
|
|
85
72
|
methods: {
|
|
86
73
|
handleTabMenuClick(value) {
|
|
87
74
|
this.$emit('tab:menu-click', value);
|
|
88
75
|
},
|
|
89
|
-
penaltyRemoval(penalty) {
|
|
90
|
-
this.$emit('penalty:removal', penalty)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
penaltyRemoval(penalty) {
|
|
77
|
+
this.$emit('penalty:removal', penalty)
|
|
78
|
+
},
|
|
79
|
+
countPenaltiesByType(type) {
|
|
80
|
+
if (!Array.isArray(this.penalties)) return 0;
|
|
81
|
+
return this.penalties.reduce((acc, person) => {
|
|
82
|
+
if (!Array.isArray(person?.Penalties)) return acc;
|
|
83
|
+
return acc + person.Penalties.filter(penalty => penalty?.PenaltyType === type).length;
|
|
84
|
+
}, 0);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
94
88
|
</script>
|
|
@@ -17,14 +17,39 @@ const makeUpcomingScheduled = (bouts) =>
|
|
|
17
17
|
const makeAllCompleted = (bouts) =>
|
|
18
18
|
bouts.map((b) => ({ ...b, Status: 'Completed' }));
|
|
19
19
|
|
|
20
|
-
const makeAssignedToUser = (bouts, userId, userName) =>
|
|
21
|
-
bouts.map((b, i) =>
|
|
22
|
-
i === 0
|
|
23
|
-
? { ...b, RefereeId: userId, RefName: userName, Status: 'Scheduled', OrderIndex: 0 }
|
|
24
|
-
: { ...b }
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
const makeAssignedToUser = (bouts, userId, userName) =>
|
|
21
|
+
bouts.map((b, i) =>
|
|
22
|
+
i === 0
|
|
23
|
+
? { ...b, RefereeId: userId, RefName: userName, Status: 'Scheduled', OrderIndex: 0 }
|
|
24
|
+
: { ...b }
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const makeActiveBoutRunByDifferentDirector = (bouts) =>
|
|
28
|
+
bouts.map((b, i) => {
|
|
29
|
+
if (i === 0) {
|
|
30
|
+
return {
|
|
31
|
+
...b,
|
|
32
|
+
Status: 'Active',
|
|
33
|
+
TimerStatus: 'running',
|
|
34
|
+
TimeLeft: 137,
|
|
35
|
+
Score1: 2,
|
|
36
|
+
Score2: 4,
|
|
37
|
+
RefereeId: 1,
|
|
38
|
+
RefName: 'Dwain Crackel',
|
|
39
|
+
Started: '2025-09-08T19:30:00.000Z',
|
|
40
|
+
OrderIndex: 0,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
...b,
|
|
46
|
+
Status: b.Status === 'Completed' ? 'Completed' : 'Scheduled',
|
|
47
|
+
TimerStatus: b.TimerStatus || 'stopped',
|
|
48
|
+
OrderIndex: b.OrderIndex ?? i,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default {
|
|
28
53
|
title: 'Templates/EventManagement/PoolLive',
|
|
29
54
|
component: PoolLive,
|
|
30
55
|
tags: ['PoolLive'],
|
|
@@ -70,19 +95,29 @@ export const NonAdminDirector = {
|
|
|
70
95
|
},
|
|
71
96
|
};
|
|
72
97
|
|
|
73
|
-
export const AssignedBoutBanner = {
|
|
74
|
-
args: {
|
|
75
|
-
role: 'director',
|
|
76
|
-
editMode: true,
|
|
77
|
-
bouts: makeAssignedToUser(baseBouts, 79, 'Tom Testerlou'),
|
|
98
|
+
export const AssignedBoutBanner = {
|
|
99
|
+
args: {
|
|
100
|
+
role: 'director',
|
|
101
|
+
editMode: true,
|
|
102
|
+
bouts: makeAssignedToUser(baseBouts, 79, 'Tom Testerlou'),
|
|
78
103
|
currentUserId: 79,
|
|
79
104
|
directors: getDirectors,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const
|
|
84
|
-
args: {
|
|
85
|
-
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const ActiveBoutRunningDifferentDirector = {
|
|
109
|
+
args: {
|
|
110
|
+
role: 'director',
|
|
111
|
+
editMode: true,
|
|
112
|
+
bouts: makeActiveBoutRunByDifferentDirector(baseBouts),
|
|
113
|
+
currentUserId: 79,
|
|
114
|
+
directors: getDirectors,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const AllBoutsComplete = {
|
|
119
|
+
args: {
|
|
120
|
+
bouts: makeAllCompleted(baseBouts),
|
|
86
121
|
connectedToServer: false,
|
|
87
122
|
editMode: false,
|
|
88
123
|
role: 'admin',
|