@dcrackel/hematournamentui 1.0.712 → 1.0.714

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 (107) hide show
  1. package/.prettierignore +7 -7
  2. package/.storybook/main.js +3 -1
  3. package/README.md +42 -0
  4. package/dist/HemaTournamentUI-lib.es.js +6856 -6243
  5. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  6. package/dist/hematournamentui-tailwind.css +79 -9
  7. package/package.json +96 -96
  8. package/prettier.config.js +16 -16
  9. package/src/index.js +43 -42
  10. package/src/main.js +1 -1
  11. package/src/mocks/getDEBouts-TableOf128.js +37 -37
  12. package/src/mocks/getDEBouts-TableOf64.js +35 -35
  13. package/src/stories/Atoms/Input/BaseInput.test.js +97 -97
  14. package/src/stories/Atoms/Input/BaseInput.vue +149 -149
  15. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -23
  16. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -35
  17. package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -30
  18. package/src/stories/Molecules/Menus/HoverActions/HoverActions.test.js +138 -0
  19. package/src/stories/Molecules/Menus/HoverActions/HoverActions.vue +212 -0
  20. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.stories.js +49 -0
  21. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.test.js +129 -0
  22. package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.vue +165 -0
  23. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +6 -0
  24. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -18
  25. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +1 -1
  26. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +5 -1
  27. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +19 -10
  28. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +11 -7
  29. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +42 -33
  30. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +76 -45
  31. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +122 -103
  32. package/src/stories/Organisms/Cards/Director/DirectorCard.test.js +82 -0
  33. package/src/stories/Organisms/Cards/Director/DirectorCard.vue +32 -51
  34. package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -51
  35. package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -106
  36. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -298
  37. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +77 -60
  38. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +144 -143
  39. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +289 -256
  40. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -69
  41. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -80
  42. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +153 -153
  43. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +4 -0
  44. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -31
  45. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -109
  46. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -192
  47. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +1 -0
  48. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +247 -204
  49. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +89 -15
  50. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +51 -29
  51. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +63 -46
  52. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -21
  53. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -39
  54. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -145
  55. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -64
  56. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +36 -57
  57. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +101 -65
  58. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +14 -1
  59. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +52 -52
  60. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +10 -3
  61. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -226
  62. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
  63. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +137 -137
  64. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -172
  65. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -216
  66. package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -79
  67. package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -29
  68. package/src/stories/Organisms/Wizards/EditEventWizard/WeaponSelection.test.js +138 -0
  69. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +149 -9
  70. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +54 -2
  71. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +77 -8
  72. package/src/stories/Templates/EventManagement/Bracket/BracketDirectorAssignment.test.js +242 -0
  73. package/src/stories/Templates/EventManagement/Bracket/BracketMobile.test.js +131 -0
  74. package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +50 -39
  75. package/src/stories/Templates/EventManagement/Bracket/BracketStories.test.js +201 -0
  76. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.js +93 -0
  77. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.test.js +152 -0
  78. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -39
  79. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -79
  80. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -93
  81. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -91
  82. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -121
  83. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +9 -2
  84. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +5 -4
  85. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +81 -81
  86. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -39
  87. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +101 -101
  88. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -71
  89. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +86 -86
  90. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -86
  91. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +247 -247
  92. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -170
  93. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -156
  94. package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -329
  95. package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -329
  96. package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -42
  97. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -84
  98. package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -114
  99. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -363
  100. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -116
  101. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -307
  102. package/src/stories/Util/Validations/PersonManagementValidations.js +45 -45
  103. package/src/stories/Util/Validations/PriceValidation.js +6 -6
  104. package/src/stories/Util/boutDirectorAssignment.js +46 -0
  105. package/src/stories/Util/bracketDirectors.js +86 -0
  106. package/src/stories/Util/registrationStatus.js +11 -11
  107. package/src/stories/Util/tabs.js +19 -47
