@dcrackel/hematournamentui 1.0.711 → 1.0.713

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 (109) hide show
  1. package/.prettierignore +7 -7
  2. package/.storybook/main.js +3 -1
  3. package/README.md +182 -148
  4. package/dist/HemaTournamentUI-lib.es.js +4150 -4039
  5. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  6. package/dist/hematournamentui-tailwind.css +11 -0
  7. package/package.json +96 -96
  8. package/prettier.config.js +16 -16
  9. package/src/main.js +1 -1
  10. package/src/mocks/getDEBouts-TableOf128.js +37 -37
  11. package/src/mocks/getDEBouts-TableOf64.js +35 -35
  12. package/src/stories/Atoms/Input/BaseInput.test.js +97 -97
  13. package/src/stories/Atoms/Input/BaseInput.vue +149 -149
  14. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -23
  15. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -35
  16. package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -0
  17. package/src/stories/Molecules/Menus/HoverActions/HoverActions.test.js +138 -0
  18. package/src/stories/Molecules/Menus/HoverActions/HoverActions.vue +212 -0
  19. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +6 -0
  20. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -18
  21. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +1 -1
  22. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +5 -1
  23. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +19 -10
  24. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +11 -7
  25. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +33 -33
  26. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +45 -45
  27. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +103 -103
  28. package/src/stories/Organisms/Cards/Director/DirectorCard.test.js +82 -0
  29. package/src/stories/Organisms/Cards/Director/DirectorCard.vue +32 -51
  30. package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -51
  31. package/src/stories/Organisms/Cards/EventCard/EventCard.stories.js +41 -1
  32. package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -0
  33. package/src/stories/Organisms/Cards/EventCard/EventCard.vue +62 -30
  34. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -298
  35. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +77 -60
  36. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +144 -143
  37. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +289 -256
  38. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -69
  39. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -80
  40. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +153 -153
  41. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +4 -0
  42. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -31
  43. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -109
  44. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -192
  45. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +1 -0
  46. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +247 -204
  47. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +89 -15
  48. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +29 -29
  49. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +46 -46
  50. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -21
  51. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -39
  52. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -145
  53. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -64
  54. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +36 -57
  55. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +101 -65
  56. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +14 -1
  57. package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.vue +12 -5
  58. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +52 -48
  59. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +256 -227
  60. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -226
  61. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
  62. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +137 -133
  63. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.test.js +221 -191
  64. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +372 -366
  65. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -172
  66. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -216
  67. package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -79
  68. package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -0
  69. package/src/stories/Organisms/Wizards/EditEventWizard/WeaponSelection.test.js +138 -0
  70. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +123 -12
  71. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +178 -166
  72. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +35 -7
  73. package/src/stories/Templates/EventManagement/Bracket/BracketDirectorAssignment.test.js +242 -0
  74. package/src/stories/Templates/EventManagement/Bracket/BracketMobile.test.js +131 -0
  75. package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +42 -39
  76. package/src/stories/Templates/EventManagement/Bracket/BracketStories.test.js +80 -0
  77. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.js +93 -0
  78. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.test.js +152 -0
  79. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -39
  80. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -79
  81. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -93
  82. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -91
  83. package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +31 -1
  84. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -121
  85. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +9 -2
  86. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +5 -4
  87. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +81 -81
  88. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -39
  89. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +101 -101
  90. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -71
  91. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +86 -86
  92. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -86
  93. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +247 -247
  94. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -170
  95. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -156
  96. package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -329
  97. package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -329
  98. package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -42
  99. package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +58 -45
  100. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -84
  101. package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -114
  102. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -363
  103. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -116
  104. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -307
  105. package/src/stories/Util/Validations/PersonManagementValidations.js +45 -45
  106. package/src/stories/Util/Validations/PriceValidation.js +6 -6
  107. package/src/stories/Util/boutDirectorAssignment.js +46 -0
  108. package/src/stories/Util/registrationStatus.js +11 -0
  109. package/src/stories/Util/tabs.js +19 -47
