@dcrackel/hematournamentui 1.0.145 → 1.0.147

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.
@@ -1,205 +1,242 @@
1
1
  const mockTournaments = [
2
2
  {
3
3
  "TournamentId": 3,
4
- "Name": "Tournament Test",
5
- "StartDate": "2023-09-09",
6
- "EndDate": "2023-09-10",
7
- "Description": "combat with the joy of spending time with furry feline friends! This event celebrates the art of Historical European Martial Arts (HEMA) while offering a purrfect opportunity to interact with adorable cats, some of whom are looking for their forever homes. Whether you're a seasoned swordsman or new to the sport, Cats & Swords promises an unforgettable day of exciting bouts, heartwarming moments, and the chance to adopt a loving companion. Come for the swords, stay for the cats, and leave with memories (and maybe a new furry friend) that will last a lifetime.",
4
+ "Name": "Fetchfecht",
5
+ "StartDate": "2024-05-05",
6
+ "EndDate": "2024-05-09",
7
+ "Description": "Cats and Swords, fence then play with adorable cats",
8
8
  "ClubId": 1,
9
9
  "AddressId": 1,
10
- "Club.Name": "Test Club",
11
- "Address": [
12
- {
13
- "Name": "Test Location",
14
- "Address1": "123 Anywhere",
15
- "City": "Delaware",
16
- "State": "OH",
17
- "Zip": 43015,
18
- "Coordinates": "40.2828592,-83.1118049"
10
+ "Visibility": null,
11
+ "HostedOnM2": true,
12
+ "PrimaryContactId": null,
13
+ "CreatedByPersonId": null,
14
+ "Club": {
15
+ "ClubId": 1,
16
+ "Name": "Acme Fencing Club"
17
+ },
18
+ "Address": {
19
+ "Name": "Test Location",
20
+ "Address1": "123 Anywhere",
21
+ "City": "Delaware",
22
+ "State": "OH",
23
+ "Zip": 43015,
24
+ "Coordinates": "40.2828592,-83.1118049"
25
+ },
26
+ "PrimaryContact": null,
27
+ "CreatedByPerson": null,
28
+ "Images": [
29
+ {
30
+ "ImageId": 1,
31
+ "URL": "https://i.ytimg.com/vi/ieQglgIMfao/maxresdefault.jpg",
32
+ "AltText": "This is alt text"
19
33
  }
20
34
  ],
21
- "SocialMedia": [
35
+ "Tag": [
22
36
  {
23
- "Label": null,
24
- "Link": "https://thisisatest.com"
37
+ "TagName": "Saber"
25
38
  },
26
39
  {
27
- "Label": null,
28
- "Link": "http://second-link.com"
29
- }
30
- ],
31
- "images": [
32
- {
33
- "URL": "https://localhost/uploads/3.png",
34
- "AltText": "This is alt text"
40
+ "TagName": "Longsword"
35
41
  }
36
- ],
37
- "tags": [
38
- "Longsword",
39
- "Saber"
40
42
  ]
41
43
  },
42
44
  {
43
45
  "TournamentId": 4,
44
- "Name": "Test Tournament",
46
+ "Name": "Sword Cat",
45
47
  "StartDate": "2023-12-30",
46
48
  "EndDate": "2023-12-31",
47
- "Description": "<p>asdfasdfa ajhasd;likjfh;jkh asdlkjha;fdslkh ;asd;lkjfha;lksdhf ;alksh;lkjha;sdolfkjh;'asdklj f'as'lkj as'ldkj' asdkjlasd'fklja'dkljf sad'</p>",
49
+ "Description": "This is a sword tournament of super fun ness",
48
50
  "ClubId": 1,
49
51
  "AddressId": 2,
50
- "Club.Name": "Test Club",
51
- "Address": [
52
- {
53
- "Name": "Test One",
54
- "Address1": "2000 Nutter Farm Lane, Delaware, OH",
55
- "City": null,
56
- "State": null,
57
- "Zip": null,
58
- "Coordinates": "40.2824683,-83.02237459999999"
52
+ "Visibility": null,
53
+ "HostedOnM2": true,
54
+ "PrimaryContactId": null,
55
+ "CreatedByPersonId": null,
56
+ "Club": {
57
+ "ClubId": 1,
58
+ "Name": "Acme Fencing Club"
59
+ },
60
+ "Address": {
61
+ "Name": "Another Place",
62
+ "Address1": "15 Any Street",
63
+ "City": "Delaware",
64
+ "State": "Oh",
65
+ "Zip": 43015,
66
+ "Coordinates": "40.2824683,-83.02237459999999"
67
+ },
68
+ "PrimaryContact": null,
69
+ "CreatedByPerson": null,
70
+ "Images": [
71
+ {
72
+ "ImageId": 2,
73
+ "URL": "https://image.spreadshirtmedia.com/image-server/v1/compositions/T347A2PA4306PT17X38Y57D1036640135W17431H22866/views/1,width=550,height=550,appearanceId=2,backgroundColor=000000,noPt=true/cat-fencing-girl-longsword-sword-fencer-cute-cool-womens-t-shirt.jpg",
74
+ "AltText": "alt text"
59
75
  }
60
76
  ],
61
- "SocialMedia": [],
62
- "images": [
77
+ "Tag": [
63
78
  {
64
- "URL": "https://node.ferrotas.com:5000/uploads/t-450.png",
65
- "AltText": "alt text"
79
+ "TagName": "Longsword"
66
80
  }
67
- ],
68
- "tags": [
69
- "Longsword"
70
81
  ]
71
82
  },
72
83
  {
73
84
  "TournamentId": 5,
74
- "Name": "test tournament",
85
+ "Name": "Cats & Swords!",
75
86
  "StartDate": "2023-12-31",
76
87
  "EndDate": "2024-01-01",
77
- "Description": "<p>This is a test</p>",
88
+ "Description": "combat with the joy of spending time with furry feline friends! This event celebrates the art of Historical European Martial Arts (HEMA) while offering a purrfect opportunity to interact with adorable cats, some of whom are looking for their forever homes. Whether you're a seasoned swordsman or new to the sport, Cats & Swords promises an unforgettable day of exciting bouts, heartwarming moments, and the chance to adopt a loving companion. Come for the swords, stay for the cats, and leave with memories (and maybe a new furry friend) that will last a lifetime.",
78
89
  "ClubId": 1,
79
90
  "AddressId": 3,
80
- "Club.Name": "Test Club",
81
- "Address": [
82
- {
83
- "Name": "Test Two",
84
- "Address1": "2000 Nutter Farm Lane",
85
- "City": "Delaware",
86
- "State": "OH",
87
- "Zip": null,
88
- "Coordinates": "40.2824683,-83.02237459999999"
89
- }
90
- ],
91
- "SocialMedia": [
92
- {
93
- "Label": "",
94
- "Link": "https://thisisatest.com"
95
- }
96
- ],
97
- "images": [
98
- {
99
- "URL": "https://node.ferrotas.com:5000/uploads/t-196.png",
91
+ "Visibility": null,
92
+ "HostedOnM2": true,
93
+ "PrimaryContactId": 1,
94
+ "CreatedByPersonId": 1,
95
+ "Club": {
96
+ "ClubId": 1,
97
+ "Name": "Acme Fencing Club"
98
+ },
99
+ "Address": {
100
+ "Name": "Nutter Time Hotel",
101
+ "Address1": "2000 Nutter Farm Lane",
102
+ "City": "Delaware",
103
+ "State": "OH",
104
+ "Zip": 43015,
105
+ "Coordinates": "40.2824683,-83.02237459999999"
106
+ },
107
+ "PrimaryContact": {
108
+ "PersonId": 1,
109
+ "DisplayName": "Dave Smith",
110
+ "Pronouns": null,
111
+ "FirstName": "Dave",
112
+ "LastName": "Smith",
113
+ "Birthday": null,
114
+ "ClubId": 4,
115
+ "ShowData": true
116
+ },
117
+ "CreatedByPerson": {
118
+ "PersonId": 1,
119
+ "DisplayName": "Dave Smith",
120
+ "Pronouns": null,
121
+ "FirstName": "Dave",
122
+ "LastName": "Smith",
123
+ "Birthday": null,
124
+ "ClubId": 4,
125
+ "ShowData": true
126
+ },
127
+ "Images": [
128
+ {
129
+ "ImageId": 3,
130
+ "URL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtxO6k-C-9LYcukGvSD-3rZlsuDIu9mXfNoS4MuxHeyA&s",
100
131
  "AltText": "more alt text"
101
132
  }
102
133
  ],
103
- "tags": []
134
+ "Tag": []
104
135
  },
105
136
  {
106
- "TournamentId": 5,
107
- "Name": "Lasers, swords, and cats",
137
+ "TournamentId": 6,
138
+ "Name": "FelineFecht",
108
139
  "StartDate": "2023-12-31",
109
140
  "EndDate": "2024-01-01",
110
- "Description": "<p>This is a test</p>",
141
+ "Description": "Test your metal here!",
111
142
  "ClubId": 1,
112
- "AddressId": 3,
113
- "Club.Name": "Test Club",
114
- "Address": [
115
- {
116
- "Name": "Test Two",
117
- "Address1": "2000 Nutter Farm Lane",
118
- "City": "Delaware",
119
- "State": "OH",
120
- "Zip": null,
121
- "Coordinates": "40.2824683,-83.02237459999999"
122
- }
123
- ],
124
- "SocialMedia": [
125
- {
126
- "Label": "",
127
- "Link": "https://thisisatest.com"
128
- }
129
- ],
130
- "images": [
131
- {
132
- "URL": "https://node.ferrotas.com:5000/uploads/t-196.png",
133
- "AltText": "more alt text"
143
+ "AddressId": 4,
144
+ "Visibility": null,
145
+ "HostedOnM2": true,
146
+ "PrimaryContactId": null,
147
+ "CreatedByPersonId": null,
148
+ "Club": {
149
+ "ClubId": 1,
150
+ "Name": "Acme Fencing Club"
151
+ },
152
+ "Address": {
153
+ "Name": "Williams Place",
154
+ "Address1": "123 West William Street",
155
+ "City": "Delaware",
156
+ "State": "OH",
157
+ "Zip": 43015,
158
+ "Coordinates": "40.2987907,-83.0725873"
159
+ },
160
+ "PrimaryContact": null,
161
+ "CreatedByPerson": null,
162
+ "Images": [
163
+ {
164
+ "ImageId": 4,
165
+ "URL": "https://ih1.redbubble.net/image.4657842394.6345/flat,750x,075,f-pad,750x1000,f8f8f8.u3.jpg",
166
+ "AltText": "alt text"
134
167
  }
135
168
  ],
136
- "tags": []
169
+ "Tag": []
137
170
  },
138
171
  {
139
- "TournamentId": 6,
140
- "Name": "Catmageddon",
172
+ "TournamentId": 7,
173
+ "Name": "Swords a coming",
141
174
  "StartDate": "2023-12-31",
142
175
  "EndDate": "2024-01-01",
143
- "Description": "<p>This is a test</p>",
176
+ "Description": "Swords and more swords",
144
177
  "ClubId": 1,
145
- "AddressId": 3,
146
- "Club.Name": "Test Club",
147
- "Address": [
148
- {
149
- "Name": "Test Two",
150
- "Address1": "2000 Nutter Farm Lane",
151
- "City": "Delaware",
152
- "State": "OH",
153
- "Zip": null,
154
- "Coordinates": "40.2824683,-83.02237459999999"
155
- }
156
- ],
157
- "SocialMedia": [
158
- {
159
- "Label": "",
160
- "Link": "https://thisisatest.com"
161
- }
162
- ],
163
- "images": [
164
- {
165
- "URL": "https://node.ferrotas.com:5000/uploads/t-196.png",
166
- "AltText": "more alt text"
167
- }
168
- ],
169
- "tags": []
178
+ "AddressId": 2,
179
+ "Visibility": null,
180
+ "HostedOnM2": true,
181
+ "PrimaryContactId": null,
182
+ "CreatedByPersonId": null,
183
+ "Club": {
184
+ "ClubId": 1,
185
+ "Name": "Acme Fencing Club"
186
+ },
187
+ "Address": {
188
+ "Name": "Another Place",
189
+ "Address1": "15 Any Street",
190
+ "City": "Delaware",
191
+ "State": "Oh",
192
+ "Zip": 43015,
193
+ "Coordinates": "40.2824683,-83.02237459999999"
194
+ },
195
+ "PrimaryContact": null,
196
+ "CreatedByPerson": null,
197
+ "Images": [
198
+ {
199
+ "ImageId": 5,
200
+ "URL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRG8z6ZGh7NP46JgZAY1uRXR6znJizLhBIa-w&s",
201
+ "AltText": "text"
202
+ }
203
+ ],
204
+ "Tag": []
170
205
  },
171
206
  {
172
- "TournamentId": 7,
173
- "Name": "Cats and Swords",
207
+ "TournamentId": 8,
208
+ "Name": "Swordathon",
174
209
  "StartDate": "2023-12-31",
175
210
  "EndDate": "2024-01-01",
176
- "Description": "<p>This is a test</p>",
211
+ "Description": "Super fun swords",
177
212
  "ClubId": 1,
178
- "AddressId": 3,
179
- "Club.Name": "Test Club",
180
- "Address": [
181
- {
182
- "Name": "Test Two",
183
- "Address1": "2000 Nutter Farm Lane",
184
- "City": "Delaware",
185
- "State": "OH",
186
- "Zip": null,
187
- "Coordinates": "40.2824683,-83.02237459999999"
188
- }
189
- ],
190
- "SocialMedia": [
191
- {
192
- "Label": "",
193
- "Link": "https://thisisatest.com"
194
- }
195
- ],
196
- "images": [
197
- {
198
- "URL": "https://node.ferrotas.com:5000/uploads/t-196.png",
199
- "AltText": "more alt text"
200
- }
201
- ],
202
- "tags": []
213
+ "AddressId": 1,
214
+ "Visibility": null,
215
+ "HostedOnM2": true,
216
+ "PrimaryContactId": null,
217
+ "CreatedByPersonId": null,
218
+ "Club": {
219
+ "ClubId": 1,
220
+ "Name": "Acme Fencing Club"
221
+ },
222
+ "Address": {
223
+ "Name": "Test Location",
224
+ "Address1": "123 Anywhere",
225
+ "City": "Delaware",
226
+ "State": "OH",
227
+ "Zip": 43015,
228
+ "Coordinates": "40.2828592,-83.1118049"
229
+ },
230
+ "PrimaryContact": null,
231
+ "CreatedByPerson": null,
232
+ "Images": [
233
+ {
234
+ "ImageId": 6,
235
+ "URL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7Rgb6Yjgcr8M-kfPWaNnuQiyj3LscU6M8fQ&s",
236
+ "AltText": "text"
237
+ }
238
+ ],
239
+ "Tag": []
203
240
  }
204
241
  ];
205
242
 
@@ -11,7 +11,7 @@
11
11
  tabindex="0"
12
12
  @keydown.enter.prevent="selectItem(index)"
13
13
  >
14
- <i :class="[selectedIndex === index ? 'fa-circle-dot text-quaternary ' : 'fa-circle ' ]" class="fa-regular pr-4 pt-2" ></i>
14
+ <i :class="[selectedIndex === index ? 'fa-circle-dot text-quaternary ' : 'fa-circle ' ]" class="fa-regular pr-4 pt-2"></i>
15
15
  <div class="flex flex-col">
16
16
  <p :class="[selectedIndex === index ? 'text-quaternary ' : '' ]" class="font-bold text-sm">{{ item.label }}</p>
17
17
  <p :class="[selectedIndex === index ? 'text-quaternary ' : '' ]" class="text-sm">{{ item.description }}</p>
@@ -32,12 +32,21 @@ export default {
32
32
  type: Array,
33
33
  required: true,
34
34
  },
35
+ value: {
36
+ type: String,
37
+ required: false,
38
+ }
35
39
  },
36
40
  data() {
37
41
  return {
38
- selectedIndex: null,
42
+ selectedIndex: this.items.findIndex(item => item.value === this.value)
39
43
  };
40
44
  },
45
+ watch: {
46
+ value(newValue) {
47
+ this.selectedIndex = this.items.findIndex(item => item.value === newValue);
48
+ }
49
+ },
41
50
  methods: {
42
51
  selectItem(index) {
43
52
  this.selectedIndex = index;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="flex flex-col w-full pt-4 pb-3 px-3" @click="handleCardClick">
3
- <BaseText :text="detail.Name" color="primary" size="xl" weight="semi-bold" />
4
- <BaseText :text="detail.Address && detail.Address[0].Name" color="primary" size="sm" weight="normal" />
3
+ <BaseText :text="tournamentName" color="primary" size="xl" weight="semi-bold" />
4
+ <BaseText :text="address" color="primary" size="sm" weight="normal" />
5
5
  <div class="mt-4 flex flex-col">
6
6
  <div class="mt-4 flex flex-col h-20" >
7
7
  <span v-html="formattedDescription"></span>
@@ -32,25 +32,7 @@ export default {
32
32
  props: {
33
33
  detail: {
34
34
  type: Object,
35
- required: true,
36
- default: () => ({
37
- TournamentId: null,
38
- Name: '',
39
- StartDate: '',
40
- EndDate: '',
41
- Description: '',
42
- Address: [{
43
- Name: '',
44
- Address1: '',
45
- City: '',
46
- State: '',
47
- Zip: null,
48
- Coordinates: ''
49
- }],
50
- SocialMedia: [],
51
- images: [],
52
- tags: []
53
- })
35
+ required: true
54
36
  }
55
37
  },
56
38
  data() {
@@ -67,6 +49,12 @@ export default {
67
49
  },
68
50
  isTruncated() {
69
51
  return this.detail.Description.length > 64;
52
+ },
53
+ address() {
54
+ return this.detail.Address && this.detail.Address.Name
55
+ },
56
+ tournamentName() {
57
+ return this.detail.Name;
70
58
  }
71
59
  },
72
60
  methods: {
@@ -1,33 +1,12 @@
1
1
  import TournamentCard from './TournamentCard.vue';
2
+ import mockTournaments from '../../../../mocks/tournamentMock.js';
2
3
 
3
4
  export default {
4
5
  title: 'Organisms/Cards/TournamentCard',
5
6
  component: TournamentCard,
6
7
  tags: ['autodocs'],
7
8
  args: {
8
- detail: {
9
- tournamentId: 1,
10
- Name: 'Spring Open 2024',
11
- StartDate: '2024-05-01',
12
- EndDate: '2024-05-02',
13
- Description: 'A prestigious HEMA tournament held in the spring.',
14
- ClubId: 1,
15
- AddressId: 1,
16
- 'Club.Name': 'HEMA Club',
17
- Address: [{
18
- Name: 'Tournament Venue',
19
- Address1: '123 Fencing St.',
20
- City: 'Springfield',
21
- State: 'IL',
22
- Zip: '62704',
23
- Coordinates: '39.7817,-89.6501'
24
- }],
25
- SocialMedia: [],
26
- images: [{
27
- URL: 'https://www.adelaideswordacademy.com/uploads/1/0/7/0/10705704/published/longsword-k-fix.jpg?1609768554',
28
- }],
29
- tags: ['HEMA', 'Tournament', 'Spring'],
30
- },
9
+ detail: mockTournaments[0],
31
10
  },
32
11
  argTypes: {
33
12
  detail: { control: 'object' },
@@ -36,54 +15,12 @@ export default {
36
15
 
37
16
  export const Default = {
38
17
  args: {
39
- detail: {
40
- tournamentId: 1,
41
- Name: 'Spring Open 2024',
42
- StartDate: '2024-05-01',
43
- EndDate: '2024-05-02',
44
- Description: 'A prestigious HEMA tournament held in the spring.',
45
- ClubId: 1,
46
- AddressId: 1,
47
- 'Club.Name': 'HEMA Club',
48
- Address: [{
49
- Name: 'Tournament Venue',
50
- Address1: '123 Fencing St.',
51
- City: 'Springfield',
52
- State: 'IL',
53
- Zip: '62704',
54
- Coordinates: '39.7817,-89.6501'
55
- }],
56
- SocialMedia: [],
57
- images: [{
58
- URL: 'https://www.adelaideswordacademy.com/uploads/1/0/7/0/10705704/published/longsword-k-fix.jpg?1609768554',
59
- }],
60
- tags: ['HEMA', 'Tournament', 'Spring'],
61
- },
18
+ detail: mockTournaments[4],
62
19
  }
63
20
  };
64
21
 
65
22
  export const WithoutImage = {
66
23
  args: {
67
- detail: {
68
- tournamentId: 2,
69
- Name: 'Summer Duel 2024',
70
- StartDate: '2024-07-15',
71
- EndDate: '2024-07-16',
72
- Description: 'A summer HEMA duel competition.',
73
- ClubId: 2,
74
- AddressId: 2,
75
- 'Club.Name': 'Summer Club',
76
- Address: [{
77
- Name: 'Summer Venue',
78
- Address1: '456 Duel Ave.',
79
- City: 'Summerfield',
80
- State: 'TX',
81
- Zip: '75001',
82
- Coordinates: '32.7767,-96.7970'
83
- }],
84
- SocialMedia: [],
85
- images: [],
86
- tags: ['HEMA', 'Duel', 'Summer'],
87
- },
24
+ detail: mockTournaments[1],
88
25
  }
89
26
  };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="rounded-xl w-72 shadow border border-dropdownSelect hover:border-bright">
3
- <TournamentHeader :artwork="detail.images && detail.images.length > 0 ? detail.images[0].URL : ''" :tags="detail.tags" @click="listEvents" />
3
+ <TournamentHeader :artwork="getImage" :tags="detail.tags" @click="listEvents" />
4
4
  <TournamentDetail :detail="detail" @listEvents="listEvents" @edit="handleEditClick"/>
5
5
  </div>
6
6
  </template>
@@ -18,28 +18,12 @@ export default {
18
18
  props: {
19
19
  detail: {
20
20
  type: Object,
21
- required: true,
22
- default: () => ({
23
- tournamentId: null,
24
- Name: '',
25
- StartDate: '',
26
- EndDate: '',
27
- Description: '',
28
- ClubId: null,
29
- AddressId: null,
30
- 'Club.Name': '',
31
- Address: [{
32
- Name: '',
33
- Address1: '',
34
- City: '',
35
- State: '',
36
- Zip: null,
37
- Coordinates: ''
38
- }],
39
- SocialMedia: [],
40
- images: [],
41
- tags: []
42
- })
21
+ required: true
22
+ }
23
+ },
24
+ computed: {
25
+ getImage() {
26
+ return this.detail.Images && this.detail.Images.length > 0 ? this.detail.Images[0].URL : ''
43
27
  }
44
28
  },
45
29
  methods: {
@@ -50,6 +50,10 @@ export default {
50
50
  name: 'FindLocation',
51
51
  components: {BaseText, BaseModal, AddressAutocomplete, BaseButton, BaseIcon, BaseInput},
52
52
  props: {
53
+ placeholder: {
54
+ type: String,
55
+ default: ''
56
+ },
53
57
  locations: {
54
58
  type: Array,
55
59
  required: true
@@ -74,7 +78,7 @@ export default {
74
78
  validAddress: false,
75
79
  showNewLocation: false,
76
80
  filteredLocations: this.locations,
77
- inputValue: '',
81
+ inputValue: this.placeholder,
78
82
  showDropdown: false,
79
83
  showAddNew: false,
80
84
  debouncedTimeout: null