@dcrackel/hematournamentui 1.0.699 → 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
@@ -9,8 +9,8 @@
9
9
  </div>
10
10
  </div>
11
11
 
12
- <div v-if="filteredAssignments.length === 0" class="text-center mt-10">
13
- <BaseText text="No Current Assignments" color="secondary" size="lg" weight="normal"/>
12
+ <div v-if="filteredAssignments.length === 0" class="text-center mt-10">
13
+ <BaseText :text="emptyAssignmentsText" color="secondary" size="lg" weight="normal"/>
14
14
  </div>
15
15
 
16
16
  <section v-if="filteredAssignments.length > 0">
@@ -40,10 +40,10 @@
40
40
  <div class="w-12 md:flex bg-poolSetup ml-2 px-4 py-2 rounded-lg">
41
41
  <BaseIcon :iconName="getStatusIcon(event)" size="md" color="quinary" :class="getIconClass(event)" />
42
42
  </div>
43
- <div v-if="shouldShowButton(event) && showCurrent" class="w-12 ml-1">
44
- <BaseButton v-if="shouldShowButton(event)" iconName="fa-right-from-line" :iconLeft="false" label="" size="md" type="primary" @buttonClick="forwardToEvent(event)" class="h-10 w-10 pr-4"/>
45
- </div>
46
- <span v-if="!shouldShowButton(event) && showCurrent" class="w-12 ml-1" />
43
+ <div v-if="canForwardToEvent(event)" class="w-12 ml-1">
44
+ <BaseButton iconName="fa-right-from-line" :iconLeft="false" label="" size="md" type="primary" @buttonClick="forwardToEvent(event)" class="h-10 w-10 pr-4"/>
45
+ </div>
46
+ <span v-if="shouldReserveForwardActionSpace(event)" class="w-12 ml-1" />
47
47
  </section>
48
48
  </div>
49
49
  </div>
@@ -91,8 +91,10 @@ const statusIconClasses = {
91
91
  completed: 'mt-0.5'
92
92
  };
93
93
 
