@dcrackel/hematournamentui 1.0.712 → 1.0.713

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.
Files changed (99) hide show
  1. package/.prettierignore +7 -7
  2. package/.storybook/main.js +3 -1
  3. package/README.md +30 -0
  4. package/package.json +96 -96
  5. package/prettier.config.js +16 -16
  6. package/src/main.js +1 -1
  7. package/src/mocks/getDEBouts-TableOf128.js +37 -37
  8. package/src/mocks/getDEBouts-TableOf64.js +35 -35
  9. package/src/stories/Atoms/Input/BaseInput.test.js +97 -97
  10. package/src/stories/Atoms/Input/BaseInput.vue +149 -149
  11. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -23
  12. package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -35
  13. package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -30
  14. package/src/stories/Molecules/Menus/HoverActions/HoverActions.test.js +138 -0
  15. package/src/stories/Molecules/Menus/HoverActions/HoverActions.vue +212 -0
  16. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +6 -0
  17. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -18
  18. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +1 -1
  19. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +5 -1
  20. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +19 -10
  21. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +11 -7
  22. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +33 -33
  23. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +45 -45
  24. package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +103 -103
  25. package/src/stories/Organisms/Cards/Director/DirectorCard.test.js +82 -0
  26. package/src/stories/Organisms/Cards/Director/DirectorCard.vue +32 -51
  27. package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -51
  28. package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -106
  29. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -298
  30. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +77 -60
  31. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +144 -143
  32. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +289 -256
  33. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -69
  34. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -80
  35. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +153 -153
  36. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +4 -0
  37. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -31
  38. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -109
  39. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -192
  40. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +1 -0
  41. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +247 -204
  42. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +89 -15
  43. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +29 -29
  44. package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +46 -46
  45. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -21
  46. package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -39
  47. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -145
  48. package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -64
  49. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +36 -57
  50. package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +101 -65
  51. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +14 -1
  52. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +52 -52
  53. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +10 -3
  54. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -226
  55. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
  56. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +137 -137
  57. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -172
  58. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -216
  59. package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -79
  60. package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -29
  61. package/src/stories/Organisms/Wizards/EditEventWizard/WeaponSelection.test.js +138 -0
  62. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +123 -12
  63. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +178 -166
  64. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +35 -7
  65. package/src/stories/Templates/EventManagement/Bracket/BracketDirectorAssignment.test.js +242 -0
  66. package/src/stories/Templates/EventManagement/Bracket/BracketMobile.test.js +131 -0
  67. package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +42 -39
  68. package/src/stories/Templates/EventManagement/Bracket/BracketStories.test.js +80 -0
  69. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.js +93 -0
  70. package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.test.js +152 -0
  71. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -39
  72. package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -79
  73. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -93
  74. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -91
  75. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -121
  76. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +9 -2
  77. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +5 -4
  78. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +81 -81
  79. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -39
  80. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +101 -101
  81. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -71
  82. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +86 -86
  83. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -86
  84. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +247 -247
  85. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -170
  86. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -156
  87. package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -329
  88. package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -329
  89. package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -42
  90. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -84
  91. package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -114
  92. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -363
  93. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -116
  94. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -307
  95. package/src/stories/Util/Validations/PersonManagementValidations.js +45 -45
  96. package/src/stories/Util/Validations/PriceValidation.js +6 -6
  97. package/src/stories/Util/boutDirectorAssignment.js +46 -0
  98. package/src/stories/Util/registrationStatus.js +11 -11
  99. package/src/stories/Util/tabs.js +19 -47
