@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
@@ -0,0 +1,113 @@
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
+ const validTournamentFields = {
7
+ Name: { invalid: false, message: '' },
8
+ Address: { invalid: false, message: '' },
9
+ StartDate: { invalid: false, message: '' },
10
+ TotalDays: { invalid: false, message: '' },
11
+ RegistrationCutOff: { invalid: false, message: '' },
12
+ Description: { invalid: false, message: '' },
13
+ };
14
+
15
+ const invalidTournamentFields = {
16
+ Name: { invalid: true, message: 'Tournament name is required' },
17
+ Address: { invalid: true, message: 'Location is required' },
18
+ StartDate: { invalid: true, message: 'Start date is required' },
19
+ TotalDays: { invalid: true, message: 'Must be at least 1 day' },
20
+ RegistrationCutOff: { invalid: true, message: 'Registration cut off is required' },
21
+ Description: { invalid: true, message: 'Description is required' },
22
+ };
23
+
24
+ const emptyTournament = {
25
+ Name: '',
26
+ Address: { Name: '' },
27
+ StartDate: new Date().toISOString().slice(0, 10),
28
+ TotalDays: 1,
29
+ RegistrationCutOff: new Date().toISOString().slice(0, 10),
30
+ PrimaryContactId: mockPersons?.[0]?.PersonId ?? 0,
31
+ Images: [{ URL: '' }],
32
+ Description: '',
33
+ };
34
+
35
+ export default {
36
+ title: 'Templates/TournamentManagement/TournamentPageOne',
37
+ component: TournamentForm,
38
+ tags: ["autodocs"],
39
+ args: {
40
+ tournament: mockTournaments[0],
41
+ locations: mockLocation,
42
+ persons: mockPersons,
43
+ validation: validTournamentFields,
44
+ isNewTournament: true,
45
+ userLevel: 'Club',
46
+ },
47
+ argTypes: {
48
+ tournament: {
49
+ control: { type: "object" },
50
+ },
51
+ locations: {
52
+ control: { type: "object" },
53
+ },
54
+ persons: {
55
+ control: { type: "object" },
56
+ },
57
+ validation: {
58
+ control: { type: "object" },
59
+ },
60
+ isNewTournament: {
61
+ control: { type: "boolean" },
62
+ },
63
+ userLevel: {
64
+ control: { type: "text" },
65
+ },
66
+ },
67
+ };
68
+
69
+ export const Default = {
70
+ args: {
71
+ tournament: mockTournaments[0],
72
+ locations: mockLocation,
73
+ persons: mockPersons,
74
+ validation: validTournamentFields,
75
+ },
76
+ };
77
+
78
+ export const EmptyTournament = {
79
+ args: {
80
+ tournament: emptyTournament,
81
+ locations: mockLocation,
82
+ persons: mockPersons,
83
+ validation: validTournamentFields,
84
+ },
85
+ };
86
+
87
+ export const EditMode = {
88
+ args: {
89
+ tournament: mockTournaments[0],
90
+ locations: mockLocation,
91
+ persons: mockPersons,
92
+ validation: validTournamentFields,
93
+ isNewTournament: false,
94
+ },
95
+ };
96
+
97
+ export const InvalidFields = {
98
+ args: {
99
+ tournament: emptyTournament,
100
+ locations: mockLocation,
101
+ persons: mockPersons,
102
+ validation: invalidTournamentFields,
103
+ },
104
+ };
105
+
106
+ export const EmptyOptions = {
107
+ args: {
108
+ tournament: emptyTournament,
109
+ locations: [],
110
+ persons: [],
111
+ validation: validTournamentFields,
112
+ },
113
+ };
@@ -3,9 +3,9 @@
3
3
  <div v-if="isNewTournament" class="w-full flex flex-row justify-center">
4
4
  <BaseText :color="'quaternary'" :size="'sm'" :text="'Step 1 out of 2'" :weight="'normal'" data-testid="text-step"/>
5
5
  </div>
