@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.
- package/.prettierignore +7 -1
- package/.storybook/main.js +5 -12
- package/.storybook/preview-head.html +10 -3
- package/.storybook/preview.js +5 -13
- package/AGENTS.md +31 -1
- package/README.md +29 -22
- package/dist/HemaTournamentUI-lib.es.js +7189 -7467
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +0 -24
- package/dist/hematournamentui.css +1 -1
- package/eslint.config.js +49 -23
- package/package.json +6 -2
- package/postcss.config.js +3 -3
- package/prettier.config.js +16 -10
- package/src/config/boutScreenConfigurations.js +52 -50
- package/src/main.js +1 -1
- package/src/mocks/EventQuestionsMock.js +43 -55
- package/src/mocks/assignments.js +180 -181
- package/src/mocks/clubGetAllMock.js +8143 -8143
- package/src/mocks/eventMock.js +205 -205
- package/src/mocks/eventPersonGetInitalPoolAssignmentsLivePools.js +541 -542
- package/src/mocks/eventPersonGetInitalPoolAssignmentsPreparing.js +522 -523
- package/src/mocks/eventPersonGetInitialPoolAssignments.js +386 -387
- package/src/mocks/eventPersonGetInitialPoolAssignments2.js +2267 -2268
- package/src/mocks/eventPersonGetInitialStaff.js +94 -95
- package/src/mocks/eventPersonGetPoolAssignmentEvent.js +161 -162
- package/src/mocks/eventRules.js +87 -86
- package/src/mocks/eventpersonGetEventById.js +1737 -1737
- package/src/mocks/getAllClubs.js +8143 -8143
- package/src/mocks/getAllStaffByTournamentId.js +74 -75
- package/src/mocks/getAllWeapons.js +81 -82
- package/src/mocks/getAttendance.js +43 -44
- package/src/mocks/getClub.js +43 -44
- package/src/mocks/getClubDisplayByClubId.js +104 -105
- package/src/mocks/getDEBouts-128Fencers.js +3247 -3248
- package/src/mocks/getDEBouts-42Fencers.js +3736 -3737
- package/src/mocks/getDEBouts-67Fencers.js +6684 -6690
- package/src/mocks/getDEBouts-DoubleElim.js +4198 -4199
- package/src/mocks/getDEWithBouts.js +628 -629
- package/src/mocks/getDeBouts-12fencers.js +1255 -1256
- package/src/mocks/getDeBouts-15fencers.js +925 -927
- package/src/mocks/getDeBouts-22fencers.js +1683 -1685
- package/src/mocks/getDeBouts-6fencers.js +818 -818
- package/src/mocks/getEventByTournamentId.js +47 -48
- package/src/mocks/getFinalEventResult.js +304 -305
- package/src/mocks/getPenaltiesByEvent.js +655 -656
- package/src/mocks/getPoolResults.js +1533 -1534
- package/src/mocks/getPoolsWithBouts.js +662 -663
- package/src/mocks/getPoolsWithBouts6PoolId139.js +885 -886
- package/src/mocks/getPoolsWithBoutsByPoolId.js +841 -841
- package/src/mocks/getPoolsWithBoutsClubColors.js +4 -4
- package/src/mocks/getPoolsWithBoutsComplete.js +919 -921
- package/src/mocks/locationMock.js +3213 -3214
- package/src/mocks/mockRoutes.js +3 -3
- package/src/mocks/personGetAllMock.js +2536 -2537
- package/src/mocks/personsMock.js +17569 -17570
- package/src/mocks/singleEventMock.js +249 -250
- package/src/mocks/tournamentMock.js +1988 -1927
- package/src/stories/Atoms/CheckBox/BaseCheckbox.stories.js +25 -23
- package/src/stories/Atoms/CheckBox/BaseCheckbox.vue +30 -24
- package/src/stories/Atoms/Icon/BaseIcon.stories.js +63 -64
- package/src/stories/Atoms/Icon/BaseIcon.test.js +67 -69
- package/src/stories/Atoms/Icon/BaseIcon.vue +2 -3
- package/src/stories/Atoms/Input/BaseInput.stories.js +18 -18
- package/src/stories/Atoms/Input/BaseInput.test.js +65 -67
- package/src/stories/Atoms/Input/BaseInput.vue +36 -31
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.stories.js +21 -21
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.test.js +31 -31
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.vue +23 -18
- package/src/stories/Atoms/Tag/BaseTag.stories.js +21 -21
- package/src/stories/Atoms/Tag/BaseTag.test.js +26 -30
- package/src/stories/Atoms/Tag/BaseTag.vue +18 -19
- package/src/stories/Atoms/Text/BaseText.stories.js +54 -62
- package/src/stories/Atoms/Text/BaseText.test.js +152 -154
- package/src/stories/Atoms/Text/BaseText.vue +103 -81
- package/src/stories/Configure.mdx +5 -3
- package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.stories.js +24 -24
- package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.vue +33 -15
- package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.stories.js +46 -48
- package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.vue +38 -25
- package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.stories.js +4 -4
- package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.vue +9 -4
- package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.stories.js +90 -90
- package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.vue +51 -32
- package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.stories.js +25 -25
- package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +47 -12
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.stories.js +19 -19
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +25 -19
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.stories.js +25 -28
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.vue +7 -7
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.stories.js +28 -29
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.test.js +58 -58
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.vue +15 -15
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.stories.js +86 -86
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.test.js +101 -103
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +87 -24
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +31 -31
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +19 -21
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.stories.js +57 -57
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.test.js +64 -64
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.vue +17 -16
- package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.stories.js +19 -19
- package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue +18 -7
- package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.stories.js +16 -18
- package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue +31 -13
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.stories.js +27 -27
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.vue +6 -5
- package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.stories.js +35 -35
- package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.vue +13 -8
- package/src/stories/Molecules/Inputs/Toggle/Toggle.stories.js +27 -27
- package/src/stories/Molecules/Inputs/Toggle/Toggle.vue +8 -5
- package/src/stories/Molecules/Menus/TabBar/TabBar.stories.js +18 -18
- package/src/stories/Molecules/Menus/TabBar/TabBar.vue +1 -2
- package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplay.stories.js +36 -27
- package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplayModal.vue +25 -15
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.stories.js +66 -65
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.vue +47 -9
- package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.stories.js +23 -23
- package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.vue +59 -11
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +37 -37
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +27 -22
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.stories.js +41 -41
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +27 -15
- package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.stories.js +29 -30
- package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.vue +18 -16
- package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.stories.js +21 -21
- package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.vue +7 -7
- package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.stories.js +24 -24
- package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.vue +30 -25
- package/src/stories/Molecules/Reorder/ReorderableShell.stories.js +81 -77
- package/src/stories/Molecules/Reorder/ReorderableShell.vue +46 -43
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.stories.js +40 -40
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue +23 -25
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.stories.js +34 -29
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +69 -66
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.stories.js +24 -22
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +53 -41
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.stories.js +24 -37
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +88 -103
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardReorder/BoutCardReorder.vue +13 -14
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.stories.js +5 -5
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.vue +22 -21
- package/src/stories/Organisms/Cards/ClubCard/ClubCard.stories.js +14 -17
- package/src/stories/Organisms/Cards/ClubCard/ClubCard.vue +25 -18
- package/src/stories/Organisms/Cards/Director/DirectorCard.stories.js +23 -23
- package/src/stories/Organisms/Cards/Director/DirectorCard.vue +159 -103
- package/src/stories/Organisms/Cards/EditBout/EditBout.stories.js +47 -47
- package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -0
- package/src/stories/Organisms/Cards/EditBout/EditBout.vue +82 -54
- package/src/stories/Organisms/Cards/EventCard/EventCard.stories.js +9 -10
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +83 -63
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +105 -105
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +142 -58
- package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.stories.js +14 -14
- package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.vue +37 -26
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResults.stories.js +24 -24
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue +95 -28
- package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.stories.js +59 -60
- package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.vue +13 -7
- package/src/stories/Organisms/Cards/KioskCard/KioskCard.stories.js +34 -34
- package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +149 -104
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.stories.js +19 -20
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +207 -163
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.stories.js +17 -17
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.vue +88 -46
- package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.stories.js +182 -182
- package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.vue +21 -12
- package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.stories.js +25 -28
- package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.vue +28 -22
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.stories.js +62 -62
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +27 -22
- package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +103 -103
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +73 -73
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +44 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +69 -56
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +80 -81
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +39 -22
- package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdmin.stories.js +20 -20
- package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdminCard.vue +62 -33
- package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +44 -30
- package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.stories.js +6 -7
- package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue +7 -8
- package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.stories.js +31 -31
- package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.vue +30 -35
- package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.stories.js +13 -16
- package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +68 -70
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.stories.js +32 -34
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +48 -25
- package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.stories.js +21 -21
- package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.vue +65 -38
- package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.stories.js +19 -20
- package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.vue +46 -21
- package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.stories.js +22 -22
- package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.vue +68 -23
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +13 -13
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +25 -24
- package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.stories.js +6 -10
- package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.vue +112 -48
- package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.stories.js +43 -44
- package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.vue +30 -23
- package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.stories.js +20 -20
- package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.vue +12 -12
- package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.stories.js +24 -25
- package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.vue +112 -87
- package/src/stories/Organisms/Containers/Pool/Pool.stories.js +54 -54
- package/src/stories/Organisms/Containers/Pool/Pool.vue +64 -41
- package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.stories.js +17 -19
- package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.vue +189 -135
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.stories.js +53 -54
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +107 -73
- package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +23 -24
- package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +49 -10
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +96 -173
- package/src/stories/Organisms/Containers/TableauColumn/TabeauColumn.stories.js +26 -27
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +20 -17
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +153 -103
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +13 -15
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +7 -8
- package/src/stories/Organisms/Form/AddDisplay/AddDisplay.stories.js +26 -26
- package/src/stories/Organisms/Form/AddDisplay/AddDisplay.vue +130 -118
- package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.stories.js +14 -15
- package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.vue +94 -88
- package/src/stories/Organisms/Grids/GridContainer.stories.js +101 -101
- package/src/stories/Organisms/Grids/GridContainer.vue +160 -136
- package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.stories.js +47 -47
- package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.vue +65 -54
- package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.stories.js +27 -27
- package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.vue +38 -22
- package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.stories.js +80 -80
- package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.vue +14 -6
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.stories.js +34 -34
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +36 -36
- package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.stories.js +21 -21
- package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.vue +56 -29
- package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.stories.js +38 -38
- package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.vue +19 -20
- package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.stories.js +12 -13
- package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.vue +47 -41
- package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.stories.js +12 -13
- package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.vue +66 -37
- package/src/stories/Organisms/Skeletons/ClubManagement/ClubManagement.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/ClubManagement/ClubMangementSkeleton.vue +2 -2
- package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.vue +2 -3
- package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.vue +1 -1
- package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.stories.js +6 -9
- package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.vue +2 -2
- package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.vue +10 -4
- package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.vue +2 -2
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +34 -34
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +106 -56
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.stories.js +95 -95
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +129 -69
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.stories.js +87 -88
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +105 -60
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +82 -82
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +150 -177
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.stories.js +28 -28
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +96 -36
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.stories.js +99 -99
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +115 -67
- package/src/stories/Templates/Assignment/Assignment.stories.js +22 -23
- package/src/stories/Templates/Assignment/Assignment.vue +210 -161
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.stories.js +90 -90
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.vue +68 -55
- package/src/stories/Templates/ClubManagement/ClubManagement.stories.js +87 -87
- package/src/stories/Templates/ClubManagement/ClubManagement.vue +167 -147
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +82 -103
- package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +88 -43
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +167 -200
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +49 -50
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +21 -21
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +105 -103
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +289 -226
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js +30 -30
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +27 -22
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.stories.js +44 -45
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.vue +52 -43
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.stories.js +28 -29
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.vue +54 -39
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +80 -111
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -0
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +290 -255
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +109 -107
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +144 -87
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +56 -57
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +132 -123
- package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +56 -57
- package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +84 -47
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +29 -29
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +71 -67
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +39 -40
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +79 -71
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +47 -47
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +39 -42
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +54 -54
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +27 -31
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +69 -69
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +78 -89
- package/src/stories/Templates/PersonManagement/Attendance/Attendance.stories.js +22 -22
- package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +61 -33
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.stories.js +29 -29
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +80 -53
- package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +84 -86
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +107 -82
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +31 -31
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +70 -51
- package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +79 -79
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +275 -230
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +113 -113
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +175 -146
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.stories.js +77 -77
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.vue +208 -185
- package/src/stories/Util/Validations/AddNewPersonModalValidation.js +23 -19
- package/src/stories/Util/Validations/ClubManagementValidations.js +17 -21
- package/src/stories/Util/Validations/PersonManagementValidations.js +26 -22
- package/src/stories/Util/Validations/TournamentFieldsValidations.js +20 -18
- package/src/stories/Util/seeding.js +131 -131
- package/src/stories/Util/tabs.js +75 -75
- package/tailwind/tailwind.css +5 -7
- package/tailwind.config.js +12 -15
- package/vite.config.js +3 -3
- package/src/mocks/getDirectors.js +0 -18
- package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.stories.js +0 -45
- package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.vue +0 -111
- package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.stories.js +0 -45
- package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.vue +0 -83
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section>
|
|
3
|
-
<EditEventsTopMenu :currentTab="'Pools'" :tabs="tabs(role, isMobile)" @tabMenuClick="handleTabMenuClick"/>
|
|
4
|
-
<ToggleHeader
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<EditEventsTopMenu :currentTab="'Pools'" :tabs="tabs(role, isMobile)" @tabMenuClick="handleTabMenuClick" />
|
|
4
|
+
<ToggleHeader
|
|
5
|
+
:currentSelection="viewName"
|
|
6
|
+
firstButtonLabel="List View"
|
|
7
|
+
secondButtonLabel="Pool Grid"
|
|
8
|
+
:showConnected="true"
|
|
9
|
+
@update:selection="handleViewChange"
|
|
10
|
+
:connectedToServer="connectedToServer"
|
|
11
|
+
class="hidden md:block"
|
|
12
|
+
/>
|
|
7
13
|
|
|
8
14
|
<section v-if="viewName === 'Pool Grid'" class="hidden md:block">
|
|
9
|
-
<PoolGrid :bouts="localBouts" :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"/>
|
|
15
|
+
<PoolGrid :bouts="localBouts" :isCountingBackwardsMaxScore="isCountingBackwardsMaxScore" />
|
|
10
16
|
</section>
|
|
11
17
|
|
|
12
18
|
<!-- Buttons visible until the first bout starts -->
|
|
13
19
|
<div v-if="remainingBoutsCount > 0 && remainingBoutsCount === localBouts.length" class="w-full my-4">
|
|
14
20
|
<div class="flex justify-center gap-3">
|
|
15
21
|
<BaseButton
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
v-if="!reorderMode"
|
|
23
|
+
:label="reorderMode ? 'Return to Bout View' : 'Fencer List'"
|
|
24
|
+
type="primary"
|
|
25
|
+
:size="isMobile ? 'xs' : 'sm'"
|
|
26
|
+
class="h-10 inline-flex shrink-0 px-5 h-10"
|
|
27
|
+
:class="fencerList ? 'w-full md:w-3/4' : 'w-44 md:w-96'"
|
|
28
|
+
@buttonClick="showFencerList"
|
|
23
29
|
/>
|
|
24
30
|
<BaseButton
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
v-if="!fencerList"
|
|
32
|
+
:label="reorderMode ? 'Return to Bout View' : 'Re-order Bouts'"
|
|
33
|
+
type="primary"
|
|
34
|
+
:size="isMobile ? 'xs' : 'sm'"
|
|
35
|
+
class="h-10 inline-flex shrink-0 px-5"
|
|
36
|
+
:class="reorderMode ? 'w-full md:w-3/4' : 'w-44 md:w-96'"
|
|
37
|
+
@buttonClick="reorderBouts"
|
|
32
38
|
/>
|
|
33
39
|
</div>
|
|
34
40
|
<div class="md:border-b border-dropdownSelect mt-3"></div>
|
|
@@ -38,53 +44,58 @@
|
|
|
38
44
|
<section v-if="remainingBoutsCount > 0 && !reorderMode">
|
|
39
45
|
<div class="w-full flex flex-col items-center">
|
|
40
46
|
<div v-if="fencerList" v-for="fencer in simpleFencerList" class="w-full md:w-3/4 my-1">
|
|
41
|
-
<FencerFinalResultCard :result="fencer"/>
|
|
47
|
+
<FencerFinalResultCard :result="fencer" />
|
|
42
48
|
</div>
|
|
43
49
|
<div v-if="!hasActiveBout && !fencerList" class="w-full md:w-3/4 my-4">
|
|
44
|
-
<BoutCard
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
<BoutCard
|
|
51
|
+
:bout="{}"
|
|
52
|
+
:hostingClubColors="hostingClubColors"
|
|
53
|
+
:editMode="editMode"
|
|
54
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
55
|
+
:isWaiting="true"
|
|
56
|
+
:reorderMode="false"
|
|
57
|
+
@action:startBout="directBout"
|
|
58
|
+
@action:resumeBout="directBout"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
<div v-for="bout in activeBouts" :key="bout.BoutId" class="w-full md:w-3/4 my-4">
|
|
62
|
+
<BoutCard
|
|
63
|
+
:bout="bout"
|
|
64
|
+
:hostingClubColors="hostingClubColors"
|
|
65
|
+
:editMode="editMode"
|
|
66
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
67
|
+
:reorderMode="false"
|
|
68
|
+
:timerStatus="bout.TimerStatus || 'stopped'"
|
|
69
|
+
@action:startBout="directBout"
|
|
70
|
+
@action:resumeBout="directBout"
|
|
52
71
|
/>
|
|
53
72
|
</div>
|
|
54
|
-
<div v-for="bout in activeBouts" :key="bout.BoutId" class="w-full md:w-3/4 my-4">
|
|
55
|
-
<BoutCard :bout="bout" :hostingClubColors="hostingClubColors" :editMode="editMode"
|
|
56
|
-
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore" :reorderMode="false"
|
|
57
|
-
:timerStatus="bout.TimerStatus || 'stopped'"
|
|
58
|
-
@action:startBout="directBout" @action:resumeBout="directBout"/>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
73
|
</div>
|
|
62
74
|
</section>
|
|
63
75
|
|
|
64
76
|
<!-- Upcoming -->
|
|
65
77
|
<section v-if="remainingBoutsCount > 0 && !fencerList && !reorderMode">
|
|
66
78
|
<div class="flex flex-row justify-between">
|
|
67
|
-
<BaseText class="mt-5" color="primaryHighlight" size="md" text="Upcoming" weight="bold"/>
|
|
79
|
+
<BaseText class="mt-5" color="primaryHighlight" size="md" text="Upcoming" weight="bold" />
|
|
68
80
|
<div class="flex mr-1">
|
|
69
|
-
<BaseText class="mt-5 ml-5" color="primaryHighlight" size="md" text="Remaining bouts:"/>
|
|
70
|
-
<BaseText :text="remainingBoutsCount" class="mt-5 ml-2" color="primaryHighlight" size="md" weight="bold"/>
|
|
81
|
+
<BaseText class="mt-5 ml-5" color="primaryHighlight" size="md" text="Remaining bouts:" />
|
|
82
|
+
<BaseText :text="remainingBoutsCount" class="mt-5 ml-2" color="primaryHighlight" size="md" weight="bold" />
|
|
71
83
|
</div>
|
|
72
84
|
</div>
|
|
73
85
|
<div class="border-b border-dropdownSelect mb-5"></div>
|
|
74
86
|
<div class="w-full flex flex-col items-center">
|
|
75
87
|
<div v-for="bout in markedUpcomingBouts" :key="bout.BoutId" class="w-full md:w-3/4 my-4 flex items-stretch">
|
|
76
88
|
<div class="flex-1">
|
|
77
|
-
<BoutCard
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/>
|
|
89
|
+
<BoutCard
|
|
90
|
+
:bout="bout"
|
|
91
|
+
:hostingClubColors="hostingClubColors"
|
|
92
|
+
:editMode="editMode"
|
|
93
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
94
|
+
:reorderMode="false"
|
|
95
|
+
:timerStatus="bout.TimerStatus || 'stopped'"
|
|
96
|
+
@action:startBout="directBout"
|
|
97
|
+
/>
|
|
86
98
|
</div>
|
|
87
|
-
|
|
88
99
|
</div>
|
|
89
100
|
</div>
|
|
90
101
|
</section>
|
|
@@ -92,148 +103,189 @@
|
|
|
92
103
|
<!-- Completed -->
|
|
93
104
|
<section v-if="hasCompletedBout > 0 && !fencerList">
|
|
94
105
|
<div class="w-full flex flex-col items-center">
|
|
95
|
-
<BaseButton
|
|
96
|
-
|
|
106
|
+
<BaseButton
|
|
107
|
+
v-if="remainingBoutsCount === 0"
|
|
108
|
+
label="Show Pool Results on Scoreboard"
|
|
109
|
+
type="bright"
|
|
110
|
+
class="w-full md:w-1/3 my-1 h-10"
|
|
111
|
+
@buttonClick="showResultsGrid"
|
|
112
|
+
/>
|
|
97
113
|
</div>
|
|
98
114
|
<div class="flex flex-row">
|
|
99
|
-
<BaseText
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
<BaseText
|
|
116
|
+
v-if="remainingBoutsCount === 0"
|
|
117
|
+
class="mt-8"
|
|
118
|
+
color="primaryHighlight"
|
|
119
|
+
size="md"
|
|
120
|
+
text="All Bouts Are Complete"
|
|
121
|
+
weight="bold"
|
|
122
|
+
/>
|
|
123
|
+
<BaseText
|
|
124
|
+
v-if="remainingBoutsCount > 0"
|
|
125
|
+
class="mt-5"
|
|
126
|
+
color="primaryHighlight"
|
|
127
|
+
size="md"
|
|
128
|
+
text="Completed"
|
|
129
|
+
weight="bold"
|
|
130
|
+
/>
|
|
103
131
|
</div>
|
|
104
132
|
<div class="border-b border-dropdownSelect mb-5"></div>
|
|
105
133
|
<div class="w-full flex flex-col items-center">
|
|
106
134
|
<div v-for="bout in completedBouts" :key="bout.BoutId" class="w-full md:w-3/4 my-4">
|
|
107
|
-
<BoutCard
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
135
|
+
<BoutCard
|
|
136
|
+
:bout="bout"
|
|
137
|
+
:hostingClubColors="hostingClubColors"
|
|
138
|
+
:editMode="editMode"
|
|
139
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
140
|
+
@action:editBout="editBout"
|
|
141
|
+
@action:startBout="directBout"
|
|
142
|
+
:reorderMode="false"
|
|
143
|
+
/>
|
|
114
144
|
</div>
|
|
115
145
|
</div>
|
|
116
146
|
</section>
|
|
117
147
|
|
|
118
|
-
|
|
119
148
|
<!-- Reorder mode -->
|
|
120
149
|
<section v-if="reorderMode">
|
|
121
150
|
<div class="w-full flex flex-col items-center">
|
|
122
|
-
|
|
123
151
|
<div class="w-full md:w-3/4 my-2">
|
|
124
152
|
<div class="text-xs text-slate-500 mb-2">
|
|
125
|
-
<BaseText text="Expected order (by seeds)" size="xs" color="primary" weight="" class=""/>
|
|
153
|
+
<BaseText text="Expected order (by seeds)" size="xs" color="primary" weight="" class="" />
|
|
126
154
|
</div>
|
|
127
155
|
<ol class="grid grid-cols-2 md:grid-cols-4 gap-2 text-xs">
|
|
128
156
|
<li
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
157
|
+
v-for="row in expectedOrderLegend"
|
|
158
|
+
:key="row.index"
|
|
159
|
+
class="px-2 py-1 rounded border flex"
|
|
160
|
+
title="Expected: {{ row.pair[0] }} vs {{ row.pair[1] }}"
|
|
133
161
|
>
|
|
134
|
-
<BaseText :text="`#${row.index+1}`" size="xs" color="quaternary" weight="" class="mr-4 w-4"/>
|
|
135
|
-
<BaseText :text="`${row.pair[0]} vs ${row.pair[1]}`" size="xs" color="quaternary" class="w-9"/>
|
|
136
|
-
<BaseIcon
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
<BaseText :text="`#${row.index + 1}`" size="xs" color="quaternary" weight="" class="mr-4 w-4" />
|
|
163
|
+
<BaseText :text="`${row.pair[0]} vs ${row.pair[1]}`" size="xs" color="quaternary" class="w-9" />
|
|
164
|
+
<BaseIcon
|
|
165
|
+
v-if="row.bout && row.index === row.boutIndex"
|
|
166
|
+
icon-name="fa-square-check"
|
|
167
|
+
size="xs"
|
|
168
|
+
color="green"
|
|
169
|
+
hover="green"
|
|
170
|
+
class="ml-2"
|
|
171
|
+
/>
|
|
172
|
+
<BaseIcon
|
|
173
|
+
v-else-if="row.bout"
|
|
174
|
+
icon-name="fa-square-xmark"
|
|
175
|
+
size="xs"
|
|
176
|
+
color="orange"
|
|
177
|
+
hover="orange"
|
|
178
|
+
class="ml-2"
|
|
179
|
+
/>
|
|
180
|
+
<BaseIcon v-else icon-name="fa-square-minus" size="xs" color="red" hover="red" class="ml-2" />
|
|
141
181
|
</li>
|
|
142
182
|
</ol>
|
|
143
183
|
</div>
|
|
144
184
|
|
|
145
185
|
<div class="w-full md:w-3/4 my-2 flex gap-2">
|
|
146
|
-
<BaseButton
|
|
147
|
-
label="Auto-sort (by seeds)"
|
|
148
|
-
type="primary"
|
|
149
|
-
class="h-10 w-full"
|
|
150
|
-
@buttonClick="autoSortBouts"
|
|
151
|
-
/>
|
|
152
|
-
|
|
186
|
+
<BaseButton label="Auto-sort (by seeds)" type="primary" class="h-10 w-full" @buttonClick="autoSortBouts" />
|
|
153
187
|
</div>
|
|
154
188
|
|
|
155
189
|
<div class="w-full md:w-3/4 my-4">
|
|
156
|
-
<BaseText text="Re-order Bouts" size="md" color="primaryHighlight" weight="bold"/>
|
|
157
|
-
<BaseText text="Select a card, then on a second to swap them." size="xs" color="quinary"/>
|
|
190
|
+
<BaseText text="Re-order Bouts" size="md" color="primaryHighlight" weight="bold" />
|
|
191
|
+
<BaseText text="Select a card, then on a second to swap them." size="xs" color="quinary" />
|
|
158
192
|
</div>
|
|
159
193
|
|
|
160
194
|
<!-- The draggable list -->
|
|
161
195
|
<div role="list" class="w-full md:w-3/4 space-y-3">
|
|
162
196
|
<ReorderableShell
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
197
|
+
v-for="bout in markedUpcomingBouts"
|
|
198
|
+
:key="bout.BoutId || bout.boutId"
|
|
199
|
+
:enabled="true"
|
|
200
|
+
:dragId="bout.BoutId || bout.boutId"
|
|
201
|
+
:payload="bout"
|
|
202
|
+
aria-label="Reorder bout"
|
|
203
|
+
@reorder:drop="onReorderDrop"
|
|
204
|
+
@reorder:tap="onReorderTap"
|
|
171
205
|
>
|
|
172
206
|
<BoutCard
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
207
|
+
:bout="bout"
|
|
208
|
+
:hostingClubColors="hostingClubColors"
|
|
209
|
+
:editMode="false"
|
|
210
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
211
|
+
:reorderMode="true"
|
|
212
|
+
:selected="selectedReorderId === (bout.BoutId || bout.boutId)"
|
|
179
213
|
/>
|
|
180
214
|
</ReorderableShell>
|
|
181
|
-
|
|
182
215
|
</div>
|
|
183
216
|
</div>
|
|
184
217
|
</section>
|
|
185
218
|
|
|
186
|
-
<DirectorModal
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
219
|
+
<DirectorModal
|
|
220
|
+
:bout="currentSelectedBout"
|
|
221
|
+
:eventRules="eventRules"
|
|
222
|
+
:hostingClubColors="hostingClubColors"
|
|
223
|
+
:show="showDirectorModal"
|
|
224
|
+
@penalty:add="handleAddPenalty"
|
|
225
|
+
@penalty:update="handleUpdatePenalty"
|
|
226
|
+
@penalty:remove="handleRemovePenalty"
|
|
227
|
+
@update:closeModal="handleCloseModal"
|
|
228
|
+
@update:bout="handleUpdateBout"
|
|
229
|
+
@submit:bout="handleSubmitBout"
|
|
230
|
+
/>
|
|
231
|
+
|
|
232
|
+
<EditBoutModal
|
|
233
|
+
:bout="currentSelectedBout"
|
|
234
|
+
:eventRules="eventRules"
|
|
235
|
+
:hostingClubColors="hostingClubColors"
|
|
236
|
+
:show="showEditBoutModal"
|
|
237
|
+
@update:closeModal="handleCloseModal"
|
|
238
|
+
@submit:bout="handleSubmitBout"
|
|
239
|
+
@request:bout-active="handleBoutActiveRequest"
|
|
240
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
241
|
+
/>
|
|
203
242
|
</section>
|
|
204
243
|
</template>
|
|
205
244
|
|
|
206
245
|
<script>
|
|
207
|
-
import EditEventsTopMenu from
|
|
208
|
-
import ToggleHeader from
|
|
209
|
-
import BaseText from
|
|
210
|
-
import BaseIcon from
|
|
211
|
-
import BoutCard from
|
|
212
|
-
import DirectorModal from
|
|
213
|
-
import EditBoutModal from
|
|
214
|
-
import PoolGrid from
|
|
215
|
-
import {tabs} from '../../../Util/tabs.js';
|
|
216
|
-
import BaseButton from
|
|
217
|
-
import FencerFinalResultCard from
|
|
218
|
-
import ReorderableShell from
|
|
219
|
-
import {getPoolOrder} from '../../../Util/seeding.js';
|
|
246
|
+
import EditEventsTopMenu from '../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue';
|
|
247
|
+
import ToggleHeader from '../../../Organisms/Headers/ToggleHeader/ToggleHeader.vue';
|
|
248
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
249
|
+
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
250
|
+
import BoutCard from '../../../Organisms/Cards/BoutCard/BoutCard.vue';
|
|
251
|
+
import DirectorModal from '../../../Molecules/Modals/DirectorModal/DirectorModal.vue';
|
|
252
|
+
import EditBoutModal from '../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue';
|
|
253
|
+
import PoolGrid from '../../../Organisms/Containers/PoolGrid/PoolGrid.vue';
|
|
254
|
+
import { tabs } from '../../../Util/tabs.js';
|
|
255
|
+
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
256
|
+
import FencerFinalResultCard from '../../../Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.vue';
|
|
257
|
+
import ReorderableShell from '../../../Molecules/Reorder/ReorderableShell.vue';
|
|
258
|
+
import { getPoolOrder } from '../../../Util/seeding.js';
|
|
259
|
+
|
|
260
|
+
const normalizeBoutStatus = bout => String(bout?.Status || '').toLowerCase();
|
|
220
261
|
|
|
221
262
|
export default {
|
|
222
|
-
name:
|
|
263
|
+
name: 'PoolLive',
|
|
223
264
|
components: {
|
|
224
265
|
ReorderableShell,
|
|
225
266
|
FencerFinalResultCard,
|
|
226
267
|
BaseButton,
|
|
227
268
|
BaseIcon,
|
|
228
|
-
PoolGrid,
|
|
229
|
-
EditBoutModal,
|
|
269
|
+
PoolGrid,
|
|
270
|
+
EditBoutModal,
|
|
230
271
|
DirectorModal,
|
|
231
272
|
BoutCard,
|
|
232
273
|
BaseText,
|
|
233
274
|
ToggleHeader,
|
|
234
275
|
EditEventsTopMenu
|
|
235
276
|
},
|
|
236
|
-
emits: [
|
|
277
|
+
emits: [
|
|
278
|
+
'penalty:add',
|
|
279
|
+
'penalty:remove',
|
|
280
|
+
'penalty:update',
|
|
281
|
+
'request:bout-active',
|
|
282
|
+
'scoreboard:showFencerList',
|
|
283
|
+
'scoreboard:showPoolGrid',
|
|
284
|
+
'submit:bout',
|
|
285
|
+
'tab:menu-click',
|
|
286
|
+
'update:bout',
|
|
287
|
+
'update:directing-bout'
|
|
288
|
+
],
|
|
237
289
|
props: {
|
|
238
290
|
bouts: {
|
|
239
291
|
type: Array,
|
|
@@ -262,11 +314,11 @@ export default {
|
|
|
262
314
|
},
|
|
263
315
|
data() {
|
|
264
316
|
return {
|
|
265
|
-
localBouts: this.cloneBouts(this.bouts),
|
|
317
|
+
localBouts: this.cloneBouts(this.bouts),
|
|
266
318
|
showDirectorModal: false,
|
|
267
319
|
showEditBoutModal: false,
|
|
268
320
|
selectedBout: {},
|
|
269
|
-
viewName:
|
|
321
|
+
viewName: 'Pool Grid',
|
|
270
322
|
fencerList: false,
|
|
271
323
|
reorderMode: false,
|
|
272
324
|
tabs,
|
|
@@ -275,17 +327,18 @@ export default {
|
|
|
275
327
|
};
|
|
276
328
|
},
|
|
277
329
|
watch: {
|
|
278
|
-
bouts: {
|
|
279
|
-
handler(newBouts) {
|
|
280
|
-
this.localBouts = this.cloneBouts(newBouts);
|
|
281
|
-
|
|
330
|
+
bouts: {
|
|
331
|
+
handler(newBouts) {
|
|
332
|
+
this.localBouts = this.cloneBouts(newBouts);
|
|
333
|
+
this.reconcileSelectedBout();
|
|
334
|
+
},
|
|
282
335
|
immediate: true,
|
|
283
336
|
deep: true
|
|
284
337
|
}
|
|
285
338
|
},
|
|
286
339
|
mounted() {
|
|
287
340
|
window.addEventListener('resize', this.handleResize);
|
|
288
|
-
this.localBouts = this.sortBoutsByOrder(this.localBouts);
|
|
341
|
+
this.localBouts = this.sortBoutsByOrder(this.localBouts);
|
|
289
342
|
},
|
|
290
343
|
beforeUnmount() {
|
|
291
344
|
window.removeEventListener('resize', this.handleResize);
|
|
@@ -302,9 +355,9 @@ export default {
|
|
|
302
355
|
},
|
|
303
356
|
upcomingBouts() {
|
|
304
357
|
return this.localBouts
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
358
|
+
.filter(b => (b.Status || '').toLowerCase() === 'scheduled')
|
|
359
|
+
.slice()
|
|
360
|
+
.sort((a, b) => Number(a.OrderIndex ?? 0) - Number(b.OrderIndex ?? 0));
|
|
308
361
|
},
|
|
309
362
|
completedBouts() {
|
|
310
363
|
return this.localBouts.filter(bout => bout.Status === 'Completed');
|
|
@@ -314,9 +367,9 @@ export default {
|
|
|
314
367
|
},
|
|
315
368
|
activeBouts() {
|
|
316
369
|
return this.localBouts
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
370
|
+
.filter(b => String(b?.Status || '').toLowerCase() === 'active')
|
|
371
|
+
.slice()
|
|
372
|
+
.sort((a, b) => Number(a?.OrderIndex ?? 0) - Number(b?.OrderIndex ?? 0));
|
|
320
373
|
},
|
|
321
374
|
|
|
322
375
|
hasActiveBout() {
|
|
@@ -367,17 +420,12 @@ export default {
|
|
|
367
420
|
});
|
|
368
421
|
},
|
|
369
422
|
upcomingBoutsSorted() {
|
|
370
|
-
return this.upcomingBouts
|
|
371
|
-
.slice()
|
|
372
|
-
.sort((a, b) => Number(a.OrderIndex ?? 0) - Number(b.OrderIndex ?? 0));
|
|
423
|
+
return this.upcomingBouts.slice().sort((a, b) => Number(a.OrderIndex ?? 0) - Number(b.OrderIndex ?? 0));
|
|
373
424
|
},
|
|
374
425
|
seedingSize() {
|
|
375
426
|
const maxPos = Math.max(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
Number(bout.Person1Pos || 0),
|
|
379
|
-
Number(bout.Person2Pos || 0),
|
|
380
|
-
])
|
|
427
|
+
0,
|
|
428
|
+
...this.localBouts.flatMap(bout => [Number(bout.Person1Pos || 0), Number(bout.Person2Pos || 0)])
|
|
381
429
|
);
|
|
382
430
|
return maxPos || this.simpleFencerList.length || 0;
|
|
383
431
|
},
|
|
@@ -386,7 +434,7 @@ export default {
|
|
|
386
434
|
if (!expected.length) return [];
|
|
387
435
|
|
|
388
436
|
// Build a normalized list of the “actual” upcoming pairs, in display order
|
|
389
|
-
const actualPairs = this.upcomingBoutsSorted.map(
|
|
437
|
+
const actualPairs = this.upcomingBoutsSorted.map(bout => {
|
|
390
438
|
const a = Number(bout.Person1Pos);
|
|
391
439
|
const b = Number(bout.Person2Pos);
|
|
392
440
|
return [Math.min(a, b), Math.max(a, b)];
|
|
@@ -395,34 +443,24 @@ export default {
|
|
|
395
443
|
return expected.map((pair, index) => {
|
|
396
444
|
const [x, y] = pair;
|
|
397
445
|
const normalized = [Math.min(x, y), Math.max(x, y)];
|
|
398
|
-
const boutIndex = actualPairs.findIndex(
|
|
399
|
-
(p) => p[0] === normalized[0] && p[1] === normalized[1]
|
|
400
|
-
);
|
|
446
|
+
const boutIndex = actualPairs.findIndex(p => p[0] === normalized[0] && p[1] === normalized[1]);
|
|
401
447
|
const bout = boutIndex >= 0 ? this.upcomingBoutsSorted[boutIndex] : null;
|
|
402
448
|
|
|
403
449
|
return {
|
|
404
|
-
index,
|
|
405
|
-
pair,
|
|
406
|
-
boutIndex,
|
|
407
|
-
bout
|
|
450
|
+
index, // 0-based index in expected order
|
|
451
|
+
pair, // [seedA, seedB]
|
|
452
|
+
boutIndex, // where it exists in the current list (or -1)
|
|
453
|
+
bout // the actual bout object (or null)
|
|
408
454
|
};
|
|
409
455
|
});
|
|
410
|
-
}
|
|
456
|
+
}
|
|
411
457
|
},
|
|
412
458
|
methods: {
|
|
413
|
-
handleCloseModal(
|
|
414
|
-
this.showDirectorModal = false;
|
|
415
|
-
this.showEditBoutModal = false;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
if (bout.Status !== 'Completed') {
|
|
419
|
-
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId);
|
|
420
|
-
if (!updatedBout) return;
|
|
421
|
-
|
|
422
|
-
updatedBout.Status = 'Scheduled';
|
|
423
|
-
this.$emit('update:bout', updatedBout);
|
|
424
|
-
}
|
|
425
|
-
},
|
|
459
|
+
handleCloseModal() {
|
|
460
|
+
this.showDirectorModal = false;
|
|
461
|
+
this.showEditBoutModal = false;
|
|
462
|
+
this.selectedBout = {};
|
|
463
|
+
},
|
|
426
464
|
handleTabMenuClick(value) {
|
|
427
465
|
this.$emit('tab:menu-click', value);
|
|
428
466
|
},
|
|
@@ -431,50 +469,36 @@ export default {
|
|
|
431
469
|
},
|
|
432
470
|
handleUpdateBout(bout) {
|
|
433
471
|
if (!bout?.BoutId) return;
|
|
434
|
-
|
|
435
|
-
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId);
|
|
436
|
-
if (!updatedBout) return;
|
|
437
|
-
|
|
438
|
-
Object.assign(updatedBout, bout);
|
|
439
|
-
updatedBout.Status = 'Active'; // keep it active while directing
|
|
440
|
-
|
|
441
|
-
this.$emit('update:bout', updatedBout);
|
|
472
|
+
this.$emit('update:bout', { ...bout });
|
|
442
473
|
},
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
this.
|
|
474
|
+
handleSubmitBout(bout) {
|
|
475
|
+
this.showEditBoutModal = false;
|
|
476
|
+
this.showDirectorModal = false;
|
|
477
|
+
if (!bout?.BoutId) return;
|
|
478
|
+
this.$emit('submit:bout', { ...bout });
|
|
479
|
+
this.selectedBout = {};
|
|
446
480
|
},
|
|
447
|
-
|
|
448
|
-
this.showEditBoutModal = false;
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
Object.assign(updatedBout, bout);
|
|
454
|
-
if (!resetToActive) updatedBout.Status = 'Completed';
|
|
455
|
-
updatedBout.Ended = new Date().toISOString();
|
|
456
|
-
|
|
457
|
-
this.$emit('submit:bout', updatedBout);
|
|
481
|
+
handleBoutActiveRequest(bout) {
|
|
482
|
+
this.showEditBoutModal = false;
|
|
483
|
+
if (!bout?.BoutId) return;
|
|
484
|
+
this.$emit('request:bout-active', { ...bout });
|
|
485
|
+
this.selectedBout = {};
|
|
458
486
|
},
|
|
459
487
|
directBout(bout) {
|
|
460
|
-
|
|
461
|
-
activeBouts.forEach(b => b.Status = 'scheduled');
|
|
462
|
-
|
|
488
|
+
if (!bout?.BoutId) return;
|
|
463
489
|
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId);
|
|
490
|
+
if (!updatedBout) return;
|
|
464
491
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this.selectedBout = updatedBout;
|
|
469
|
-
}
|
|
470
|
-
this.$emit('update:directing-bout', updatedBout)
|
|
492
|
+
this.selectedBout = { ...updatedBout };
|
|
493
|
+
this.showDirectorModal = normalizeBoutStatus(updatedBout) === 'active';
|
|
494
|
+
this.$emit('update:directing-bout', { ...updatedBout });
|
|
471
495
|
},
|
|
472
496
|
editBout(bout) {
|
|
473
497
|
const updatedBout = this.localBouts.find(b => b.BoutId === bout.BoutId);
|
|
474
|
-
if (updatedBout)
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}
|
|
498
|
+
if (!updatedBout) return;
|
|
499
|
+
|
|
500
|
+
this.showEditBoutModal = true;
|
|
501
|
+
this.selectedBout = { ...updatedBout };
|
|
478
502
|
},
|
|
479
503
|
handleResize() {
|
|
480
504
|
this.windowWidth = window.innerWidth;
|
|
@@ -497,10 +521,10 @@ export default {
|
|
|
497
521
|
},
|
|
498
522
|
reorderBouts() {
|
|
499
523
|
this.reorderMode = !this.reorderMode;
|
|
500
|
-
},
|
|
501
|
-
autoSortBouts() {
|
|
502
|
-
const normalizeStatus = s => String(s || '').toLowerCase();
|
|
503
|
-
const idOf = bout => bout.BoutId ?? bout.boutId;
|
|
524
|
+
},
|
|
525
|
+
autoSortBouts() {
|
|
526
|
+
const normalizeStatus = s => String(s || '').toLowerCase();
|
|
527
|
+
const idOf = bout => bout.BoutId ?? bout.boutId;
|
|
504
528
|
const matchPair = (bout, [a, b]) => {
|
|
505
529
|
const p1 = Number(bout.Person1Pos);
|
|
506
530
|
const p2 = Number(bout.Person2Pos);
|
|
@@ -510,17 +534,13 @@ export default {
|
|
|
510
534
|
const poolSize = this.seedingSize;
|
|
511
535
|
const expectedOrder = getPoolOrder(poolSize) || [];
|
|
512
536
|
|
|
513
|
-
const scheduled = this.localBouts
|
|
514
|
-
.filter(b => normalizeStatus(b.Status) === 'scheduled')
|
|
515
|
-
.slice();
|
|
537
|
+
const scheduled = this.localBouts.filter(b => normalizeStatus(b.Status) === 'scheduled').slice();
|
|
516
538
|
|
|
517
539
|
const usedIds = new Set();
|
|
518
540
|
const inExpectedOrder = [];
|
|
519
541
|
|
|
520
542
|
for (const pair of expectedOrder) {
|
|
521
|
-
const match = scheduled.find(
|
|
522
|
-
bout => !usedIds.has(idOf(bout)) && matchPair(bout, pair)
|
|
523
|
-
);
|
|
543
|
+
const match = scheduled.find(bout => !usedIds.has(idOf(bout)) && matchPair(bout, pair));
|
|
524
544
|
if (match) {
|
|
525
545
|
inExpectedOrder.push(match);
|
|
526
546
|
usedIds.add(idOf(match));
|
|
@@ -543,44 +563,49 @@ export default {
|
|
|
543
563
|
_normalizeStatus(s) {
|
|
544
564
|
return String(s || '').toLowerCase();
|
|
545
565
|
},
|
|
546
|
-
_getBoutById(id) {
|
|
547
|
-
return
|
|
566
|
+
_getBoutById(id, bouts = this.localBouts) {
|
|
567
|
+
return bouts.find(bout => String(this._idOf(bout)) === String(id));
|
|
548
568
|
},
|
|
549
|
-
|
|
550
|
-
const
|
|
569
|
+
_withSequentialScheduledOrder(bouts) {
|
|
570
|
+
const scheduledOrderById = new Map(
|
|
571
|
+
bouts
|
|
551
572
|
.filter(b => this._normalizeStatus(b.Status) === 'scheduled')
|
|
552
573
|
.slice()
|
|
553
|
-
.sort((a, b) => Number(a.OrderIndex ?? Infinity) - Number(b.OrderIndex ?? Infinity))
|
|
554
|
-
|
|
555
|
-
|
|
574
|
+
.sort((a, b) => Number(a.OrderIndex ?? Infinity) - Number(b.OrderIndex ?? Infinity))
|
|
575
|
+
.map((bout, index) => [String(this._idOf(bout)), index])
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
return bouts.map(bout => {
|
|
579
|
+
const orderIndex = scheduledOrderById.get(String(this._idOf(bout)));
|
|
580
|
+
return orderIndex === undefined ? bout : { ...bout, OrderIndex: orderIndex };
|
|
556
581
|
});
|
|
557
582
|
},
|
|
558
583
|
_swapOrderBetweenIds(idA, idB) {
|
|
559
584
|
if (!idA || !idB || String(idA) === String(idB)) return;
|
|
560
|
-
const
|
|
561
|
-
const
|
|
585
|
+
const normalizedBouts = this._withSequentialScheduledOrder(this.localBouts);
|
|
586
|
+
const a = this._getBoutById(idA, normalizedBouts);
|
|
587
|
+
const b = this._getBoutById(idB, normalizedBouts);
|
|
562
588
|
if (!a || !b) return;
|
|
563
|
-
if (this._normalizeStatus(a.Status) !== 'scheduled' ||
|
|
564
|
-
this._normalizeStatus(b.Status) !== 'scheduled') return;
|
|
565
|
-
|
|
566
|
-
// make sure indices are sane before swapping
|
|
567
|
-
this._ensureSequentialOrderIndexForScheduled();
|
|
589
|
+
if (this._normalizeStatus(a.Status) !== 'scheduled' || this._normalizeStatus(b.Status) !== 'scheduled') return;
|
|
568
590
|
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
|
|
591
|
+
const swappedOrderById = new Map([
|
|
592
|
+
[String(idA), Number(b.OrderIndex ?? 0)],
|
|
593
|
+
[String(idB), Number(a.OrderIndex ?? 0)]
|
|
594
|
+
]);
|
|
572
595
|
|
|
573
|
-
|
|
574
|
-
|
|
596
|
+
this.localBouts = normalizedBouts.map(bout => {
|
|
597
|
+
const orderIndex = swappedOrderById.get(String(this._idOf(bout)));
|
|
598
|
+
return orderIndex === undefined ? bout : { ...bout, OrderIndex: orderIndex };
|
|
599
|
+
});
|
|
575
600
|
},
|
|
576
601
|
|
|
577
602
|
// --- DnD drop from <ReorderableShell> ---
|
|
578
|
-
onReorderDrop({fromDragId, toDragId}) {
|
|
603
|
+
onReorderDrop({ fromDragId, toDragId }) {
|
|
579
604
|
this._swapOrderBetweenIds(fromDragId, toDragId);
|
|
580
605
|
},
|
|
581
606
|
|
|
582
607
|
// --- Tap-to-swap (mobile) from <ReorderableShell> ---
|
|
583
|
-
onReorderTap(payload) {
|
|
608
|
+
onReorderTap(payload) {
|
|
584
609
|
const tappedId = this._idOf(payload);
|
|
585
610
|
if (!tappedId) return;
|
|
586
611
|
|
|
@@ -593,16 +618,26 @@ export default {
|
|
|
593
618
|
this.selectedReorderId = null;
|
|
594
619
|
return;
|
|
595
620
|
}
|
|
596
|
-
this._swapOrderBetweenIds(this.selectedReorderId, tappedId);
|
|
597
|
-
this.selectedReorderId = null;
|
|
598
|
-
},
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
621
|
+
this._swapOrderBetweenIds(this.selectedReorderId, tappedId);
|
|
622
|
+
this.selectedReorderId = null;
|
|
623
|
+
},
|
|
624
|
+
reconcileSelectedBout() {
|
|
625
|
+
const selectedBoutId = this.selectedBout?.BoutId;
|
|
626
|
+
if (!selectedBoutId) return;
|
|
627
|
+
|
|
628
|
+
const updatedBout = this.localBouts.find(bout => bout.BoutId === selectedBoutId);
|
|
629
|
+
if (!updatedBout) return;
|
|
630
|
+
|
|
631
|
+
this.selectedBout = { ...updatedBout };
|
|
632
|
+
if (normalizeBoutStatus(updatedBout) !== 'active') return;
|
|
633
|
+
this.showDirectorModal = true;
|
|
634
|
+
},
|
|
635
|
+
cloneBouts(bouts) {
|
|
636
|
+
return Array.isArray(bouts) ? bouts.map(bout => ({ ...bout })) : [];
|
|
637
|
+
},
|
|
638
|
+
sortBoutsByOrder(bouts) {
|
|
639
|
+
return this.cloneBouts(bouts).sort((a, b) => Number(a.OrderIndex ?? 0) - Number(b.OrderIndex ?? 0));
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
</script>
|