94
+ const actionableStatuses = ['live', 'results', 'de'];
95
+
94
96
  export default {
95
- name: "TournamentAssignments",
97
+ name: "Assignment",
96
98
  emits: ['forwardToEvent', 'refreshAssignments'],
97
99
  components: {BaseIcon, BaseText, BaseButton},
98
100
  props: {
@@ -106,23 +108,44 @@ export default {
106
108
  showCurrent: true,
107
109
  };
108
110
  },
109
- computed: {
110
- filteredAssignments() {
111
- const today = new Date();
112
- return this.assignments.filter((tournament) => {
113
- const tournamentEndDate = new Date(tournament.EndDate);
114
- return this.showCurrent
115
- ? tournamentEndDate >= today
116
- : tournamentEndDate < today;
117
- });
118
- },
119
- },
120
- methods: {
121
- getTournamentArtworkURL(tournament) {
122
- return tournament.Images?.URL || defaultImage;
123
- },
124
- formatEventDate(date, time) {
125
- const eventDate = new Date(`${date}T${time}`);
111
+ computed: {
112
+ filteredAssignments() {
113
+ const today = this.getStartOfDay(new Date());
114
+ return this.assignments.filter((tournament) => {
115
+ const tournamentEndDate = this.getEndOfDay(tournament.EndDate);
116
+ return this.showCurrent
117
+ ? tournamentEndDate >= today
118
+ : tournamentEndDate < today;
119
+ });
120
+ },
121
+ emptyAssignmentsText() {
122
+ return this.showCurrent ? 'No Current Assignments' : 'No Past Assignments';
123
+ },
124
+ },
125
+ methods: {
126
+ getTournamentArtworkURL(tournament) {
127
+ if (Array.isArray(tournament.Images)) {
128
+ const image = tournament.Images.find((item) => this.getImageUrl(item));
129
+ return this.getImageUrl(image) || defaultImage;
130
+ }
131
+
132
+ return this.getImageUrl(tournament.Images) || defaultImage;
133
+ },
134
+ getImageUrl(image) {
135
+ return image?.URL || image?.Url || image?.url;
136
+ },
137
+ getStartOfDay(date) {
138
+ const normalizedDate = new Date(date);
139
+ normalizedDate.setHours(0, 0, 0, 0);
140
+ return normalizedDate;
141
+ },
142
+ getEndOfDay(date) {
143
+ const normalizedDate = new Date(date);
144
+ normalizedDate.setHours(23, 59, 59, 999);
145
+ return normalizedDate;
146
+ },
147
+ formatEventDate(date, time) {
148
+ const eventDate = new Date(`${date}T${time}`);
126
149
  const options = {weekday: 'long', hour: 'numeric', minute: '2-digit', hour12: true};
127
150
  return eventDate.toLocaleDateString('en-US', options);
128
151
  },
@@ -131,24 +154,29 @@ export default {
131
154
  },
132
155
  getIconStyle(event) {
133
156
  return roleIconStyles[event.Role] || 'fa-solid';
134
- },
135
- shouldShowButton(event) {
136
- const eventStatus = event.Status.toLowerCase();
137
- return eventStatus === "live" || eventStatus === "results" || eventStatus === "de";
138
- },
139
- formatTournamentDates(startDate, endDate) {
140
- const today = new Date();
141
-
142
- const formatDate = (date, includeYear) => {
143
- const d = new Date(date);
157
+ },
158
+ shouldShowButton(event) {
159
+ return actionableStatuses.includes(this.getNormalizedStatus(event));
160
+ },
161
+ canForwardToEvent(event) {
162
+ return this.showCurrent && this.shouldShowButton(event);
163
+ },
164
+ shouldReserveForwardActionSpace(event) {
165
+ return this.showCurrent && !this.shouldShowButton(event);
166
+ },
167
+ formatTournamentDates(startDate, endDate) {
168
+ const today = this.getStartOfDay(new Date());
169
+
170
+ const formatDate = (date, includeYear) => {
171
+ const d = new Date(date);
144
172
  const day = d.getDate();
145
173
  const month = d.toLocaleString('default', { month: 'short' });
146
174
  const suffix = this.getDaySuffix(day);
147
175
  const year = includeYear ? ` ${d.getFullYear()}` : '';
148
- return `${month} ${day}${suffix}${year}`;
149
- };
150
-
151
- const includeYear = new Date(endDate) < today;
176
+ return `${month} ${day}${suffix}${year}`;
177
+ };
178
+
179
+ const includeYear = this.getEndOfDay(endDate) < today;
152
180
 
153
181
  if (startDate === endDate) {
154
182
  return formatDate(startDate, includeYear);
@@ -160,11 +188,14 @@ export default {
160
188
  if (day > 3 && day < 21) return 'th'; // General rule
161
189
  return daySuffixes[day % 10] || 'th';
162
190
  },
191
+ getNormalizedStatus(event) {
192
+ return String(event?.Status || '').toLowerCase();
193
+ },
163
194
  getStatusIcon(event) {
164
- return statusIcons[event.Status] || 'fa-circle-question';
195
+ return statusIcons[this.getNormalizedStatus(event)] || 'fa-circle-question';
165
196
  },
166
197
  getIconClass(event) {
167
- return statusIconClasses[event.Status] || '';
198
+ return statusIconClasses[this.getNormalizedStatus(event)] || '';
168
199
  },
169
200
  forwardToEvent(event) {
170
201
  this.$emit('forwardToEvent', event);
@@ -1,9 +1,21 @@
1
- import ClubBasic from './ClubBasic.vue';
2
- import mockLocations from '../../../../mocks/locationMock.js';
3
-
4
- export default {
5
- title: 'Templates/ClubManagement/ClubBasic',
6
- component: ClubBasic,
1
+ import ClubBasic from './ClubBasic.vue';
2
+ import mockLocations from '../../../../mocks/locationMock.js';
3
+
4
+ const validValidation = {
5
+ Name: { invalid: false, message: '' },
6
+ ShortName: { invalid: false, message: '' },
7
+ Address: { invalid: false, message: '' },
8
+ };
9
+
10
+ const invalidValidation = {
11
+ Name: { invalid: true, message: 'Required' },
12
+ ShortName: { invalid: true, message: 'Required' },
13
+ Address: { invalid: true, message: 'Required' },
14
+ };
15
+
16
+ export default {
17
+ title: 'Templates/ClubManagement/ClubBasic',
18
+ component: ClubBasic,
7
19
  tags: ['autodocs'],
8
20
  args: {
9
21
  club: {
@@ -15,15 +27,19 @@ export default {
15
27
  Name: "123 Fencing St, Columbus, OH"
16
28
  },
17
29
  Color1: "blue",
18
- Color2: "gold"
19
- },
20
- locations: mockLocations
21
- },
22
- argTypes: {
23
- club: { control: { type: 'object' } },
24
- locations: { control: { type: 'array' } }
25
- }
26
- };
30
+ Color2: "gold"
31
+ },
32
+ locations: mockLocations,
33
+ validation: validValidation
34
+ },
35
+ argTypes: {
36
+ club: { control: { type: 'object' } },
37
+ locations: { control: { type: 'array' } },
38
+ validation: { control: { type: 'object' } },
39
+ 'add:newAddress': { action: 'add:newAddress' },
40
+ 'update:club': { action: 'update:club' },
41
+ }
42
+ };
27
43
 
28
44
  export const Default = {
29
45
  args: {
@@ -36,11 +52,12 @@ export const Default = {
36
52
  Name: "123 Fencing St, Columbus, OH"
37
53
  },
38
54
  Color1: "blue",
39
- Color2: "gold"
40
- },
41
- locations: mockLocations
42
- }
43
- };
55
+ Color2: "gold"
56
+ },
57
+ locations: mockLocations,
58
+ validation: validValidation
59
+ }
60
+ };
44
61
 
45
62
  export const EmptyClub = {
46
63
  args: {
@@ -53,11 +70,12 @@ export const EmptyClub = {
53
70
  Name: ""
54
71
  },
55
72
  Color1: "",
56
- Color2: ""
57
- },
58
- locations: mockLocations
59
- }
60
- };
73
+ Color2: ""
74
+ },
75
+ locations: mockLocations,
76
+ validation: invalidValidation
77
+ }
78
+ };
61
79
 
