@dcrackel/hematournamentui 1.0.253 → 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/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,7 +123,56 @@ 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
178
|
if (key === 'EventName') this.localEvent.EventName = value;
|
|
@@ -131,8 +180,9 @@ export default {
|
|
|
131
180
|
if (key === 'StartTime ') this.localEvent.Date = this.formatTimeToHHMMSS(value);
|
|
132
181
|
if (key === 'NumberOfRings ') this.NumberOfRings = value;
|
|
133
182
|
if (key === 'WeaponId') this.localEvent.WeaponId = value.link;
|
|
134
|
-
|
|
183
|
+
},
|
|
135
184
|
handleValueChange(change) {
|
|
185
|
+
console.log(change)
|
|
136
186
|
const [key, value] = Object.entries(change)[0];
|
|
137
187
|
this.eventConfig[key] = value;
|
|
138
188
|
},
|