@dcrackel/hematournamentui 1.0.712 → 1.0.714

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.
Files changed (107) hide show
  1. package/.prettierignore +7 -7
  2. package/.storybook/main.js +3 -1
  3. package/README.md +42 -0
  4. package/dist/HemaTournamentUI-lib.es.js +6856 -6243
  5. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  6. package/dist/hematournamentui-tailwind.css +79 -9
  7. package/package.json +96 -96
  8. package/prettier.config.js +16 -16
  9. package/src/index.js +43 -42
  10. package/src/main.js +1 -1
  11. package/src/mocks/getDEBouts-TableOf128.js +37 -37
  12. package/src/mocks/getDEBouts-TableOf64.js +35 -35
  13. package/src/stories/Atoms/Input/BaseInput.test.js +97 -97
  14. package/src/stories/Atoms/Input/BaseInput.vue +149 -149
  15. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -23
  16. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -35
  17. package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -30
  18. package/src/stories/Molecules/Menus/HoverActions/HoverActions.test.js +138 -0
  19. package/src/stories/Molecules/Menus/HoverActions/HoverActions.vue +212 -0
  20. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.stories.js +49 -0
  21. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.test.js +129 -0
  22. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.vue +165 -0
  23. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +6 -0
  24. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -18
  25. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +1 -1
  26. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +5 -1
  27. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +19 -10
  28. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +11 -7
  29. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +42 -33
  30. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +76 -45
  31. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +122 -103
  32. package/src/stories/Organisms/Cards/Director/DirectorCard.test.js +82 -0
  33. package/src/stories/Organisms/Cards/Director/DirectorCard.vue +32 -51
  34. package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -51
  35. package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -106
  36. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -298
  37. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +77 -60
  38. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +144 -143
  39. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +289 -256
  40. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -69
  41. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -80
  42. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +153 -153
  43. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +4 -0
  44. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -31
  45. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -109
  46. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -192
  47. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +1 -0
  48. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +247 -204
  49. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +89 -15
  50. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +51 -29
  51. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +63 -46
  52. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -21
  53. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -39
  54. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -145
  55. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -64
  56. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +36 -57
  57. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +101 -65
  58. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +14 -1
  59. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +52 -52
  60. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +10 -3
  61. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -226
  62. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
  63. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +137 -137
  64. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -172
  65. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -216
  66. package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -79
  67. package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -29
  68. package/src/stories/Organisms/Wizards/EditEventWizard/WeaponSelection.test.js +138 -0
  69. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +149 -9
  70. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +54 -2
  71. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +77 -8
  72. package/src/stories/Templates/EventManagement/Bracket/BracketDirectorAssignment.test.js +242 -0
  73. package/src/stories/Templates/EventManagement/Bracket/BracketMobile.test.js +131 -0
  74. package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +50 -39
  75. package/src/stories/Templates/EventManagement/Bracket/BracketStories.test.js +201 -0
  76. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.js +93 -0
  77. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.test.js +152 -0
  78. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -39
  79. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -79
  80. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -93
  81. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -91
  82. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -121
  83. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +9 -2
  84. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +5 -4
  85. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +81 -81
  86. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -39
  87. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +101 -101
  88. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -71
  89. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +86 -86
  90. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -86
  91. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +247 -247
  92. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -170
  93. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -156
  94. package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -329
  95. package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -329
  96. package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -42
  97. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -84
  98. package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -114
  99. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -363
  100. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -116
  101. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -307
  102. package/src/stories/Util/Validations/PersonManagementValidations.js +45 -45
  103. package/src/stories/Util/Validations/PriceValidation.js +6 -6
  104. package/src/stories/Util/boutDirectorAssignment.js +46 -0
  105. package/src/stories/Util/bracketDirectors.js +86 -0
  106. package/src/stories/Util/registrationStatus.js +11 -11
  107. package/src/stories/Util/tabs.js +19 -47