62
80
  export const CustomColors = {
63
81
  args: {
@@ -70,8 +88,9 @@ export const CustomColors = {
70
88
  Name: "456 Forge Ln, Pittsburgh, PA"
71
89
  },
72
90
  Color1: "red",
73
- Color2: "silver"
74
- },
75
- locations: mockLocations
76
- }
77
- };
91
+ Color2: "silver"
92
+ },
93
+ locations: mockLocations,
94
+ validation: validValidation
95
+ }
96
+ };
@@ -1,19 +1,17 @@
1
1
  <template>
2
2
  <div class="flex flex-col mb-4">
3
- <TitledInput :inputValue="club.Name || ''"
4
- :invalid="validation.Name.invalid"
5
- :title="validation.Name.invalid ? `Club Name - ${validation.Name.message}` : 'Club Name'"
6
- placeholder="Enter Club Name"
7
- title="Club Name"
8
- @update:value="emitUpdate('Name', $event)"/>
3
+ <TitledInput :inputValue="club.Name || ''"
4
+ :invalid="validation.Name.invalid"
5
+ :title="validation.Name.invalid ? `Club Name - ${validation.Name.message}` : 'Club Name'"
6
+ placeholder="Enter Club Name"
7
+ @update:value="emitUpdate('Name', $event)"/>
9
8
  </div>
10
9
  <div class="flex flex-col mb-4">
