@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.
Files changed (67) hide show
  1. package/AGENTS.md +3 -0
  2. package/dist/HemaTournamentUI-lib.es.js +10512 -10219
  3. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  4. package/dist/hematournamentui-tailwind.css +14 -0
  5. package/dist/hematournamentui.css +1 -1
  6. package/package.json +92 -92
  7. package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +1 -1
  8. package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +1 -1
  9. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +2 -2
  10. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +25 -22
  11. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +31 -29
  12. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.vue +2 -4
  13. package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +31 -31
  14. package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.stories.js +6 -6
  15. package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +64 -53
  16. package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.stories.js +6 -7
  17. package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.vue +18 -10
  18. package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +4 -4
  19. package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +64 -45
  20. package/src/stories/Organisms/Containers/Pool/Pool.vue +1 -1
  21. package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +35 -20
  22. package/src/stories/Templates/Assignment/Assignment.stories.js +17 -15
  23. package/src/stories/Templates/Assignment/Assignment.vue +71 -40
  24. package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.stories.js +49 -30
  25. package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.vue +29 -28
  26. package/src/stories/Templates/ClubManagement/{ClubMangement.stories.js → ClubManagement.stories.js} +74 -59
  27. package/src/stories/Templates/ClubManagement/ClubManagement.vue +104 -92
  28. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +92 -97
  29. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +37 -33
  30. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +11 -14
  31. package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +34 -37
  32. package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js +11 -10
  33. package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +8 -8
  34. package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.stories.js +13 -16
  35. package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.vue +15 -19
  36. package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.stories.js +25 -24
  37. package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.vue +28 -34
  38. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +54 -19
  39. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +75 -68
  40. package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +55 -45
  41. package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +47 -55
  42. package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +56 -55
  43. package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +71 -73
  44. package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +18 -16
  45. package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +9 -6
  46. package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +22 -19
  47. package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +44 -36
  48. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +30 -23
  49. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +55 -58
  50. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +67 -0
  51. package/src/stories/Templates/PersonManagement/Admin/{Administration.vue → Administration/Administration.vue} +94 -87
  52. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -0
  53. package/src/stories/Templates/PersonManagement/Admin/{FencerAdmin.vue → FencerAdmin/FencerAdmin.vue} +90 -77
  54. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -0
  55. package/src/stories/Templates/PersonManagement/Admin/{MergeAccounts.vue → MergeAccounts/MergeAccounts.vue} +258 -242
  56. package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +28 -28
  57. package/src/stories/Templates/PersonManagement/PersonManagement.vue +1 -1
  58. package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +45 -28
  59. package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +22 -16
  60. package/src/stories/Templates/TournamentManagement/{TournamentMangement.stories.js → TournamentManagement.stories.js} +68 -39
  61. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +199 -153
  62. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +113 -0
  63. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +123 -106
  64. package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.stories.js +76 -31
  65. package/src/stories/Templates/TournamentManagement/TournamentPageTwo/{TouranmentPageTwo.vue → TournamentPageTwo.vue} +63 -44
  66. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin.stories.js +0 -48
  67. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TouranmentPageOne.stories.js +0 -63
@@ -12,7 +12,7 @@
12
12
  :size="'xl'"
13
13
  :text="'Do you want MeyerSquared to host your tournament?'"
14
14
  :weight="'normal'"
15
- data-testid="text-ferrotas-to-host"
15
+ data-testid="text-meyer-squared-to-host"
16
16
  class="border-b border-dropdownSelect mb-2"
17
17
  />
18
18
  <BaseText
@@ -32,7 +32,7 @@
32
32
  label="Yes"
33
33
  size="sm"
34
34
  type="square"
35
- :selected="!!tournament.HostedOnM2"
35
+ :selected="isHosted"
36
36
  @buttonClick="handleHostedChoice(true)"
37
37
  />
38
38
  <BaseButton
@@ -41,14 +41,13 @@
41
41
  label="No"
42
42
  size="sm"
