@dcrackel/hematournamentui 1.0.706 → 1.0.707

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 (330) hide show
  1. package/.prettierignore +7 -1
  2. package/.storybook/main.js +5 -12
  3. package/.storybook/preview-head.html +10 -3
  4. package/.storybook/preview.js +5 -13
  5. package/AGENTS.md +31 -1
  6. package/README.md +29 -22
  7. package/dist/HemaTournamentUI-lib.es.js +7189 -7467
  8. package/dist/HemaTournamentUI-lib.umd.js +27 -27
  9. package/dist/hematournamentui-tailwind.css +0 -24
  10. package/dist/hematournamentui.css +1 -1
  11. package/eslint.config.js +49 -23
  12. package/package.json +6 -2
  13. package/postcss.config.js +3 -3
  14. package/prettier.config.js +16 -10
  15. package/src/config/boutScreenConfigurations.js +52 -50
  16. package/src/main.js +1 -1
  17. package/src/mocks/EventQuestionsMock.js +43 -55
  18. package/src/mocks/assignments.js +180 -181
  19. package/src/mocks/clubGetAllMock.js +8143 -8143
  20. package/src/mocks/eventMock.js +205 -205
  21. package/src/mocks/eventPersonGetInitalPoolAssignmentsLivePools.js +541 -542
  22. package/src/mocks/eventPersonGetInitalPoolAssignmentsPreparing.js +522 -523
  23. package/src/mocks/eventPersonGetInitialPoolAssignments.js +386 -387
  24. package/src/mocks/eventPersonGetInitialPoolAssignments2.js +2267 -2268
  25. package/src/mocks/eventPersonGetInitialStaff.js +94 -95
  26. package/src/mocks/eventPersonGetPoolAssignmentEvent.js +161 -162
  27. package/src/mocks/eventRules.js +87 -86
  28. package/src/mocks/eventpersonGetEventById.js +1737 -1737
  29. package/src/mocks/getAllClubs.js +8143 -8143
  30. package/src/mocks/getAllStaffByTournamentId.js +74 -75
  31. package/src/mocks/getAllWeapons.js +81 -82
  32. package/src/mocks/getAttendance.js +43 -44
  33. package/src/mocks/getClub.js +43 -44
  34. package/src/mocks/getClubDisplayByClubId.js +104 -105
  35. package/src/mocks/getDEBouts-128Fencers.js +3247 -3248
  36. package/src/mocks/getDEBouts-42Fencers.js +3736 -3737
  37. package/src/mocks/getDEBouts-67Fencers.js +6684 -6690
  38. package/src/mocks/getDEBouts-DoubleElim.js +4198 -4199
  39. package/src/mocks/getDEWithBouts.js +628 -629
  40. package/src/mocks/getDeBouts-12fencers.js +1255 -1256
  41. package/src/mocks/getDeBouts-15fencers.js +925 -927
  42. package/src/mocks/getDeBouts-22fencers.js +1683 -1685
  43. package/src/mocks/getDeBouts-6fencers.js +818 -818
  44. package/src/mocks/getEventByTournamentId.js +47 -48
  45. package/src/mocks/getFinalEventResult.js +304 -305
  46. package/src/mocks/getPenaltiesByEvent.js +655 -656
  47. package/src/mocks/getPoolResults.js +1533 -1534
  48. package/src/mocks/getPoolsWithBouts.js +662 -663
  49. package/src/mocks/getPoolsWithBouts6PoolId139.js +885 -886
  50. package/src/mocks/getPoolsWithBoutsByPoolId.js +841 -841
  51. package/src/mocks/getPoolsWithBoutsClubColors.js +4 -4
  52. package/src/mocks/getPoolsWithBoutsComplete.js +919 -921
  53. package/src/mocks/locationMock.js +3213 -3214
  54. package/src/mocks/mockRoutes.js +3 -3
  55. package/src/mocks/personGetAllMock.js +2536 -2537
  56. package/src/mocks/personsMock.js +17569 -17570
  57. package/src/mocks/singleEventMock.js +249 -250
  58. package/src/mocks/tournamentMock.js +1988 -1927
  59. package/src/stories/Atoms/CheckBox/BaseCheckbox.stories.js +25 -23
  60. package/src/stories/Atoms/CheckBox/BaseCheckbox.vue +30 -24
  61. package/src/stories/Atoms/Icon/BaseIcon.stories.js +63 -64
  62. package/src/stories/Atoms/Icon/BaseIcon.test.js +67 -69
  63. package/src/stories/Atoms/Icon/BaseIcon.vue +2 -3
  64. package/src/stories/Atoms/Input/BaseInput.stories.js +18 -18
  65. package/src/stories/Atoms/Input/BaseInput.test.js +65 -67
  66. package/src/stories/Atoms/Input/BaseInput.vue +36 -31
  67. package/src/stories/Atoms/RadioGroup/BaseRadioGroup.stories.js +21 -21
  68. package/src/stories/Atoms/RadioGroup/BaseRadioGroup.test.js +31 -31
  69. package/src/stories/Atoms/RadioGroup/BaseRadioGroup.vue +23 -18
  70. package/src/stories/Atoms/Tag/BaseTag.stories.js +21 -21
  71. package/src/stories/Atoms/Tag/BaseTag.test.js +26 -30
  72. package/src/stories/Atoms/Tag/BaseTag.vue +18 -19
  73. package/src/stories/Atoms/Text/BaseText.stories.js +54 -62
  74. package/src/stories/Atoms/Text/BaseText.test.js +152 -154
  75. package/src/stories/Atoms/Text/BaseText.vue +103 -81
  76. package/src/stories/Configure.mdx +5 -3
  77. package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.stories.js +24 -24
  78. package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.vue +33 -15
  79. package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.stories.js +46 -48
  80. package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.vue +38 -25
  81. package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.stories.js +4 -4
  82. package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.vue +9 -4
  83. package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.stories.js +90 -90
  84. package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.vue +51 -32
  85. package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.stories.js +25 -25
  86. package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +47 -12
  87. package/src/stories/Molecules/Boxes/CounterBox/CounterBox.stories.js +19 -19
  88. package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +25 -19
  89. package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.stories.js +25 -28
  90. package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.vue +7 -7
  91. package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.stories.js +28 -29
  92. package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.test.js +58 -58
  93. package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.vue +15 -15
  94. package/src/stories/Molecules/Buttons/BaseButton/BaseButton.stories.js +86 -86
  95. package/src/stories/Molecules/Buttons/BaseButton/BaseButton.test.js +101 -103
  96. package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +87 -24
  97. package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +31 -31
  98. package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +19 -21
  99. package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.stories.js +57 -57
  100. package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.test.js +64 -64
  101. package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.vue +17 -16
  102. package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.stories.js +19 -19
  103. package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue +18 -7
  104. package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.stories.js +16 -18
  105. package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue +31 -13
  106. package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.stories.js +27 -27
  107. package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.vue +6 -5
  108. package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.stories.js +35 -35
  109. package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.vue +13 -8
  110. package/src/stories/Molecules/Inputs/Toggle/Toggle.stories.js +27 -27
  111. package/src/stories/Molecules/Inputs/Toggle/Toggle.vue +8 -5
  112. package/src/stories/Molecules/Menus/TabBar/TabBar.stories.js +18 -18
  113. package/src/stories/Molecules/Menus/TabBar/TabBar.vue +1 -2
  114. package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplay.stories.js +36 -27
  115. package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplayModal.vue +25 -15
  116. package/src/stories/Molecules/Modals/BaseModal/BaseModal.stories.js +66 -65
  117. package/src/stories/Molecules/Modals/BaseModal/BaseModal.vue +47 -9
  118. package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.stories.js +23 -23
  119. package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.vue +59 -11
  120. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +37 -37
  121. package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +27 -22
  122. package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.stories.js +41 -41
  123. package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +27 -15
  124. package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.stories.js +29 -30
  125. package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.vue +18 -16
  126. package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.stories.js +21 -21
  127. package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.vue +7 -7
  128. package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.stories.js +24 -24
  129. package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.vue +30 -25
  130. package/src/stories/Molecules/Reorder/ReorderableShell.stories.js +81 -77
  131. package/src/stories/Molecules/Reorder/ReorderableShell.vue +46 -43
  132. package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.stories.js +40 -40
  133. package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue +23 -25
  134. package/src/stories/Organisms/Cards/BoutCard/BoutCard.stories.js +34 -29
  135. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +69 -66
  136. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.stories.js +24 -22
  137. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +53 -41
  138. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.stories.js +24 -37
  139. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +88 -103
  140. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardReorder/BoutCardReorder.vue +13 -14
  141. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.stories.js +5 -5
  142. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.vue +22 -21
  143. package/src/stories/Organisms/Cards/ClubCard/ClubCard.stories.js +14 -17
  144. package/src/stories/Organisms/Cards/ClubCard/ClubCard.vue +25 -18
  145. package/src/stories/Organisms/Cards/Director/DirectorCard.stories.js +23 -23
  146. package/src/stories/Organisms/Cards/Director/DirectorCard.vue +159 -103
  147. package/src/stories/Organisms/Cards/EditBout/EditBout.stories.js +47 -47
  148. package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -0
  149. package/src/stories/Organisms/Cards/EditBout/EditBout.vue +82 -54
  150. package/src/stories/Organisms/Cards/EventCard/EventCard.stories.js +9 -10
  151. package/src/stories/Organisms/Cards/EventCard/EventCard.vue +83 -63
  152. package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +105 -105
  153. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +142 -58
  154. package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.stories.js +14 -14
  155. package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.vue +37 -26
  156. package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResults.stories.js +24 -24
  157. package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue +95 -28
  158. package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.stories.js +59 -60
  159. package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.vue +13 -7
  160. package/src/stories/Organisms/Cards/KioskCard/KioskCard.stories.js +34 -34
  161. package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +149 -104
  162. package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.stories.js +19 -20
  163. package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +207 -163
  164. package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.stories.js +17 -17
  165. package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.vue +88 -46
  166. package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.stories.js +182 -182
  167. package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.vue +21 -12
  168. package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.stories.js +25 -28
  169. package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.vue +28 -22
  170. package/src/stories/Organisms/Cards/StaffCard/StaffCard.stories.js +62 -62
  171. package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +27 -22
  172. package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +103 -103
  173. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +73 -73
  174. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +44 -0
  175. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +69 -56
  176. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +80 -81
  177. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +39 -22
  178. package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdmin.stories.js +20 -20
  179. package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdminCard.vue +62 -33
  180. package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +44 -30
  181. package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.stories.js +6 -7
  182. package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue +7 -8
  183. package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.stories.js +31 -31
  184. package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.vue +30 -35
  185. package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.stories.js +13 -16
  186. package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +68 -70
  187. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.stories.js +32 -34
  188. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +48 -25
  189. package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.stories.js +21 -21
  190. package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.vue +65 -38
  191. package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.stories.js +19 -20
  192. package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.vue +46 -21
  193. package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.stories.js +22 -22
  194. package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.vue +68 -23
  195. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +13 -13
  196. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +25 -24
  197. package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.stories.js +6 -10
  198. package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.vue +112 -48
  199. package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.stories.js +43 -44
  200. package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.vue +30 -23
  201. package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.stories.js +20 -20
  202. package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.vue +12 -12
  203. package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.stories.js +24 -25
  204. package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.vue +112 -87
  205. package/src/stories/Organisms/Containers/Pool/Pool.stories.js +54 -54
  206. package/src/stories/Organisms/Containers/Pool/Pool.vue +64 -41
  207. package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.stories.js +17 -19
  208. package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.vue +189 -135
  209. package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.stories.js +53 -54
  210. package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +107 -73
  211. package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +23 -24
  212. package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +49 -10
  213. package/src/stories/Organisms/Containers/Tableau/Tableau.vue +96 -173
  214. package/src/stories/Organisms/Containers/TableauColumn/TabeauColumn.stories.js +26 -27
  215. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +20 -17
  216. package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +153 -103
  217. package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +13 -15
  218. package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +7 -8
  219. package/src/stories/Organisms/Form/AddDisplay/AddDisplay.stories.js +26 -26
  220. package/src/stories/Organisms/Form/AddDisplay/AddDisplay.vue +130 -118
  221. package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.stories.js +14 -15
  222. package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.vue +94 -88
  223. package/src/stories/Organisms/Grids/GridContainer.stories.js +101 -101
  224. package/src/stories/Organisms/Grids/GridContainer.vue +160 -136
  225. package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.stories.js +47 -47
  226. package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.vue +65 -54
  227. package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.stories.js +27 -27
  228. package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.vue +38 -22
  229. package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.stories.js +80 -80
  230. package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.vue +14 -6
  231. package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.stories.js +34 -34
  232. package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +36 -36
  233. package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.stories.js +21 -21
  234. package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.vue +56 -29
  235. package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.stories.js +38 -38
  236. package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.vue +19 -20
  237. package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.stories.js +12 -13
  238. package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.vue +47 -41
  239. package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.stories.js +12 -13
  240. package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.vue +66 -37
  241. package/src/stories/Organisms/Skeletons/ClubManagement/ClubManagement.stories.js +6 -10
  242. package/src/stories/Organisms/Skeletons/ClubManagement/ClubMangementSkeleton.vue +2 -2
  243. package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.stories.js +6 -10
  244. package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.vue +2 -3
  245. package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.stories.js +6 -10
  246. package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.vue +1 -1
  247. package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.stories.js +6 -9
  248. package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.vue +2 -2
  249. package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.stories.js +6 -10
  250. package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.vue +10 -4
  251. package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.stories.js +6 -10
  252. package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.vue +2 -2
  253. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +34 -34
  254. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +106 -56
  255. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.stories.js +95 -95
  256. package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +129 -69
  257. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.stories.js +87 -88
  258. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +105 -60
  259. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +82 -82
  260. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +150 -177
  261. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.stories.js +28 -28
  262. package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +96 -36
  263. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.stories.js +99 -99
  264. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +115 -67
  265. package/src/stories/Templates/Assignment/Assignment.stories.js +22 -23
  266. package/src/stories/Templates/Assignment/Assignment.vue +210 -161
  267. package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.stories.js +90 -90
  268. package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.vue +68 -55
  269. package/src/stories/Templates/ClubManagement/ClubManagement.stories.js +87 -87
  270. package/src/stories/Templates/ClubManagement/ClubManagement.vue +167 -147
  271. package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +82 -103
  272. package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +88 -43
  273. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +167 -200
  274. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +49 -50
  275. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +21 -21
  276. package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +105 -103
  277. package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +289 -226
  278. package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js +30 -30
  279. package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +27 -22
  280. package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.stories.js +44 -45
  281. package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.vue +52 -43
  282. package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.stories.js +28 -29
  283. package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.vue +54 -39
  284. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +80 -111
  285. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -0
  286. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +290 -255
  287. package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +109 -107
  288. package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +144 -87
  289. package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +56 -57
  290. package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +132 -123
  291. package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +56 -57
  292. package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +84 -47
  293. package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +29 -29
  294. package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +71 -67
  295. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +39 -40
  296. package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +79 -71
  297. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +47 -47
  298. package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +39 -42
  299. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +54 -54
  300. package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +27 -31
  301. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +69 -69
  302. package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +78 -89
  303. package/src/stories/Templates/PersonManagement/Attendance/Attendance.stories.js +22 -22
  304. package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +61 -33
  305. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.stories.js +29 -29
  306. package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +80 -53
  307. package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +84 -86
  308. package/src/stories/Templates/PersonManagement/PersonManagement.vue +107 -82
  309. package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +31 -31
  310. package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +70 -51
  311. package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +79 -79
  312. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +275 -230
  313. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +113 -113
  314. package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +175 -146
  315. package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.stories.js +77 -77
  316. package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.vue +208 -185
  317. package/src/stories/Util/Validations/AddNewPersonModalValidation.js +23 -19
  318. package/src/stories/Util/Validations/ClubManagementValidations.js +17 -21
  319. package/src/stories/Util/Validations/PersonManagementValidations.js +26 -22
  320. package/src/stories/Util/Validations/TournamentFieldsValidations.js +20 -18
  321. package/src/stories/Util/seeding.js +131 -131
  322. package/src/stories/Util/tabs.js +75 -75
  323. package/tailwind/tailwind.css +5 -7
  324. package/tailwind.config.js +12 -15
  325. package/vite.config.js +3 -3
  326. package/src/mocks/getDirectors.js +0 -18
  327. package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.stories.js +0 -45
  328. package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.vue +0 -111
  329. package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.stories.js +0 -45
  330. package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.vue +0 -83