11
- <TitledInput :inputValue="club.ShortName || ''"
12
- :invalid="validation.ShortName.invalid"
13
- :title="validation.ShortName.invalid ? `Club Short Name - ${validation.ShortName.message}` : 'Club Short Name'"
14
- placeholder="Enter Short Name"
15
- title="Short Name"
16
- @update:value="emitUpdate('ShortName', $event)"/>
10
+ <TitledInput :inputValue="club.ShortName || ''"
11
+ :invalid="validation.ShortName.invalid"
12
+ :title="validation.ShortName.invalid ? `Club Short Name - ${validation.ShortName.message}` : 'Club Short Name'"
13
+ placeholder="Enter Short Name"
14
+ @update:value="emitUpdate('ShortName', $event)"/>
17
15
  </div>
18
16
  <div class="flex flex-col mb-4">
19
17
  <TitledInput :inputValue="club.TagLine || ''"
@@ -42,9 +40,9 @@
42
40
  :weight="'normal'" class="mb-1" data-testid="text-description"/>
43
41
  <TextBoxEditor :initialContent="club.Description" @update:editorContent="emitUpdate('Description', $event)"/>
44
42
  </div>
45
- <div class="flex flex-col mb-4">
46
- <ClubColorPicker :club="club" :isPrimary="true" @update:value="emitUpdate('Color1', $event)" />
47
- <ClubColorPicker :club="club" :isPrimary="false" @update:value="emitUpdate('Color1', $event)" />
43
+ <div class="flex flex-col mb-4">
44
+ <ClubColorPicker :club="club" :isPrimary="true" @update:value="emitColorUpdate" />
45
+ <ClubColorPicker :club="club" :isPrimary="false" @update:value="emitColorUpdate" />
48
46
  </div>
49
47
  </template>
50
48
 
@@ -73,18 +71,21 @@ export default {
73
71
  required: true
74
72
  }
75
73
  },
76
- computed: {
77
- getSelectedAddress() {
78
- return this.club.Address ? this.club.Address.Name : '';
79
- }
80
- },
81
- methods: {
82
- emitAddNewAddress(address) {
83
- this.$emit('add:newAddress', address);
84
- },
85
- emitUpdate(field, value) {
86
- this.$emit('update:club', { field, value });
87
- },
74
+ computed: {
75
+ getSelectedAddress() {
76
+ return this.club?.Address?.Name || '';
77
+ }
78
+ },
79
+ methods: {
80
+ emitAddNewAddress(address) {
81
+ this.$emit('add:newAddress', address);
82
+ },
83
+ emitColorUpdate(payload) {
84
+ this.$emit('update:club', { ...payload });
85
+ },
86
+ emitUpdate(field, value) {
87
+ this.$emit('update:club', { field, value });
88
+ },
88
89
  }
89
90
  }
90
- </script>
91
+ </script>
@@ -2,75 +2,90 @@ import ClubManagement from './ClubManagement.vue';
2
2
  import addressesMock from "../../../mocks/locationMock.js";
3
3
  import clubMock from "../../../mocks/getClub.js";
4
4
 
5
- export default {
6
- title: 'Templates/ClubManagement',
7
- component: ClubManagement,
5
+ export default {
6
+ title: 'Templates/ClubManagement',
7
+ component: ClubManagement,
8
8
  tags: ['autodocs'],
9
9
  args: {
10
10
  uploadImageName: 'club-profile-test',
11
11
  uploadServer: 'http://localhost:3000/api/upload/',
12
12
  imageServer: 'http://localhost:3000/uploads/',
13
- locations: addressesMock,
14
- clubProfile: clubMock,
15
- userLevel: 'user'
16
- },
17
- argTypes: {
18
- uploadImageName: { control: { type: 'text' } },
19
- uploadServer: { control: { type: 'text' } },
20
- imageServer: { control: { type: 'text' } },
21
- locations: { control: { type: 'array'} },
22
- clubProfile: { control: { type: 'object' } },
23
- userLevel: { control: { type: 'text' } }
24
- }
25
- };
13
+ locations: addressesMock,
14
+ clubProfile: clubMock,
15
+ userLevel: 'user',
16
+ loading: false,
17
+ saveButtonLabel: 'Save'
18
+ },
19
+ argTypes: {
20
+ uploadImageName: { control: { type: 'text' } },
21
+ uploadServer: { control: { type: 'text' } },
22
+ imageServer: { control: { type: 'text' } },
23
+ locations: { control: { type: 'array'} },
24
+ clubProfile: { control: { type: 'object' } },
25
+ userLevel: { control: { type: 'text' } },
26
+ loading: { control: { type: 'boolean' } },
27
+ saveButtonLabel: { control: { type: 'text' } },
28
+ 'add:newAddress': { action: 'add:newAddress' },
29
+ 'delete:club': { action: 'delete:club' },
30
+ 'submit:club': { action: 'submit:club' },
31
+ 'update:image': { action: 'update:image' },
32
+ }
33
+ };
26
34
 