6
- <div class="w-full flex flex-row justify-center my-4">
7
- <BaseText v-if="isNewTournament" :color="'primaryHighlight'" :size="'2xl'" :text="'Add New Tournament'" :weight="'normal'" data-testid="text-add-tournament"/>
8
- <BaseText v-if="!isNewTournament" :color="'primaryHighlight'" :size="'2xl'" :text="'Basic Tournament Infomation'" :weight="'normal'" data-testid="text-add-tournament"/>
6
+ <div class="w-full flex flex-row justify-center my-4">
7
+ <BaseText v-if="isNewTournament" :color="'primaryHighlight'" :size="'2xl'" :text="'Add New Tournament'" :weight="'normal'" data-testid="text-add-tournament"/>
8
+ <BaseText v-if="!isNewTournament" :color="'primaryHighlight'" :size="'2xl'" :text="'Basic Tournament Information'" :weight="'normal'" data-testid="text-add-tournament"/>
9
9
  </div>
10
10
  <div class="w-full flex flex-row justify-center my-4">
11
11
 
@@ -16,111 +16,111 @@
16
16
  @update:url="handleNewImageUrl"/>
17
17
  </div>
18
18
 
19
- <TitledInput
20
- :inputValue="tournamentName"
21
- :invalid="validation?.Name?.invalid ?? false"
22
- :title="validation?.Name?.invalid ? `Tournament Name - ${validation?.Name?.message}` : 'Tournament Name'"
23
- placeholder="Enter Tournament Name"
24
- @update:value="emitUpdate('Name', $event)"
25
- class="mb-4"
19
+ <TitledInput
20
+ :inputValue="tournamentName"
21
+ :invalid="isFieldInvalid('Name')"
22
+ :title="getValidationLabel('Name', 'Tournament Name')"
23
+ placeholder="Enter Tournament Name"
24
+ @update:value="emitUpdate('Name', $event)"
25
+ class="mb-4"
26
26
  />
27
27
 
28
28
  <div class="flex flex-col mb-4">
29
- <BaseText
30
- :color="'primaryHighlight'"
31
- :invalid="validation?.Address?.invalid"
32
- :text="validation?.Address?.invalid ? `Location - ${validation?.Address?.message}` : 'Location'"
33
- :size="'sm'"
34
- :weight="'normal'"
35
- class="mb-1"
29
+ <BaseText
30
+ :color="'primaryHighlight'"
31
+ :invalid="isFieldInvalid('Address')"
32
+ :text="getValidationLabel('Address', 'Location')"
33
+ :size="'sm'"
34
+ :weight="'normal'"
35
+ class="mb-1"
36
36
  data-testid="text-address"
37
37
  />
38
38
  <FindLocation
39
- :placeholder="addressName"
40
- :addBorder="true"
41
- :locations="locations"
42
- :invalid="validation.Address.invalid"
43
- addNewText="Add New"
44
- @update:location="handleAddressUpdate"
45
- @submit:location="handleAddressUpdate"
39
+ :placeholder="addressName"
40
+ :addBorder="true"
41
+ :locations="locations"
42
+ :invalid="isFieldInvalid('Address')"
43
+ addNewText="Add New"
44
+ @update:location="handleAddressUpdate"
45
+ @submit:location="handleAddressUpdate"
46
46
  @submit:addNewAddress="handleAddNewAddress"
47
47
  />
48
48
  </div>
49
49
 
50
50
  <div class="flex flex-row mb-4">
51
51
  <div class="w-3/4 mr-1">
