@dcrackel/hematournamentui 1.0.252 → 1.0.255
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/dist/HemaTournamentUI-lib.es.js +54 -11
- package/dist/HemaTournamentUI-lib.umd.js +2 -2
- package/package.json +1 -2
- package/src/mocks/singleEventMock.js +5 -5
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +54 -8
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +1 -2
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcrackel/hematournamentui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.255",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/HemaTournamentUI-lib.umd.js",
|
|
7
7
|
"module": "dist/HemaTournamentUI-lib.es.js",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"@storybook/addon-essentials": "^8.2.7",
|
|
58
58
|
"@storybook/addon-interactions": "^8.2.7",
|
|
59
59
|
"@storybook/addon-links": "^8.2.7",
|
|
60
|
-
"@storybook/addon-mdx-gfm": "^8.2.7",
|
|
61
60
|
"@storybook/blocks": "^8.2.7",
|
|
62
61
|
"@storybook/react": "^8.2.7",
|
|
63
62
|
"@storybook/test": "^8.2.7",
|
|
@@ -2,7 +2,7 @@ const singleEventMock =
|
|
|
2
2
|
{
|
|
3
3
|
"EventId": 11,
|
|
4
4
|
"TournamentId": 19,
|
|
5
|
-
"EventName": "Test
|
|
5
|
+
"EventName": "Test Event",
|
|
6
6
|
"Date": "2024-05-22",
|
|
7
7
|
"StartTime": "17:25:31",
|
|
8
8
|
"NumberOfRings": 2,
|
|
@@ -21,7 +21,7 @@ const singleEventMock =
|
|
|
21
21
|
{
|
|
22
22
|
"RuleId": 1,
|
|
23
23
|
"RuleName": "PoolTime",
|
|
24
|
-
"RuleValue": "
|
|
24
|
+
"RuleValue": "120",
|
|
25
25
|
"Context": "pool"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -33,7 +33,7 @@ const singleEventMock =
|
|
|
33
33
|
{
|
|
34
34
|
"RuleId": 3,
|
|
35
35
|
"RuleName": "DETime",
|
|
36
|
-
"RuleValue": "
|
|
36
|
+
"RuleValue": "120",
|
|
37
37
|
"Context": "de"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -51,7 +51,7 @@ const singleEventMock =
|
|
|
51
51
|
{
|
|
52
52
|
"RuleId": 9,
|
|
53
53
|
"RuleName": "DEPromotionOrder",
|
|
54
|
-
"RuleValue": "
|
|
54
|
+
"RuleValue": "Win Percent,Indicator,Points Scored",
|
|
55
55
|
"Context": "de"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
@@ -63,7 +63,7 @@ const singleEventMock =
|
|
|
63
63
|
{
|
|
64
64
|
"RuleId": 11,
|
|
65
65
|
"RuleName": "PoolSeeding",
|
|
66
|
-
"RuleValue": "HR",
|
|
66
|
+
"RuleValue": "HR - Hema Ratings",
|
|
67
67
|
"Context": "pool"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -97,9 +97,9 @@ export default {
|
|
|
97
97
|
boutCounter: false,
|
|
98
98
|
boutCount: 5,
|
|
99
99
|
poolTimer: false,
|
|
100
|
-
poolMax:
|
|
101
|
-
DEMax:
|
|
102
|
-
thirdPlaceBout:
|
|
100
|
+
poolMax: false,
|
|
101
|
+
DEMax: false,
|
|
102
|
+
thirdPlaceBout: false,
|
|
103
103
|
poolTime: 120,
|
|
104
104
|
poolMaxPoints: 7,
|
|
105
105
|
DETimer: false,
|
|
@@ -123,19 +123,66 @@ export default {
|
|
|
123
123
|
]
|
|
124
124
|
};
|
|
125
125
|
},
|
|
126
|
+
mounted() {
|
|
127
|
+
this.setInitialValues();
|
|
128
|
+
},
|
|
126
129
|
methods: {
|
|
130
|
+
setInitialValues() {
|
|
131
|
+
if (!this.localEvent.rules) return;
|
|
132
|
+
this.localEvent.rules.forEach(rule => {
|
|
133
|
+
switch (rule.RuleId) {
|
|
134
|
+
case 1:
|
|
135
|
+
this.eventConfig.poolTime = rule.RuleValue;
|
|
136
|
+
this.eventConfig.poolTimer = true;
|
|
137
|
+
break;
|
|
138
|
+
case 2:
|
|
139
|
+
this.eventConfig.poolMaxPoints = rule.RuleValue;
|
|
140
|
+
this.eventConfig.poolMax = true;
|
|
141
|
+
break;
|
|
142
|
+
case 3:
|
|
143
|
+
this.eventConfig.DETime = rule.RuleValue;
|
|
144
|
+
this.eventConfig.DETimer = true;
|
|
145
|
+
break;
|
|
146
|
+
case 4:
|
|
147
|
+
this.eventConfig.DEMaxPoints = rule.RuleValue;
|
|
148
|
+
this.eventConfig.DEMax = true;
|
|
149
|
+
break;
|
|
150
|
+
case 5:
|
|
151
|
+
this.eventConfig.thirdPlaceBout = rule.RuleValue === 'true';
|
|
152
|
+
break;
|
|
153
|
+
case 6:
|
|
154
|
+
this.eventConfig.boutCount = rule.RuleValue;
|
|
155
|
+
this.eventConfig.boutCounter = true;
|
|
156
|
+
break;
|
|
157
|
+
case 7:
|
|
158
|
+
this.eventConfig.DEBoutCount = rule.RuleValue;
|
|
159
|
+
this.eventConfig.DEBoutCounter = true;
|
|
160
|
+
break;
|
|
161
|
+
case 9:
|
|
162
|
+
this.eventConfig.DEPromationOrder = rule.RuleValue.split(',');
|
|
163
|
+
break;
|
|
164
|
+
case 10:
|
|
165
|
+
this.eventConfig.DEPromotionAmount = rule.RuleValue;
|
|
166
|
+
break;
|
|
167
|
+
case 11:
|
|
168
|
+
this.eventConfig.seedWith = rule.RuleValue;
|
|
169
|
+
break;
|
|
170
|
+
case 14:
|
|
171
|
+
this.eventConfig.maxFencerCount = rule.RuleValue;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
},
|
|
127
176
|
handleBasicValueChange(change) {
|
|
128
177
|
const [key, value] = Object.entries(change)[0];
|
|
129
|
-
console.log(key, value)
|
|
130
178
|
if (key === 'EventName') this.localEvent.EventName = value;
|
|
131
179
|
if (key === 'Date ') this.localEvent.Date = this.formatDateToYYYYMMDD(value);
|
|
132
180
|
if (key === 'StartTime ') this.localEvent.Date = this.formatTimeToHHMMSS(value);
|
|
133
181
|
if (key === 'NumberOfRings ') this.NumberOfRings = value;
|
|
134
182
|
if (key === 'WeaponId') this.localEvent.WeaponId = value.link;
|
|
135
|
-
|
|
136
|
-
console.log(this.localEvent)
|
|
137
|
-
},
|
|
183
|
+
},
|
|
138
184
|
handleValueChange(change) {
|
|
185
|
+
console.log(change)
|
|
139
186
|
const [key, value] = Object.entries(change)[0];
|
|
140
187
|
this.eventConfig[key] = value;
|
|
141
188
|
},
|
|
@@ -174,7 +221,6 @@ export default {
|
|
|
174
221
|
},
|
|
175
222
|
handleSubmit() {
|
|
176
223
|
this.localEvent.rules = this.convertEventConfigToRules(this.eventConfig)
|
|
177
|
-
console.log(this.localEvent)
|
|
178
224
|
this.$emit('update:submit', this.localEvent);
|
|
179
225
|
},
|
|
180
226
|
handleCancel() {
|
package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue
CHANGED
|
@@ -87,9 +87,8 @@ export default {
|
|
|
87
87
|
selectedItem: 'M2 - MeyerSquared'
|
|
88
88
|
};
|
|
89
89
|
},
|
|
90
|
-
computed: {
|
|
91
|
-
},
|
|
92
90
|
mounted() {
|
|
91
|
+
console.log('PoolConfiguration.vue: computed: eventConfig: ', this.eventConfig);
|
|
93
92
|
this.localEventConfig = { ...this.eventConfig };
|
|
94
93
|
},
|
|
95
94
|
watch: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<EditEventsTopMenu :currentTab="'Edit'" :tabs="tabs" @tabMenuClick="handleTabMenuClick"/>
|
|
4
4
|
|
|
5
5
|
<div class="w-full flex flex-row justify-center mt-3">
|
|
6
|
-
<EditEventWizard :event="event" :rules="rules" :weapons="weapons"/>
|
|
6
|
+
<EditEventWizard :event="event" :rules="rules" :weapons="weapons" @update:submit="handleSubmit"/>
|
|
7
7
|
</div>
|
|
8
8
|
</section>
|
|
9
9
|
</template>
|
|
@@ -57,9 +57,9 @@ export default {
|
|
|
57
57
|
handleTabMenuClick(value) {
|
|
58
58
|
this.$emit('tab:menu-click', value);
|
|
59
59
|
},
|
|
60
|
-
|
|
61
|
-
this
|
|
62
|
-
}
|
|
60
|
+
handleSubmit(value){
|
|
61
|
+
this.$emit('update:submit', value);
|
|
62
|
+
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
</script>
|