@@ -1,227 +1,256 @@
1
- <template>
2
- <div class="flex flex-col h-full pb-4">
3
- <div class="w-full flex justify-center grow">
4
- <StepIndicator :steps="steps" :selected="currentStep" />
5
- </div>
6
- <div class="w-full flex flex-row justify-center my-4 grow">
7
- <BaseText color="primaryHighlight" size="2xl" text="Basic Event Information" weight="normal" />
8
- </div>
9
- <div class="w-full flex flex-row justify-center my-4 grow">
10
- <BaseText
11
- color="quinary"
12
- size="sm"
13
- text="Please fill in the basic information required for your event, including the event name, start date, start time, number of rings, and weapon form."
14
- weight="normal"
15
- />
16
- </div>
17
-
18
- <div class="mb-4 grow">
19
- <BaseText color="quaternary" size="sm" text="BASIC INFORMATION" class="border-b mb-5" />
20
- <TitledInput
21
- :inputValue="eventConfig.EventName || ''"
22
- :invalid="validation.EventName.invalid"
23
- placeholder="Enter Event Name"
24
- :title="validation.EventName.invalid ? `Event Name - ${validation.EventName.message}` : 'Event Name'"
25
- @update:value="handleEventNameChange"
26
- />
27
- </div>
28
-
29
- <div class="mb-4 grow">
30
- <TitledInput
31
- :inputValue="eventConfig.EventPrice ?? ''"
32
- :invalid="priceValidation.invalid"
33
- placeholder="0.00"
34
- :title="priceValidationLabel"
35
- @update:value="handleEventPriceChange"
36
- />
37
- </div>
38
-
39
- <div class="flex flex-row mb-3 grow">
40
- <div class="mr-1 w-full">
41
- <BaseText
42
- color="quinary"
43
- :invalid="validation.startDate"
44
- size="sm"
45
- text="Start Date"
46
- weight="normal"
47
- class="mb-1"
48
- />
49
- <DatePicker
50
- :invalid="validation.Date"
51
- :setDate="eventConfig.Date"
52
- :userLevel="userLevel"
53
- @update:selectedDate="handleDateUpdate"
54
- />
55
- </div>
56
- </div>
57
-
58
- <div class="mb-4 grow">
59
- <BaseText
60
- color="quinary"
61
- :invalid="validation.StartTime"
62
- size="sm"
63
- text="Start Time"
64
- weight="normal"
65
- class="mb-1"
66
- />
67
- <DatePicker
68
- :invalid="validation.StartTime"
69
- :setDate="eventConfig.StartTime"
70
- pickerMode="time"
71
- @update:selectedDate="handleTimeUpdate"
72
- />
73
- </div>
74
-
75
- <div class="mb-4 grow">
76
- <BaseText
77
- color="quinary"
78
- :invalid="validation.WeaponId"
79
- size="sm"
80
- text="Weapon Form"
81
- weight="normal"
82
- class="mb-1"
83
- />
84
- <DropDownMenu
85
- :label="''"
86
- :items="weapons"
87
- :selected-item="selectedWeapon"
88
- :alignEnd="false"
89
- width="w-full"
90
- @update:selectedItem="handleWeaponChange"
91
- />
92
- </div>
93
-
94
- <div class="mb-4 grow">
95
- <TitledInput
96
- :inputValue="eventConfig.NumberOfRings || 2"
97
- :invalid="validation.NumberOfRings"
98
- placeholder="Enter Number of Rings"
99
- inputType="number"
100
- title="Number of Rings"
101
- @update:value="handleNumberOfRingsChange"
102
- />
103
- </div>
104
-
105
- <div class="mb-4 grow">
106
- <TitledInput
107
- :inputValue="eventConfig.CutOffNumber || ''"
108
- placeholder="Unlimited"
109
- inputType="number"
110
- title="Max Fencers Allowed In (blank is unlimited)"
111
- @update:value="handleCutOffNumber"
112
- />
113
- </div>
114
-
115
- <div class="flex flex-row justify-center h-12 mt-4">
116
- <BaseButton
117
- class="w-1/2 ml-1 h-12"
118
- color="neutral"
119
- label="Cancel"
120
- size="sm"
121
- type="primary"
122
- @buttonClick="handleBack"
123
- />
124
- <BaseButton
125
- class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
126
- color="neutral"
127
- :label="nextButtonLabel"
128
- selected
129
- size="sm"
130
- type="primary"
131
- @buttonClick="handleNext"
132
- />
133
- </div>
134
- </div>
135
- </template>
136
-
137
- <script>
138
- import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
139
- import BaseText from '../../../../Atoms/Text/BaseText.vue';
140
- import DatePicker from '../../../ComplexInputs/DatePicker/DatePicker.vue';
141
- import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
142
- import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
143
- import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
144
-
145
- export default {
146
- name: 'BasicEventInfoForm',
147
- emits: ['update', 'update:back', 'update:next'],
148
- components: { StepIndicator, BaseText, DropDownMenu, DatePicker, TitledInput, BaseButton },
149
- props: {
150
- nextButtonLabel: { type: String, default: 'Next' },
151
- eventConfig: {
152
- type: Object,
153
- required: true
154
- },
155
- weapons: {
156
- type: Array,
157
- required: true
158
- },
159
- validation: {
160
- type: Object,
161
- required: true
162
- },
163
- steps: {
164
- type: Array,
165
- required: true
166
- },
167
- currentStep: {
168
- type: Number,
169
- required: true
170
- },
171
- userLevel: {
172
- type: String,
173
- default: 'Club'
174
- }
175
- },
176
- data() {
177
- return {
178
- validationState: {
179
- invalid: false,
180
- message: ''
181
- }
182
- };
183
- },
184
- computed: {
185
- priceValidation() {
186
- return this.validation.EventPrice ?? { invalid: false, message: '' };
187
- },
188
- priceValidationLabel() {
189
- if (!this.priceValidation.invalid) return 'Event Price';
190
- return `Event Price - ${this.priceValidation.message}`;
191
- },
192
- selectedWeapon() {
193
- const weapon = this.weapons.find(w => w.Id === this.eventConfig.WeaponId);
194
- return weapon ? weapon.Name : { text: 'Longsword', link: 1 };
195
- }
196
- },
197
- methods: {
198
- handleEventNameChange(value) {
199
- this.$emit('update', { EventName: value });
200
- },
201
- handleEventPriceChange(value) {
202
- this.$emit('update', { EventPrice: value });
203
- },
204
- handleDateUpdate(value) {
205
- this.$emit('update', { Date: value });
206
- },
207
- handleTimeUpdate(value) {
208
- this.$emit('update', { StartTime: value });
209
- },
210
- handleNumberOfRingsChange(value) {
211
- this.$emit('update', { NumberOfRings: value });
212
- },
213
- handleWeaponChange(value) {
214
- this.$emit('update', { WeaponId: value.link });
215
- },
216
- handleCutOffNumber(value) {
217
- this.$emit('update', { CutOffNumber: value });
218
- },
219
- handleNext() {
220
- this.$emit('update:next');
221
- },
222
- handleBack() {
223
- this.$emit('update:back');
224
- }
225
- }
226
- };
227
- </script>
1
+ <template>
2
+ <div class="flex flex-col h-full pb-4">
3
+ <div class="w-full flex justify-center grow">
4
+ <StepIndicator :steps="steps" :selected="currentStep" />
5
+ </div>
6
+ <div class="w-full flex flex-row justify-center my-4 grow">
7
+ <BaseText color="primaryHighlight" size="2xl" text="Basic Event Information" weight="normal" />
8
+ </div>
9
+ <div class="w-full flex flex-row justify-center my-4 grow">
10
+ <BaseText
11
+ color="quinary"
12
+ size="sm"
13
+ text="Please fill in the basic information required for your event, including the event name, start date, start time, number of rings, and weapon form."
14
+ weight="normal"
15
+ />
16
+ </div>
17
+
18
+ <div class="mb-4 grow">
19
+ <BaseText color="quaternary" size="sm" text="BASIC INFORMATION" class="border-b mb-5" />
20
+ <TitledInput
21
+ :inputValue="eventConfig.EventName || ''"
22
+ :invalid="validation.EventName.invalid"
23
+ placeholder="Enter Event Name"
24
+ :title="validation.EventName.invalid ? `Event Name - ${validation.EventName.message}` : 'Event Name'"
25
+ @update:value="handleEventNameChange"
26
+ />
27
+ </div>
28
+
29
+ <div class="mb-4 grow">
30
+ <TitledInput
31
+ :inputValue="eventConfig.EventPrice ?? ''"
32
+ :invalid="priceValidation.invalid"
33
+ placeholder="0.00"
34
+ :title="priceValidationLabel"
35
+ @update:value="handleEventPriceChange"
36
+ />
37
+ </div>
38
+
39
+ <div class="flex flex-row mb-3 grow">
40
+ <div class="mr-1 w-full">
41
+ <BaseText
42
+ color="quinary"
43
+ :invalid="validation.startDate"
44
+ size="sm"
45
+ text="Start Date"
46
+ weight="normal"
47
+ class="mb-1"
48
+ />
49
+ <DatePicker
50
+ :invalid="validation.Date"
51
+ :setDate="eventConfig.Date"
52
+ :userLevel="userLevel"
53
+ @update:selectedDate="handleDateUpdate"
54
+ />
55
+ </div>
56
+ </div>
57
+
58
+ <div class="mb-4 grow">
59
+ <BaseText
60
+ color="quinary"
61
+ :invalid="validation.StartTime"
62
+ size="sm"
63
+ text="Start Time"
64
+ weight="normal"
65
+ class="mb-1"
66
+ />
67
+ <DatePicker
68
+ :invalid="validation.StartTime"
69
+ :setDate="eventConfig.StartTime"
70
+ pickerMode="time"
71
+ @update:selectedDate="handleTimeUpdate"
72
+ />
73
+ </div>
74
+
75
+ <div class="mb-4 grow">
76
+ <BaseText
77
+ color="quinary"
78
+ :invalid="validation.WeaponId"
79
+ size="sm"
80
+ text="Weapon Form"
81
+ weight="normal"
82
+ class="mb-1"
83
+ />
84
+ <DropDownMenu
85
+ :label="''"
86
+ :items="weaponOptions"
87
+ :selected-item="selectedWeapon"
88
+ :alignEnd="false"
89
+ width="w-full"
90
+ @update:selectedItem="handleWeaponChange"
91
+ />
92
+ </div>
93
+
94
+ <div class="mb-4 grow">
95
+ <TitledInput
96
+ :inputValue="eventConfig.NumberOfRings || 2"
97
+ :invalid="validation.NumberOfRings"
98
+ placeholder="Enter Number of Rings"
99
+ inputType="number"
100
+ title="Number of Rings"
101
+ @update:value="handleNumberOfRingsChange"
102
+ />
103
+ </div>
104
+
105
+ <div class="mb-4 grow">
106
+ <TitledInput
107
+ :inputValue="eventConfig.CutOffNumber || ''"
108
+ placeholder="Unlimited"
109
+ inputType="number"
110
+ title="Max Fencers Allowed In (blank is unlimited)"
111
+ @update:value="handleCutOffNumber"
112
+ />
113
+ </div>
114
+
115
+ <div class="mb-4 grow">
116
+ <Toggle
117
+ :checked="isWaitlistEnabled"
118
+ label="Enable Waitlist"
119
+ :labelLeft="false"
120
+ @update:checked="handleWaitlistChange"
121
+ />
122
+ <BaseText
123
+ text="Allow fencers to join a waitlist when this event reaches capacity."
124
+ size="sm"
125
+ color="quinary"
126
+ class="mt-1"
127
+ />
128
+ </div>
129
+
130
+ <div class="flex flex-row justify-center h-12 mt-4">
131
+ <BaseButton
132
+ class="w-1/2 ml-1 h-12"
133
+ color="neutral"
134
+ label="Cancel"
135
+ size="sm"
136
+ type="primary"
137
+ @buttonClick="handleBack"
138
+ />
139
+ <BaseButton
140
+ class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
141
+ color="neutral"
142
+ :label="nextButtonLabel"
143
+ selected
144
+ size="sm"
145
+ type="primary"
146
+ @buttonClick="handleNext"
147
+ />
148
+ </div>
149
+ </div>
150
+ </template>
151
+
152
+ <script>
153
+ import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
154
+ import BaseText from '../../../../Atoms/Text/BaseText.vue';
155
+ import DatePicker from '../../../ComplexInputs/DatePicker/DatePicker.vue';
156
+ import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
157
+ import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
158
+ import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
159
+ import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
160
+
161
+ export default {
162
+ name: 'BasicEventInfoForm',
163
+ emits: ['update', 'update:back', 'update:next'],
164
+ components: { Toggle, StepIndicator, BaseText, DropDownMenu, DatePicker, TitledInput, BaseButton },
165
+ props: {
166
+ nextButtonLabel: { type: String, default: 'Next' },
167
+ eventConfig: {
168
+ type: Object,
169
+ required: true
170
+ },
171
+ weapons: {
172
+ type: Array,
173
+ required: true
174
+ },
175
+ validation: {
176
+ type: Object,
177
+ required: true
178
+ },
179
+ steps: {
180
+ type: Array,
181
+ required: true
182
+ },
183
+ currentStep: {
184
+ type: Number,
185
+ required: true
186
+ },
187
+ userLevel: {
188
+ type: String,
189
+ default: 'Club'
190
+ }
191
+ },
192
+ data() {
193
+ return {
194
+ validationState: {
195
+ invalid: false,
196
+ message: ''
197
+ }
198
+ };
199
+ },
200
+ computed: {
201
+ isWaitlistEnabled() {
202
+ return this.eventConfig.WaitlistEnabled ?? true;
203
+ },
204
+ priceValidation() {
205
+ return this.validation.EventPrice ?? { invalid: false, message: '' };
206
+ },
207
+ priceValidationLabel() {
208
+ if (!this.priceValidation.invalid) return 'Event Price';
209
+ return `Event Price - ${this.priceValidation.message}`;
210
+ },
211
+ weaponOptions() {
212
+ return this.weapons.map(weapon => ({
213
+ ...weapon,
214
+ text: weapon.text ?? weapon.Name,
215
+ link: weapon.link ?? weapon.Id
216
+ }));
217
+ },
218
+ selectedWeapon() {
219
+ const weapon = this.weaponOptions.find(option => String(option.link) === String(this.eventConfig.WeaponId));
220
+ return weapon ?? { text: 'Select a weapon', link: null };
221
+ }
222
+ },
223
+ methods: {
224
+ handleEventNameChange(value) {
225
+ this.$emit('update', { EventName: value });
226
+ },
227
+ handleEventPriceChange(value) {
228
+ this.$emit('update', { EventPrice: value });
229
+ },
230
+ handleDateUpdate(value) {
231
+ this.$emit('update', { Date: value });
232
+ },
233
+ handleTimeUpdate(value) {
234
+ this.$emit('update', { StartTime: value });
235
+ },
236
+ handleNumberOfRingsChange(value) {
237
+ this.$emit('update', { NumberOfRings: value });
238
+ },
239
+ handleWeaponChange(value) {
240
+ this.$emit('update', { WeaponId: value.link });
241
+ },
242
+ handleCutOffNumber(value) {
243
+ this.$emit('update', { CutOffNumber: value });
244
+ },
245
+ handleWaitlistChange(value) {
246
+ this.$emit('update', { WaitlistEnabled: value });
247
+ },
248
+ handleNext() {
249
+ this.$emit('update:next');
250
+ },
251
+ handleBack() {
252
+ this.$emit('update:back');
253
+ }
254
+ }
255
+ };
256
+ </script>