@dcrackel/hematournamentui 1.0.709 → 1.0.711
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.
- package/README.md +16 -0
- package/dist/HemaTournamentUI-lib.es.js +4343 -4086
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +3 -0
- package/package.json +1 -1
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +48 -41
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +227 -206
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -225
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +133 -91
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.test.js +191 -0
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +366 -309
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -171
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -215
- package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -0
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -52
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -75
- package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -83
- package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -0
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -360
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -113
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -280
- package/src/stories/Util/Validations/PriceValidation.js +6 -0
- package/src/stories/Util/Validations/TournamentFieldsValidations.js +4 -0
package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue
CHANGED
|
@@ -1,171 +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 ===
|
|
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="
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
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>
|