@dcrackel/meyersquaredui 1.0.69 → 1.0.71
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/meyersquaredui.es.js +215 -206
- package/dist/meyersquaredui.umd.js +1 -1
- package/package.json +1 -1
- package/src/mocks/getTournamentById.js +64 -0
- package/src/stories/Organisms/Cards/TournamentDetails/TournamentDetails.vue +9 -6
- package/src/stories/Organisms/Column/HostColumn.vue +5 -0
- package/src/stories/Templates/TournamentDetailPage/TournamentDetail.stories.js +4 -5
- package/src/stories/Templates/TournamentDetailPage/TournamentDetailPage.vue +55 -7
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const mockGetTournamentId =
|
|
2
|
+
{
|
|
3
|
+
"TournamentId": 37,
|
|
4
|
+
"Name": "Pumpkin Slice",
|
|
5
|
+
"StartDate": "2024-10-27",
|
|
6
|
+
"EndDate": "2024-10-28",
|
|
7
|
+
"RegistrationCutOff": "2024-10-27",
|
|
8
|
+
"Description": "<p>We are gathering at the Coombs Fairgrounds & Event Centre on October 27th, 2023 for an Open Steel Messer tournament. This will be the second iteration, official, but spiritually, the third, as it was inspired by the Spooky Scary Messer tournament held by THCC in Vancouver.</p>",
|
|
9
|
+
"HostedOnM2": true,
|
|
10
|
+
"TotalParticipants": 0,
|
|
11
|
+
"Events": [],
|
|
12
|
+
"Club": {
|
|
13
|
+
"Name": "Comox Valley Combat Guild",
|
|
14
|
+
"ClubId": 356,
|
|
15
|
+
"Images": [
|
|
16
|
+
{
|
|
17
|
+
"ImageId": 46,
|
|
18
|
+
"URL": "https://meyersquared.com/uploads/CVCG+Logo+2024.png",
|
|
19
|
+
"AltText": "This is alt text"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"Address": {
|
|
24
|
+
"Name": "Coombs Fairgrounds & Event Center",
|
|
25
|
+
"City": "Coombs",
|
|
26
|
+
"State": "BC",
|
|
27
|
+
"Address1": "1014 Ford Rd",
|
|
28
|
+
"Zip": 12345,
|
|
29
|
+
"Coordinates": "49.303763,-124.419878"
|
|
30
|
+
},
|
|
31
|
+
"Images": [
|
|
32
|
+
{
|
|
33
|
+
"ImageId": 45,
|
|
34
|
+
"URL": "https://meyersquared.com/uploads/t-23ee43e9.png",
|
|
35
|
+
"AltText": "Pumpkin Slice image"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"PrimaryContact": {
|
|
39
|
+
"PersonId": 0,
|
|
40
|
+
"DisplayName": "Not Assigned",
|
|
41
|
+
"Images": []
|
|
42
|
+
},
|
|
43
|
+
"SocialMedia": [
|
|
44
|
+
{
|
|
45
|
+
"Link": "https://www.facebook.com/events/654044546924140/",
|
|
46
|
+
"Type": "Facebook",
|
|
47
|
+
"Label": "Registration Link"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"Link": "https://www.facebook.com/events/654044546924140/",
|
|
51
|
+
"Type": "Registration",
|
|
52
|
+
"Label": "Registration Link"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"Link": "https://www.facebook.com/events/654044546924140/",
|
|
56
|
+
"Type": "Rules",
|
|
57
|
+
"Label": "Rules Link"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"TotalEvents": 0,
|
|
61
|
+
"Status": "completed"
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default mockGetTournamentId;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div class="flex justify-end items-center w-full md:h-10 rounded-md p-2">
|
|
8
|
-
<BaseText color="primary" size="md" weight="normal" class="mr-2">Share</BaseText>
|
|
8
|
+
<BaseText v-if="shareLinks && shareLinks.length > 0" color="primary" size="md" weight="normal" class="mr-2 mt-0.5">Share</BaseText>
|
|
9
9
|
<a
|
|
10
10
|
v-for="link in shareLinks"
|
|
11
11
|
:key="link.name"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
target="_blank"
|
|
14
14
|
class="mx-2 hover:text-accent transition duration-200"
|
|
15
15
|
>
|
|
16
|
-
<Icon type="fa-brands" color="primary" :icon="link.icon" size="md" />
|
|
16
|
+
<Icon type="fa-brands" color="primary" :icon="link.icon" size="md" class="hover:text-accent" />
|
|
17
17
|
</a>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -45,14 +45,17 @@ export default {
|
|
|
45
45
|
type: String,
|
|
46
46
|
default: '<p>This is a sample tournament description. It can be long and may contain HTML.</p>',
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
shareLinks: [
|
|
48
|
+
shareLinks: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default: () => [
|
|
52
51
|
{ name: 'Facebook', url: 'https://facebook.com', icon: 'fa-facebook' },
|
|
53
52
|
{ name: 'Instagram', url: 'https://twitter.com', icon: 'fa-instagram' },
|
|
54
53
|
{ name: 'Discord', url: 'https://linkedin.com', icon: 'fa-discord' },
|
|
55
54
|
],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
56
59
|
};
|
|
57
60
|
},
|
|
58
61
|
};
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
<div class="flex justify-center">
|
|
30
30
|
<BaseButton
|
|
31
|
+
v-if="rulesLink"
|
|
31
32
|
backgroundColor="secondary"
|
|
32
33
|
color="primary"
|
|
33
34
|
border="primary"
|
|
@@ -85,6 +86,10 @@ export default {
|
|
|
85
86
|
type: Number,
|
|
86
87
|
default: 0,
|
|
87
88
|
},
|
|
89
|
+
rulesLink: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: '',
|
|
92
|
+
},
|
|
88
93
|
apiKey: {
|
|
89
94
|
type: String,
|
|
90
95
|
default: '',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import HomePage from './TournamentDetailPage.vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import mockGetTournamentId from "../../../mocks/getTournamentById.js";
|
|
4
3
|
export default {
|
|
5
4
|
title: 'Templates/TournamentDetailsPage',
|
|
6
5
|
component: HomePage,
|
|
@@ -15,9 +14,9 @@ export default {
|
|
|
15
14
|
|
|
16
15
|
export const Default = {
|
|
17
16
|
args: {
|
|
18
|
-
title:
|
|
17
|
+
title: mockGetTournamentId.Name,
|
|
19
18
|
imageSrc: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
20
|
-
tournament:
|
|
19
|
+
tournament: mockGetTournamentId,
|
|
21
20
|
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q',
|
|
22
21
|
},
|
|
23
22
|
};
|
|
@@ -26,7 +25,7 @@ export const AllLoading = {
|
|
|
26
25
|
args: {
|
|
27
26
|
title: 'Discover, Compete, Connect',
|
|
28
27
|
imageSrc: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
29
|
-
tournament:
|
|
28
|
+
tournament: mockGetTournamentId,
|
|
30
29
|
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q',
|
|
31
30
|
},
|
|
32
31
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<Header/>
|
|
4
4
|
<TournamentDetailsBanner :title="title"
|
|
5
5
|
:imageSrc="imageSrc"
|
|
6
|
-
:club-logo="
|
|
6
|
+
:club-logo="ClubLogo"
|
|
7
7
|
:hosting-club-name="tournament.Club.Name"
|
|
8
8
|
:tournament-start-date="tournament.StartDate"
|
|
9
9
|
/>
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
<TournamentDetails
|
|
15
15
|
:imageSrc="tournament.Images[0].URL"
|
|
16
16
|
:description="tournament.Description"
|
|
17
|
+
:shareLinks="ShareLinks"
|
|
17
18
|
/>
|
|
18
19
|
</div>
|
|
19
20
|
<div class="w-full max-w-4xl mx-auto md:p-4">
|
|
20
21
|
<GridLayout
|
|
22
|
+
v-if="tournament.Events.length > 0"
|
|
21
23
|
:cardComponent="EventListCard"
|
|
22
24
|
:items="tournament.Events"
|
|
23
25
|
:maxColumns="1"
|
|
@@ -26,17 +28,18 @@
|
|
|
26
28
|
:title="'Events'"
|
|
27
29
|
/>
|
|
28
30
|
</div>
|
|
29
|
-
<div class="w-full flex justify-center md:mb-20">
|
|
30
|
-
<BaseButton label="Register" backgroundColor="secondary" border="primary" class="w-40 mx-auto mt-10"/>
|
|
31
|
+
<div v-if="RegistrationLink" class="w-full flex justify-center md:mb-20">
|
|
32
|
+
<BaseButton label="Register" backgroundColor="secondary" border="primary" class="w-40 mx-auto mt-10" @click="handleRegistrationClick"/>
|
|
31
33
|
</div>
|
|
32
34
|
</section>
|
|
33
35
|
<section class="mt-8 md:mt-16">
|
|
34
36
|
<HostColumn
|
|
35
|
-
:organizerName="
|
|
36
|
-
:organizerPortrait="
|
|
37
|
+
:organizerName="ContactName"
|
|
38
|
+
:organizerPortrait="ContactImage"
|
|
37
39
|
:address="tournament.Address"
|
|
38
40
|
:fencersGoing="tournament.TotalParticipants"
|
|
39
41
|
:bookmarksCount="tournament.TotalBookmarks"
|
|
42
|
+
:rulesLink="RulesLink"
|
|
40
43
|
:apiKey="apiKey"
|
|
41
44
|
@rulesClick="onRulesClick"
|
|
42
45
|
/>
|
|
@@ -57,6 +60,7 @@ import EventListCard from "../../Organisms/Cards/EventListCard/EventListCard.vue
|
|
|
57
60
|
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
58
61
|
import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
|
|
59
62
|
import HostColumn from "../../Organisms/Column/HostColumn.vue";
|
|
63
|
+
import protrait1 from "../../../assets/images/portrait1.png";
|
|
60
64
|
|
|
61
65
|
export default {
|
|
62
66
|
name: 'TournamentDetailPage',
|
|
@@ -106,14 +110,58 @@ export default {
|
|
|
106
110
|
},
|
|
107
111
|
limitedTournaments() {
|
|
108
112
|
return this.tournaments;
|
|
113
|
+
},
|
|
114
|
+
ClubLogo() {
|
|
115
|
+
return this.tournament?.Club?.Images?.[0]?.URL || this.defaultPortrait;
|
|
116
|
+
},
|
|
117
|
+
ContactName() {
|
|
118
|
+
return this.tournament.PrimaryContact.DisplayName === 'BYE' ? 'Contact Not Assigned' : this.tournament.PrimaryContact.DisplayName;
|
|
119
|
+
},
|
|
120
|
+
ContactImage() {
|
|
121
|
+
if (!this.tournament.PrimaryContact) return this.defaultPortrait;
|
|
122
|
+
if (this.tournament.PrimaryContact.PersonId === 0) return this.defaultPortrait;
|
|
123
|
+
return this.tournament?.PrimaryContact?.Images?.[0]?.URL || this.defaultPortrait;
|
|
124
|
+
},
|
|
125
|
+
RulesLink() {
|
|
126
|
+
const rulesLink = this.tournament.SocialMedia.find(social => social.Type === 'Rules');
|
|
127
|
+
return rulesLink ? rulesLink.Link : '';
|
|
128
|
+
},
|
|
129
|
+
RegistrationLink() {
|
|
130
|
+
const registrationLink = this.tournament.SocialMedia.find(social => social.Type === 'Registration');
|
|
131
|
+
return registrationLink ? registrationLink.Link : '';
|
|
132
|
+
},
|
|
133
|
+
ShareLinks() {
|
|
134
|
+
const iconMap = {
|
|
135
|
+
Facebook: 'fa-facebook',
|
|
136
|
+
Instagram: 'fa-instagram',
|
|
137
|
+
Twitter: 'fa-twitter',
|
|
138
|
+
Discord: 'fa-discord',
|
|
139
|
+
YouTube: 'fa-youtube',
|
|
140
|
+
TikTok: 'fa-tiktok'
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return this.tournament.SocialMedia
|
|
144
|
+
.filter(social => social.Type !== 'Rules' && social.Type !== 'Registration') // Exclude Rules and Registration
|
|
145
|
+
.map(social => {
|
|
146
|
+
return {
|
|
147
|
+
name: social.Type,
|
|
148
|
+
url: social.Link,
|
|
149
|
+
icon: iconMap[social.Type] || 'fa-link'
|
|
150
|
+
};
|
|
151
|
+
});
|
|
109
152
|
}
|
|
110
153
|
},
|
|
111
154
|
data() {
|
|
112
|
-
return {
|
|
155
|
+
return {
|
|
156
|
+
defaultPortrait: protrait1
|
|
157
|
+
}
|
|
113
158
|
},
|
|
114
159
|
methods: {
|
|
115
160
|
onRulesClick() {
|
|
116
|
-
this.$emit('rules-click');
|
|
161
|
+
this.$emit('rules-click', this.RulesLink);
|
|
162
|
+
},
|
|
163
|
+
handleRegistrationClick() {
|
|
164
|
+
this.$emit('registration-click', this.RegistrationLink);
|
|
117
165
|
}
|
|
118
166
|
}
|
|
119
167
|
}
|