@@ -1,137 +1,137 @@
1
- import { ref } from 'vue';
2
- import EditEvent from './EditEventWizard.vue';
3
- import singleEventMock from '../../../../mocks/singleEventMock.js';
4
-
5
- export default {
6
- title: 'Organisms/Wizards/EditEventWizard/EditEventWizard',
7
- component: EditEvent,
8
- args: {
9
- event: { ...singleEventMock, EventPrice: 25.5 },
10
- weapons: [
11
- { text: 'Longsword', link: 1 },
12
- { text: 'Saber', link: 2 },
13
- { text: 'Rapier', link: 3 }
14
- ],
15
- DEFormats: [
16
- { text: 'Single Elimination', link: 1 },
17
- { text: 'Double Elimination', link: 2 },
18
- { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
19
- ],
20
- userLevel: 'Admin'
21
- },
22
- argTypes: {
23
- editMode: { control: 'boolean' },
24
- step: { control: { type: 'number', min: 1, max: 5 } },
25
- saving: { control: 'boolean' },
26
- saveError: { control: 'text' },
27
- saveNotice: { control: 'text' },
28
- event: { control: 'object' },
29
- weapons: { control: 'object' },
30
- DEFormats: { control: 'object' },
31
- userLevel: { control: 'string' }
32
- }
33
- };
34
-
35
- export const Default = {
36
- args: {
37
- event: { ...singleEventMock, EventPrice: 25.5 },
38
- weapons: [
39
- { text: 'Longsword', link: 1 },
40
- { text: 'Saber', link: 2 },
41
- { text: 'Rapier', link: 3 }
42
- ],
43
- DEFormats: [
44
- { text: 'Single Elimination', link: 1 },
45
- { text: 'Double Elimination', link: 2 },
46
- { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
47
- ],
48
- userLevel: 'Admin'
49
- }
50
- };
51
- // new Date().toISOString().split('T')[0],
52
- export const newEventAsClub = {
53
- args: {
54
- event: {
55
- EventId: 0,
56
- CountDoubles: false,
57
- CountHandshots: false,
58
- CutOffNumber: 64,
59
- DEBoutCount: 7,
60
- DEBoutCounter: false,
61
- DEMax: false,
62
- DEMaxPoints: 12,
63
- DEPromoteBy: ['Top Percent', 'Top Count', 'Top Count of Each Pool'],
64
- DEPromotionAmount: '100%',
65
- DEPromotionOrder: ['Win Percent', 'Win Count', 'Indicator', 'Points Scored'],
66
- DETime: 180,
67
- DETimer: false,
68
- DEType: 'single',
69
- Date: new Date().toISOString().split('T')[0],
70
- EventName: '',
71
- EventPrice: '',
72
- NumberOfRings: 2,
73
- PenaltiesReset: true,
74
- PoolScoreDirection: true,
75
- StartTime: '12:00:00',
76
- WeaponId: 1,
77
- boutCount: 5,
78
- boutCounter: false,
79
- poolMax: false,
80
- poolMaxPoints: 7,
81
- poolTime: 180,
82
- poolTimer: false,
83
- seedWith: 'M2 - MeyerSquared',
84
- thirdPlaceBout: false
85
- },
86
- weapons: [
87
- { text: 'Longsword', link: 1 },
88
- { text: 'Saber', link: 2 },
89
- { text: 'Rapier', link: 3 }
90
- ],
91
- DEFormats: [
92
- { text: 'Single Elimination', link: 1 },
93
- { text: 'Double Elimination', link: 2 },
94
- { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
95
- ],
96
- userLevel: 'Club'
97
- }
98
- };
99
-
100
- export const EditWithStepSaves = {
101
- args: { ...Default.args, editMode: true, step: 1 },
102
- render: args => ({
103
- components: { Editor: EditEvent },
104
- setup() {
105
- const event = ref(JSON.parse(JSON.stringify(args.event)));
106
- const step = ref(args.step);
107
- const saving = ref(false);
108
- const notice = ref('');
109
- const saveStep = async request => {
110
- saving.value = true;
111
- await new Promise(resolve => setTimeout(resolve, 500));
112
- event.value = request.event;
113
- step.value = Math.min(request.step + 1, 5);
114
- notice.value = 'Changes saved.';
115
- saving.value = false;
116
- };
117
- const clearNotice = dirty => {
118
- if (dirty) notice.value = '';
119
- };
120
- return { args, event, step, saving, notice, saveStep, clearNotice };
121
- },
122
- template:
123
- '<Editor v-bind="args" :weapons="args.weapons" :event="event" :step="step" :saving="saving" :saveNotice="notice" @save:step="saveStep" @navigate:step="step = $event" @update:dirty="clearNotice" />'
124
- })
125
- };
126
-
127
- export const SavingStep = {
128
- args: { ...Default.args, editMode: true, step: 2, saving: true }
129
- };
130
-
131
- export const StepSaveFailed = {
132
- args: { ...Default.args, editMode: true, step: 2, saveError: 'Changes could not be saved. Please try again.' }
133
- };
134
-
135
- export const WaitlistDisabled = {
136
- args: { ...Default.args, event: { ...Default.args.event, WaitlistEnabled: false }, editMode: true, step: 1 }
137
- };
1
+ import { ref } from 'vue';
2
+ import EditEvent from './EditEventWizard.vue';
3
+ import singleEventMock from '../../../../mocks/singleEventMock.js';
4
+
5
+ export default {
6
+ title: 'Organisms/Wizards/EditEventWizard/EditEventWizard',
7
+ component: EditEvent,
8
+ args: {
9
+ event: { ...singleEventMock, EventPrice: 25.5 },
10
+ weapons: [
11
+ { text: 'Longsword', link: 1 },
12
+ { text: 'Saber', link: 2 },
13
+ { text: 'Rapier', link: 3 }
14
+ ],
15
+ DEFormats: [
16
+ { text: 'Single Elimination', link: 1 },
17
+ { text: 'Double Elimination', link: 2 },
18
+ { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
19
+ ],
20
+ userLevel: 'Admin'
21
+ },
22
+ argTypes: {
23
+ editMode: { control: 'boolean' },
24
+ step: { control: { type: 'number', min: 1, max: 5 } },
25
+ saving: { control: 'boolean' },
26
+ saveError: { control: 'text' },
27
+ saveNotice: { control: 'text' },
28
+ event: { control: 'object' },
29
+ weapons: { control: 'object' },
30
+ DEFormats: { control: 'object' },
31
+ userLevel: { control: 'string' }
32
+ }
33
+ };
34
+
35
+ export const Default = {
36
+ args: {
37
+ event: { ...singleEventMock, EventPrice: 25.5 },
38
+ weapons: [
39
+ { text: 'Longsword', link: 1 },
40
+ { text: 'Saber', link: 2 },
41
+ { text: 'Rapier', link: 3 }
42
+ ],
43
+ DEFormats: [
44
+ { text: 'Single Elimination', link: 1 },
45
+ { text: 'Double Elimination', link: 2 },
46
+ { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
47
+ ],
48
+ userLevel: 'Admin'
49
+ }
50
+ };
51
+ // new Date().toISOString().split('T')[0],
52
+ export const newEventAsClub = {
53
+ args: {
54
+ event: {
55
+ EventId: 0,
56
+ CountDoubles: false,
57
+ CountHandshots: false,
58
+ CutOffNumber: 64,
59
+ DEBoutCount: 7,
60
+ DEBoutCounter: false,
61
+ DEMax: false,
62
+ DEMaxPoints: 12,
63
+ DEPromoteBy: ['Top Percent', 'Top Count', 'Top Count of Each Pool'],
64
+ DEPromotionAmount: '100%',
65
+ DEPromotionOrder: ['Win Percent', 'Win Count', 'Indicator', 'Points Scored'],
66
+ DETime: 180,
67
+ DETimer: false,
68
+ DEType: 'single',
69
+ Date: new Date().toISOString().split('T')[0],
70
+ EventName: '',
71
+ EventPrice: '',
72
+ NumberOfRings: 2,
73
+ PenaltiesReset: true,
74
+ PoolScoreDirection: true,
75
+ StartTime: '12:00:00',
76
+ WeaponId: 1,
77
+ boutCount: 5,
78
+ boutCounter: false,
79
+ poolMax: false,
80
+ poolMaxPoints: 7,
81
+ poolTime: 180,
82
+ poolTimer: false,
83
+ seedWith: 'M2 - MeyerSquared',
84
+ thirdPlaceBout: false
85
+ },
86
+ weapons: [
87
+ { text: 'Longsword', link: 1 },
88
+ { text: 'Saber', link: 2 },
89
+ { text: 'Rapier', link: 3 }
90
+ ],
91
+ DEFormats: [
92
+ { text: 'Single Elimination', link: 1 },
93
+ { text: 'Double Elimination', link: 2 },
94
+ { text: 'Single Elimination with Round Robin Semi-Final', link: 3 }
95
+ ],
96
+ userLevel: 'Club'
97
+ }
98
+ };
99
+
100
+ export const EditWithStepSaves = {
101
+ args: { ...Default.args, editMode: true, step: 1 },
102
+ render: args => ({
103
+ components: { Editor: EditEvent },
104
+ setup() {
105
+ const event = ref(JSON.parse(JSON.stringify(args.event)));
106
+ const step = ref(args.step);
107
+ const saving = ref(false);
108
+ const notice = ref('');
109
+ const saveStep = async request => {
110
+ saving.value = true;
111
+ await new Promise(resolve => setTimeout(resolve, 500));
112
+ event.value = request.event;
113
+ step.value = Math.min(request.step + 1, 5);
114
+ notice.value = 'Changes saved.';
115
+ saving.value = false;
116
+ };
117
+ const clearNotice = dirty => {
118
+ if (dirty) notice.value = '';
119
+ };
120
+ return { args, event, step, saving, notice, saveStep, clearNotice };
121
+ },
122
+ template:
123
+ '<Editor v-bind="args" :weapons="args.weapons" :event="event" :step="step" :saving="saving" :saveNotice="notice" @save:step="saveStep" @navigate:step="step = $event" @update:dirty="clearNotice" />'
124
+ })
125
+ };
126
+
127
+ export const SavingStep = {
128
+ args: { ...Default.args, editMode: true, step: 2, saving: true }
129
+ };
130
+
131
+ export const StepSaveFailed = {
132
+ args: { ...Default.args, editMode: true, step: 2, saveError: 'Changes could not be saved. Please try again.' }
133
+ };
134
+
135
+ export const WaitlistDisabled = {
136
+ args: { ...Default.args, event: { ...Default.args.event, WaitlistEnabled: false }, editMode: true, step: 1 }
137
+ };
@@ -1,172 +1,172 @@
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
8
- :color="'primaryHighlight'"
9
- :size="'2xl'"
10
- :text="'Event Customization'"
11
- :weight="'normal'"
12
- data-testid="text-add-tournament"
13
- />
14
- </div>
15
- <div class="w-full flex flex-row justify-center my-4 grow">
16
- <BaseText
17
- :color="'quinary'"
18
- :size="'sm'"
19
- :text="'This section is for event specific customizations. These settings are optional and vary from tournament to tournament.'"
20
- :weight="'normal'"
21
- data-testid="text-registration"
22
- />
23
- </div>
24
- <div class="mb-4 grow">
25
- <BaseText :color="'quaternary'" :size="'sm'" :text="'INCLUDE IN RATINGS'" class="border-b my-5" />
26
- <Toggle
27
- :checked="localEventConfig.IncludeInRatings === true"
28
- :label="includeInRatingsUpLabel"
29
- :labelLeft="false"
30
- @update:checked="handleToggleChange('IncludeInRatings', localEventConfig.IncludeInRatings)"
31
- />
32
- </div>
33
- <div class="mb-4 grow">
34
- <BaseText :color="'quaternary'" :size="'sm'" :text="'SCORING DIRECTION'" class="border-b my-5" />
35
- <Toggle
36
- :checked="localEventConfig.PoolScoreDirection === true"
37
- :label="countedUpLabel"
38
- :labelLeft="false"
39
- @update:checked="handleToggleChange('PoolScoreDirection', localEventConfig.PoolScoreDirection)"
40
- />
41
- </div>
42
- <div class="mb-4 grow">
43
- <BaseText :color="'quaternary'" :size="'sm'" :text="'PENALTIES'" class="border-b mt-5" />
44
- <BaseText
45
- text="Regardless of this setting, Directors can add a note to any fencer that will stick for the entire event."
46
- size="sm"
47
- color="quaternary"
48
- class="mt-1 mb-5"
49
- />
50
- <Toggle
51
- :checked="localEventConfig.PenaltiesReset === true"
52
- :label="penaltyCardsLabel"
53
- :labelLeft="false"
54
- @update:checked="handleToggleChange('PenaltiesReset', localEventConfig.PenaltiesReset)"
55
- />
56
- </div>
57
- <div class="mb-4 grow">
58
- <BaseText :color="'quaternary'" :size="'sm'" :text="'EXTRA TRACKING DATA'" class="border-b mt-5" />
59
- <BaseText
60
- :color="'quaternary'"
61
- :size="'sm'"
62
- :text="'This will add extra modules to the Director screen. It\'s recommended to enable only this feature if truly necessary.'"
63
- :weight="'normal'"
64
- class="mt-1 mb-5"
65
- />
66
- <Toggle
67
- :checked="isCountHandshotsEnabled"
68
- :label="countingHandshotsLabel"
69
- :labelLeft="false"
70
- @update:checked="handleToggleChange('CountHandshots')"
71
- />
72
- <Toggle
73
- :checked="localEventConfig.CountDoubles === true"
74
- :label="countDoublesLabel"
75
- :labelLeft="false"
76
- @update:checked="handleToggleChange('CountDoubles', localEventConfig.CountDoubles)"
77
- />
78
- </div>
79
- </div>
80
- <div class="flex flex-row justify-center h-12 mt-4">
81
- <BaseButton
82
- class="w-1/2 ml-1 h-12"
83
- color="neutral"
84
- label="Back"
85
- size="sm"
86
- type="primary"
87
- @buttonClick="handleBack"
88
- />
89
- <BaseButton
90
- class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
91
- color="neutral"
92
- :label="nextButtonLabel"
93
- selected="selected"
94
- size="sm"
95
- type="primary"
96
- @buttonClick="handleNext"
97
- />
98
- </div>
99
- </template>
100
-
101
- <script>
102
- import BaseText from '../../../../Atoms/Text/BaseText.vue';
103
- import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
104
- import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
105
- import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
106
-
107
- export default {
108
- name: 'EventCustomization',
109
- components: { BaseButton, StepIndicator, BaseText, Toggle },
110
- emits: ['update', 'update:back', 'update:next'],
111
- props: {
112
- nextButtonLabel: { type: String, default: 'Next' },
113
- eventConfig: {
114
- type: Object,
115
- required: true
116
- },
117
- steps: {
118
- type: Array,
119
- required: true
120
- },
121
- currentStep: {
122
- type: Number,
123
- required: true
124
- }
125
- },
126
- data() {
127
- return {
128
- localEventConfig: { ...this.eventConfig }
129
- };
130
- },
131
- computed: {
132
- includeInRatingsUpLabel() {
133
- return this.localEventConfig.IncludeInRatings
134
- ? 'Include in M² Ratings - Other Criteria may still need to meet to be included'
135
- : 'Exclude from Ratings';
136
- },
137
- countedUpLabel() {
138
- return this.localEventConfig.PoolScoreDirection
139
- ? 'Score Counts Up From Zero to Max'
140
- : 'Score Starts at Max and Counts Down to Zero';
141
- },
142
- isCountHandshotsEnabled() {
143
- return this.localEventConfig.CountHandshots === true;
144
- },
145
- countingHandshotsLabel() {
146
- return this.localEventConfig.CountHandshots
147
- ? 'Handshots Counter Added & Will Be Tracked'
148
- : 'Handshots Are Not Counted';
149
- },
150
- countDoublesLabel() {
151
- return this.localEventConfig.CountDoubles ? 'Double Counter Added & Will Be Tracked' : 'Doubles Are Not Counted';
152
- },
153
- penaltyCardsLabel() {
154
- return this.localEventConfig.PenaltiesReset
155
- ? 'Penalty Cards Reset After Each Bout'
156
- : 'Penalty Cards Stick for the Entire Event';
157
- }
158
- },
159
- methods: {
160
- handleBack() {
161
- this.$emit('update:back');
162
- },
163
- handleNext() {
164
- this.$emit('update:next', this.eventConfig);
165
- },
166
- handleToggleChange(key) {
167
- this.localEventConfig[key] = this.localEventConfig[key] !== true;
168
- this.$emit('update', { [key]: this.localEventConfig[key] });
169
- }
170
- }
171
- };
172
- </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
8
+ :color="'primaryHighlight'"
9
+ :size="'2xl'"
10
+ :text="'Event Customization'"
11
+ :weight="'normal'"
12
+ data-testid="text-add-tournament"
13
+ />
14
+ </div>
15
+ <div class="w-full flex flex-row justify-center my-4 grow">
16
+ <BaseText
17
+ :color="'quinary'"
18
+ :size="'sm'"
19
+ :text="'This section is for event specific customizations. These settings are optional and vary from tournament to tournament.'"
20
+ :weight="'normal'"
21
+ data-testid="text-registration"
22
+ />
23
+ </div>
24
+ <div class="mb-4 grow">
25
+ <BaseText :color="'quaternary'" :size="'sm'" :text="'INCLUDE IN RATINGS'" class="border-b my-5" />
26
+ <Toggle
27
+ :checked="localEventConfig.IncludeInRatings === true"
28
+ :label="includeInRatingsUpLabel"
29
+ :labelLeft="false"
30
+ @update:checked="handleToggleChange('IncludeInRatings', localEventConfig.IncludeInRatings)"
31
+ />
32
+ </div>
33
+ <div class="mb-4 grow">
34
+ <BaseText :color="'quaternary'" :size="'sm'" :text="'SCORING DIRECTION'" class="border-b my-5" />
35
+ <Toggle
36
+ :checked="localEventConfig.PoolScoreDirection === true"
37
+ :label="countedUpLabel"
38
+ :labelLeft="false"
39
+ @update:checked="handleToggleChange('PoolScoreDirection', localEventConfig.PoolScoreDirection)"
40
+ />
41
+ </div>
42
+ <div class="mb-4 grow">
43
+ <BaseText :color="'quaternary'" :size="'sm'" :text="'PENALTIES'" class="border-b mt-5" />
44
+ <BaseText
45
+ text="Regardless of this setting, Directors can add a note to any fencer that will stick for the entire event."
46
+ size="sm"
47
+ color="quaternary"
48
+ class="mt-1 mb-5"
49
+ />
50
+ <Toggle
51
+ :checked="localEventConfig.PenaltiesReset === true"
52
+ :label="penaltyCardsLabel"
53
+ :labelLeft="false"
54
+ @update:checked="handleToggleChange('PenaltiesReset', localEventConfig.PenaltiesReset)"
55
+ />
56
+ </div>
57
+ <div class="mb-4 grow">
58
+ <BaseText :color="'quaternary'" :size="'sm'" :text="'EXTRA TRACKING DATA'" class="border-b mt-5" />
59
+ <BaseText
60
+ :color="'quaternary'"
61
+ :size="'sm'"
62
+ :text="'This will add extra modules to the Director screen. It\'s recommended to enable only this feature if truly necessary.'"
63
+ :weight="'normal'"
64
+ class="mt-1 mb-5"
65
+ />
66
+ <Toggle
67
+ :checked="isCountHandshotsEnabled"
68
+ :label="countingHandshotsLabel"
69
+ :labelLeft="false"
70
+ @update:checked="handleToggleChange('CountHandshots')"
71
+ />
72
+ <Toggle
73
+ :checked="localEventConfig.CountDoubles === true"
74
+ :label="countDoublesLabel"
75
+ :labelLeft="false"
76
+ @update:checked="handleToggleChange('CountDoubles', localEventConfig.CountDoubles)"
77
+ />
78
+ </div>
79
+ </div>
80
+ <div class="flex flex-row justify-center h-12 mt-4">
81
+ <BaseButton
82
+ class="w-1/2 ml-1 h-12"
83
+ color="neutral"
84
+ label="Back"
85
+ size="sm"
86
+ type="primary"
87
+ @buttonClick="handleBack"
88
+ />
89
+ <BaseButton
90
+ class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
91
+ color="neutral"
92
+ :label="nextButtonLabel"
93
+ selected="selected"
94
+ size="sm"
95
+ type="primary"
96
+ @buttonClick="handleNext"
97
+ />
98
+ </div>
99
+ </template>
100
+
101
+ <script>
102
+ import BaseText from '../../../../Atoms/Text/BaseText.vue';
103
+ import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
104
+ import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
105
+ import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
106
+
107
+ export default {
108
+ name: 'EventCustomization',
109
+ components: { BaseButton, StepIndicator, BaseText, Toggle },
110
+ emits: ['update', 'update:back', 'update:next'],
111
+ props: {
112
+ nextButtonLabel: { type: String, default: 'Next' },
113
+ eventConfig: {
114
+ type: Object,
115
+ required: true
116
+ },
117
+ steps: {
118
+ type: Array,
119
+ required: true
120
+ },
121
+ currentStep: {
122
+ type: Number,
123
+ required: true
124
+ }
125
+ },
126
+ data() {
127
+ return {
128
+ localEventConfig: { ...this.eventConfig }
129
+ };
130
+ },
131
+ computed: {
132
+ includeInRatingsUpLabel() {
133
+ return this.localEventConfig.IncludeInRatings
134
+ ? 'Include in M² Ratings - Other Criteria may still need to meet to be included'
135
+ : 'Exclude from Ratings';
136
+ },
137
+ countedUpLabel() {
138
+ return this.localEventConfig.PoolScoreDirection
139
+ ? 'Score Counts Up From Zero to Max'
140
+ : 'Score Starts at Max and Counts Down to Zero';
141
+ },
142
+ isCountHandshotsEnabled() {
143
+ return this.localEventConfig.CountHandshots === true;
144
+ },
145
+ countingHandshotsLabel() {
146
+ return this.localEventConfig.CountHandshots
147
+ ? 'Handshots Counter Added & Will Be Tracked'
148
+ : 'Handshots Are Not Counted';
149
+ },
150
+ countDoublesLabel() {
151
+ return this.localEventConfig.CountDoubles ? 'Double Counter Added & Will Be Tracked' : 'Doubles Are Not Counted';
152
+ },
153
+ penaltyCardsLabel() {
154
+ return this.localEventConfig.PenaltiesReset
155
+ ? 'Penalty Cards Reset After Each Bout'
156
+ : 'Penalty Cards Stick for the Entire Event';
157
+ }
158
+ },
159
+ methods: {
160
+ handleBack() {
161
+ this.$emit('update:back');
162
+ },
163
+ handleNext() {
164
+ this.$emit('update:next', this.eventConfig);
165
+ },
166
+ handleToggleChange(key) {
167
+ this.localEventConfig[key] = this.localEventConfig[key] !== true;
168
+ this.$emit('update', { [key]: this.localEventConfig[key] });
169
+ }
170
+ }
171
+ };
172
+ </script>