@dcrackel/hematournamentui 1.0.711 → 1.0.712
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 +152 -148
- package/dist/HemaTournamentUI-lib.es.js +4150 -4039
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +11 -0
- package/package.json +1 -1
- package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -0
- package/src/stories/Organisms/Cards/EventCard/EventCard.stories.js +41 -1
- package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -0
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +62 -30
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +1 -1
- package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.vue +12 -5
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +4 -0
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +249 -227
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +4 -0
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.test.js +221 -191
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +372 -366
- package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -0
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +31 -1
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +58 -45
- package/src/stories/Util/registrationStatus.js +11 -0
|
@@ -1,227 +1,249 @@
|
|
|
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 color="primaryHighlight" size="2xl" text="Basic Event Information" weight="normal" />
|
|
8
|
-
</div>
|
|
9
|
-
<div class="w-full flex flex-row justify-center my-4 grow">
|
|
10
|
-
<BaseText
|
|
11
|
-
color="quinary"
|
|
12
|
-
size="sm"
|
|
13
|
-
text="Please fill in the basic information required for your event, including the event name, start date, start time, number of rings, and weapon form."
|
|
14
|
-
weight="normal"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div class="mb-4 grow">
|
|
19
|
-
<BaseText color="quaternary" size="sm" text="BASIC INFORMATION" class="border-b mb-5" />
|
|
20
|
-
<TitledInput
|
|
21
|
-
:inputValue="eventConfig.EventName || ''"
|
|
22
|
-
:invalid="validation.EventName.invalid"
|
|
23
|
-
placeholder="Enter Event Name"
|
|
24
|
-
:title="validation.EventName.invalid ? `Event Name - ${validation.EventName.message}` : 'Event Name'"
|
|
25
|
-
@update:value="handleEventNameChange"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div class="mb-4 grow">
|
|
30
|
-
<TitledInput
|
|
31
|
-
:inputValue="eventConfig.EventPrice ?? ''"
|
|
32
|
-
:invalid="priceValidation.invalid"
|
|
33
|
-
placeholder="0.00"
|
|
34
|
-
:title="priceValidationLabel"
|
|
35
|
-
@update:value="handleEventPriceChange"
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div class="flex flex-row mb-3 grow">
|
|
40
|
-
<div class="mr-1 w-full">
|
|
41
|
-
<BaseText
|
|
42
|
-
color="quinary"
|
|
43
|
-
:invalid="validation.startDate"
|
|
44
|
-
size="sm"
|
|
45
|
-
text="Start Date"
|
|
46
|
-
weight="normal"
|
|
47
|
-
class="mb-1"
|
|
48
|
-
/>
|
|
49
|
-
<DatePicker
|
|
50
|
-
:invalid="validation.Date"
|
|
51
|
-
:setDate="eventConfig.Date"
|
|
52
|
-
:userLevel="userLevel"
|
|
53
|
-
@update:selectedDate="handleDateUpdate"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<div class="mb-4 grow">
|
|
59
|
-
<BaseText
|
|
60
|
-
color="quinary"
|
|
61
|
-
:invalid="validation.StartTime"
|
|
62
|
-
size="sm"
|
|
63
|
-
text="Start Time"
|
|
64
|
-
weight="normal"
|
|
65
|
-
class="mb-1"
|
|
66
|
-
/>
|
|
67
|
-
<DatePicker
|
|
68
|
-
:invalid="validation.StartTime"
|
|
69
|
-
:setDate="eventConfig.StartTime"
|
|
70
|
-
pickerMode="time"
|
|
71
|
-
@update:selectedDate="handleTimeUpdate"
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div class="mb-4 grow">
|
|
76
|
-
<BaseText
|
|
77
|
-
color="quinary"
|
|
78
|
-
:invalid="validation.WeaponId"
|
|
79
|
-
size="sm"
|
|
80
|
-
text="Weapon Form"
|
|
81
|
-
weight="normal"
|
|
82
|
-
class="mb-1"
|
|
83
|
-
/>
|
|
84
|
-
<DropDownMenu
|
|
85
|
-
:label="''"
|
|
86
|
-
:items="weapons"
|
|
87
|
-
:selected-item="selectedWeapon"
|
|
88
|
-
:alignEnd="false"
|
|
89
|
-
width="w-full"
|
|
90
|
-
@update:selectedItem="handleWeaponChange"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<div class="mb-4 grow">
|
|
95
|
-
<TitledInput
|
|
96
|
-
:inputValue="eventConfig.NumberOfRings || 2"
|
|
97
|
-
:invalid="validation.NumberOfRings"
|
|
98
|
-
placeholder="Enter Number of Rings"
|
|
99
|
-
inputType="number"
|
|
100
|
-
title="Number of Rings"
|
|
101
|
-
@update:value="handleNumberOfRingsChange"
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div class="mb-4 grow">
|
|
106
|
-
<TitledInput
|
|
107
|
-
:inputValue="eventConfig.CutOffNumber || ''"
|
|
108
|
-
placeholder="Unlimited"
|
|
109
|
-
inputType="number"
|
|
110
|
-
title="Max Fencers Allowed In (blank is unlimited)"
|
|
111
|
-
@update:value="handleCutOffNumber"
|
|
112
|
-
/>
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
<div class="
|
|
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
|
-
|
|
168
|
-
type:
|
|
169
|
-
required: true
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
type:
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
this
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
this
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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 color="primaryHighlight" size="2xl" text="Basic Event Information" weight="normal" />
|
|
8
|
+
</div>
|
|
9
|
+
<div class="w-full flex flex-row justify-center my-4 grow">
|
|
10
|
+
<BaseText
|
|
11
|
+
color="quinary"
|
|
12
|
+
size="sm"
|
|
13
|
+
text="Please fill in the basic information required for your event, including the event name, start date, start time, number of rings, and weapon form."
|
|
14
|
+
weight="normal"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="mb-4 grow">
|
|
19
|
+
<BaseText color="quaternary" size="sm" text="BASIC INFORMATION" class="border-b mb-5" />
|
|
20
|
+
<TitledInput
|
|
21
|
+
:inputValue="eventConfig.EventName || ''"
|
|
22
|
+
:invalid="validation.EventName.invalid"
|
|
23
|
+
placeholder="Enter Event Name"
|
|
24
|
+
:title="validation.EventName.invalid ? `Event Name - ${validation.EventName.message}` : 'Event Name'"
|
|
25
|
+
@update:value="handleEventNameChange"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="mb-4 grow">
|
|
30
|
+
<TitledInput
|
|
31
|
+
:inputValue="eventConfig.EventPrice ?? ''"
|
|
32
|
+
:invalid="priceValidation.invalid"
|
|
33
|
+
placeholder="0.00"
|
|
34
|
+
:title="priceValidationLabel"
|
|
35
|
+
@update:value="handleEventPriceChange"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="flex flex-row mb-3 grow">
|
|
40
|
+
<div class="mr-1 w-full">
|
|
41
|
+
<BaseText
|
|
42
|
+
color="quinary"
|
|
43
|
+
:invalid="validation.startDate"
|
|
44
|
+
size="sm"
|
|
45
|
+
text="Start Date"
|
|
46
|
+
weight="normal"
|
|
47
|
+
class="mb-1"
|
|
48
|
+
/>
|
|
49
|
+
<DatePicker
|
|
50
|
+
:invalid="validation.Date"
|
|
51
|
+
:setDate="eventConfig.Date"
|
|
52
|
+
:userLevel="userLevel"
|
|
53
|
+
@update:selectedDate="handleDateUpdate"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="mb-4 grow">
|
|
59
|
+
<BaseText
|
|
60
|
+
color="quinary"
|
|
61
|
+
:invalid="validation.StartTime"
|
|
62
|
+
size="sm"
|
|
63
|
+
text="Start Time"
|
|
64
|
+
weight="normal"
|
|
65
|
+
class="mb-1"
|
|
66
|
+
/>
|
|
67
|
+
<DatePicker
|
|
68
|
+
:invalid="validation.StartTime"
|
|
69
|
+
:setDate="eventConfig.StartTime"
|
|
70
|
+
pickerMode="time"
|
|
71
|
+
@update:selectedDate="handleTimeUpdate"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="mb-4 grow">
|
|
76
|
+
<BaseText
|
|
77
|
+
color="quinary"
|
|
78
|
+
:invalid="validation.WeaponId"
|
|
79
|
+
size="sm"
|
|
80
|
+
text="Weapon Form"
|
|
81
|
+
weight="normal"
|
|
82
|
+
class="mb-1"
|
|
83
|
+
/>
|
|
84
|
+
<DropDownMenu
|
|
85
|
+
:label="''"
|
|
86
|
+
:items="weapons"
|
|
87
|
+
:selected-item="selectedWeapon"
|
|
88
|
+
:alignEnd="false"
|
|
89
|
+
width="w-full"
|
|
90
|
+
@update:selectedItem="handleWeaponChange"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div class="mb-4 grow">
|
|
95
|
+
<TitledInput
|
|
96
|
+
:inputValue="eventConfig.NumberOfRings || 2"
|
|
97
|
+
:invalid="validation.NumberOfRings"
|
|
98
|
+
placeholder="Enter Number of Rings"
|
|
99
|
+
inputType="number"
|
|
100
|
+
title="Number of Rings"
|
|
101
|
+
@update:value="handleNumberOfRingsChange"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="mb-4 grow">
|
|
106
|
+
<TitledInput
|
|
107
|
+
:inputValue="eventConfig.CutOffNumber || ''"
|
|
108
|
+
placeholder="Unlimited"
|
|
109
|
+
inputType="number"
|
|
110
|
+
title="Max Fencers Allowed In (blank is unlimited)"
|
|
111
|
+
@update:value="handleCutOffNumber"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div class="mb-4 grow">
|
|
116
|
+
<Toggle
|
|
117
|
+
:checked="isWaitlistEnabled"
|
|
118
|
+
label="Enable Waitlist"
|
|
119
|
+
:labelLeft="false"
|
|
120
|
+
@update:checked="handleWaitlistChange"
|
|
121
|
+
/>
|
|
122
|
+
<BaseText
|
|
123
|
+
text="Allow fencers to join a waitlist when this event reaches capacity."
|
|
124
|
+
size="sm"
|
|
125
|
+
color="quinary"
|
|
126
|
+
class="mt-1"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div class="flex flex-row justify-center h-12 mt-4">
|
|
131
|
+
<BaseButton
|
|
132
|
+
class="w-1/2 ml-1 h-12"
|
|
133
|
+
color="neutral"
|
|
134
|
+
label="Cancel"
|
|
135
|
+
size="sm"
|
|
136
|
+
type="primary"
|
|
137
|
+
@buttonClick="handleBack"
|
|
138
|
+
/>
|
|
139
|
+
<BaseButton
|
|
140
|
+
class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
|
|
141
|
+
color="neutral"
|
|
142
|
+
:label="nextButtonLabel"
|
|
143
|
+
selected
|
|
144
|
+
size="sm"
|
|
145
|
+
type="primary"
|
|
146
|
+
@buttonClick="handleNext"
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<script>
|
|
153
|
+
import TitledInput from '../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue';
|
|
154
|
+
import BaseText from '../../../../Atoms/Text/BaseText.vue';
|
|
155
|
+
import DatePicker from '../../../ComplexInputs/DatePicker/DatePicker.vue';
|
|
156
|
+
import DropDownMenu from '../../../ComplexInputs/DropDown/DropDownMenu.vue';
|
|
157
|
+
import BaseButton from '../../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
158
|
+
import StepIndicator from '../../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
|
|
159
|
+
import Toggle from '../../../../Molecules/Inputs/Toggle/Toggle.vue';
|
|
160
|
+
|
|
161
|
+
export default {
|
|
162
|
+
name: 'BasicEventInfoForm',
|
|
163
|
+
emits: ['update', 'update:back', 'update:next'],
|
|
164
|
+
components: { Toggle, StepIndicator, BaseText, DropDownMenu, DatePicker, TitledInput, BaseButton },
|
|
165
|
+
props: {
|
|
166
|
+
nextButtonLabel: { type: String, default: 'Next' },
|
|
167
|
+
eventConfig: {
|
|
168
|
+
type: Object,
|
|
169
|
+
required: true
|
|
170
|
+
},
|
|
171
|
+
weapons: {
|
|
172
|
+
type: Array,
|
|
173
|
+
required: true
|
|
174
|
+
},
|
|
175
|
+
validation: {
|
|
176
|
+
type: Object,
|
|
177
|
+
required: true
|
|
178
|
+
},
|
|
179
|
+
steps: {
|
|
180
|
+
type: Array,
|
|
181
|
+
required: true
|
|
182
|
+
},
|
|
183
|
+
currentStep: {
|
|
184
|
+
type: Number,
|
|
185
|
+
required: true
|
|
186
|
+
},
|
|
187
|
+
userLevel: {
|
|
188
|
+
type: String,
|
|
189
|
+
default: 'Club'
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
data() {
|
|
193
|
+
return {
|
|
194
|
+
validationState: {
|
|
195
|
+
invalid: false,
|
|
196
|
+
message: ''
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
computed: {
|
|
201
|
+
isWaitlistEnabled() {
|
|
202
|
+
return this.eventConfig.WaitlistEnabled ?? true;
|
|
203
|
+
},
|
|
204
|
+
priceValidation() {
|
|
205
|
+
return this.validation.EventPrice ?? { invalid: false, message: '' };
|
|
206
|
+
},
|
|
207
|
+
priceValidationLabel() {
|
|
208
|
+
if (!this.priceValidation.invalid) return 'Event Price';
|
|
209
|
+
return `Event Price - ${this.priceValidation.message}`;
|
|
210
|
+
},
|
|
211
|
+
selectedWeapon() {
|
|
212
|
+
const weapon = this.weapons.find(w => w.Id === this.eventConfig.WeaponId);
|
|
213
|
+
return weapon ? weapon.Name : { text: 'Longsword', link: 1 };
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
methods: {
|
|
217
|
+
handleEventNameChange(value) {
|
|
218
|
+
this.$emit('update', { EventName: value });
|
|
219
|
+
},
|
|
220
|
+
handleEventPriceChange(value) {
|
|
221
|
+
this.$emit('update', { EventPrice: value });
|
|
222
|
+
},
|
|
223
|
+
handleDateUpdate(value) {
|
|
224
|
+
this.$emit('update', { Date: value });
|
|
225
|
+
},
|
|
226
|
+
handleTimeUpdate(value) {
|
|
227
|
+
this.$emit('update', { StartTime: value });
|
|
228
|
+
},
|
|
229
|
+
handleNumberOfRingsChange(value) {
|
|
230
|
+
this.$emit('update', { NumberOfRings: value });
|
|
231
|
+
},
|
|
232
|
+
handleWeaponChange(value) {
|
|
233
|
+
this.$emit('update', { WeaponId: value.link });
|
|
234
|
+
},
|
|
235
|
+
handleCutOffNumber(value) {
|
|
236
|
+
this.$emit('update', { CutOffNumber: value });
|
|
237
|
+
},
|
|
238
|
+
handleWaitlistChange(value) {
|
|
239
|
+
this.$emit('update', { WaitlistEnabled: value });
|
|
240
|
+
},
|
|
241
|
+
handleNext() {
|
|
242
|
+
this.$emit('update:next');
|
|
243
|
+
},
|
|
244
|
+
handleBack() {
|
|
245
|
+
this.$emit('update:back');
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
</script>
|
|
@@ -131,3 +131,7 @@ export const SavingStep = {
|
|
|
131
131
|
export const StepSaveFailed = {
|
|
132
132
|
args: { ...Default.args, editMode: true, step: 2, saveError: 'Changes could not be saved. Please try again.' }
|
|
133
133
|
};
|
|
134
|
+
|
|
135
|
+
export const WaitlistDisabled = {
|
|
136
|
+
args: { ...Default.args, event: { ...Default.args.event, WaitlistEnabled: false }, editMode: true, step: 1 }
|
|
137
|
+
};
|