@@ -1,226 +1,226 @@
1
- <template>
2
- <div class="flex flex-col h-full pb-4">
3
- <div class="w-full flex justify-center">
4
- <StepIndicator :steps="steps" :selected="currentStep" />
5
- </div>
6
-
7
- <div class="grow">
8
- <div class="w-full flex flex-row justify-center my-4">
9
- <BaseText
10
- :color="'primaryHighlight'"
11
- :size="'2xl'"
12
- :text="'DIRECT ELIMINATION'"
13
- :weight="'normal'"
14
- data-testid="text-add-tournament"
15
- />
16
- </div>
17
- <div class="w-full flex flex-col mb-3 ml-1">
18
- <BaseText
19
- :color="'quinary'"
20
- :size="'sm'"
21
- :text="'Define the criteria for promoting fencers to the Direct Elimination (DE) stage. These options specify how fencers advance based on their performance metrics. Ensure the correct order of criteria to reflect their importance in the promotion process.'"
22
- :weight="'normal'"
23
- data-testid="text-registration"
24
- />
25
- </div>
26
-
27
- <div class="grow">
28
- <div class="mb-4 mt-8">
29
- <BaseText :color="'quaternary'" :size="'xs'" :text="'TYPE OF DIRECT ELIMINATION'" class="border-b mb-5" />
30
- </div>
31
- <div class="mb-2 flex flex-col">
32
- <BaseText
33
- :color="'quinary'"
34
- :size="'sm'"
35
- :text="'Please select the format type for the direct elimination bracket of your event.'"
36
- :weight="'normal'"
37
- data-testid="text-registration"
38
- class="mb-4"
39
- />
40
- <DropDownMenu
41
- label="Select Format"
42
- :items="DEFormats"
43
- :selected-item="selectedFormat"
44
- :alignEnd="false"
45
- :width="'w-full'"
46
- :dropDownWidth="'w-full'"
47
- @update:selectedItem="handleDEFormatChange"
48
- />
49
- </div>
50
- </div>
51
-
52
- <div class="mb-4 mt-8">
53
- <BaseText :color="'quaternary'" :size="'xs'" :text="'DIRECT ELIMINATION CONFIGURATION'" class="border-b mb-5" />
54
- <BaseText
55
- :color="'quaternary'"
56
- :size="'sm'"
57
- :text="'Timer duration is in seconds.'"
58
- :weight="'normal'"
59
- class="mt-1"
60
- />
61
- </div>
62
- <div class="mb-2 flex">
63
- <div class="mt-1 h-10 w-52">
64
- <Toggle
65
- :checked="localEventConfig.DETimer"
66
- label="DE Timer"
67
- :labelLeft="false"
68
- @update:checked="handleDETimerToggle"
69
- />
70
- </div>
71
- <TitledInput
72
- v-if="localEventConfig.DETimer"
73
- :inputValue="localEventConfig.DETime"
74
- :invalid="validation.DETime"
75
- inputType="number"
76
- placeholder="Enter Time in Seconds"
77
- title=""
78
- @update:value="handleDETimeChange"
79
- />
80
- </div>
81
- <div class="mb-2 flex">
82
- <div class="mt-1 h-10 w-52">
83
- <Toggle
84
- :checked="localEventConfig.DEBoutCounter"
85
- label="DE Pass Counter"
86
- :labelLeft="false"
87
- inputType="number"
88
- @update:checked="handleDEBoutCountToggle"
89
- />
90
- </div>
91
- <TitledInput
92
- v-if="localEventConfig.DEBoutCounter"
93
- :inputValue="localEventConfig.DEBoutCount"
94
- inputType="number"
95
- :invalid="validation.DEBoutCount"
96
- placeholder="Enter Number of Passes"
97
- title=""
98
- @update:value="handleDEBoutCountChange"
99
- />
100
- </div>
101
- <div class="mb-2 flex">
102
- <div class="mt-1 h-10 w-52">
103
- <Toggle
104
- :checked="localEventConfig.DEMax"
105
- label="DE Max Points"
106
- :labelLeft="false"
107
- @update:checked="handleDEMax"
108
- />
109
- </div>
110
- <TitledInput
111
- v-if="localEventConfig.DEMax"
112
- :inputValue="localEventConfig.DEMaxPoints"
113
- :invalid="validation.DEMaxPoints"
114
- placeholder="Enter DE Max Points"
115
- inputType="number"
116
- title=""
117
- @update:value="handleDEMaxPointsChange"
118
- />
119
- </div>
120
- </div>
121
-
122
- <div v-if="localEventConfig.DEType === 'single'" class="grow">
123
- <div class="mb-4 mt-8">
124
- <BaseText
125
- :color="'quaternary'"
126
- :size="'xs'"
127
- :text="'TIE FOR THIRD PLACE OR FENCE OFF FOR THIRD'"
128
- class="border-b mb-5"
129
- />
130
- </div>
131
- <div class="mt-8 h-10 w-52">
132
- <Toggle
133
- :checked="localEventConfig.thirdPlaceBout"
134
- :label="thirdPlaceLabel"
135
- :labelLeft="false"
136
- @update:checked="handleThirdPlaceToggle"
137
- />
138
- </div>
139
- </div>
140
-
141
- <div class="flex flex-row justify-center h-12 mt-4">
142
- <BaseButton class="w-1/2 ml-1" color="neutral" label="Back" size="sm" type="primary" @buttonClick="handleBack" />
143
- <BaseButton
144
- class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
145
- color="neutral"
146
- :label="nextButtonLabel"
147
- selected="selected"
148
- size="sm"
149
- type="primary"
150
- @buttonClick="handleNext"
151
- />
152
- </div>
153
- </div>
154
- </template>
155
-
156
- <script>
157
- import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
158
- import BaseText from '../../../../Atoms/Text/BaseText.vue';
159
- import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
160
- import MultiSelect from '../../../../Molecules/Inputs/MultiSelect/MultiSelect.vue';
161
- import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
162
- import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
163
- import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
164
-
165
- export default {
166
- name: 'DirectElimination',
167
- components: { DropDownMenu, BaseButton, StepIndicator, BaseText, TitledInput, Toggle, MultiSelect },
168
- props: {
169
- nextButtonLabel: { type: String, default: 'Submit' },
170
- eventConfig: Object,
171
- validation: Object,
172
- currentStep: Number,
173
- steps: Array,
174
- DEFormats: Array
175
- },
176
- emits: ['update', 'update:back', 'update:submit'],
177
- data() {
178
- return {
179
- localEventConfig: { ...this.eventConfig },
180
- selectedFormat: { link: 1, text: 'Single Elimination' }
181
- };
182
- },
183
- computed: {
184
- thirdPlaceLabel() {
185
- return this.eventConfig.thirdPlaceBout ? '3rd Place Fence Off' : 'Tie for 3rd Place';
186
- }
187
- },
188
- methods: {
189
- handleDETimerToggle(value) {
190
- this.localEventConfig.DETimer = value;
191
- this.$emit('update', { DETimer: value });
192
- },
193
- handleDETimeChange(value) {
194
- this.$emit('update', { DETime: value });
195
- },
196
- handleDEBoutCountToggle(value) {
197
- this.localEventConfig.DEBoutCounter = value;
198
- this.$emit('update', { DEBoutCounter: value });
199
- },
200
- handleDEBoutCountChange(value) {
201
- this.$emit('update', { DEBoutCount: value });
202
- },
203
- handleDEMax(value) {
204
- this.localEventConfig.DEMax = value;
205
- this.$emit('update', { DEMax: value });
206
- },
207
- handleDEMaxPointsChange(value) {
208
- this.$emit('update', { DEMaxPoints: value });
209
- },
210
- handleThirdPlaceToggle(value) {
211
- this.$emit('update', { thirdPlaceBout: value });
212
- },
213
- handleBack() {
214
- this.$emit('update:back');
215
- },
216
- handleNext() {
217
- this.$emit('update:submit');
218
- },
219
- handleDEFormatChange(value) {
220
- this.selectedFormat = value;
221
- this.localEventConfig.DEType = value.text === 'Single Elimination' ? 'single' : 'double';
222
- this.$emit('update', { DEType: this.localEventConfig.DEType });
223
- }
224
- }
225
- };
226
- </script>
1
+ <template>
2
+ <div class="flex flex-col h-full pb-4">
3
+ <div class="w-full flex justify-center">
4
+ <StepIndicator :steps="steps" :selected="currentStep" />
5
+ </div>
6
+
7
+ <div class="grow">
8
+ <div class="w-full flex flex-row justify-center my-4">
9
+ <BaseText
10
+ :color="'primaryHighlight'"
11
+ :size="'2xl'"
12
+ :text="'DIRECT ELIMINATION'"
13
+ :weight="'normal'"
14
+ data-testid="text-add-tournament"
15
+ />
16
+ </div>
17
+ <div class="w-full flex flex-col mb-3 ml-1">
18
+ <BaseText
19
+ :color="'quinary'"
20
+ :size="'sm'"
21
+ :text="'Define the criteria for promoting fencers to the Direct Elimination (DE) stage. These options specify how fencers advance based on their performance metrics. Ensure the correct order of criteria to reflect their importance in the promotion process.'"
22
+ :weight="'normal'"
23
+ data-testid="text-registration"
24
+ />
25
+ </div>
26
+
27
+ <div class="grow">
28
+ <div class="mb-4 mt-8">
29
+ <BaseText :color="'quaternary'" :size="'xs'" :text="'TYPE OF DIRECT ELIMINATION'" class="border-b mb-5" />
30
+ </div>
31
+ <div class="mb-2 flex flex-col">
32
+ <BaseText
33
+ :color="'quinary'"
34
+ :size="'sm'"
35
+ :text="'Please select the format type for the direct elimination bracket of your event.'"
36
+ :weight="'normal'"
37
+ data-testid="text-registration"
38
+ class="mb-4"
39
+ />
40
+ <DropDownMenu
41
+ label="Select Format"
42
+ :items="DEFormats"
43
+ :selected-item="selectedFormat"
44
+ :alignEnd="false"
45
+ :width="'w-full'"
46
+ :dropDownWidth="'w-full'"
47
+ @update:selectedItem="handleDEFormatChange"
48
+ />
49
+ </div>
50
+ </div>
51
+
52
+ <div class="mb-4 mt-8">
53
+ <BaseText :color="'quaternary'" :size="'xs'" :text="'DIRECT ELIMINATION CONFIGURATION'" class="border-b mb-5" />
54
+ <BaseText
55
+ :color="'quaternary'"
56
+ :size="'sm'"
57
+ :text="'Timer duration is in seconds.'"
58
+ :weight="'normal'"
59
+ class="mt-1"
60
+ />
61
+ </div>
62
+ <div class="mb-2 flex">
63
+ <div class="mt-1 h-10 w-52">
64
+ <Toggle
65
+ :checked="localEventConfig.DETimer"
66
+ label="DE Timer"
67
+ :labelLeft="false"
68
+ @update:checked="handleDETimerToggle"
69
+ />
70
+ </div>
71
+ <TitledInput
72
+ v-if="localEventConfig.DETimer"
73
+ :inputValue="localEventConfig.DETime"
74
+ :invalid="validation.DETime"
75
+ inputType="number"
76
+ placeholder="Enter Time in Seconds"
77
+ title=""
78
+ @update:value="handleDETimeChange"
79
+ />
80
+ </div>
81
+ <div class="mb-2 flex">
82
+ <div class="mt-1 h-10 w-52">
83
+ <Toggle
84
+ :checked="localEventConfig.DEBoutCounter"
85
+ label="DE Pass Counter"
86
+ :labelLeft="false"
87
+ inputType="number"
88
+ @update:checked="handleDEBoutCountToggle"
89
+ />
90
+ </div>
91
+ <TitledInput
92
+ v-if="localEventConfig.DEBoutCounter"
93
+ :inputValue="localEventConfig.DEBoutCount"
94
+ inputType="number"
95
+ :invalid="validation.DEBoutCount"
96
+ placeholder="Enter Number of Passes"
97
+ title=""
98
+ @update:value="handleDEBoutCountChange"
99
+ />
100
+ </div>
101
+ <div class="mb-2 flex">
102
+ <div class="mt-1 h-10 w-52">
103
+ <Toggle
104
+ :checked="localEventConfig.DEMax"
105
+ label="DE Max Points"
106
+ :labelLeft="false"
107
+ @update:checked="handleDEMax"
108
+ />
109
+ </div>
110
+ <TitledInput
111
+ v-if="localEventConfig.DEMax"
112
+ :inputValue="localEventConfig.DEMaxPoints"
113
+ :invalid="validation.DEMaxPoints"
114
+ placeholder="Enter DE Max Points"
115
+ inputType="number"
116
+ title=""
117
+ @update:value="handleDEMaxPointsChange"
118
+ />
119
+ </div>
120
+ </div>
121
+
122
+ <div v-if="localEventConfig.DEType === 'single'" class="grow">
123
+ <div class="mb-4 mt-8">
124
+ <BaseText
125
+ :color="'quaternary'"
126
+ :size="'xs'"
127
+ :text="'TIE FOR THIRD PLACE OR FENCE OFF FOR THIRD'"
128
+ class="border-b mb-5"
129
+ />
130
+ </div>
131
+ <div class="mt-8 h-10 w-52">
132
+ <Toggle
133
+ :checked="localEventConfig.thirdPlaceBout"
134
+ :label="thirdPlaceLabel"
135
+ :labelLeft="false"
136
+ @update:checked="handleThirdPlaceToggle"
137
+ />
138
+ </div>
139
+ </div>
140
+
141
+ <div class="flex flex-row justify-center h-12 mt-4">
142
+ <BaseButton class="w-1/2 ml-1" color="neutral" label="Back" size="sm" type="primary" @buttonClick="handleBack" />
143
+ <BaseButton
144
+ class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
145
+ color="neutral"
146
+ :label="nextButtonLabel"
147
+ selected="selected"
148
+ size="sm"
149
+ type="primary"
150
+ @buttonClick="handleNext"
151
+ />
152
+ </div>
153
+ </div>
154
+ </template>
155
+
156
+ <script>
157
+ import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
158
+ import BaseText from '../../../../Atoms/Text/BaseText.vue';
159
+ import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
160
+ import MultiSelect from '../../../../Molecules/Inputs/MultiSelect/MultiSelect.vue';
161
+ import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
162
+ import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
163
+ import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
164
+
165
+ export default {
166
+ name: 'DirectElimination',
167
+ components: { DropDownMenu, BaseButton, StepIndicator, BaseText, TitledInput, Toggle, MultiSelect },
168
+ props: {
169
+ nextButtonLabel: { type: String, default: 'Submit' },
170
+ eventConfig: Object,
171
+ validation: Object,
172
+ currentStep: Number,
173
+ steps: Array,
174
+ DEFormats: Array
175
+ },
176
+ emits: ['update', 'update:back', 'update:submit'],
177
+ data() {
178
+ return {
179
+ localEventConfig: { ...this.eventConfig },
180
+ selectedFormat: { link: 1, text: 'Single Elimination' }
181
+ };
182
+ },
183
+ computed: {
184
+ thirdPlaceLabel() {
185
+ return this.eventConfig.thirdPlaceBout ? '3rd Place Fence Off' : 'Tie for 3rd Place';
186
+ }
187
+ },
188
+ methods: {
189
+ handleDETimerToggle(value) {
190
+ this.localEventConfig.DETimer = value;
191
+ this.$emit('update', { DETimer: value });
192
+ },
193
+ handleDETimeChange(value) {
194
+ this.$emit('update', { DETime: value });
195
+ },
196
+ handleDEBoutCountToggle(value) {
197
+ this.localEventConfig.DEBoutCounter = value;
198
+ this.$emit('update', { DEBoutCounter: value });
199
+ },
200
+ handleDEBoutCountChange(value) {
201
+ this.$emit('update', { DEBoutCount: value });
202
+ },
203
+ handleDEMax(value) {
204
+ this.localEventConfig.DEMax = value;
205
+ this.$emit('update', { DEMax: value });
206
+ },
207
+ handleDEMaxPointsChange(value) {
208
+ this.$emit('update', { DEMaxPoints: value });
209
+ },
210
+ handleThirdPlaceToggle(value) {
211
+ this.$emit('update', { thirdPlaceBout: value });
212
+ },
213
+ handleBack() {
214
+ this.$emit('update:back');
215
+ },
216
+ handleNext() {
217
+ this.$emit('update:submit');
218
+ },
219
+ handleDEFormatChange(value) {
220
+ this.selectedFormat = value;
221
+ this.localEventConfig.DEType = value.text === 'Single Elimination' ? 'single' : 'double';
222
+ this.$emit('update', { DEType: this.localEventConfig.DEType });
223
+ }
224
+ }
225
+ };
226
+ </script>