52
- <BaseText
53
- :color="'primaryHighlight'"
54
- :invalid="validation.StartDate.invalid"
55
- :size="'sm'"
56
- :text="validation.StartDate.invalid ? `Start Date - ${validation.StartDate.message}` : 'Start Date'"
57
- :weight="'normal'"
58
- class="mb-1"
59
- data-testid="text-start-date"
60
- />
61
- <DatePicker
62
- :invalid="validation.StartDate.invalid"
63
- :setDate="startDate"
64
- :userLevel="userLevel"
65
- @update:selectedDate="emitUpdate('StartDate', $event)"
52
+ <BaseText
53
+ :color="'primaryHighlight'"
54
+ :invalid="isFieldInvalid('StartDate')"
55
+ :size="'sm'"
56
+ :text="getValidationLabel('StartDate', 'Start Date')"
57
+ :weight="'normal'"
58
+ class="mb-1"
59
+ data-testid="text-start-date"
60
+ />
61
+ <DatePicker
62
+ :invalid="isFieldInvalid('StartDate')"
63
+ :setDate="startDate"
64
+ :userLevel="userLevel"
65
+ @update:selectedDate="emitUpdate('StartDate', $event)"
66
66
  />
67
67
  </div>
68
68
  <div>
69
- <TitledInput
70
- :inputValue="totalDays"
71
- :invalid="validation.TotalDays.invalid"
72
- :placeholder="'Number of Days'"
73
- :inputType="'number'"
74
- :title="validation.TotalDays.invalid ? `Number of Days - ${validation.TotalDays.message}` : 'Number of Days'"
75
- @update:value="emitUpdate('TotalDays', $event)"
76
- />
69
+ <TitledInput
70
+ :inputValue="totalDays"
71
+ :invalid="isFieldInvalid('TotalDays')"
72
+ :placeholder="'Number of Days'"
73
+ :inputType="'number'"
74
+ :title="getValidationLabel('TotalDays', 'Number of Days')"
75
+ @update:value="emitUpdate('TotalDays', $event)"
76
+ />
77
77
  </div>
78
78
  </div>
79
79
 
80
80
  <div class="w-full mr-1 mb-4">
81
- <BaseText
82
- :color="'primaryHighlight'"
83
- :invalid="validation.RegistrationCutOff.invalid"
84
- :size="'sm'"
85
- :text="validation.RegistrationCutOff.invalid ? `Registration Cut Off - ${validation.RegistrationCutOff.message}` : 'Registration Cut Off'"
86
- :weight="'normal'"
87
- class="mb-1"
88
- data-testid="text-start-date"
89
- />
90
- <DatePicker
91
- :invalid="validation.RegistrationCutOff.invalid"
92
- :setDate="registrationCutOff"
93
- :userLevel="userLevel"
94
- @update:selectedDate="emitUpdate('RegistrationCutOff', $event)"
81
+ <BaseText
82
+ :color="'primaryHighlight'"
83
+ :invalid="isFieldInvalid('RegistrationCutOff')"
84
+ :size="'sm'"
85
+ :text="getValidationLabel('RegistrationCutOff', 'Registration Cut Off')"
86
+ :weight="'normal'"
87
+ class="mb-1"
88
+ data-testid="text-start-date"
89
+ />
90
+ <DatePicker
91
+ :invalid="isFieldInvalid('RegistrationCutOff')"
92
+ :setDate="registrationCutOff"
93
+ :userLevel="userLevel"
94
+ @update:selectedDate="emitUpdate('RegistrationCutOff', $event)"
95
95
  />
96
96
  </div>
97
97
 
98
98
  <div class="flex flex-col mb-4">
99
- <BaseText
100
- :color="'primaryHighlight'"
101
- :invalid="validation.Description.invalid"
102
- :size="'sm'"
103
- :text="validation.Description.invalid ? `Description - ${validation.Description.message}` : 'Description'"
104
- :weight="'normal'"
105
- class="mb-1"
106
- data-testid="text-description"
107
- />
108
- <TextBoxEditor
109
- :invalid="validation.Description.invalid"
110
- :initialContent="tournament.Description"
111
- @update:editorContent="emitUpdate('Description', $event)"
112
- />
99
+ <BaseText
100
+ :color="'primaryHighlight'"
101
+ :invalid="isFieldInvalid('Description')"
102
+ :size="'sm'"
103
+ :text="getValidationLabel('Description', 'Description')"
104
+ :weight="'normal'"
105
+ class="mb-1"
106
+ data-testid="text-description"
107
+ />
108
+ <TextBoxEditor
109
+ :invalid="isFieldInvalid('Description')"
110
+ :initialContent="description"
111
+ @update:editorContent="emitUpdate('Description', $event)"
112
+ />
113
113
  </div>