27
35
  export const Default = {
28
36
  args: {
29
37
  uploadImageName: 'ctest1',
30
- uploadServer: 'http://localhost:3000/api/upload/',
31
- imageServer: 'http://localhost:3000/uploads/',
32
- locations: addressesMock,
33
- clubProfile: clubMock[0],
34
- userLevel: 'user'
35
- }
36
- };
37
-
38
- export const asAdmin = {
39
- args: {
40
- uploadImageName: 'ctest2',
41
- uploadServer: 'http://localhost:3000/api/upload/',
42
- imageServer: 'http://localhost:3000/uploads/',
43
- clubProfile: clubMock,
44
- locations: addressesMock,
45
- userLevel: 'Admin'
46
- }
47
- };
48
-
49
- export const asAdminAndLoading = {
50
- args: {
51
- uploadImageName: 'ctest2',
52
- uploadServer: 'http://localhost:3000/api/upload/',
53
- imageServer: 'http://localhost:3000/uploads/',
54
- locations: addressesMock,
55
- clubProfile: clubMock,
56
- userLevel: 'Admin',
57
- loading: true
58
- }
59
- };
60
-
61
- export const emptyClub = {
62
- args: {
63
- uploadImageName: 'ctest2',
64
- uploadServer: 'http://localhost:3000/api/upload/',
38
+ uploadServer: 'http://localhost:3000/api/upload/',
39
+ imageServer: 'http://localhost:3000/uploads/',
40
+ locations: addressesMock,
41
+ clubProfile: clubMock,
42
+ userLevel: 'user',
43
+ loading: false,
44
+ saveButtonLabel: 'Save'
45
+ }
46
+ };
47
+
48
+ export const AsAdmin = {
49
+ args: {
50
+ uploadImageName: 'ctest2',
51
+ uploadServer: 'http://localhost:3000/api/upload/',
52
+ imageServer: 'http://localhost:3000/uploads/',
53
+ clubProfile: clubMock,
54
+ locations: addressesMock,
55
+ userLevel: 'Admin',
56
+ loading: false,
57
+ saveButtonLabel: 'Save'
58
+ }
59
+ };
60
+
61
+ export const AsAdminAndLoading = {
62
+ args: {
63
+ uploadImageName: 'ctest2',
64
+ uploadServer: 'http://localhost:3000/api/upload/',
65
+ imageServer: 'http://localhost:3000/uploads/',
66
+ locations: addressesMock,
67
+ clubProfile: clubMock,
68
+ userLevel: 'Admin',
69
+ loading: true,
70
+ saveButtonLabel: 'Save'
71
+ }
72
+ };
73
+
74
+ export const EmptyClub = {
75
+ args: {
76
+ uploadImageName: 'ctest2',
77
+ uploadServer: 'http://localhost:3000/api/upload/',
65
78
  imageServer: 'http://localhost:3000/uploads/',
66
79
  locations: addressesMock,
67
80
  clubProfile: {
68
81
  Name: '',
69
- ClubId: 0,
70
- Color1: 'red',
71
- Color2: 'blue',
72
- },
73
- userLevel: 'Admin',
74
- loading: false
75
- }
76
- };
82
+ ClubId: 0,
83
+ Color1: 'red',
84
+ Color2: 'blue',
85
+ Images: [],
86
+ },
87
+ userLevel: 'Admin',
88
+ loading: false,
89
+ saveButtonLabel: 'Create'
90
+ }
91
+ };