@dcrackel/hematournamentui 1.0.122 → 1.0.124
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 +10552 -10523
- package/dist/HemaTournamentUI-lib.umd.js +28 -28
- package/package.json +1 -1
- package/src/assets/empty_desert_icon-old.png +0 -0
- package/src/assets/empty_desert_icon.png +0 -0
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.stories.js +27 -4
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +25 -3
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +0 -12
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +11 -2
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +4 -1
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FencerResults from './PoolResultsTable.vue'
|
|
2
2
|
import getPoolResults from '../../../../mocks/getPoolResults.js';
|
|
3
|
+
import eventPersonGetPoolAssignmentEvent from '../../../../mocks/eventPersonGetPoolAssignmentEvent.js';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Organisms/Containers/PoolResultsTable',
|
|
@@ -8,30 +9,52 @@ export default {
|
|
|
8
9
|
args: {
|
|
9
10
|
poolResults: getPoolResults.report,
|
|
10
11
|
initialCutoffLinePosition: 0,
|
|
12
|
+
numPromoted: "100%",
|
|
13
|
+
event: eventPersonGetPoolAssignmentEvent
|
|
11
14
|
},
|
|
12
15
|
argTypes: {
|
|
13
16
|
poolResults: { control: 'object' },
|
|
14
17
|
cutoffLinePosition: { control: 'number' },
|
|
18
|
+
numPromoted: { control: 'text' },
|
|
19
|
+
event: { control: 'object' }
|
|
20
|
+
|
|
15
21
|
},
|
|
16
22
|
}
|
|
17
23
|
|
|
24
|
+
let modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "results"}
|
|
25
|
+
|
|
18
26
|
export const Default = {
|
|
19
27
|
args: {
|
|
20
28
|
poolResults: getPoolResults.report,
|
|
21
|
-
initialCutoffIndex: 0
|
|
29
|
+
initialCutoffIndex: 0,
|
|
30
|
+
numPromoted: "100%",
|
|
31
|
+
event: modifiedEvent
|
|
22
32
|
}
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
const modifiedResults = getPoolResults.report.map((person, index) => {
|
|
26
36
|
return {
|
|
27
37
|
...person,
|
|
28
|
-
Promoted: index < 5
|
|
38
|
+
Promoted: index < 5,
|
|
39
|
+
Status: "results"
|
|
29
40
|
};
|
|
30
41
|
});
|
|
31
42
|
|
|
32
|
-
export const
|
|
43
|
+
export const PromoteHalf = {
|
|
44
|
+
args: {
|
|
45
|
+
poolResults: modifiedResults,
|
|
46
|
+
initialCutoffIndex: 5,
|
|
47
|
+
numPromoted: "100%",
|
|
48
|
+
event: modifiedEvent
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "preparation"}
|
|
53
|
+
export const EventIsInPreparationMode = {
|
|
33
54
|
args: {
|
|
34
55
|
poolResults: modifiedResults,
|
|
35
|
-
initialCutoffIndex: 5
|
|
56
|
+
initialCutoffIndex: 5,
|
|
57
|
+
numPromoted: "100%",
|
|
58
|
+
event: modifiedEvent
|
|
36
59
|
}
|
|
37
60
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mt-3">
|
|
3
3
|
<div class="flex flex-col w-full relative">
|
|
4
|
-
<
|
|
4
|
+
<section v-if="!shouldShowResults">
|
|
5
|
+
<img alt="Small desert scene with wind blowing." class="w-96 mx-auto" :src="emptyDesertIcon" />
|
|
6
|
+
<div class="w-full flex justify-center">
|
|
7
|
+
<div class="w-96">
|
|
8
|
+
<BaseText text="No Results Yet!" size="lg" color="quinary" weight="bold" class="text-center" />
|
|
9
|
+
<BaseText text="Pool results will be displayed here once all bouts have completed and the 'Generate Pool Results' button has been clicked on the Pools Tab." size="sm" color="quinary" class="text-center" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</section>
|
|
13
|
+
|
|
14
|
+
<div v-if="shouldShowResults" v-for="(person, index) in results" :key="person.personId" class="flex flex-col py-1">
|
|
5
15
|
<!-- Person Card -->
|
|
6
16
|
<FencerPoolResultsCard :person="person" @remove:person="handleWithdraw" />
|
|
7
17
|
|
|
@@ -22,12 +32,14 @@
|
|
|
22
32
|
import FencerPoolResultsCard from "../../Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue";
|
|
23
33
|
import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
|
|
24
34
|
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
35
|
+
import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
|
|
25
36
|
|
|
26
37
|
export default {
|
|
27
38
|
components: {
|
|
28
39
|
BaseText,
|
|
29
40
|
BaseIcon,
|
|
30
|
-
FencerPoolResultsCard
|
|
41
|
+
FencerPoolResultsCard,
|
|
42
|
+
emptyDesertIcon
|
|
31
43
|
},
|
|
32
44
|
props: {
|
|
33
45
|
poolResults: {
|
|
@@ -42,12 +54,17 @@ export default {
|
|
|
42
54
|
numPromoted: {
|
|
43
55
|
type: [Number, String],
|
|
44
56
|
required: true
|
|
57
|
+
},
|
|
58
|
+
event: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: true
|
|
45
61
|
}
|
|
46
62
|
},
|
|
47
63
|
data() {
|
|
48
64
|
return {
|
|
49
65
|
results: this.poolResults,
|
|
50
|
-
cutoffIndex: this.initialCutoffIndex
|
|
66
|
+
cutoffIndex: this.initialCutoffIndex,
|
|
67
|
+
emptyDesertIcon
|
|
51
68
|
}
|
|
52
69
|
},
|
|
53
70
|
watch: {
|
|
@@ -56,6 +73,11 @@ export default {
|
|
|
56
73
|
this.updatePromotions();
|
|
57
74
|
}
|
|
58
75
|
},
|
|
76
|
+
computed: {
|
|
77
|
+
shouldShowResults() {
|
|
78
|
+
return ['results', 'de', 'completed'].includes(this.event.Status.toLowerCase());
|
|
79
|
+
}
|
|
80
|
+
},
|
|
59
81
|
methods: {
|
|
60
82
|
moveUp() {
|
|
61
83
|
if (this.cutoffIndex > 1) { // Prevent moving above the 2nd position
|
|
@@ -61,18 +61,6 @@ export default {
|
|
|
61
61
|
event: {
|
|
62
62
|
type: Object,
|
|
63
63
|
required: true,
|
|
64
|
-
validator(event) {
|
|
65
|
-
const requiredFields = [
|
|
66
|
-
'EventName',
|
|
67
|
-
'RuleSummary'
|
|
68
|
-
];
|
|
69
|
-
const missingFields = requiredFields.filter(field => !(field in event));
|
|
70
|
-
if (missingFields.length) {
|
|
71
|
-
console.warn(`Invalid event object: Missing fields: ${missingFields.join(', ')}`);
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
},
|
|
76
64
|
},
|
|
77
65
|
numPromoted: {
|
|
78
66
|
type: [Number, String],
|
|
@@ -20,13 +20,22 @@ export default {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
let modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "results"}
|
|
24
24
|
export const Default = {
|
|
25
25
|
args: {
|
|
26
|
-
event:
|
|
26
|
+
event: modifiedEvent,
|
|
27
27
|
poolResults: getPoolResults.report,
|
|
28
28
|
numPromoted: '100%'
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
modifiedEvent = {...eventPersonGetPoolAssignmentEvent, Status: "planning"}
|
|
34
|
+
export const EventIsInPlanning = {
|
|
35
|
+
args: {
|
|
36
|
+
event: modifiedEvent,
|
|
37
|
+
poolResults: getPoolResults.report,
|
|
38
|
+
numPromoted: '100%'
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
<PoolResultsTable :poolResults="poolResults"
|
|
10
10
|
:initialCutoffIndex="initialCutoffIndex"
|
|
11
11
|
:numPromoted="promoted"
|
|
12
|
+
:event="event"
|
|
12
13
|
@update:withdraw="handleWithdraw"
|
|
13
14
|
@update:handleIncreaseCount="handleIncreaseCount"
|
|
14
15
|
@update:handleDecreaseCount="handleDecreaseCount"
|
|
@@ -74,10 +75,12 @@ export default {
|
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
mounted() {
|
|
78
|
+
console.log(`PoolResults.vue mounted`)
|
|
79
|
+
console.log('poolResults', this.poolResults)
|
|
77
80
|
this.calculateInitialCutoffIndex(this.getNumericValue(this.promoted))
|
|
78
81
|
},
|
|
79
82
|
methods: {
|
|
80
|
-
handleTabMenuClick(){
|
|
83
|
+
handleTabMenuClick(value) {
|
|
81
84
|
this.$emit('tab:menu-click', value);
|
|
82
85
|
},
|
|
83
86
|
handleIncreaseCount(value){
|