114
114
 
115
115
  <div class="flex flex-col pb-4 mr-4">
116
116
  <BaseText :color="'primaryHighlight'" :invalid="false" :size="'sm'" :text="'Primary Contact'"
117
117
  :weight="'normal'" class="mb-1" data-testid="text-primary-contact"/>
118
118
  <FindPerson :addBorder="true"
119
- :persons="persons"
120
- :defaultValue="getDefaultPerson"
121
- addNewText="Add New Person"
122
- @new-person-submitted="handlePersonUpdate('PrimaryContactId', $event)"
123
- @person-selected="handlePersonUpdate('PrimaryContactId', $event)"/>
119
+ :persons="persons"
120
+ :defaultValue="getDefaultPerson"
121
+ addNewText="Add New Person"
122
+ @add-new-person="handleAddNewPerson"
123
+ @person-selected="handlePrimaryContactUpdate"/>
124
124
  </div>
125
125
 
126
126
  </section>
@@ -135,9 +135,9 @@ import TextBoxEditor from "../../../Organisms/ComplexInputs/TextBoxEditor/TextBo
135
135
  import ImageCropper from "../../../Organisms/ComplexInputs/ImageCropper/ImageCropper.vue";
136
136
  import FindPerson from "../../../Organisms/ComplexInputs/FindPerson/FindPerson.vue";
137
137
 
