@dcrackel/hematournamentui 1.0.60 → 1.0.62
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/.storybook/main.js +1 -3
- package/.storybook/preview.js +1 -1
- package/dist/HemaTouranmentUI-lib.es.js +1568 -1577
- package/dist/HemaTouranmentUI-lib.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +13 -13
- package/src/index.js +1 -1
- package/src/mocks/personsMock.js +353 -36
- package/src/mocks/tournamentMock.js +1 -1
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.stories.js +29 -0
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +67 -0
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.stories.js +40 -0
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.vue +35 -0
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +9 -9
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +5 -4
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +5 -19
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +171 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +129 -0
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +18 -6
- package/src/stories/Organisms/Containers/PoolSummary/PoolSummary.stories.js +28 -0
- package/src/stories/Organisms/Containers/PoolSummary/PoolSummary.vue +55 -0
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +29 -0
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +118 -0
- package/src/stories/Templates/{TournamentManagement/EditTournament → EventManagement}/ListEvents/ListEvents.stories.js +2 -2
- package/src/stories/Templates/{TournamentManagement/EditTournament → EventManagement}/ListEvents/ListEvents.vue +14 -6
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +20 -0
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +51 -0
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.stories.js +14 -2
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.vue +14 -39
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageOne/EditTournamentPageOne.vue +9 -2
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageTwo/EditTournamentPageTwo.vue +8 -1
- package/tailwind.config.js +7 -6
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.js +0 -29
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.vue +0 -67
- package/src/stories/Organisms/Containers/Container.stories.js +0 -13
- package/src/stories/Organisms/Containers/Container.vue +0 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import EventStatusBox from './EventStatusBox.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/Boxes/EventStatusBox',
|
|
5
|
+
component: EventStatusBox,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
statusCount: 10,
|
|
9
|
+
statusLabel: 'PRESENT',
|
|
10
|
+
boxColor: 'bg-eventBoxBlue',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: {
|
|
19
|
+
statusCount: 10,
|
|
20
|
+
statusLabel: 'PRESENT',
|
|
21
|
+
boxColor: 'bg-eventBoxBlue',
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Absent = {
|
|
26
|
+
args: {
|
|
27
|
+
statusCount: 5,
|
|
28
|
+
statusLabel: 'ABSENT',
|
|
29
|
+
boxColor: 'bg-eventBoxGreen',
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export const Removed = {
|
|
35
|
+
args: {
|
|
36
|
+
statusCount: 3,
|
|
37
|
+
statusLabel: 'REMOVED',
|
|
38
|
+
boxColor: 'bg-eventBoxRed',
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section :class="['w-20 h-14 rounded-xl m-1', boxColor]">
|
|
3
|
+
<div class="flex flex-col justify-between h-14 py-2 pl-1">
|
|
4
|
+
<p class="flex flex-row justify-center w-full pb-1">
|
|
5
|
+
<BaseText :text="statusCount" size="sm" color="quinary" weight="bold" />
|
|
6
|
+
</p>
|
|
7
|
+
<p class="flex flex-row justify-center w-full">
|
|
8
|
+
<BaseText :text="statusLabel" size="xs" color="quinary" />
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
</section>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'EventStatusBox',
|
|
19
|
+
components: {BaseText},
|
|
20
|
+
props: {
|
|
21
|
+
statusCount: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
statusLabel: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
boxColor: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
@@ -6,8 +6,8 @@ export default {
|
|
|
6
6
|
tags: ['autodocs'],
|
|
7
7
|
args: {
|
|
8
8
|
buttons: [
|
|
9
|
-
{ id: 'btn1', label: 'Option 1' },
|
|
10
|
-
{ id: 'btn2', label: 'Option 2' }
|
|
9
|
+
{ id: 'btn1', label: 'Option 1', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-tertiary' },
|
|
10
|
+
{ id: 'btn2', label: 'Option 2', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-tertiary' }
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
argTypes: {
|
|
@@ -24,19 +24,19 @@ export default {
|
|
|
24
24
|
export const Primary = {
|
|
25
25
|
args: {
|
|
26
26
|
buttons: [
|
|
27
|
-
{ id: 'btn1', label: 'Absent' },
|
|
28
|
-
{ id: 'btn2', label: 'Present' }
|
|
29
|
-
]
|
|
27
|
+
{ id: 'btn1', label: 'Absent', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxBlue' },
|
|
28
|
+
{ id: 'btn2', label: 'Present', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxGreen' }
|
|
29
|
+
],
|
|
30
|
+
selected: 'btn1' // Set default selected button
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export const ThreeButtons = {
|
|
34
35
|
args: {
|
|
35
36
|
buttons: [
|
|
36
|
-
{ id: 'btn1', label: 'Option 1' },
|
|
37
|
-
{ id: 'btn2', label: 'Option 2' },
|
|
38
|
-
{ id: 'btn3', label: 'Option 3' }
|
|
37
|
+
{ id: 'btn1', label: 'Option 1', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-tertiary' },
|
|
38
|
+
{ id: 'btn2', label: 'Option 2', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-tertiary' },
|
|
39
|
+
{ id: 'btn3', label: 'Option 3', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-tertiary' }
|
|
39
40
|
]
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex">
|
|
3
3
|
<section v-for="(button, index) in buttons" :key="button.id" class="flex flex-row text-sm" @click="selectButton(button.id)">
|
|
4
|
-
<div class="py-3 px-4 transition-colors duration-200 border border-1"
|
|
4
|
+
<div class="py-3 px-4 transition-colors duration-200 border border-1 border-dropdownSelect shadow-md"
|
|
5
5
|
:class="{
|
|
6
6
|
'rounded-l-xl': parseInt(index) === 0,
|
|
7
7
|
'rounded-r-xl': parseInt(index) === Object.keys(this.buttons).length - 1,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
[button.selectedBgColor]: selected === button.id,
|
|
9
|
+
[button.defaultBgColor]: selected !== button.id,
|
|
10
|
+
'text-primaryHighlight': selected === button.id,
|
|
11
|
+
'text-quaternary': selected !== button.id
|
|
10
12
|
}">
|
|
11
13
|
{{ button.label }}
|
|
12
14
|
</div>
|
|
@@ -34,7 +36,6 @@ export default {
|
|
|
34
36
|
setup(props, { emit }) {
|
|
35
37
|
const selected = ref(props.selected);
|
|
36
38
|
|
|
37
|
-
// Watch for external changes to the `selected` prop
|
|
38
39
|
watch(() => props.selected, (newValue) => {
|
|
39
40
|
selected.value = newValue;
|
|
40
41
|
});
|
|
@@ -17,24 +17,9 @@
|
|
|
17
17
|
<BaseButton label="Manage" size="sm" type="primary" @click="onManage" class="w-2/3" />
|
|
18
18
|
</div>
|
|
19
19
|
<div class="flex flex-row">
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<p class="flex flex-row justify-center w-full"><BaseText text="PRESENT" size="xs" color="quinary" /></p>
|
|
24
|
-
</div>
|
|
25
|
-
</section>
|
|
26
|
-
<section class="w-20 h-16 bg-eventBoxGreen rounded-xl m-1">
|
|
27
|
-
<div class="flex flex-col justify-between h-14 py-2 pl-1">
|
|
28
|
-
<p class="flex flex-row justify-center w-full pb-1"><BaseText :text="event.Absent" size="lg" color="quinary" weight="bold" /></p>
|
|
29
|
-
<p class="flex flex-row justify-center w-full"><BaseText text="ABSENT" size="xs" color="quinary" /></p>
|
|
30
|
-
</div>
|
|
31
|
-
</section>
|
|
32
|
-
<section class="w-20 h-16 bg-eventBoxRed rounded-xl m-1">
|
|
33
|
-
<div class="flex flex-col justify-between h-14 py-2 pl-1">
|
|
34
|
-
<p class="flex flex-row justify-center w-full pb-1"><BaseText :text="event.Removed" size="lg" color="quinary" weight="bold" /></p>
|
|
35
|
-
<p class="flex flex-row justify-center w-full"><BaseText text="REMOVED" size="xs" color="quinary" /></p>
|
|
36
|
-
</div>
|
|
37
|
-
</section>
|
|
20
|
+
<EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxBlue" />
|
|
21
|
+
<EventStatusBox :status-count="event.Absent" status-label="ABSENT" box-color="bg-eventBoxGreen" />
|
|
22
|
+
<EventStatusBox :status-count="event.Removed" status-label="REMOVED" box-color="bg-eventBoxRed" />
|
|
38
23
|
</div>
|
|
39
24
|
</div>
|
|
40
25
|
</div>
|
|
@@ -45,10 +30,11 @@
|
|
|
45
30
|
<script>
|
|
46
31
|
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
47
32
|
import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
33
|
+
import EventStatusBox from "../../../Molecules/Boxes/EventStatusBox/EventStatusBox.vue";
|
|
48
34
|
|
|
49
35
|
export default {
|
|
50
36
|
name: 'EventCard',
|
|
51
|
-
components: {BaseButton, BaseText},
|
|
37
|
+
components: {EventStatusBox, BaseButton, BaseText},
|
|
52
38
|
props: {
|
|
53
39
|
event: {
|
|
54
40
|
type: Object,
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import FencerCard from './FencerCard.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Cards/FencerCard',
|
|
5
|
+
component: FencerCard,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
person: {
|
|
9
|
+
"Id": 73,
|
|
10
|
+
"EventId": 1,
|
|
11
|
+
"PersonId": 1,
|
|
12
|
+
"Seed": 1,
|
|
13
|
+
"Status": "Absent",
|
|
14
|
+
"Person": {
|
|
15
|
+
"PersonId": 1,
|
|
16
|
+
"FirstName": "Dave",
|
|
17
|
+
"LastName": "Jones",
|
|
18
|
+
"Images": [
|
|
19
|
+
{
|
|
20
|
+
"ImageId": 7,
|
|
21
|
+
"URL": "https://randomuser.me/api/portraits/men/22.jpg",
|
|
22
|
+
"AltText": null,
|
|
23
|
+
"Type": "Portrait",
|
|
24
|
+
"EntityId": 1,
|
|
25
|
+
"EntityType": "Person"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"Club": {
|
|
29
|
+
"ClubId": 1,
|
|
30
|
+
"Name": "Test Club",
|
|
31
|
+
"Description": "This is a test",
|
|
32
|
+
"AddressId": 1,
|
|
33
|
+
"SocialMediaId": null
|
|
34
|
+
},
|
|
35
|
+
"HEMARatings": [
|
|
36
|
+
{
|
|
37
|
+
"Id": 1,
|
|
38
|
+
"PersonId": 1,
|
|
39
|
+
"Rank": 1700,
|
|
40
|
+
"Rating": 1200.2,
|
|
41
|
+
"WeaponId": 1,
|
|
42
|
+
"Updated": "2024-05-30T17:39:47.000Z"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"M2Ratings": [
|
|
46
|
+
{
|
|
47
|
+
"id": 1,
|
|
48
|
+
"PersonId": 1,
|
|
49
|
+
"EventId": 1,
|
|
50
|
+
"WeaponId": 1,
|
|
51
|
+
"Rating": "E24",
|
|
52
|
+
"DateEarned": "2024-05-30"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
argTypes: {
|
|
59
|
+
person: {
|
|
60
|
+
control: 'object'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Default = {
|
|
66
|
+
args: {
|
|
67
|
+
person: {
|
|
68
|
+
"Id": 73,
|
|
69
|
+
"EventId": 1,
|
|
70
|
+
"PersonId": 1,
|
|
71
|
+
"Seed": 1,
|
|
72
|
+
"Status": "Absent",
|
|
73
|
+
"Person": {
|
|
74
|
+
"PersonId": 1,
|
|
75
|
+
"FirstName": "Dave",
|
|
76
|
+
"LastName": "Jones",
|
|
77
|
+
"Images": [
|
|
78
|
+
{
|
|
79
|
+
"ImageId": 7,
|
|
80
|
+
"URL": "https://randomuser.me/api/portraits/men/22.jpg",
|
|
81
|
+
"AltText": null,
|
|
82
|
+
"Type": "Portrait",
|
|
83
|
+
"EntityId": 1,
|
|
84
|
+
"EntityType": "Person"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"Club": {
|
|
88
|
+
"ClubId": 1,
|
|
89
|
+
"Name": "Test Club",
|
|
90
|
+
"Description": "This is a test",
|
|
91
|
+
"AddressId": 1,
|
|
92
|
+
"SocialMediaId": null
|
|
93
|
+
},
|
|
94
|
+
"HEMARatings": [
|
|
95
|
+
{
|
|
96
|
+
"Id": 1,
|
|
97
|
+
"PersonId": 1,
|
|
98
|
+
"Rank": 1700,
|
|
99
|
+
"Rating": 1200.2,
|
|
100
|
+
"WeaponId": 1,
|
|
101
|
+
"Updated": "2024-05-30T17:39:47.000Z"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"M2Ratings": [
|
|
105
|
+
{
|
|
106
|
+
"id": 1,
|
|
107
|
+
"PersonId": 1,
|
|
108
|
+
"EventId": 1,
|
|
109
|
+
"WeaponId": 1,
|
|
110
|
+
"Rating": "E24",
|
|
111
|
+
"DateEarned": "2024-05-30"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const CheckedIn = {
|
|
120
|
+
args: {
|
|
121
|
+
person: {
|
|
122
|
+
Seed: 2,
|
|
123
|
+
Status: 'Present',
|
|
124
|
+
M2Rating: "B21",
|
|
125
|
+
HemaRating: 1600,
|
|
126
|
+
Person: {
|
|
127
|
+
PersonId: 2,
|
|
128
|
+
FirstName: 'Jane',
|
|
129
|
+
LastName: 'Smith',
|
|
130
|
+
ClubName: 'Fencing Club',
|
|
131
|
+
Images: [
|
|
132
|
+
{
|
|
133
|
+
ImageId: 2,
|
|
134
|
+
URL: 'https://randomuser.me/api/portraits/women/9.jpg',
|
|
135
|
+
AltText: null,
|
|
136
|
+
Type: 'Portrait',
|
|
137
|
+
EntityId: 2,
|
|
138
|
+
EntityType: 'Person'
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const Absent = {
|
|
147
|
+
args: {
|
|
148
|
+
person: {
|
|
149
|
+
Seed: 3,
|
|
150
|
+
Status: 'Absent',
|
|
151
|
+
M2Rating: "C23",
|
|
152
|
+
HemaRating: 1400,
|
|
153
|
+
Person: {
|
|
154
|
+
PersonId: 3,
|
|
155
|
+
FirstName: 'Alice',
|
|
156
|
+
LastName: 'Johnson',
|
|
157
|
+
ClubName: 'Martial Arts Club',
|
|
158
|
+
Images: [
|
|
159
|
+
{
|
|
160
|
+
ImageId: 3,
|
|
161
|
+
URL: 'https://randomuser.me/api/portraits/women/19.jpg',
|
|
162
|
+
AltText: null,
|
|
163
|
+
Type: 'Portrait',
|
|
164
|
+
EntityId: 3,
|
|
165
|
+
EntityType: 'Person'
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-white hover:border-bright">
|
|
3
|
+
<div class="mr-4 border-r h-20 w-8 items-center text-center">
|
|
4
|
+
<BaseText :text="person.Seed" size="lg" color="quaternary" weight="bold" class="pt-6" />
|
|
5
|
+
</div>
|
|
6
|
+
<div class="mr-4">
|
|
7
|
+
<div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
|
|
8
|
+
<BaseText text="" size="sm" color="white" weight="bold"/>
|
|
9
|
+
</div>
|
|
10
|
+
<img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-14 h-14 rounded-xl">
|
|
11
|
+
</div>
|
|
12
|
+
<div class="flex flex-col w-4/12 justify-star">
|
|
13
|
+
<span class="w-full flex justify-start">
|
|
14
|
+
<BaseText :text="fullName" size="xl" color="primary" weight="bold"/>
|
|
15
|
+
</span>
|
|
16
|
+
<span class="w-full flex justify-start">
|
|
17
|
+
<BaseText :text="person.Person.Club.Name" size="sm" color="primary" weight="normal"/>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="grid grid-cols-2 gap-x-4 mr-10">
|
|
21
|
+
<BaseText text="M2Rating" size="sm" color="primary" weight="normal" />
|
|
22
|
+
<BaseText :text="M2Rating" size="sm" color="primary" weight="bold"/>
|
|
23
|
+
<BaseText text="HemaRating" size="sm" color="primary" weight="normal" />
|
|
24
|
+
<BaseText :text="HEMARating" size="sm" color="primary" weight="bold"/>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="mr-4 ml-auto">
|
|
27
|
+
<ButtonBar
|
|
28
|
+
:buttons="buttons"
|
|
29
|
+
:selected="computedSelected"
|
|
30
|
+
@update:selected="handleAttendance"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
38
|
+
import ButtonBar from "../../../Molecules/Buttons/ButtonBar/ButtonBar.vue";
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: 'FencerCard',
|
|
42
|
+
components: { ButtonBar, BaseText },
|
|
43
|
+
props: {
|
|
44
|
+
person: {
|
|
45
|
+
type: Object,
|
|
46
|
+
required: true,
|
|
47
|
+
default: () => ({
|
|
48
|
+
"Id": 73,
|
|
49
|
+
"EventId": 1,
|
|
50
|
+
"PersonId": 1,
|
|
51
|
+
"Seed": 1,
|
|
52
|
+
"Status": "Absent",
|
|
53
|
+
"Person": {
|
|
54
|
+
"PersonId": 1,
|
|
55
|
+
"FirstName": "Dave",
|
|
56
|
+
"LastName": "Jones",
|
|
57
|
+
"Images": [
|
|
58
|
+
{
|
|
59
|
+
"ImageId": 7,
|
|
60
|
+
"URL": "https://randomuser.me/api/portraits/men/22.jpg",
|
|
61
|
+
"AltText": null,
|
|
62
|
+
"Type": "Portrait",
|
|
63
|
+
"EntityId": 1,
|
|
64
|
+
"EntityType": "Person"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"HEMARatings": [
|
|
68
|
+
{
|
|
69
|
+
"Id": 1,
|
|
70
|
+
"PersonId": 1,
|
|
71
|
+
"Rank": 1700,
|
|
72
|
+
"Rating": 1200.2,
|
|
73
|
+
"WeaponId": 1,
|
|
74
|
+
"Updated": "2024-05-30T17:39:47.000Z"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"M2Ratings": [
|
|
78
|
+
{
|
|
79
|
+
"id": 1,
|
|
80
|
+
"PersonId": 1,
|
|
81
|
+
"EventId": 1,
|
|
82
|
+
"WeaponId": 1,
|
|
83
|
+
"Rating": "E",
|
|
84
|
+
"DateEarned": "2024-05-30"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
fullName() {
|
|
93
|
+
return `${this.person.Person.FirstName} ${this.person.Person.LastName}`;
|
|
94
|
+
},
|
|
95
|
+
portraitURL() {
|
|
96
|
+
const images = this.person.Person.Images || [];
|
|
97
|
+
const portrait = images.find(image => image.Type === 'Portrait');
|
|
98
|
+
return portrait ? portrait.URL : '';
|
|
99
|
+
},
|
|
100
|
+
buttons() {
|
|
101
|
+
return [
|
|
102
|
+
{ id: 'Absent', label: 'Absent', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxBlue' },
|
|
103
|
+
{ id: 'Present', label: 'Present', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxGreen' }
|
|
104
|
+
];
|
|
105
|
+
},
|
|
106
|
+
HEMARating() {
|
|
107
|
+
if (!this.person.Person.HEMARatings || this.person.Person.HEMARatings.length === 0) {
|
|
108
|
+
return 0;
|
|
109
|
+
}
|
|
110
|
+
return this.person.Person.HEMARatings[0].Rating
|
|
111
|
+
},
|
|
112
|
+
M2Rating() {
|
|
113
|
+
if (!this.person.Person.M2Ratings || this.person.Person.M2Ratings.length === 0) {
|
|
114
|
+
return "U"
|
|
115
|
+
}
|
|
116
|
+
return this.person.Person.M2Ratings[0].Rating
|
|
117
|
+
},
|
|
118
|
+
computedSelected() {
|
|
119
|
+
return this.person.Status === 'Absent' ? 'Absent' : 'Present';
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
methods: {
|
|
123
|
+
handleAttendance(selected) {
|
|
124
|
+
const person = { ...this.person, Status: selected };
|
|
125
|
+
this.$emit('update:status', person);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
</script>
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
<BaseText :text="selectedItem.text" color="secondary" size="sm" weight="normal" />
|
|
7
7
|
<i class="fa-solid fa-chevron-down text-xs" />
|
|
8
8
|
</div>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<transition name="fade-in-down">
|
|
10
|
+
<div v-if="isDropDownOpen" class="flex flex-col w-40 shadow-lg -mt-1 z-10 rounded-b-xl absolute bg-neutral border border-dropdownSelect">
|
|
11
|
+
<a v-for="item in items" :key="item.id" @click="handleClick(item)" class="hover:bg-dropdownSelect py-1 px-2 border-b border-l border-r border-dropdownSelect">
|
|
12
|
+
<BaseText :text="item.text" color="primary" size="sm" weight="normal" class="py-0.5" />
|
|
13
|
+
</a>
|
|
14
|
+
</div>
|
|
15
|
+
</transition>
|
|
14
16
|
</span>
|
|
15
17
|
</div>
|
|
16
18
|
</template>
|
|
@@ -20,7 +22,7 @@ import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
|
20
22
|
|
|
21
23
|
export default {
|
|
22
24
|
name: 'DropDownMenu',
|
|
23
|
-
components: {BaseText},
|
|
25
|
+
components: { BaseText },
|
|
24
26
|
props: {
|
|
25
27
|
label: {
|
|
26
28
|
type: String,
|
|
@@ -49,3 +51,13 @@ export default {
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
</script>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.fade-in-down-enter-active, .fade-in-down-leave-active {
|
|
57
|
+
transition: all 0.3s ease-out;
|
|
58
|
+
}
|
|
59
|
+
.fade-in-down-enter, .fade-in-down-leave-to /* .fade-in-down-leave-active in <2.1.8 */ {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform: translateY(-10px);
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PoolSummary from './PoolSummary.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Containers/PoolSummary',
|
|
5
|
+
component: PoolSummary,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {},
|
|
8
|
+
argTypes: {}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Default = {
|
|
12
|
+
args: {
|
|
13
|
+
event: {
|
|
14
|
+
EventId: 1,
|
|
15
|
+
TournamentId: 8,
|
|
16
|
+
EventName: "Longsword Event For Everyone",
|
|
17
|
+
Date: "2024-05-03",
|
|
18
|
+
StartTime: "12:00:16",
|
|
19
|
+
NumberOfRings: 3,
|
|
20
|
+
WeaponId: 1,
|
|
21
|
+
Status: "Active",
|
|
22
|
+
RuleSummary: "Pools -> DE -> 3rd Place Faceoff",
|
|
23
|
+
Present: "0",
|
|
24
|
+
Absent: "20",
|
|
25
|
+
Removed: "1",
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bg-poolSetup py-1 px-4 rounded-xl flex justify-between items-center">
|
|
3
|
+
<section class="flex flex-col pt-2">
|
|
4
|
+
<BaseText :text="event.EventName" size="lg" color="primary" weight="bold" />
|
|
5
|
+
<BaseText :text="event.RuleSummary" size="md" color="quinary" weight="normal" />
|
|
6
|
+
<span class="h-8"></span>
|
|
7
|
+
</section>
|
|
8
|
+
<section class="flex space-x-4">
|
|
9
|
+
<CounterBox :recommended="7" :count="event.PoolSize" label="Pool Size" />
|
|
10
|
+
<CounterBox :recommended="event.NumberOfPools" :count="event.NumberOfPools" label="Num Pools" />
|
|
11
|
+
<CounterBox :recommended="0" :count="event.numberOfFlights" label="Flights" />
|
|
12
|
+
</section>
|
|
13
|
+
<section class="flex flex-col">
|
|
14
|
+
<div class="flex justify-center items-center">
|
|
15
|
+
<BaseText text="Fencer Counts" size="sm" color="quinary" weight="" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="flex">
|
|
18
|
+
<EventStatusBox :status-count="event.Absent" status-label="ABSENT" box-color="bg-eventBoxBlue" />
|
|
19
|
+
<EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxGreen" />
|
|
20
|
+
<EventStatusBox :status-count="event.Removed" status-label="REMOVED" box-color="bg-eventBoxRed" />
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import EventStatusBox from "../../../Molecules/Boxes/EventStatusBox/EventStatusBox.vue";
|
|
29
|
+
import CounterBox from "../../../Molecules/Boxes/CounterBox/CounterBox.vue";
|
|
30
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'PoolSummary',
|
|
34
|
+
components: {BaseText, CounterBox, EventStatusBox },
|
|
35
|
+
props: {
|
|
36
|
+
event: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: true,
|
|
39
|
+
validator(event) {
|
|
40
|
+
const requiredFields = [
|
|
41
|
+
'EventName',
|
|
42
|
+
'RuleSummary',
|
|
43
|
+
'PoolSize',
|
|
44
|
+
'NumberOfPools',
|
|
45
|
+
'NumberOfFlights',
|
|
46
|
+
'Absent',
|
|
47
|
+
'Present',
|
|
48
|
+
'Removed',
|
|
49
|
+
];
|
|
50
|
+
return requiredFields.every(field => field in event);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import EditEvents from './EventAttendance.vue';
|
|
2
|
+
import personsMock from '../../../../mocks/personsMock.js';
|
|
3
|
+
import eventMock from '../../../../mocks/eventMock.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/EventManagement/EventAttendance/EventAttendance',
|
|
7
|
+
component: EditEvents,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
args: {
|
|
10
|
+
persons: personsMock,
|
|
11
|
+
},
|
|
12
|
+
argTypes: {}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {
|
|
17
|
+
eventId: 8,
|
|
18
|
+
persons: personsMock,
|
|
19
|
+
event: eventMock[0]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export const NoEvents = {
|
|
25
|
+
args: {
|
|
26
|
+
eventId: 8,
|
|
27
|
+
persons: []
|
|
28
|
+
}
|
|
29
|
+
};
|