@@ -1,69 +1,69 @@
1
- import TableauFencerCard from './TableauFencerCard.vue';
2
-
3
- export default {
4
- title: 'Organisms/Cards/TableauFencerCard',
5
- component: TableauFencerCard,
6
- tags: ['autodocs'],
7
- args: {
8
- fencer: { DisplayName: 'John Doe' },
9
- score: '15',
10
- position: '1',
11
- color: 'blue',
12
- scoreColor: 'bg-winGreen',
13
- showScore: true,
14
- corners: 'top'
15
- },
16
- argTypes: {
17
- fencer: {
18
- control: 'object',
19
- description: 'Fencer displayed in the bracket row'
20
- },
21
- score: {
22
- control: 'text',
23
- description: 'Displayed bout score'
24
- },
25
- position: {
26
- control: 'text',
27
- description: 'Seed or direct-elimination position'
28
- },
29
- color: {
30
- control: 'text',
31
- description: 'Tailwind theme color used for the seed strip'
32
- },
33
- scoreColor: {
34
- control: 'text',
35
- description: 'Tailwind background class used for the score cell'
36
- },
37
- showScore: {
38
- control: 'boolean',
39
- description: 'Whether the score cell displays a value'
40
- },
41
- corners: {
42
- control: 'select',
43
- options: ['none', 'top', 'bottom'],
44
- description: 'Rounds the outside corners when used as the top or bottom bout row'
45
- }
46
- }
47
- };
48
-
49
- export const Default = {};
50
-
51
- export const LosingScore = {
52
- args: {
53
- fencer: { DisplayName: 'Jane Doe' },
54
- score: '12',
55
- position: '2',
56
- color: 'red',
57
- scoreColor: 'bg-lossRed',
58
- corners: 'bottom'
59
- }
60
- };
61
-
62
- export const PendingFencer = {
63
- args: {
64
- fencer: { DisplayName: '' },
65
- score: '0',
66
- position: '',
67
- showScore: false
68
- }
69
- };
1
+ import TableauFencerCard from './TableauFencerCard.vue';
2
+
3
+ export default {
4
+ title: 'Organisms/Cards/TableauFencerCard',
5
+ component: TableauFencerCard,
6
+ tags: ['autodocs'],
7
+ args: {
8
+ fencer: { DisplayName: 'John Doe' },
9
+ score: '15',
10
+ position: '1',
11
+ color: 'blue',
12
+ scoreColor: 'bg-winGreen',
13
+ showScore: true,
14
+ corners: 'top'
15
+ },
16
+ argTypes: {
17
+ fencer: {
18
+ control: 'object',
19
+ description: 'Fencer displayed in the bracket row'
20
+ },
21
+ score: {
22
+ control: 'text',
23
+ description: 'Displayed bout score'
24
+ },
25
+ position: {
26
+ control: 'text',
27
+ description: 'Seed or direct-elimination position'
28
+ },
29
+ color: {
30
+ control: 'text',
31
+ description: 'Tailwind theme color used for the seed strip'
32
+ },
33
+ scoreColor: {
34
+ control: 'text',
35
+ description: 'Tailwind background class used for the score cell'
36
+ },
37
+ showScore: {
38
+ control: 'boolean',
39
+ description: 'Whether the score cell displays a value'
40
+ },
41
+ corners: {
42
+ control: 'select',
43
+ options: ['none', 'top', 'bottom'],
44
+ description: 'Rounds the outside corners when used as the top or bottom bout row'
45
+ }
46
+ }
47
+ };
48
+
49
+ export const Default = {};
50
+
51
+ export const LosingScore = {
52
+ args: {
53
+ fencer: { DisplayName: 'Jane Doe' },
54
+ score: '12',
55
+ position: '2',
56
+ color: 'red',
57
+ scoreColor: 'bg-lossRed',
58
+ corners: 'bottom'
59
+ }
60
+ };
61
+
62
+ export const PendingFencer = {
63
+ args: {
64
+ fencer: { DisplayName: '' },
65
+ score: '0',
66
+ position: '',
67
+ showScore: false
68
+ }
69
+ };
@@ -1,80 +1,80 @@
1
- <template>
2
- <section class="flex h-7 w-40 overflow-hidden border border-poolSetup bg-poolSetup" :class="cornerClass">
3
- <div class="flex w-5 shrink-0 items-center justify-center px-1" :class="positionColorClass">
4
- <BaseText :text="position" size="xs" color="neutral" />
5
- </div>
6
-
7
- <div class="flex min-w-0 flex-1 items-center px-2">
8
- <BaseText :text="name" size="xs" color="quaternary" class="truncate whitespace-nowrap" />
9
- </div>
10
-
11
- <div class="flex w-7 shrink-0 items-center justify-center border-l border-poolSetup" :class="scoreColor">
12
- <BaseText v-if="showScore" :text="displayedScore" size="xs" color="neutral" />
13
- </div>
14
- </section>
15
- </template>
16
-
17
- <script>
18
- import BaseText from '../../../Atoms/Text/BaseText.vue';
19
-
20
- const cornerClasses = {
21
- none: '',
22
- top: 'rounded-t',
23
- bottom: 'rounded-b'
24
- };
25
-
26
- export default {
27
- name: 'TableauFencerCard',
28
- components: { BaseText },
29
- props: {
30
- fencer: {
31
- type: Object,
32
- required: true
33
- },
34
- score: {
35
- type: String,
36
- required: true
37
- },
38
- position: {
39
- type: [String, Number],
40
- required: true
41
- },
42
- color: {
43
- type: String,
44
- default: ''
45
- },
46
- scoreColor: {
47
- type: String,
48
- required: true
49
- },
50
- showScore: {
51
- type: Boolean,
52
- default: true
53
- },
54
- isCountingBackwardsMaxScore: {
55
- type: Number,
56
- default: 0
57
- },
58
- corners: {
59
- type: String,
60
- default: 'none',
61
- validator: value => Object.hasOwn(cornerClasses, value)
62
- }
63
- },
64
- computed: {
65
- cornerClass() {
66
- return cornerClasses[this.corners];
67
- },
68
- displayedScore() {
69
- const score = Number(this.score || 0);
70
- return this.isCountingBackwardsMaxScore > 0 ? this.isCountingBackwardsMaxScore - score : score;
71
- },
72
- name() {
73
- return String(this.fencer?.DisplayName || '');
74
- },
75
- positionColorClass() {
76
- return this.color ? `bg-${this.color}` : 'bg-dropdownSelect';
77
- }
78
- }
79
- };
80
- </script>
1
+ <template>
2
+ <section class="flex h-7 w-40 overflow-hidden border border-poolSetup bg-poolSetup" :class="cornerClass">
3
+ <div class="flex w-5 shrink-0 items-center justify-center px-1" :class="positionColorClass">
4
+ <BaseText :text="position" size="xs" color="neutral" />
5
+ </div>
6
+
7
+ <div class="flex min-w-0 flex-1 items-center px-2">
8
+ <BaseText :text="name" size="xs" color="quaternary" class="truncate whitespace-nowrap" />
9
+ </div>
10
+
11
+ <div class="flex w-7 shrink-0 items-center justify-center border-l border-poolSetup" :class="scoreColor">
12
+ <BaseText v-if="showScore" :text="displayedScore" size="xs" color="neutral" />
13
+ </div>
14
+ </section>
15
+ </template>
16
+
17
+ <script>
18
+ import BaseText from '../../../Atoms/Text/BaseText.vue';
19
+
20
+ const cornerClasses = {
21
+ none: '',
22
+ top: 'rounded-t',
23
+ bottom: 'rounded-b'
24
+ };
25
+
26
+ export default {
27
+ name: 'TableauFencerCard',
28
+ components: { BaseText },
29
+ props: {
30
+ fencer: {
31
+ type: Object,
32
+ required: true
33
+ },
34
+ score: {
35
+ type: String,
36
+ required: true
37
+ },
38
+ position: {
39
+ type: [String, Number],
40
+ required: true
41
+ },
42
+ color: {
43
+ type: String,
44
+ default: ''
45
+ },
46
+ scoreColor: {
47
+ type: String,
48
+ required: true
49
+ },
50
+ showScore: {
51
+ type: Boolean,
52
+ default: true
53
+ },
54
+ isCountingBackwardsMaxScore: {
55
+ type: Number,
56
+ default: 0
57
+ },
58
+ corners: {
59
+ type: String,
60
+ default: 'none',
61
+ validator: value => Object.hasOwn(cornerClasses, value)
62
+ }
63
+ },
64
+ computed: {
65
+ cornerClass() {
66
+ return cornerClasses[this.corners];
67
+ },
68
+ displayedScore() {
69
+ const score = Number(this.score || 0);
70
+ return this.isCountingBackwardsMaxScore > 0 ? this.isCountingBackwardsMaxScore - score : score;
71
+ },
72
+ name() {
73
+ return String(this.fencer?.DisplayName || '');
74
+ },
75
+ positionColorClass() {
76
+ return this.color ? `bg-${this.color}` : 'bg-dropdownSelect';
77
+ }
78
+ }
79
+ };
80
+ </script>
@@ -1,153 +1,153 @@
1
- <template>
2
- <div
3
- v-if="person"
4
- class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-poolBox hover:border-bright"
5
- >
6
- <div class="hidden md:block mr-4 border-r border-dropdownSelect h-20 w-10 items-center text-center pt-7">
7
- <BaseText :text="queueLabel" size="md" color="quaternary" weight="bold" />
8
- </div>
9
- <div class="block md:hidden mr-4 border-r border-dropdownSelect h-16 w-5 items-center text-center pt-5">
10
- <BaseText :text="queueLabel" size="sm" color="quaternary" weight="bold" />
11
- </div>
12
-
13
- <div class="hidden md:block mr-4">
14
- <div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
15
- <BaseText text="" size="sm" color="neutral" weight="bold" />
16
- </div>
17
- <img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-14 h-14 rounded-xl" />
18
- </div>
19
-
20
- <div class="flex flex-col w-3/4 md:w-4/12 justify-start">
21
- <div class="flex items-center justify-start gap-2 min-w-0">
22
- <button class="min-w-0 text-left" type="button" @click="handleForwardToProfile">
23
- <BaseText
24
- :text="displayName"
25
- size="md"
26
- color="quaternary"
27
- weight="bold"
28
- class="text-sm md:text-xl truncate"
29
- />
30
- </button>
31
- <MissingHemaRatingsId :person="person.Person" />
32
- </div>
33
- <span class="w-full flex justify-start">
34
- <BaseText :text="clubName" size="md" color="quinary" weight="normal" class="hidden md:block" />
35
- <BaseText :text="clubShortName" size="xs" color="quinary" weight="normal" class="block md:hidden" />
36
- </span>
37
-
38
- <div class="grid md:hidden grid-cols-2 gap-x-4 mr-10">
39
- <div class="flex">
40
- <BaseText text="M2: " size="xs" color="quaternary" weight="normal" class="mr-1" />
41
- <BaseText :text="M2Rating" size="xs" color="quinary" weight="bold" class="ml-1" />
42
- </div>
43
- <div class="flex">
44
- <BaseText text="HR: " size="xs" color="quaternary" weight="normal" class="mr-1" />
45
- <BaseText :text="HEMARating" size="xs" color="quinary" weight="bold" class="ml-1" />
46
- </div>
47
- </div>
48
- </div>
49
-
50
- <div class="hidden md:grid grid-cols-1 gap-x-4 mr-4 w-36">
51
- <div class="flex">
52
- <BaseText text="M2Rating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
53
- <BaseText :text="M2Rating" size="sm" color="quinary" weight="bold" class="pt-0.5" />
54
- </div>
55
- <div class="flex">
56
- <BaseText text="HemaRating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
57
- <BaseText :text="HEMARating" size="sm" color="quinary" weight="bold" />
58
- </div>
59
- </div>
60
-
61
- <div class="mr-2 md:mr-4 md:ml-auto flex flex-row">
62
- <div class="flex justify-center w-20">
63
- <div class="hidden md:flex border border-dropdownSelect shadow-md rounded-lg bg-natural h-9 px-3 items-center">
64
- <BaseText text="Unpaid" size="xs" color="quinary" weight="bold" />
65
- </div>
66
- </div>
67
- <div class="w-44 flex justify-end">
68
- <BaseButton
69
- label="Move to Active"
70
- size="xs"
71
- type="primary"
72
- icon-name="fa-arrow-up-from-bracket"
73
- class="border border-dropdownSelect shadow-md rounded-l-lg bg-natural w-40 m-0! p-0! h-10"
74
- @buttonClick="handleMoveToActive"
75
- />
76
- </div>
77
- </div>
78
-
79
- <div
80
- class="block md:ml-4 border-l border-dropdownSelect h-16 w-9 md:h-20 md:w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg pt-5 md:pt-6"
81
- >
82
- <BaseIcon
83
- icon-name="fa-circle-xmark"
84
- size=""
85
- color="quinary"
86
- hover="alarm"
87
- @click="handleRemoveFencer"
88
- class="text-md md:text-2xl"
89
- />
90
- </div>
91
- </div>
92
- </template>
93
-
94
- <script>
95
- import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
96
- import BaseText from '../../../Atoms/Text/BaseText.vue';
97
- import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
98
- import MissingHemaRatingsId from '../../../Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue';
99
-
100
- export default {
101
- name: 'WaitlistFencerCard',
102
- components: { BaseButton, BaseIcon, BaseText, MissingHemaRatingsId },
103
- emits: ['forward:toProfile', 'move:active', 'remove:fencer'],
104
- props: {
105
- person: {
106
- type: Object,
107
- required: true
108
- },
109
- queuePosition: {
110
- type: Number,
111
- required: true
112
- }
113
- },
114
- computed: {
115
- queueLabel() {
116
- return `#${this.queuePosition}`;
117
- },
118
- displayName() {
119
- return this.person?.Person?.DisplayName || 'Unknown fencer';
120
- },
121
- clubName() {
122
- return this.person?.Person?.Club?.Name || 'No club listed';
123
- },
124
- clubShortName() {
125
- return this.person?.Person?.Club?.ShortName || this.clubName;
126
- },
127
- portraitURL() {
128
- const images = this.person?.Person?.Images || [];
129
- const portrait = images.find(image => image.Type === 'Portrait');
130
- return portrait ? portrait.URL : '';
131
- },
132
- HEMARating() {
133
- const rating = this.person?.Person?.HEMARatings?.[0]?.Rating;
134
- return rating || 0;
135
- },
136
- M2Rating() {
137
- const rating = this.person?.Person?.M2Ratings?.[0]?.Rating;
138
- return rating || 'U';
139
- }
140
- },
141
- methods: {
142
- handleMoveToActive() {
143
- this.$emit('move:active', { ...this.person });
144
- },
145
- handleRemoveFencer() {
146
- this.$emit('remove:fencer', { ...this.person });
147
- },
148
- handleForwardToProfile() {
149
- this.$emit('forward:toProfile', this.person.PersonId);
150
- }
151
- }
152
- };
153
- </script>
1
+ <template>
2
+ <div
3
+ v-if="person"
4
+ class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-poolBox hover:border-bright"
5
+ >
6
+ <div class="hidden md:block mr-4 border-r border-dropdownSelect h-20 w-10 items-center text-center pt-7">
7
+ <BaseText :text="queueLabel" size="md" color="quaternary" weight="bold" />
8
+ </div>
9
+ <div class="block md:hidden mr-4 border-r border-dropdownSelect h-16 w-5 items-center text-center pt-5">
10
+ <BaseText :text="queueLabel" size="sm" color="quaternary" weight="bold" />
11
+ </div>
12
+
13
+ <div class="hidden md:block mr-4">
14
+ <div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
15
+ <BaseText text="" size="sm" color="neutral" weight="bold" />
16
+ </div>
17
+ <img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-14 h-14 rounded-xl" />
18
+ </div>
19
+
20
+ <div class="flex flex-col w-3/4 md:w-4/12 justify-start">
21
+ <div class="flex items-center justify-start gap-2 min-w-0">
22
+ <button class="min-w-0 text-left" type="button" @click="handleForwardToProfile">
23
+ <BaseText
24
+ :text="displayName"
25
+ size="md"
26
+ color="quaternary"
27
+ weight="bold"
28
+ class="text-sm md:text-xl truncate"
29
+ />
30
+ </button>
31
+ <MissingHemaRatingsId :person="person.Person" />
32
+ </div>
33
+ <span class="w-full flex justify-start">
34
+ <BaseText :text="clubName" size="md" color="quinary" weight="normal" class="hidden md:block" />
35
+ <BaseText :text="clubShortName" size="xs" color="quinary" weight="normal" class="block md:hidden" />
36
+ </span>
37
+
38
+ <div class="grid md:hidden grid-cols-2 gap-x-4 mr-10">
39
+ <div class="flex">
40
+ <BaseText text="M2: " size="xs" color="quaternary" weight="normal" class="mr-1" />
41
+ <BaseText :text="M2Rating" size="xs" color="quinary" weight="bold" class="ml-1" />
42
+ </div>
43
+ <div class="flex">
44
+ <BaseText text="HR: " size="xs" color="quaternary" weight="normal" class="mr-1" />
45
+ <BaseText :text="HEMARating" size="xs" color="quinary" weight="bold" class="ml-1" />
46
+ </div>
47
+ </div>
48
+ </div>
49
+
50
+ <div class="hidden md:grid grid-cols-1 gap-x-4 mr-4 w-36">
51
+ <div class="flex">
52
+ <BaseText text="M2Rating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
53
+ <BaseText :text="M2Rating" size="sm" color="quinary" weight="bold" class="pt-0.5" />
54
+ </div>
55
+ <div class="flex">
56
+ <BaseText text="HemaRating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
57
+ <BaseText :text="HEMARating" size="sm" color="quinary" weight="bold" />
58
+ </div>
59
+ </div>
60
+
61
+ <div class="mr-2 md:mr-4 md:ml-auto flex flex-row">
62
+ <div class="flex justify-center w-20">
63
+ <div class="hidden md:flex border border-dropdownSelect shadow-md rounded-lg bg-natural h-9 px-3 items-center">
64
+ <BaseText text="Unpaid" size="xs" color="quinary" weight="bold" />
65
+ </div>
66
+ </div>
67
+ <div class="w-44 flex justify-end">
68
+ <BaseButton
69
+ label="Move to Active"
70
+ size="xs"
71
+ type="primary"
72
+ icon-name="fa-arrow-up-from-bracket"
73
+ class="border border-dropdownSelect shadow-md rounded-l-lg bg-natural w-40 m-0! p-0! h-10"
74
+ @buttonClick="handleMoveToActive"
75
+ />
76
+ </div>
77
+ </div>
78
+
79
+ <div
80
+ class="block md:ml-4 border-l border-dropdownSelect h-16 w-9 md:h-20 md:w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg pt-5 md:pt-6"
81
+ >
82
+ <BaseIcon
83
+ icon-name="fa-circle-xmark"
84
+ size=""
85
+ color="quinary"
86
+ hover="alarm"
87
+ @click="handleRemoveFencer"
88
+ class="text-md md:text-2xl"
89
+ />
90
+ </div>
91
+ </div>
92
+ </template>
93
+
94
+ <script>
95
+ import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
96
+ import BaseText from '../../../Atoms/Text/BaseText.vue';
97
+ import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
98
+ import MissingHemaRatingsId from '../../../Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue';
99
+
100
+ export default {
101
+ name: 'WaitlistFencerCard',
102
+ components: { BaseButton, BaseIcon, BaseText, MissingHemaRatingsId },
103
+ emits: ['forward:toProfile', 'move:active', 'remove:fencer'],
104
+ props: {
105
+ person: {
106
+ type: Object,
107
+ required: true
108
+ },
109
+ queuePosition: {
110
+ type: Number,
111
+ required: true
112
+ }
113
+ },
114
+ computed: {
115
+ queueLabel() {
116
+ return `#${this.queuePosition}`;
117
+ },
118
+ displayName() {
119
+ return this.person?.Person?.DisplayName || 'Unknown fencer';
120
+ },
121
+ clubName() {
122
+ return this.person?.Person?.Club?.Name || 'No club listed';
123
+ },
124
+ clubShortName() {
125
+ return this.person?.Person?.Club?.ShortName || this.clubName;
126
+ },
127
+ portraitURL() {
128
+ const images = this.person?.Person?.Images || [];
129
+ const portrait = images.find(image => image.Type === 'Portrait');
130
+ return portrait ? portrait.URL : '';
131
+ },
132
+ HEMARating() {
133
+ const rating = this.person?.Person?.HEMARatings?.[0]?.Rating;
134
+ return rating || 0;
135
+ },
136
+ M2Rating() {
137
+ const rating = this.person?.Person?.M2Ratings?.[0]?.Rating;
138
+ return rating || 'U';
139
+ }
140
+ },
141
+ methods: {
142
+ handleMoveToActive() {
143
+ this.$emit('move:active', { ...this.person });
144
+ },
145
+ handleRemoveFencer() {
146
+ this.$emit('remove:fencer', { ...this.person });
147
+ },
148
+ handleForwardToProfile() {
149
+ this.$emit('forward:toProfile', this.person.PersonId);
150
+ }
151
+ }
152
+ };
153
+ </script>
@@ -90,6 +90,10 @@ export default {
90
90
  document.removeEventListener('click', this.handleClickOutside, true);
91
91
  },
92
92
  watch: {
93
+ selectedItem(newItem) {
94
+ this.localSelectedItem = newItem;
95
+ this.backupSelectedItem = { ...newItem };
96
+ },
93
97
  items(newItems) {
94
98
  this.localItems = newItems;
95
99
  }