43
43
  type="square"
44
- :selected="!tournament.HostedOnM2"
44
+ :selected="!isHosted"
45
45
  @buttonClick="handleHostedChoice(false)"
46
46
  />
47
47
  </div>
48
48
  </section>
49
49
 
50
- <!-- Results Import (only when NOT hosted) -->
51
- <div v-if="!tournament.HostedOnM2" class="flex flex-col pb-4 mt-10">
50
+ <div v-if="!isHosted" class="flex flex-col pb-4 mt-10">
52
51
  <BaseText
53
52
  :color="'primaryHighlight'"
54
53
  :size="'xl'"
@@ -73,22 +72,22 @@
73
72
  label="Not now"
74
73
  size="sm"
75
74
  type="square"
76
- :selected="!tournament.ResultsEnabled"
75
+ :selected="!resultsEnabled"
77
76
  @buttonClick="emitUpdate('ResultsEnabled', false)"
78
77
  />
79
78
  <BaseButton
80
79
  class="w-1/2 ml-1"
81
80
  color="neutral"
82
- label="Yes, Ill upload results"
81
+ label="Yes, I'll upload results"
83
82
  size="sm"
84
83
  type="square"
85
- :selected="!!tournament.ResultsEnabled"
84
+ :selected="resultsEnabled"
86
85
  @buttonClick="emitUpdate('ResultsEnabled', true)"
87
86
  />
88
87
  </div>
89
88
  </section>
90
89
 
91
- <div v-if="tournament.ResultsEnabled" class="w-full flex flex-col items-center mt-6">
90
+ <div v-if="resultsEnabled" class="w-full flex flex-col items-center mt-6">
92
91
  <BaseText
93
92
  :color="'quaternary'"
94
93
  :size="'sm'"
@@ -98,9 +97,7 @@
98
97
  data-testid="text-results-anytime"
99
98
  />
100
99
 
101
- <!-- This does not navigate by itself; it just emits an intent.
102
- Parent can switch to a "Results Import" tab/screen. -->
103
- <BaseButton
100
+ <BaseButton
104
101
  class="w-3/4"
105
102
  color="neutral"
106
103
  label="Go to Results Import"
@@ -111,8 +108,7 @@
111
108
  </div>
112
109
  </div>
113
110
 
114
- <!-- Visibility (only when hosted) -->
115
- <div v-if="tournament.HostedOnM2" class="flex flex-col pb-4 mt-10">
111
+ <div v-if="isHosted" class="flex flex-col pb-4 mt-10">
116
112
  <BaseText
117
113
  :color="'primaryHighlight'"
118
114
  :invalid="validation.visibility"
@@ -133,15 +129,14 @@
133
129
  <BaseRadioGroup
134
130
  :invalid="validation.visibility"
135
131
  :items="visibilityItems"
136
- :value="tournament.Visibility"
132
+ :value="visibility"
137
133
  @update:value="value => emitUpdate('Visibility', value)"
138
134
  class="w-3/4"
139
135
  />
140
136
  </div>
141
137
  </div>
142
138
 
143
- <!-- Waiver Required (only when hosted) -->
144
- <div v-if="tournament.HostedOnM2" class="flex flex-col pb-4 mt-10">
139
+ <div v-if="isHosted" class="flex flex-col pb-4 mt-10">
145
140
  <BaseText
146
141
  :color="'primaryHighlight'"
147
142
  :invalid="validation.waiverScope"
@@ -162,7 +157,7 @@
162
157
  <BaseRadioGroup
163
158
  :invalid="validation.waiverScope"
164
159
  :items="waiverItems"
165
- :value="tournament.WaiverScope"
160
+ :value="waiverScope"
166
161
  @update:value="value => emitUpdate('WaiverScope', value)"
167
162
  class="w-3/4"
168
163
  />
@@ -190,7 +185,7 @@
190
185
 
191
186
  <BaseText :color="'quaternary'" :size="'sm'" :text="'Registration (Payment) Link'" :weight="'normal'" class="mb-1" data-testid="text-registration-link"/>
