@dcrackel/hematournamentui 1.0.91 → 1.0.93

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.91",
4
+ "version": "1.0.93",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTouranmentUI-lib.umd.js",
7
7
  "module": "dist/HemaTouranmentUI-lib.es.js",
@@ -2,10 +2,10 @@ const personGetAllMock =
2
2
  [
3
3
  {
4
4
  "PersonId": 1,
5
- "DisplayName": "Dwain Crackel",
5
+ "DisplayName": "Bob Smith",
6
6
  "Pronouns": null,
7
- "FirstName": "Dwain",
8
- "LastName": "Crackel",
7
+ "FirstName": "Bob",
8
+ "LastName": "Smith",
9
9
  "Birthday": null,
10
10
  "ClubId": 1,
11
11
  "PersonEmails": [
@@ -47,8 +47,8 @@ const personsMock = [
47
47
  "Status": "Absent",
48
48
  "Person": {
49
49
  "PersonId": 1,
50
- "FirstName": "Dwain",
51
- "LastName": "Crackel",
50
+ "FirstName": "Bob",
51
+ "LastName": "Smith",
52
52
  "Images": [
53
53
  {
54
54
  "ImageId": 7,
@@ -138,7 +138,16 @@ const personsMock = [
138
138
  "PersonId": 3,
139
139
  "FirstName": "Dave",
140
140
  "LastName": "Larabee",
141
- "Images": [],
141
+ "Images": [
142
+ {
143
+ "ImageId": 7,
144
+ "URL": "https://randomuser.me/api/portraits/men/31.jpg",
145
+ "AltText": null,
146
+ "Type": "Portrait",
147
+ "EntityId": 1,
148
+ "EntityType": "Person"
149
+ }
150
+ ],
142
151
  "Club": {
143
152
  "ClubId": 1,
144
153
  "Name": "Test Club",
@@ -169,7 +178,16 @@ const personsMock = [
169
178
  "PersonId": 5,
170
179
  "FirstName": "Darlene",
171
180
  "LastName": "Acevedo",
172
- "Images": [],
181
+ "Images": [
182
+ {
183
+ "ImageId": 7,
184
+ "URL": "https://randomuser.me/api/portraits/women/31.jpg",
185
+ "AltText": null,
186
+ "Type": "Portrait",
187
+ "EntityId": 1,
188
+ "EntityType": "Person"
189
+ }
190
+ ],
173
191
  "Club": {
174
192
  "ClubId": 1,
175
193
  "Name": "Test Club",
@@ -191,7 +209,16 @@ const personsMock = [
191
209
  "PersonId": 6,
192
210
  "FirstName": "Courtney",
193
211
  "LastName": "Medina",
194
- "Images": [],
212
+ "Images": [
213
+ {
214
+ "ImageId": 7,
215
+ "URL": "https://randomuser.me/api/portraits/women/19.jpg",
216
+ "AltText": null,
217
+ "Type": "Portrait",
218
+ "EntityId": 1,
219
+ "EntityType": "Person"
220
+ }
221
+ ],
195
222
  "Club": {
196
223
  "ClubId": 1,
197
224
  "Name": "Test Club",
@@ -213,7 +240,16 @@ const personsMock = [
213
240
  "PersonId": 7,
214
241
  "FirstName": "Emily",
215
242
  "LastName": "Carlson",
216
- "Images": [],
243
+ "Images": [
244
+ {
245
+ "ImageId": 7,
246
+ "URL": "https://randomuser.me/api/portraits/women/12.jpg",
247
+ "AltText": null,
248
+ "Type": "Portrait",
249
+ "EntityId": 1,
250
+ "EntityType": "Person"
251
+ }
252
+ ],
217
253
  "Club": {
218
254
  "ClubId": 1,
219
255
  "Name": "Test Club",
@@ -257,7 +293,16 @@ const personsMock = [
257
293
  "PersonId": 9,
258
294
  "FirstName": "Sean",
259
295
  "LastName": "McCoy",
260
- "Images": [],
296
+ "Images": [
297
+ {
298
+ "ImageId": 7,
299
+ "URL": "https://randomuser.me/api/portraits/men/12.jpg",
300
+ "AltText": null,
301
+ "Type": "Portrait",
302
+ "EntityId": 1,
303
+ "EntityType": "Person"
304
+ }
305
+ ],
261
306
  "Club": {
262
307
  "ClubId": 1,
263
308
  "Name": "Test Club",
@@ -323,7 +368,16 @@ const personsMock = [
323
368
  "PersonId": 12,
324
369
  "FirstName": "Lindsey",
325
370
  "LastName": "Mitchell",
326
- "Images": [],
371
+ "Images": [
372
+ {
373
+ "ImageId": 7,
374
+ "URL": "https://randomuser.me/api/portraits/women/33.jpg",
375
+ "AltText": null,
376
+ "Type": "Portrait",
377
+ "EntityId": 1,
378
+ "EntityType": "Person"
379
+ }
380
+ ],
327
381
  "Club": {
328
382
  "ClubId": 1,
329
383
  "Name": "Test Club",
@@ -13,13 +13,12 @@
13
13
  </section>
14
14
  <div class="flex flex-col pl-4">
15
15
  <div class="flex flex-row pb-2">
16
- <BaseButton label="Edit" size="sm" type="primary" @click="onEdit" class="w-28" />
17
- <BaseButton label="Manage" size="sm" type="primary" @click="onManage" class="w-2/3" />
16
+ <BaseButton label="Edit" size="sm" type="primary" @click="onEdit" class="w-1/2" />
17
+ <BaseButton label="Manage" size="sm" type="primary" @click="onManage" class="w-1/2" />
18
18
  </div>
19
19
  <div class="flex flex-row">
20
20
  <EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxBlue" />
21
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" />
23
22
  </div>
24
23
  </div>
25
24
  </div>
@@ -127,7 +127,6 @@ export const CheckedIn = {
127
127
  PersonId: 2,
128
128
  FirstName: 'Jane',
129
129
  LastName: 'Smith',
130
- ClubName: 'Fencing Club',
131
130
  Images: [
132
131
  {
133
132
  ImageId: 2,
@@ -137,7 +136,14 @@ export const CheckedIn = {
137
136
  EntityId: 2,
138
137
  EntityType: 'Person'
139
138
  }
140
- ]
139
+ ],
140
+ "Club": {
141
+ "ClubId": 1,
142
+ "Name": "Test Club",
143
+ "Description": "This is a test",
144
+ "AddressId": 1,
145
+ "SocialMediaId": null
146
+ },
141
147
  }
142
148
  }
143
149
  }
@@ -154,7 +160,6 @@ export const Absent = {
154
160
  PersonId: 3,
155
161
  FirstName: 'Alice',
156
162
  LastName: 'Johnson',
157
- ClubName: 'Martial Arts Club',
158
163
  Images: [
159
164
  {
160
165
  ImageId: 3,
@@ -164,7 +169,14 @@ export const Absent = {
164
169
  EntityId: 3,
165
170
  EntityType: 'Person'
166
171
  }
167
- ]
172
+ ],
173
+ "Club": {
174
+ "ClubId": 1,
175
+ "Name": "Test Club",
176
+ "Description": "This is a test",
177
+ "AddressId": 1,
178
+ "SocialMediaId": null
179
+ },
168
180
  }
169
181
  }
170
182
  }
@@ -30,63 +30,25 @@
30
30
  @update:selected="handleAttendance"
31
31
  />
32
32
  </div>
33
+ <div class="ml-4 border-l border-dropdownSelect h-20 w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg">
34
+ <BaseIcon icon-name="fa-circle-xmark" size="2xl" color="quinary" class="pt-6" hover="alarm" @click="handlerRemoveFencer" />
35
+ </div>
33
36
  </div>
34
37
  </template>
35
38
 
36
39
  <script>
37
40
  import BaseText from "../../../Atoms/Text/BaseText.vue";
38
41
  import ButtonBar from "../../../Molecules/Buttons/ButtonBar/ButtonBar.vue";
42
+ import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
39
43
 
40
44
  export default {
41
45
  name: 'FencerCard',
42
- components: { ButtonBar, BaseText },
46
+ components: {BaseIcon, ButtonBar, BaseText },
43
47
  props: {
44
48
  person: {
45
49
  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
- },
50
+ required: true
51
+ }
90
52
  },
91
53
  computed: {
92
54
  fullName() {
@@ -123,6 +85,9 @@ export default {
123
85
  handleAttendance(selected) {
124
86
  const person = { ...this.person, Status: selected };
125
87
  this.$emit('update:status', person);
88
+ },
89
+ handlerRemoveFencer(){
90
+ this.$emit('remove:fencer', this.person);
126
91
  }
127
92
  }
128
93
  };
@@ -22,16 +22,21 @@
22
22
  @update:selected="handleAssignment"
23
23
  />
24
24
  </div>
25
+
26
+ <div class="ml-4 border-l border-dropdownSelect h-20 w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg">
27
+ <BaseIcon icon-name="fa-circle-xmark" size="2xl" color="quinary" class="pt-6" hover="alarm" @click="handlerRemoveFencer" />
28
+ </div>
25
29
  </div>
26
30
  </template>
27
31
 
28
32
  <script>
29
33
  import BaseText from "../../../Atoms/Text/BaseText.vue";
30
34
  import ButtonBar from "../../../Molecules/Buttons/ButtonBar/ButtonBar.vue";
35
+ import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
31
36
 
32
37
  export default {
33
38
  name: 'StaffCard',
34
- components: { ButtonBar, BaseText },
39
+ components: {BaseIcon, ButtonBar, BaseText },
35
40
  props: {
36
41
  staff: {
37
42
  type: Object,
@@ -67,6 +72,9 @@ export default {
67
72
  handleAssignment(selected) {
68
73
  const staff = { ...this.staff, Status: selected };
69
74
  this.$emit('update:assignment', staff);
75
+ },
76
+ handlerRemoveFencer() {
77
+ this.$emit('remove:staff', this.staff);
70
78
  }
71
79
  }
72
80
  };
@@ -23,6 +23,7 @@
23
23
  :seed="person.Seed"
24
24
  :portrait="clubLogoURL(person)"
25
25
  @swap-fencers="handleSwap"
26
+ @remove:fencer="handleRemoveFencer"
26
27
  />
27
28
  </div>
28
29
  </div>
@@ -43,6 +44,10 @@ export default {
43
44
  PoolFencerCard
44
45
  },
45
46
  props: {
47
+ poolId: {
48
+ type: [String, Number],
49
+ required: true
50
+ },
46
51
  poolName: {
47
52
  type: String,
48
53
  required: true
@@ -76,10 +81,9 @@ export default {
76
81
  computed: {
77
82
  directors() {
78
83
  return this.staff
79
- //.filter(staffMember => staffMember.Role === 'Director')
80
84
  .map(staffMember => ({
81
85
  text: staffMember.Person.DisplayName,
82
- link: staffMember.PersonId // Assuming PersonId is a suitable unique identifier
86
+ link: { personId: staffMember.PersonId, eventId: staffMember.EventId, poolId: this.poolId }
83
87
  }));
84
88
  }
85
89
  },
@@ -96,9 +100,11 @@ export default {
96
100
  return portrait ? portrait.Link : '';
97
101
  },
98
102
  handleSelectedItem(event){
99
- console.log(event)
100
- this.selectedDirector = { text: event.text, link: event.link }
101
- this.$emit('update:setDirector', event.link)
103
+ this.selectedDirector = { text: event.text, link: { directorId: event.link, poolId: this.poolId } }
104
+ this.$emit('update:setDirector', event)
105
+ },
106
+ handleRemoveFencer(person) {
107
+ this.$emit('remove:fencer', person);
102
108
  }
103
109
  }
104
110
  };
@@ -12,7 +12,6 @@
12
12
  <div class="flex">
13
13
  <EventStatusBox :status-count="absent" status-label="ABSENT" box-color="bg-eventBoxBlue" />
14
14
  <EventStatusBox :status-count="present" status-label="PRESENT" box-color="bg-eventBoxGreen" />
15
- <EventStatusBox :status-count="removed" status-label="REMOVED" box-color="bg-eventBoxRed" />
16
15
  </div>
17
16
  </section>
18
17
 
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
 
36
36
  <section v-for="person in sortedPersons" class="w-full">
37
- <FencerCard :person="person" class="mb-4" @update:status="handleStatus"/>
37
+ <FencerCard :person="person" class="mb-4" @update:status="handleStatus" @remove:fencer="handleRemoveFencer"/>
38
38
  </section>
39
39
  </div>
40
40
  </section>
@@ -146,6 +146,10 @@ export default {
146
146
  handleTabMenuClick(value) {
147
147
  console.log(`----- handleTabMenuClick: ${value}`);
148
148
  this.$emit('tab:menu-click', value);
149
+ },
150
+ handleRemoveFencer(value) {
151
+ console.log(`----- handleRemoveFencer: ${value}`);
152
+ this.$emit('remove:fencer', value);
149
153
  }
150
154
  }
151
155
  }
@@ -62,11 +62,37 @@ export const NoPoolsYet = {
62
62
  }
63
63
  };
64
64
 
65
+ const staff = [{
66
+ Id: 2,
67
+ TournamentId: 4,
68
+ EventId: 5,
69
+ PoolId: 102,
70
+ PersonId: 23,
71
+ Role: 'Director',
72
+ Person: {
73
+ DisplayName: 'Lucas Garcia',
74
+ Club: {
75
+ ClubId: 1,
76
+ Name: 'Acme Fencing Club'
77
+ },
78
+ Images: [
79
+ {
80
+ URL: 'https://randomuser.me/api/portraits/men/77.jpg'
81
+ }
82
+ ]
83
+ },
84
+ Pool: {
85
+ PoolId: 102,
86
+ Name: 'Pool 1',
87
+ RingName: 'Ring 1'
88
+ }
89
+ }];
90
+
65
91
  export const liveMode = {
66
92
  args: {
67
93
  event:eventPersonGetPoolAssignmentEvent,
68
94
  poolAssignments: eventPersonGetInitialPoolAssignments,
69
- staff: eventPersonGetInitialStaff,
95
+ staff: staff,
70
96
  mode: 'Live'
71
97
  }
72
98
  };
@@ -8,6 +8,7 @@
8
8
  <div class="w-full flex flex-row flex-wrap justify-center" :class="this.event.Flights > 1 ? 'mt-0' : 'mt-4'">
9
9
  <div v-for="pool in filteredPools" :key="pool.Name">
10
10
  <Pool
11
+ :poolId="pool.PoolId"
11
12
  :poolName="pool.Name"
12
13
  :ringName="pool.RingName"
13
14
  :poolInd="pool.poolStrengthInd"
@@ -16,6 +17,7 @@
16
17
  :staff="staff"
17
18
  @swap-fencers="swapFencers"
18
19
  @update:setDirector="setDirector"
20
+ @remove:fencer="handleRemoveFencer"
19
21
  />
20
22
  </div>
21
23
  <div v-if="filteredPools.length < 1" class="w-full flex justify-center items-center">
@@ -135,6 +137,9 @@ export default {
135
137
  setDirector(personId) {
136
138
  this.$emit('update:director', personId );
137
139
  },
140
+ handleRemoveFencer(person){
141
+ this.$emit('remove:fencer', person);
142
+ }
138
143
  }
139
144
  }
140
145
  </script>
@@ -31,7 +31,7 @@
31
31
 
32
32
  <div v-if="viewName === 'Staff List'" class="mt-4 w-full">
33
33
  <div v-for="staff in staffMembers" :key="staff.Id">
34
- <StaffCard :staff="staff" class="mb-4" @update:assignment="handleAssignment" />
34
+ <StaffCard :staff="staff" class="mb-4" @update:assignment="handleAssignment" @remove:staff="handleRemoveStaff" />
35
35
  </div>
36
36
  </div>
37
37
 
@@ -129,6 +129,9 @@ export default {
129
129
  },
130
130
  handleStaffView(value){
131
131
  this.viewName = value;
132
+ },
133
+ handleRemoveStaff(value){
134
+ this.$emit('remove:staff', value);
132
135
  }
133
136
  }
134
137
  }