@dcrackel/hematournamentui 1.0.90 → 1.0.92

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.90",
4
+ "version": "1.0.92",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTouranmentUI-lib.umd.js",
7
7
  "module": "dist/HemaTouranmentUI-lib.es.js",
@@ -1,38 +1,101 @@
1
1
  const eventPersonGetInitialStaff =
2
- [
3
- {
4
- "Id": 2,
5
- "TournamentId": 4,
6
- "EventId": 5,
7
- "PoolId": 102,
8
- "PersonId": 23,
9
- "Role": "Director",
10
- "Person": {
11
- "DisplayName": "Robert Garcia"
2
+ [
3
+ {
4
+ "Id": 2,
5
+ "TournamentId": 4,
6
+ "EventId": 5,
7
+ "PoolId": 102,
8
+ "PersonId": 23,
9
+ "Role": "Director",
10
+ "Person": {
11
+ "DisplayName": "Lucas Garcia",
12
+ "Club": {
13
+ "ClubId": 1,
14
+ "Name": "Acme Fencing Club"
15
+ },
16
+ "Images": [
17
+ {
18
+ "URL": "https://randomuser.me/api/portraits/men/77.jpg"
19
+ }
20
+ ]
21
+ },
22
+ "Pool": {
23
+ "PoolId": 102,
24
+ "Name": "Pool 1",
25
+ "RingName": "Ring 1"
26
+ }
27
+ },
28
+ {
29
+ "Id": 3,
30
+ "TournamentId": 4,
31
+ "EventId": 5,
32
+ "PoolId": 103,
33
+ "PersonId": 24,
34
+ "Role": "Director",
35
+ "Person": {
36
+ "DisplayName": "Mia Rodriguez",
37
+ "Club": {
38
+ "ClubId": 2,
39
+ "Name": "Historical Fencing Of Anywhere"
40
+ },
41
+ "Images": [
42
+ {
43
+ "URL": "https://randomuser.me/api/portraits/women/89.jpg"
44
+ }
45
+ ]
46
+ },
47
+ "Pool": {
48
+ "PoolId": 103,
49
+ "Name": "Pool 2",
50
+ "RingName": "Ring 2"
51
+ }
52
+ },
53
+ {
54
+ "Id": 4,
55
+ "TournamentId": 4,
56
+ "EventId": 5,
57
+ "PoolId": 102,
58
+ "PersonId": 22,
59
+ "Role": "Line Judge",
60
+ "Person": {
61
+ "DisplayName": "Bob Smith",
62
+ "Club": {
63
+ "ClubId": 6,
64
+ "Name": "SwordPlay Society"
65
+ },
66
+ "Images": [
67
+ {
68
+ "URL": "https://randomuser.me/api/portraits/men/81.jpg"
69
+ }
70
+ ]
71
+ },
72
+ "Pool": {
73
+ "PoolId": 102,
74
+ "Name": "Pool 1",
75
+ "RingName": "Ring 1"
76
+ }
77
+ },
78
+ {
79
+ "Id": 5,
80
+ "TournamentId": 4,
81
+ "EventId": 5,
82
+ "PoolId": null,
83
+ "PersonId": 1,
84
+ "Role": "Director",
85
+ "Person": {
86
+ "DisplayName": "Dave Smith",
87
+ "Club": {
88
+ "ClubId": 4,
89
+ "Name": "Guardians of the Guard"
90
+ },
91
+ "Images": [
92
+ {
93
+ "URL": "https://randomuser.me/api/portraits/men/22.jpg"
94
+ }
95
+ ]
96
+ },
97
+ "Pool": null
12
98
  }
13
- },
14
- {
15
- "Id": 3,
16
- "TournamentId": 4,
17
- "EventId": 5,
18
- "PoolId": 103,
19
- "PersonId": 24,
20
- "Role": "Director",
21
- "Person": {
22
- "DisplayName": "Mia Rodriguez"
23
- }
24
- },
25
- {
26
- "Id": 4,
27
- "TournamentId": 4,
28
- "EventId": 5,
29
- "PoolId": 102,
30
- "PersonId": 22,
31
- "Role": "Line Judge",
32
- "Person": {
33
- "DisplayName": "Bob Smith"
34
- }
35
- }
36
- ];
99
+ ]
37
100
 
38
101
  export default eventPersonGetInitialStaff;
@@ -43,6 +43,10 @@ export default {
43
43
  PoolFencerCard
44
44
  },
45
45
  props: {
46
+ poolId: {
47
+ type: [String, Number],
48
+ required: true
49
+ },
46
50
  poolName: {
47
51
  type: String,
48
52
  required: true
@@ -56,7 +60,7 @@ export default {
56
60
  required: true
57
61
  },
58
62
  poolInd: {
59
- type: String,
63
+ type: [String, Number],
60
64
  required: true
61
65
  },
62
66
  pool: {
@@ -76,10 +80,9 @@ export default {
76
80
  computed: {
77
81
  directors() {
78
82
  return this.staff
79
- //.filter(staffMember => staffMember.Role === 'Director')
80
83
  .map(staffMember => ({
81
84
  text: staffMember.Person.DisplayName,
82
- link: staffMember.PersonId // Assuming PersonId is a suitable unique identifier
85
+ link: { personId: staffMember.PersonId, eventId: staffMember.EventId, poolId: this.poolId }
83
86
  }));
84
87
  }
85
88
  },
@@ -96,9 +99,8 @@ export default {
96
99
  return portrait ? portrait.Link : '';
97
100
  },
98
101
  handleSelectedItem(event){
99
- console.log(event)
100
- this.selectedDirector = { text: event.text, link: event.link }
101
- this.$emit('update:setDirector', event.link)
102
+ this.selectedDirector = { text: event.text, link: { directorId: event.link, poolId: this.poolId } }
103
+ this.$emit('update:setDirector', event)
102
104
  }
103
105
  }
104
106
  };
@@ -77,11 +77,9 @@ export default {
77
77
  },
78
78
  computed: {
79
79
  poolSize() {
80
- console.log(`poolSize: ${this.event.PoolSize}`)
81
80
  return this.event.PoolSize || 0;
82
81
  },
83
82
  numberOfRings() {
84
- console.log(`numberOfRings: ${this.event.NumberOfRings}`)
85
83
  return this.event.NumberOfRings || 0;
86
84
  },
87
85
  },
@@ -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"
@@ -25,7 +26,6 @@
25
26
  <BaseText text="Go Back Seeding and Checkin to mark fencers as present." size="sm" color="primary" weight="normal" />
26
27
  </div>
27
28
  </div>
28
-
29
29
  </div>
30
30
 
31
31
  <div v-if="filteredPools.length > 1 && mode !== 'Complete'" class="grid grid-cols-2 gap-4 mx-8 mt-8">
@@ -54,7 +54,10 @@ export default {
54
54
  },
55
55
  props: {
56
56
  event: Object,
57
- poolAssignments: Object,
57
+ poolAssignments: {
58
+ type: Array,
59
+ default: () => []
60
+ },
58
61
  mode: {
59
62
  type: String,
60
63
  required: true,
@@ -128,11 +131,9 @@ export default {
128
131
  return director ? director.Person.DisplayName : 'Unassigned';
129
132
  },
130
133
  swapFencers({ draggedPerson }) {
131
- console.log('swapFencers', draggedPerson);
132
134
  this.$emit('update:swapFencers', {draggedPerson});
133
135
  },
134
136
  setDirector(personId) {
135
- console.log('setDirector', personId);
136
137
  this.$emit('update:director', personId );
137
138
  },
138
139
  }