192
187
  <BaseInput
193
- :value="tournament.RegistrationLink"
188
+ :value="registrationLink"
194
189
  :addBorder="true"
195
190
  class="pb-2 w-full mb-4"
196
191
  iconName="fa-dash"
@@ -200,7 +195,7 @@
200
195
 
201
196
  <BaseText :color="'quaternary'" :size="'sm'" :text="'Tournament Rules and Documents'" :weight="'normal'" class="mb-1" data-testid="text-rules-link"/>
202
197
  <BaseInput
203
- :value="tournament.RulesLink"
198
+ :value="rulesLink"
204
199
  :addBorder="true"
205
200
  class="pb-2 w-full"
206
201
  iconName="fa-dash"
@@ -234,19 +229,37 @@ export default {
234
229
  waiverScope: false,
235
230
  },
236
231
  visibilityItems: [
237
- { label: 'Open', value: 'Open', description: 'Viewable To Everyone' },
238
- { label: 'Club', value: 'Club', description: 'Viewable Only to Members of Your Club' },
239
- { label: 'Private', value: 'Private', description: 'Only Viewable by you' },
240
- ],
241
- waiverItems: [
242
- { label: 'No', value: 'none', description: 'No waiver required' },
243
- { label: 'Club Waiver', value: 'club', description: 'Sign once, good forever' },
244
- { label: 'Tournament Waiver', value: 'tournament', description: 'Only for this tournament' },
245
- ],
232
+ { label: 'Open', value: 'Open', description: 'Viewable to everyone' },
233
+ { label: 'Club', value: 'Club', description: 'Viewable only to members of your club' },
234
+ { label: 'Private', value: 'Private', description: 'Only viewable by you' },
235
+ ],
236
+ waiverItems: [
237
+ { label: 'No', value: 'None', description: 'No waiver required' },
238
+ { label: 'Club Waiver', value: 'Club', description: 'Sign once, good forever' },
239
+ { label: 'Tournament Waiver', value: 'Tournament', description: 'Only for this tournament' },
240
+ ],
246
241
  };