@@ -2,97 +2,97 @@ import TableauBoutCard from './TableauBoutCard.vue';
2
2
  import getDEWithBouts from '../../../../mocks/getDEWithBouts.js';
3
3
 
4
4
  export default {
5
- title: 'Organisms/Cards/TableauBoutCard',
6
- component: TableauBoutCard,
7
- tags: ['autodocs'],
8
- args: {
9
- bout: getDEWithBouts.pools[0].Bouts[0],
10
- hostingClubColors: getDEWithBouts.hostingClubColors,
11
- large: true,
12
- roundName: getDEWithBouts.pools[0].Bouts[0].RoundLabel,
13
- bracketSize: 'Table of 8',
14
- highLight: false
5
+ title: 'Organisms/Cards/TableauBoutCard',
6
+ component: TableauBoutCard,
7
+ tags: ['autodocs'],
8
+ args: {
9
+ bout: getDEWithBouts.pools[0].Bouts[0],
10
+ hostingClubColors: getDEWithBouts.hostingClubColors,
11
+ large: true,
12
+ roundName: getDEWithBouts.pools[0].Bouts[0].RoundLabel,
13
+ bracketSize: 'Table of 8',
14
+ highLight: false
15
+ },
16
+ argTypes: {
17
+ bout: {
18
+ control: 'object',
19
+ description: 'Bout object containing fencers and scores'
15
20
  },
16
- argTypes: {
17
- bout: {
18
- control: 'object',
19
- description: 'Bout object containing fencers and scores'
20
- },
21
- hostingClubColors: {
22
- control: 'object',
23
- description: 'Colors for hosting club'
24
- },
25
- large: {
26
- control: 'boolean',
27
- description: 'Size of the card'
28
- },
29
- roundName: {
30
- control: 'text',
31
- description: 'Name of the round'
32
- },
33
- bracketSize: {
34
- control: 'text',
35
- description: 'Size of the bracket'
36
- },
37
- highLight: {
38
- control: 'boolean',
39
- description: 'Card is highlighed'
40
- }
21
+ hostingClubColors: {
22
+ control: 'object',
23
+ description: 'Colors for hosting club'
24
+ },
25
+ large: {
26
+ control: 'boolean',
27
+ description: 'Size of the card'
28
+ },
29
+ roundName: {
30
+ control: 'text',
31
+ description: 'Name of the round'
32
+ },
33
+ bracketSize: {
34
+ control: 'text',
35
+ description: 'Size of the bracket'
36
+ },
37
+ highLight: {
38
+ control: 'boolean',
39
+ description: 'Card is highlighed'
41
40
  }
41
+ }
42
42
  };
43
43
 
44
44
  export const Default = {
45
- args: {
46
- bout: getDEWithBouts.pools[0].Bouts[2],
47
- hostingClubColors: getDEWithBouts.hostingClubColors,
48
- large: true,
49
- roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
50
- bracketSize: 'Table of 8',
51
- highLight: false
52
- }
45
+ args: {
46
+ bout: getDEWithBouts.pools[0].Bouts[2],
47
+ hostingClubColors: getDEWithBouts.hostingClubColors,
48
+ large: true,
49
+ roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
50
+ bracketSize: 'Table of 8',
51
+ highLight: false
52
+ }
53
53
  };
54
54
 
55
55
  let modifiedBout = { ...getDEWithBouts.pools[0].Bouts[2], Status: 'Active' };
56
56
  export const ActiveBout = {
57
- args: {
58
- bout: modifiedBout,
59
- hostingClubColors: getDEWithBouts.hostingClubColors,
60
- large: true,
61
- roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
62
- bracketSize: 'Table of 8',
63
- highLight: false
64
- }
57
+ args: {
58
+ bout: modifiedBout,
59
+ hostingClubColors: getDEWithBouts.hostingClubColors,
60
+ large: true,
61
+ roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
62
+ bracketSize: 'Table of 8',
63
+ highLight: false
64
+ }
65
65
  };
66
66
 
67
67
  export const smallCardBout = {
68
- args: {
69
- bout: getDEWithBouts.pools[0].Bouts[1],
70
- hostingClubColors: getDEWithBouts.hostingClubColors,
71
- large: false,
72
- roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
73
- bracketSize: 'Table of 8',
74
- highLight: false
75
- }
68
+ args: {
69
+ bout: getDEWithBouts.pools[0].Bouts[1],
70
+ hostingClubColors: getDEWithBouts.hostingClubColors,
71
+ large: false,
72
+ roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
73
+ bracketSize: 'Table of 8',
74
+ highLight: false
75
+ }
76
76
  };
77
77
 
78
78
  modifiedBout = { ...getDEWithBouts.pools[0].Bouts[2], Status: 'Completed' };
79
79
  export const CompletedBout = {
80
- args: {
81
- bout: modifiedBout,
82
- large: true,
83
- roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
84
- highLight: false
85
- }
80
+ args: {
81
+ bout: modifiedBout,
82
+ large: true,
83
+ roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
84
+ highLight: false
85
+ }
86
86
  };
87
87
 
88
88
  modifiedBout = { ...getDEWithBouts.pools[0].Bouts[0], Status: 'Completed' };
89
89
  export const ByeBout = {
90
- args: {
91
- bout: modifiedBout,
92
- hostingClubColors: getDEWithBouts.hostingClubColors,
93
- large: false,
94
- roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
95
- bracketSize: 'Table of 8',
96
- highLight: false
97
- }
90
+ args: {
91
+ bout: modifiedBout,
92
+ hostingClubColors: getDEWithBouts.hostingClubColors,
93
+ large: false,
94
+ roundName: getDEWithBouts.pools[0].Bouts[1].RoundLabel,
95
+ bracketSize: 'Table of 8',
96
+ highLight: false
97
+ }
98
98
  };
@@ -0,0 +1,44 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import { describe, expect, it } from 'vitest';
3
+ import TableauBoutCard from './TableauBoutCard.vue';
4
+
5
+ const createBout = status => ({
6
+ BoutId: 42,
7
+ Status: status,
8
+ Score1: 4,
9
+ Score2: 3,
10
+ Person1: { PersonId: 1, DisplayName: 'Fencer One', EventPersons: [] },
11
+ Person2: { PersonId: 2, DisplayName: 'Fencer Two', EventPersons: [] }
12
+ });
13
+
14
+ const mountCard = bout =>
15
+ shallowMount(TableauBoutCard, {
16
+ props: {
17
+ bout,
18
+ hostingClubColors: {},
19
+ roundName: 'Final',
20
+ bracketSize: 'Final'
21
+ }
22
+ });
23
+
24
+ describe('TableauBoutCard selection', () => {
25
+ it('emits directing intent for a scheduled bout', async () => {
26
+ const bout = createBout('Scheduled');
27
+ const wrapper = mountCard(bout);
28
+
29
+ await wrapper.find('section section').trigger('click');
30
+
31
+ expect(wrapper.emitted('action:directingBout')).toEqual([[bout]]);
32
+ expect(wrapper.emitted('action:editBout')).toBeUndefined();
33
+ });
34
+
35
+ it('emits editing intent for a completed bout', async () => {
36
+ const bout = createBout('Completed');
37
+ const wrapper = mountCard(bout);
38
+
39
+ await wrapper.find('section section').trigger('click');
40
+
41
+ expect(wrapper.emitted('action:editBout')).toEqual([[bout]]);
42
+ expect(wrapper.emitted('action:directingBout')).toBeUndefined();
43
+ });
44
+ });
@@ -1,18 +1,22 @@
1
1
  <template>
2
2
  <section :class="getTopSpace">
3
- <div v-if="roundName === 'Third Place'" class="flex justify-center border-b mb-4 mt-8" :class="large ? 'w-72': 'w-40'">
4
- <BaseText :text="roundName" size="sm" color="quaternary"/>
3
+ <div
4
+ v-if="roundName === 'Third Place'"
5
+ class="flex justify-center border-b mb-4 mt-8"
6
+ :class="large ? 'w-72' : 'w-40'"
7
+ >
8
+ <BaseText :text="roundName" size="sm" color="quaternary" />
5
9
  </div>
6
- <div v-if="roundName === 'Final'" class="flex justify-center border-b mb-4 mt-0" :class="large ? 'w-72': 'w-40'">
7
- <BaseText :text="roundName" size="sm" color="quaternary"/>
10
+ <div v-if="roundName === 'Final'" class="flex justify-center border-b mb-4 mt-0" :class="large ? 'w-72' : 'w-40'">
11
+ <BaseText :text="roundName" size="sm" color="quaternary" />
8
12
  </div>
9
- <div v-if="showGrandFinal" class="flex justify-center border-b mb-4 mt-0" :class="large ? 'w-72': 'w-40'">
10
- <BaseText :text="roundName" size="sm" color="quaternary"/>
13
+ <div v-if="showGrandFinal" class="flex justify-center border-b mb-4 mt-0" :class="large ? 'w-72' : 'w-40'">
14
+ <BaseText :text="roundName" size="sm" color="quaternary" />
11
15
  </div>
12
16
  <!-- Replacement headers for finals -->
13
17
  <div v-if="roundName !== 'Grand Final' || showGrandFinal">
14
- <section @click="handleBoutClick(bout)" >
15
- <TableauFencerCard
18
+ <section @click="handleBoutClick(bout)">
19
+ <TableauFencerCard
16
20
  :fencer="person1Display"
17
21
  :score="score1"
18
22
  :position="dePosition1"
@@ -23,13 +27,13 @@
23
27
  :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
24
28
  :faded="shouldFade(bout, true)"
25
29
  @action:highLight="handleHighlight"
26
- />
27
- </section>
28
- <!-- Card break -->
29
- <div :class="getCardSpace"></div>
30
- <!-- Card break -->
31
- <section @click="handleBoutClick(bout)">
32
- <TableauFencerCard
30
+ />
31
+ </section>
32
+ <!-- Card break -->
33
+ <div :class="getCardSpace"></div>
34
+ <!-- Card break -->
35
+ <section @click="handleBoutClick(bout)">
36
+ <TableauFencerCard
33
37
  :fencer="person2Display"
34
38
  :score="score2"
35
39
  :position="dePosition2"
@@ -40,17 +44,47 @@
40
44
  :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
41
45
  :faded="shouldFade(bout, false)"
42
46
  @action:highLight="handleHighlight"
43
- />
44
- </section>
47
+ />
48
+ </section>
45
49
  </div>
46
50
  </section>
47
51
  </template>
48
52
 
49
53
  <script>
50
- import BaseText from "../../../Atoms/Text/BaseText.vue";
54
+ import BaseText from '../../../Atoms/Text/BaseText.vue';
51
55
  import TableauFencerCard from '../TableauFencerCard/TableauFencerCard.vue';
52
56
  import { spacingConfig } from './SpacingConfig';
53
57
 
58
+ const scoreColorRulesByFencer = {
59
+ true: [
60
+ {
61
+ matches: bout => bout.Person1.DisplayName !== 'BYE' && bout.Person2.DisplayName === 'BYE',
62
+ color: 'bg-winGreen'
63
+ },
64
+ { matches: bout => bout.Score1 > bout.Score2, color: 'bg-winGreen' },
65
+ {
66
+ matches: bout => bout.Score1 < bout.Score2 && bout.Status === 'Active',
67
+ color: 'bg-lossRed'
68
+ }
69
+ ],
70
+ false: [
71
+ {
72
+ matches: bout => bout.Person2.DisplayName !== 'BYE' && bout.Person1.DisplayName === 'BYE',
73
+ color: 'bg-winGreen'
74
+ },
75
+ { matches: bout => bout.Score2 > bout.Score1, color: 'bg-winGreen' },
76
+ {
77
+ matches: bout => bout.Score2 < bout.Score1 && bout.Status === 'Active',
78
+ color: 'bg-lossRed'
79
+ }
80
+ ]
81
+ };
82
+
83
+ const getMatchingScoreColor = (bout, isPerson1) => {
84
+ const matchingRule = scoreColorRulesByFencer[String(isPerson1)].find(rule => rule.matches(bout));
85
+ return matchingRule?.color || 'bg-dropdownSelect';
86
+ };
87
+
54
88
  export default {
55
89
  name: 'TableauBoutCard',
56
90
  emits: ['action:directingBout', 'action:editBout'],
@@ -110,55 +144,32 @@ export default {
110
144
  handleBoutClick(bout) {
111
145
  if (bout.Status === 'Completed') {
112
146
  this.$emit('action:editBout', bout);
113
- } else {
114
- this.$emit('action:directingBout', bout);
147
+ return;
115
148
  }
149
+ this.$emit('action:directingBout', bout);
116
150
  },
117
151
  getScoreColor(isPerson1) {
118
- if (isPerson1) {
119
- if (this.bout.Person2.DisplayName === 'BYE' && !((this.bout.Person1.DisplayName === 'BYE') && (this.bout.Person2.DisplayName === 'BYE'))) return 'bg-winGreen'
120
-
121
- if (this.bout.Score1 > this.bout.Score2) {
122
- return 'bg-winGreen';
123
- }
124
-
125
- if (this.bout.Score1 < this.bout.Score2 && this.bout.Status === 'Active') {
126
- return 'bg-lossRed';
127
- }
128
- }
129
-
130
- if (!isPerson1) {
131
- if (this.bout.Person1.DisplayName === 'BYE' && !((this.bout.Person1.DisplayName === 'BYE') && (this.bout.Person2.DisplayName === 'BYE'))) return 'bg-winGreen'
132
-
133
- if (this.bout.Score1 < this.bout.Score2) {
134
- return 'bg-winGreen';
135
- }
136
-
137
- if (this.bout.Score1 > this.bout.Score2 && this.bout.Status === 'Active') {
138
- return 'bg-lossRed';
139
- }
140
- }
141
- return 'bg-dropdownSelect';
152
+ return getMatchingScoreColor(this.bout, isPerson1);
142
153
  },
143
154
  handleHighlight(value) {
144
155
  if (this.bout.Person1.DisplayName.length < 1 || this.bout.Person2.DisplayName.length < 1) return;
145
156
  if (this.bout.Person1.DisplayName === 'BYE' || this.bout.Person2.DisplayName === 'BYE') return;
146
157
  this.highlight = value;
147
158
  },
148
- shouldFade(bout, person1){
149
- if (this.bout.Person1.DisplayName === 'BYE' && this.bout.Person2.DisplayName === 'BYE') return false;
159
+ shouldFade(bout, person1) {
160
+ if (this.bout.Person1.DisplayName === 'BYE' && this.bout.Person2.DisplayName === 'BYE') return false;
150
161
 
151
- if (person1) {
152
- if (bout.Person1.DisplayName === 'BYE') return true;
153
- if (parseInt(bout.Score1) < parseInt(bout.Score2)) return true;
154
- }
162
+ if (person1) {
163
+ if (bout.Person1.DisplayName === 'BYE') return true;
164
+ if (parseInt(bout.Score1) < parseInt(bout.Score2)) return true;
165
+ }
155
166
 
156
167
  if (!person1) {
157
168
  if (bout.Person2.DisplayName === 'BYE') return true;
158
169
  if (parseInt(bout.Score2) < parseInt(bout.Score1)) return true;
159
170
  }
160
171
 
161
- return false
172
+ return false;
162
173
  }
163
174
  },
164
175
  computed: {
@@ -181,21 +192,23 @@ export default {
181
192
  return this.currentConfig?.getCardSpace || '';
182
193
  },
183
194
  person1Display() {
184
- if (this.bout.Status === "Scheduled" && this.bout.Person1.DisplayName === 'BYE') {
195
+ if (this.bout.Status === 'Scheduled' && this.bout.Person1.DisplayName === 'BYE') {
185
196
  return { ...this.bout.Person1, DisplayName: '', Club: { Name: '' } };
186
197
  }
187
198
  return this.bout.Person1;
188
199
  },
189
200
  person2Display() {
190
- if (this.bout.Status === "Scheduled" && this.bout.Person2.DisplayName === 'BYE') {
201
+ if (this.bout.Status === 'Scheduled' && this.bout.Person2.DisplayName === 'BYE') {
191
202
  return { ...this.bout.Person2, DisplayName: '', Club: { Name: '' } };
192
203
  }
193
204
  return this.bout.Person2;
194
205
  },
195
206
  showGrandFinal() {
196
- return this.roundName === 'Grand Final' &&
197
- this.bout.Person1.DisplayName !== 'BYE' &&
198
- this.bout.Person2.DisplayName !== 'BYE';
207
+ return (
208
+ this.roundName === 'Grand Final' &&
209
+ this.bout.Person1.DisplayName !== 'BYE' &&
210
+ this.bout.Person2.DisplayName !== 'BYE'
211
+ );
199
212
  }
200
213
  }
201
214
  };
@@ -1,93 +1,92 @@
1
1
  import TableauFencerCard from './TableauFencerCard.vue';
2
2
 
3
-
4
3
  export default {
5
- title: 'Organisms/Cards/TableauFencerCard',
6
- component: TableauFencerCard,
7
- args: {
8
- fencer: {
9
- DisplayName: 'John Doe',
10
- Club: {
11
- Name: 'Fencing Club'
12
- },
13
- Images: [
14
- {
15
- URL: 'https://randomuser.me/api/portraits/men/91.jpg'
16
- }
17
- ]
18
- },
19
- score: '15',
20
- position: '1',
21
- color: 'blue',
22
- scoreColor: 'bg-winGreen',
23
- large: true
24
- },
25
- argTypes: {
26
- fencer: {
27
- control: 'object',
28
- description: 'Object containing fencer details including name, club, and images'
29
- },
30
- score: {
31
- control: 'text',
32
- description: 'Score of the fencer'
33
- },
34
- position: {
35
- control: 'text',
36
- description: 'Position of the fencer in the bracket'
37
- },
38
- color: {
39
- control: 'color',
40
- description: 'Color for the position background'
41
- },
42
- scoreColor: {
43
- control: 'color',
44
- description: 'Color for the score background'
45
- },
46
- large: {
47
- control: 'boolean',
48
- description: 'Boolean to determine the size of the card'
4
+ title: 'Organisms/Cards/TableauFencerCard',
5
+ component: TableauFencerCard,
6
+ args: {
7
+ fencer: {
8
+ DisplayName: 'John Doe',
9
+ Club: {
10
+ Name: 'Fencing Club'
11
+ },
12
+ Images: [
13
+ {
14
+ URL: 'https://randomuser.me/api/portraits/men/91.jpg'
49
15
  }
16
+ ]
17
+ },
18
+ score: '15',
19
+ position: '1',
20
+ color: 'blue',
21
+ scoreColor: 'bg-winGreen',
22
+ large: true
23
+ },
24
+ argTypes: {
25
+ fencer: {
26
+ control: 'object',
27
+ description: 'Object containing fencer details including name, club, and images'
28
+ },
29
+ score: {
30
+ control: 'text',
31
+ description: 'Score of the fencer'
32
+ },
33
+ position: {
34
+ control: 'text',
35
+ description: 'Position of the fencer in the bracket'
36
+ },
37
+ color: {
38
+ control: 'color',
39
+ description: 'Color for the position background'
40
+ },
41
+ scoreColor: {
42
+ control: 'color',
43
+ description: 'Color for the score background'
44
+ },
45
+ large: {
46
+ control: 'boolean',
47
+ description: 'Boolean to determine the size of the card'
50
48
  }
49
+ }
51
50
  };
52
51
 
53
52
  export const Default = {
54
- args: {
55
- fencer: {
56
- DisplayName: 'John Doe',
57
- Club: {
58
- Name: 'Fencing Club'
59
- },
60
- Images: [
61
- {
62
- URL: 'https://randomuser.me/api/portraits/men/50.jpg'
63
- }
64
- ]
65
- },
66
- score: '15',
67
- position: '1',
68
- color: 'blue',
69
- scoreColor: 'bg-winGreen',
70
- large: true
71
- }
53
+ args: {
54
+ fencer: {
55
+ DisplayName: 'John Doe',
56
+ Club: {
57
+ Name: 'Fencing Club'
58
+ },
59
+ Images: [
60
+ {
61
+ URL: 'https://randomuser.me/api/portraits/men/50.jpg'
62
+ }
63
+ ]
64
+ },
65
+ score: '15',
66
+ position: '1',
67
+ color: 'blue',
68
+ scoreColor: 'bg-winGreen',
69
+ large: true
70
+ }
72
71
  };
73
72
 
74
73
  export const Small = {
75
- args: {
76
- fencer: {
77
- DisplayName: 'Jane Doe',
78
- Club: {
79
- Name: 'Fencing Club'
80
- },
81
- Images: [
82
- {
83
- URL: 'https://via.placeholder.com/40'
84
- }
85
- ]
86
- },
87
- score: '12',
88
- position: '2',
89
- color: 'red',
90
- scoreColor: 'bg-lossRed',
91
- large: false
92
- }
74
+ args: {
75
+ fencer: {
76
+ DisplayName: 'Jane Doe',
77
+ Club: {
78
+ Name: 'Fencing Club'
79
+ },
80
+ Images: [
81
+ {
82
+ URL: 'https://via.placeholder.com/40'
83
+ }
84
+ ]
85
+ },
86
+ score: '12',
87
+ position: '2',
88
+ color: 'red',
89
+ scoreColor: 'bg-lossRed',
90
+ large: false
91
+ }
93
92
  };