@dcrackel/hematournamentui 1.0.708 → 1.0.710

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 (38) hide show
  1. package/README.md +148 -106
  2. package/dist/HemaTournamentUI-lib.es.js +6678 -6196
  3. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  4. package/dist/hematournamentui-tailwind.css +16 -6
  5. package/package.json +1 -1
  6. package/src/stories/Atoms/Input/BaseInput.test.js +97 -85
  7. package/src/stories/Atoms/Input/BaseInput.vue +149 -150
  8. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -20
  9. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -0
  10. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -133
  11. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +48 -41
  12. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +227 -206
  13. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -225
  14. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
  15. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +133 -91
  16. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.test.js +191 -0
  17. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +366 -309
  18. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -171
  19. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -215
  20. package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -0
  21. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -52
  22. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -75
  23. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +14 -0
  24. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -0
  25. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +13 -3
  26. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -172
  27. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -103
  28. package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -0
  29. package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -213
  30. package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -0
  31. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -83
  32. package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +89 -0
  33. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -360
  34. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -113
  35. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +292 -280
  36. package/src/stories/Util/Validations/PersonManagementValidations.js +45 -29
  37. package/src/stories/Util/Validations/PriceValidation.js +6 -0
  38. package/src/stories/Util/Validations/TournamentFieldsValidations.js +4 -0
@@ -1,206 +1,227 @@
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="flex flex-row mb-3 grow">
30
- <div class="mr-1 w-full">
31
- <BaseText
32
- color="quinary"
33
- :invalid="validation.startDate"
34
- size="sm"
35
- text="Start Date"
36
- weight="normal"
37
- class="mb-1"
38
- />
39
- <DatePicker
40
- :invalid="validation.Date"
41
- :setDate="eventConfig.Date"
42
- :userLevel="userLevel"
43
- @update:selectedDate="handleDateUpdate"
44
- />
45
- </div>
46
- </div>
47
-
48
- <div class="mb-4 grow">
49
- <BaseText
50
- color="quinary"
51
- :invalid="validation.StartTime"
52
- size="sm"
53
- text="Start Time"
54
- weight="normal"
55
- class="mb-1"
56
- />
57
- <DatePicker
58
- :invalid="validation.StartTime"
59
- :setDate="eventConfig.StartTime"
60
- pickerMode="time"
61
- @update:selectedDate="handleTimeUpdate"
62
- />
63
- </div>
64
-
65
- <div class="mb-4 grow">
66
- <BaseText
67
- color="quinary"
68
- :invalid="validation.WeaponId"
69
- size="sm"
70
- text="Weapon Form"
71
- weight="normal"
72
- class="mb-1"
73
- />
74
- <DropDownMenu
75
- :label="''"
76
- :items="weapons"
77
- :selected-item="selectedWeapon"
78
- :alignEnd="false"
79
- width="w-full"
80
- @update:selectedItem="handleWeaponChange"
81
- />
82
- </div>
83
-
84
- <div class="mb-4 grow">
85
- <TitledInput
86
- :inputValue="eventConfig.NumberOfRings || 2"
87
- :invalid="validation.NumberOfRings"
88
- placeholder="Enter Number of Rings"
89
- inputType="number"
90
- title="Number of Rings"
91
- @update:value="handleNumberOfRingsChange"
92
- />
93
- </div>
94
-
95
- <div class="mb-4 grow">
96
- <TitledInput
97
- :inputValue="eventConfig.CutOffNumber || ''"
98
- placeholder="Unlimited"
99
- inputType="number"
100
- title="Max Fencers Allowed In (blank is unlimited)"
101
- @update:value="handleCutOffNumber"
102
- />
103
- </div>
104
-
105
- <div class="flex flex-row justify-center h-12 mt-4">
106
- <BaseButton
107
- class="w-1/2 ml-1 h-12"
108
- color="neutral"
109
- label="Cancel"
110
- size="sm"
111
- type="primary"
112
- @buttonClick="handleBack"
113
- />
114
- <BaseButton
115
- class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
116
- color="neutral"
117
- label="Next"
118
- selected
119
- size="sm"
120
- type="primary"
121
- @buttonClick="handleNext"
122
- />
123
- </div>
124
- </div>
125
- </template>
126
-
127
- <script>
128
- import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
129
- import BaseText from '../../../../Atoms/Text/BaseText.vue';
130
- import DatePicker from '../../../ComplexInputs/DatePicker/DatePicker.vue';
131
- import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
132
- import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
133
- import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
134
-
135
- export default {
136
- name: 'BasicEventInfoForm',
137
- emits: ['update', 'update:back', 'update:next'],
138
- components: { StepIndicator, BaseText, DropDownMenu, DatePicker, TitledInput, BaseButton },
139
- props: {
140
- eventConfig: {
141
- type: Object,
142
- required: true
143
- },
144
- weapons: {
145
- type: Array,
146
- required: true
147
- },
148
- validation: {
149
- type: Object,
150
- required: true
151
- },
152
- steps: {
153
- type: Array,
154
- required: true
155
- },
156
- currentStep: {
157
- type: Number,
158
- required: true
159
- },
160
- userLevel: {
161
- type: String,
162
- default: 'Club'
163
- }
164
- },
165
- data() {
166
- return {
167
- validationState: {
168
- invalid: false,
169
- message: ''
170
- }
171
- };
172
- },
173
- computed: {
174
- selectedWeapon() {
175
- const weapon = this.weapons.find(w => w.Id === this.eventConfig.WeaponId);
176
- return weapon ? weapon.Name : { text: 'Longsword', link: 1 };
177
- }
178
- },
179
- methods: {
180
- handleEventNameChange(value) {
181
- this.$emit('update', { EventName: value });
182
- },
183
- handleDateUpdate(value) {
184
- this.$emit('update', { Date: value });
185
- },
186
- handleTimeUpdate(value) {
187
- this.$emit('update', { StartTime: value });
188
- },
189
- handleNumberOfRingsChange(value) {
190
- this.$emit('update', { NumberOfRings: value });
191
- },
192
- handleWeaponChange(value) {
193
- this.$emit('update', { WeaponId: value.link });
194
- },
195
- handleCutOffNumber(value) {
196
- this.$emit('update', { CutOffNumber: value });
197
- },
198
- handleNext() {
199
- this.$emit('update:next');
200
- },
201
- handleBack() {
202
- this.$emit('update:back');
203
- }
204
- }
205
- };
206
- </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="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>