247
- },
248
- computed: {
249
- hostingDescription() {
242
+ },
243
+ computed: {
244
+ isHosted() {
245
+ return !!this.tournament?.HostedOnM2;
246
+ },
247
+ resultsEnabled() {
248
+ return !!this.tournament?.ResultsEnabled;
249
+ },
250
+ visibility() {
251
+ return this.tournament?.Visibility || 'Open';
252
+ },
253
+ waiverScope() {
254
+ return this.tournament?.WaiverScope || 'None';
255
+ },
256
+ registrationLink() {
257
+ return this.tournament?.RegistrationLink || '';
258
+ },
259
+ rulesLink() {
260
+ return this.tournament?.RulesLink || '';
261
+ },
262
+ hostingDescription() {
250
263
  return `If you select 'No', your tournament will be featured on our main calendar and you can link out to your registration page.\n\n`
251
264
  + `You can also publish final results on MeyerSquared later (any time) to support ratings and historical records.\n\n`
252
265
  + `By selecting 'Yes', you'll gain access to the full MeyerSquared platform to run pools, brackets, and live scoring.`;
@@ -256,16 +269,22 @@ export default {
256
269
  + `You can upload results now, or come back after the tournament and upload them later.`;
257
270
  }
258
271
  },
259
- methods: {
260
- emitUpdate(field, value) {
261
- this.$emit('update:tournament', { [field]: value });
262
- },
263
- handleHostedChoice(isHosted) {
264
- this.emitUpdate('HostedOnM2', isHosted);
272
+ methods: {
273
+ emitUpdate(field, value) {
274
+ this.$emit('update:tournament', { [field]: value });
275
+ },
276
+ emitTournamentUpdate(updatedTournamentFields) {
277
+ this.$emit('update:tournament', updatedTournamentFields);
278
+ },
279
+ handleHostedChoice(isHosted) {
280
+ if (isHosted) {
281
+ this.emitTournamentUpdate({ HostedOnM2: true, ResultsEnabled: false });
282
+ return;
283
+ }
284
+
285
+ this.emitUpdate('HostedOnM2', false);
286
+ }
287
+ }
288
+ };
289
+ </script>
265
290
 
266
- // If they switch to Hosted, results import doesn't apply. Clear it to avoid confusion.
267
- if (isHosted) this.emitUpdate('ResultsEnabled', false);
268
- }
269
- }
270
- };
271
- </script>
@@ -1,48 +0,0 @@
1
- import FencerAdmin from './FencerAdmin.vue';
2
- import personsMock from "../../../../mocks/personsMock.js";
3
-
4
- export default {
5
- title: 'Templates/PersonManagement/Admin/FencerAdmin',
6
- component: FencerAdmin,
7
- tags: ['autodocs'],
8
- args: {
9
- person: personsMock
10
- },
11
- argTypes: {
12
- person: { control: { type: 'object' } }
13
- }
14
- };
15
-
16
- export const Default = {
17
- args: {
18
- person: personsMock
19
- }
20
- };
21
-
22
- export const WithAdminAccess = {
23
- args: {
24
- person: {
25
- ...personsMock,
26
- AccessLevel: 'Admin',
27
- HemaRatingsId: '12345'
28
- }
29
- }
30
- };
31
-
32
- export const WithoutHemaRating = {
33
- args: {
34
- person: {
35
- ...personsMock[0],
36
- HemaRatingsId: ''
37
- }
38
- }
39
- };
40
-
41
- export const WithClubAccess = {
42
- args: {
43
- person: {
44
- ...personsMock[0],
45
- AccessLevel: 'Club'
46
- }
47
- }
48
- };
@@ -1,63 +0,0 @@
1
- import TournamentForm from "./TournamentPageOne.vue";
2
- import mockLocation from "../../../../mocks/locationMock.js";
3
- import mockTournaments from "../../../../mocks/tournamentMock.js";
4
- import mockPersons from "../../../../mocks/personsMock.js";
5
-
6
- export default {
7
- title: 'Templates/TournamentManagement/TournamentPageOne',
8
- component: TournamentForm,
9
- tags: ["autodocs"],
10
- args: {
11
- tournament: mockTournaments[0],
12
- locations: mockLocation,
13
- },
14
- argTypes: {
15
- tournament: {
16
- control: { type: "object" },
17
- },
18
- locations: {
19
- control: { type: "object" },
20
- },
21
- },
22
- };
23
-
24
- export const Default = {
25
- args: {
26
- tournament: mockTournaments[0],
27
- locations: mockLocation,
28
- persons: mockPersons,
29
- validation: {
30
- Name: { invalid: false, message: '' },
31
- Address: { invalid: false, message: '' },
32
- StartDate: { invalid: false, message: '' },
33
- TotalDays: { invalid: false, message: '' },
34
- RegistrationCutOff: { invalid: false, message: '' },
35
- Description: { invalid: false, message: '' },
36
- },
37
- },
38
- };
39
-
40
- export const EmptyTournament = {
41
- args: {
42
- tournament: {
43
- Name: '',
44
- Address: { Name: '' },
45
- StartDate: new Date(),
46
- TotalDays: 1,
47
- RegistrationCutOff: new Date(),
48
- PrimaryContactId: mockPersons?.[0]?.PersonId ?? 0,
49
- Images: [{ URL: '' }],
50
- Description: '',
51
- },
52
- locations: mockLocation,
53
- persons: mockPersons,
54
- validation: {
55
- Name: { invalid: false, message: '' },
56
- Address: { invalid: false, message: '' },
57
- StartDate: { invalid: false, message: '' },
58
- TotalDays: { invalid: false, message: '' },
59
- RegistrationCutOff: { invalid: false, message: '' },
60
- Description: { invalid: false, message: '' },
61
- },
62
- },
63
- };