@dcrackel/hematournamentui 1.0.708 → 1.0.710
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 +148 -106
- package/dist/HemaTournamentUI-lib.es.js +6678 -6196
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +16 -6
- package/package.json +1 -1
- package/src/stories/Atoms/Input/BaseInput.test.js +97 -85
- package/src/stories/Atoms/Input/BaseInput.vue +149 -150
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -20
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -0
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -133
- 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/PersonManagement/Admin/Administration/Administration.stories.js +14 -0
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -0
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +13 -3
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -172
- package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -103
- package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -0
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -213
- package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -0
- package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -83
- package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +89 -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 +292 -280
- package/src/stories/Util/Validations/PersonManagementValidations.js +45 -29
- package/src/stories/Util/Validations/PriceValidation.js +6 -0
- package/src/stories/Util/Validations/TournamentFieldsValidations.js +4 -0
package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js
CHANGED
|
@@ -1,113 +1,116 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
control: { type: 'object' }
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
control: { type: 'object' }
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
control: { type: 'object' }
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
control: { type: '
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
control: { type: '
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
+
BasePrice: { invalid: false, message: '' },
|
|
9
|
+
Address: { invalid: false, message: '' },
|
|
10
|
+
StartDate: { invalid: false, message: '' },
|
|
11
|
+
TotalDays: { invalid: false, message: '' },
|
|
12
|
+
RegistrationCutOff: { invalid: false, message: '' },
|
|
13
|
+
Description: { invalid: false, message: '' }
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const invalidTournamentFields = {
|
|
17
|
+
Name: { invalid: true, message: 'Tournament name is required' },
|
|
18
|
+
BasePrice: { invalid: true, message: 'Price must be a non-negative number.' },
|
|
19
|
+
Address: { invalid: true, message: 'Location is required' },
|
|
20
|
+
StartDate: { invalid: true, message: 'Start date is required' },
|
|
21
|
+
TotalDays: { invalid: true, message: 'Must be at least 1 day' },
|
|
22
|
+
RegistrationCutOff: { invalid: true, message: 'Registration cut off is required' },
|
|
23
|
+
Description: { invalid: true, message: 'Description is required' }
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const emptyTournament = {
|
|
27
|
+
Name: '',
|
|
28
|
+
BasePrice: '',
|
|
29
|
+
Address: { Name: '' },
|
|
30
|
+
StartDate: new Date().toISOString().slice(0, 10),
|
|
31
|
+
TotalDays: 1,
|
|
32
|
+
RegistrationCutOff: new Date().toISOString().slice(0, 10),
|
|
33
|
+
PrimaryContactId: mockPersons?.[0]?.PersonId ?? 0,
|
|
34
|
+
Images: [{ URL: '' }],
|
|
35
|
+
Description: ''
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
title: 'Templates/TournamentManagement/TournamentPageOne',
|
|
40
|
+
component: TournamentForm,
|
|
41
|
+
tags: ['autodocs'],
|
|
42
|
+
args: {
|
|
43
|
+
tournament: { ...mockTournaments[0], BasePrice: 75.5 },
|
|
44
|
+
locations: mockLocation,
|
|
45
|
+
persons: mockPersons,
|
|
46
|
+
validation: validTournamentFields,
|
|
47
|
+
isNewTournament: true,
|
|
48
|
+
userLevel: 'Club'
|
|
49
|
+
},
|
|
50
|
+
argTypes: {
|
|
51
|
+
tournament: {
|
|
52
|
+
control: { type: 'object' }
|
|
53
|
+
},
|
|
54
|
+
locations: {
|
|
55
|
+
control: { type: 'object' }
|
|
56
|
+
},
|
|
57
|
+
persons: {
|
|
58
|
+
control: { type: 'object' }
|
|
59
|
+
},
|
|
60
|
+
validation: {
|
|
61
|
+
control: { type: 'object' }
|
|
62
|
+
},
|
|
63
|
+
isNewTournament: {
|
|
64
|
+
control: { type: 'boolean' }
|
|
65
|
+
},
|
|
66
|
+
userLevel: {
|
|
67
|
+
control: { type: 'text' }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const Default = {
|
|
73
|
+
args: {
|
|
74
|
+
tournament: mockTournaments[0],
|
|
75
|
+
locations: mockLocation,
|
|
76
|
+
persons: mockPersons,
|
|
77
|
+
validation: validTournamentFields
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const EmptyTournament = {
|
|
82
|
+
args: {
|
|
83
|
+
tournament: emptyTournament,
|
|
84
|
+
locations: mockLocation,
|
|
85
|
+
persons: mockPersons,
|
|
86
|
+
validation: validTournamentFields
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const EditMode = {
|
|
91
|
+
args: {
|
|
92
|
+
tournament: { ...mockTournaments[0], BasePrice: 75.5 },
|
|
93
|
+
locations: mockLocation,
|
|
94
|
+
persons: mockPersons,
|
|
95
|
+
validation: validTournamentFields,
|
|
96
|
+
isNewTournament: false
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const InvalidFields = {
|
|
101
|
+
args: {
|
|
102
|
+
tournament: { ...emptyTournament, BasePrice: -5 },
|
|
103
|
+
locations: mockLocation,
|
|
104
|
+
persons: mockPersons,
|
|
105
|
+
validation: invalidTournamentFields
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const EmptyOptions = {
|
|
110
|
+
args: {
|
|
111
|
+
tournament: emptyTournament,
|
|
112
|
+
locations: [],
|
|
113
|
+
persons: [],
|
|
114
|
+
validation: validTournamentFields
|
|
115
|
+
}
|
|
116
|
+
};
|