138
- export default {
139
- name: 'TournamentPageOne',
140
- emits: ['update:tournament', 'update:image', 'update:address', 'add:newAddress'],
138
+ export default {
139
+ name: 'TournamentPageOne',
140
+ emits: ['update:tournament', 'update:image', 'update:address', 'add:newAddress', 'add:newPerson'],
141
141
  props: {
142
142
  tournament: {
143
143
  type: Object,
@@ -204,31 +204,48 @@ export default {
204
204
  totalDays() {
205
205
  return this.tournament?.TotalDays || 1;
206
206
  },
207
- registrationCutOff() {
208
- return this.tournament?.RegistrationCutOff || new Date();
209
- },
210
- getDefaultPerson: function () {
211
- const person = this.persons.find(p => p.PersonId === this.tournament.PrimaryContactId);
212
- return person ? person.DisplayName : '';
213
- }
214
- },
215
- methods: {
216
- handleNewImageUrl(url) {
217
- this.tournament.ImageLink = url;
218
- this.$emit('update:image', { 'ImageLink': url });
219
- },
207
+ registrationCutOff() {
208
+ return this.tournament?.RegistrationCutOff || new Date();
209
+ },
210
+ description() {
211
+ return this.tournament?.Description || '';
212
+ },
213
+ getDefaultPerson: function () {
214
+ const person = this.persons.find(p => p.PersonId === this.tournament?.PrimaryContactId);
215
+ return person ? person.DisplayName : '';
216
+ }
217
+ },
218
+ methods: {
219
+ handleNewImageUrl(url) {
220
+ this.$emit('update:image', { 'ImageLink': url });
221
+ },
220
222
  handleAddNewAddress(newAddress) {
221
223
  this.$emit('add:newAddress', newAddress);
222
224
  },
223
- handleAddressUpdate(updatedAddress) {
224
- this.$emit('update:address', updatedAddress);
225
- },
226
- handlePersonUpdate(person, value) {
227
- this.$emit('update:tournament', { 'PrimaryContactId': value.PersonId });
228
- },
229
- emitUpdate(field, value) {
230
- this.$emit('update:tournament', { [field]: value });
231
- }
232
- }
233
- };
225
+ handleAddressUpdate(updatedAddress) {
226
+ this.$emit('update:address', updatedAddress);
227
+ },
228
+ handleAddNewPerson(personName) {
229
+ this.$emit('add:newPerson', personName);
230
+ },
231
+ handlePrimaryContactUpdate(person) {
232
+ if (!person) return;
233
+ this.$emit('update:tournament', { 'PrimaryContactId': person.PersonId });
234
+ },
235
+ emitUpdate(field, value) {
236
+ this.$emit('update:tournament', { [field]: value });
237
+ },
238
+ getFieldValidation(field) {
239
+ return this.validation?.[field] || { invalid: false, message: '' };
240
+ },
241
+ isFieldInvalid(field) {
242
+ return this.getFieldValidation(field).invalid;
243
+ },
244
+ getValidationLabel(field, label) {
245
+ const fieldValidation = this.getFieldValidation(field);
246
+ if (!fieldValidation.invalid) return label;
247
+ return `${label} - ${fieldValidation.message}`;
248
+ }
249
+ }
250
+ };
234
251
  </script>
@@ -1,32 +1,77 @@
1
- import TournamentPageTwo from "./TouranmentPageTwo.vue";
2
- import mockTournaments from "../../../../mocks/tournamentMock.js";
3
-
4
- export default {
5
- title: 'Templates/TournamentManagement/TournamentPageTwo',
6
- component: TournamentPageTwo,
1
+ import TournamentPageTwo from "./TournamentPageTwo.vue";
2
+ import mockTournaments from "../../../../mocks/tournamentMock.js";
3
+
4
+ const hostedTournament = {
5
+ ...mockTournaments[0],
6
+ HostedOnM2: true,
7
+ ResultsEnabled: false,
8
+ Visibility: 'Open',
9
+ WaiverScope: 'None',
10
+ RegistrationLink: 'https://example.com/register',
11
+ RulesLink: 'https://example.com/rules',
12
+ };
13
+
14
+ const nonHostedTournament = {
15
+ ...hostedTournament,
16
+ HostedOnM2: false,
17
+ ResultsEnabled: false,
18
+ };
19
+
20
+ export default {
21
+ title: 'Templates/TournamentManagement/TournamentPageTwo',
22
+ component: TournamentPageTwo,
7
23
  tags: ["autodocs"],
8
- args: {
9
- tournament: mockTournaments[0],
10
- },
11
- argTypes: {
12
- tournament: {
13
- control: { type: "object" },
14
- },
15
- },
16
- };
17
-
18
- export const Default = {
19
- args: {
20
- tournament: mockTournaments[0],
21
- },
22
- };
23
-
24
- export const EmptyTournament = {
25
- args: {
26
- tournament: {
27
- hostedOnM2: false,
28
- registrationLink: "",
29
- rulesLink: "",
30
- },
31
- },
32
- };
24
+ args: {
25
+ tournament: hostedTournament,
26
+ isNewTournament: true,
27
+ },
28
+ argTypes: {
29
+ tournament: {
30
+ control: { type: "object" },
31
+ },
32
+ isNewTournament: {
33
+ control: { type: "boolean" },
34
+ },
35
+ },
36
+ };
37
+
38
+ export const Default = {
39
+ args: {
40
+ tournament: hostedTournament,
41
+ },
42
+ };
43
+
44
+ export const EmptyTournament = {
45
+ args: {
46
+ tournament: {
47
+ HostedOnM2: false,
48
+ ResultsEnabled: false,
49
+ Visibility: 'Open',
50
+ WaiverScope: 'None',
51
+ RegistrationLink: '',
52
+ RulesLink: '',
53
+ },
54
+ },
55
+ };
56
+
57
+ export const NotHosted = {
58
+ args: {
59
+ tournament: nonHostedTournament,
60
+ },
61
+ };
62
+
63
+ export const ResultsUploadEnabled = {
64
+ args: {
65
+ tournament: {
66
+ ...nonHostedTournament,
67
+ ResultsEnabled: true,
68
+ },
69
+ },
70
+ };
71
+
72
+ export const EditMode = {
73
+ args: {
74
+ tournament: hostedTournament,
75
+ isNewTournament: false,
76
+ },
77
+ };