@dcrackel/hematournamentui 1.0.706 → 1.0.708
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 +118 -88
- package/README.md +29 -22
- package/dist/HemaTournamentUI-lib.es.js +8394 -8807
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +183 -428
- package/dist/hematournamentui.css +1 -1
- package/eslint.config.js +49 -23
- package/package.json +15 -11
- package/postcss.config.js +3 -3
- package/prettier.config.js +16 -10
- package/src/config/boutScreenConfigurations.js +52 -50
- package/src/index.js +2 -0
- 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/getDEBouts-TableOf128.js +37 -0
- package/src/mocks/getDEBouts-TableOf64.js +35 -0
- 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/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -0
- package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -0
- 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.test.js +18 -0
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +29 -23
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.stories.js +41 -41
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +28 -16
- 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/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +33 -0
- package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +45 -0
- package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +103 -0
- 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 +298 -194
- 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/TableauBoutCard.stories.js +60 -98
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +143 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +256 -202
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -93
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -111
- 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 +56 -32
- 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 +177 -10
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +319 -198
- package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +29 -0
- package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +46 -0
- package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -0
- package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -0
- package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -0
- package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -0
- package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +57 -0
- package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +65 -0
- package/src/stories/Organisms/Containers/TableauColumn/TabeauColumn.stories.js +26 -27
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +31 -26
- 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 +216 -109
- package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +138 -43
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +198 -195
- package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +39 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -0
- 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
- package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +0 -111
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +0 -112
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +0 -23
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +0 -79
|
@@ -1,90 +1,127 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section>
|
|
3
|
-
<EditEventsTopMenu :currentTab="'Bracket'" :tabs="tabs(role, isListView)" @tabMenuClick="handleTabMenuClick"/>
|
|
4
|
-
<ToggleHeader
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@update:selection="handleViewChange"
|
|
13
|
-
@update:cardSize="handleCardSizeToggle"/>
|
|
14
|
-
|
|
15
|
-
<Tableau
|
|
16
|
-
:bouts="sortedBouts"
|
|
17
|
-
:hostingClubColors="hostingClubColors"
|
|
18
|
-
:bracketSize="bracketSize"
|
|
19
|
-
:largeCards="largeCards"
|
|
20
|
-
:listView="isListView"
|
|
21
|
-
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
22
|
-
:role="role"
|
|
23
|
-
:currentUserId="currentUserId"
|
|
24
|
-
@action:editBout="editBout"
|
|
25
|
-
@action:directingBout="directBout"
|
|
26
|
-
@action:assignBout="openAssignDirector"
|
|
3
|
+
<EditEventsTopMenu :currentTab="'Bracket'" :tabs="tabs(role, isListView)" @tabMenuClick="handleTabMenuClick" />
|
|
4
|
+
<ToggleHeader
|
|
5
|
+
:currentSelection="viewName"
|
|
6
|
+
:key="viewName"
|
|
7
|
+
firstButtonLabel="List View"
|
|
8
|
+
secondButtonLabel="Tableau"
|
|
9
|
+
:showConnected="true"
|
|
10
|
+
:connectedToServer="connectedToServer"
|
|
11
|
+
@update:selection="handleViewChange"
|
|
27
12
|
/>
|
|
28
13
|
|
|
14
|
+
<div class="flex flex-col gap-4 xl:flex-row">
|
|
15
|
+
<div class="min-w-0 flex-1">
|
|
16
|
+
<Tableau
|
|
17
|
+
:bouts="sortedBouts"
|
|
18
|
+
:hostingClubColors="hostingClubColors"
|
|
19
|
+
:bracketSize="bracketSize"
|
|
20
|
+
:listView="isListView"
|
|
21
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
22
|
+
:plannedDirectingStations="plannedDirectingStations"
|
|
23
|
+
:plannedBoutAssignments="plannedBoutAssignments"
|
|
24
|
+
:viewerPersonId="viewerPersonId"
|
|
25
|
+
@action:editBout="editBout"
|
|
26
|
+
@action:directingBout="directBout"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<BracketDirectorAssignmentPanel
|
|
31
|
+
v-if="showPlannedAssignmentPanel"
|
|
32
|
+
class="order-first flex-none xl:order-last"
|
|
33
|
+
:stations="plannedDirectingStations"
|
|
34
|
+
:showAddCard="showAddPlannedDirectorCard"
|
|
35
|
+
@request:add-planned-director="$emit('request:add-planned-director')"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
29
39
|
<div v-if="bouts.length < 1" class="w-full flex justify-center items-center">
|
|
30
40
|
<div class="text-center mb-10">
|
|
31
41
|
<img alt="Small desert scene with wind blowing." class="w-96 mx-auto" :src="emptyDesertIcon" />
|
|
32
42
|
<BaseText text="Nothing to Show Yet!" size="lg" color="quinary" weight="bold" class="text-center" />
|
|
33
|
-
<BaseText
|
|
34
|
-
|
|
43
|
+
<BaseText
|
|
44
|
+
text="Check Back when this event has progress to Direct Elimination"
|
|
45
|
+
size="sm"
|
|
46
|
+
color="quinary"
|
|
47
|
+
weight="normal"
|
|
48
|
+
/>
|
|
49
|
+
<BaseText
|
|
50
|
+
text="The Generate bracket button will appear on the bottom of the pools screen"
|
|
51
|
+
size="sm"
|
|
52
|
+
color="quinary"
|
|
53
|
+
weight="normal"
|
|
54
|
+
/>
|
|
35
55
|
</div>
|
|
36
56
|
</div>
|
|
37
57
|
|
|
38
|
-
<DirectorModal
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<EditBoutModal :bout="selectedBout"
|
|
51
|
-
:eventRules="eventRules"
|
|
52
|
-
:hostingClubColors="hostingClubColors"
|
|
53
|
-
:show="showEditBoutModal"
|
|
54
|
-
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
55
|
-
@update:closeModal="handleCloseModal"
|
|
56
|
-
@submit:bout="handleSubmitBout"/>
|
|
57
|
-
|
|
58
|
-
<AssignDirectorModal
|
|
59
|
-
:show="showAssignDirectorModal"
|
|
60
|
-
:bout="assigningBout || {}"
|
|
61
|
-
:directors="directors"
|
|
62
|
-
@update:closeModal="closeAssignDirectorModal"
|
|
63
|
-
@assign="handleAssignDirector"
|
|
58
|
+
<DirectorModal
|
|
59
|
+
:bout="selectedBout"
|
|
60
|
+
:eventRules="eventRules"
|
|
61
|
+
:hostingClubColors="hostingClubColors"
|
|
62
|
+
:show="showDirectorModal"
|
|
63
|
+
@penalty:add="handleAddPenalty"
|
|
64
|
+
@penalty:update="handleUpdatePenalty"
|
|
65
|
+
@penalty:remove="handleRemovePenalty"
|
|
66
|
+
@update:closeModal="handleCloseModal"
|
|
67
|
+
@update:bout="handleUpdateBout"
|
|
68
|
+
@submit:bout="handleSubmitBout"
|
|
64
69
|
/>
|
|
65
70
|
|
|
71
|
+
<EditBoutModal
|
|
72
|
+
:bout="selectedBout"
|
|
73
|
+
:eventRules="eventRules"
|
|
74
|
+
:hostingClubColors="hostingClubColors"
|
|
75
|
+
:show="showEditBoutModal"
|
|
76
|
+
:isCountingBackwardsMaxScore="isCountingBackwardsMaxScore"
|
|
77
|
+
@update:closeModal="handleCloseModal"
|
|
78
|
+
@request:bout-active="handleBoutActiveRequest"
|
|
79
|
+
@submit:bout="handleSubmitBout"
|
|
80
|
+
/>
|
|
66
81
|
</section>
|
|
67
82
|
</template>
|
|
68
83
|
|
|
69
84
|
<script>
|
|
70
|
-
import EditEventsTopMenu from
|
|
71
|
-
import ToggleHeader from
|
|
72
|
-
import BaseText from
|
|
73
|
-
import DirectorModal from
|
|
74
|
-
import EditBoutModal from
|
|
75
|
-
import Tableau from
|
|
76
|
-
import
|
|
85
|
+
import EditEventsTopMenu from '../../Menus/EditEventsTopMenu/EditEventsTopMenu.vue';
|
|
86
|
+
import ToggleHeader from '../../../Organisms/Headers/ToggleHeader/ToggleHeader.vue';
|
|
87
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
88
|
+
import DirectorModal from '../../../Molecules/Modals/DirectorModal/DirectorModal.vue';
|
|
89
|
+
import EditBoutModal from '../../../Molecules/Modals/EditBoutModal/EditBoutModal.vue';
|
|
90
|
+
import Tableau from '../../../Organisms/Containers/Tableau/Tableau.vue';
|
|
91
|
+
import BracketDirectorAssignmentPanel from '../../../Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue';
|
|
92
|
+
import emptyDesertIcon from '../../../../assets/empty_desert_icon.png';
|
|
77
93
|
import { tabs } from '../../../Util/tabs.js';
|
|
78
|
-
import AssignDirectorModal from "../../../Molecules/Modals/AssignDirectorModal/AssignDirectorModal.vue";
|
|
79
94
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
const isByeFencer = person => {
|
|
96
|
+
if (!person?.PersonId || Number(person.PersonId) === 0) return true;
|
|
97
|
+
return String(person.DisplayName || '').toUpperCase() === 'BYE';
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const invalidDirectingBoutPredicates = [
|
|
101
|
+
bout => !bout?.BoutId,
|
|
102
|
+
bout => isByeFencer(bout?.Person1),
|
|
103
|
+
bout => isByeFencer(bout?.Person2)
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
export default {
|
|
107
|
+
emits: [
|
|
108
|
+
'close:directing-bout',
|
|
109
|
+
'penalty:add',
|
|
110
|
+
'penalty:remove',
|
|
111
|
+
'penalty:update',
|
|
112
|
+
'request:add-planned-director',
|
|
113
|
+
'request:bout-active',
|
|
114
|
+
'submit:bout',
|
|
115
|
+
'tab:menu-click',
|
|
116
|
+
'update:bout',
|
|
117
|
+
'update:directing-bout'
|
|
118
|
+
],
|
|
119
|
+
components: {
|
|
120
|
+
Tableau,
|
|
121
|
+
EditBoutModal,
|
|
122
|
+
DirectorModal,
|
|
123
|
+
BracketDirectorAssignmentPanel,
|
|
124
|
+
BaseText,
|
|
88
125
|
ToggleHeader,
|
|
89
126
|
EditEventsTopMenu
|
|
90
127
|
},
|
|
@@ -92,10 +129,10 @@ export default {
|
|
|
92
129
|
bouts: {
|
|
93
130
|
type: Array,
|
|
94
131
|
required: true
|
|
95
|
-
},
|
|
96
|
-
eventRules: {
|
|
97
|
-
type: Array,
|
|
98
|
-
required: true
|
|
132
|
+
},
|
|
133
|
+
eventRules: {
|
|
134
|
+
type: Array,
|
|
135
|
+
required: true
|
|
99
136
|
},
|
|
100
137
|
hostingClubColors: {
|
|
101
138
|
type: Object,
|
|
@@ -113,15 +150,26 @@ export default {
|
|
|
113
150
|
type: String,
|
|
114
151
|
default: 'Admin'
|
|
115
152
|
},
|
|
116
|
-
|
|
153
|
+
plannedDirectingStations: {
|
|
117
154
|
type: Array,
|
|
118
155
|
default: () => []
|
|
119
156
|
},
|
|
120
|
-
|
|
157
|
+
plannedBoutAssignments: {
|
|
158
|
+
type: Array,
|
|
159
|
+
default: () => []
|
|
160
|
+
},
|
|
161
|
+
viewerPersonId: {
|
|
121
162
|
type: [Number, String],
|
|
122
163
|
default: null
|
|
123
164
|
},
|
|
124
|
-
|
|
165
|
+
showPlannedDirectorAssignments: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false
|
|
168
|
+
},
|
|
169
|
+
showAddPlannedDirectorCard: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
default: true
|
|
172
|
+
}
|
|
125
173
|
},
|
|
126
174
|
data() {
|
|
127
175
|
return {
|
|
@@ -130,17 +178,14 @@ export default {
|
|
|
130
178
|
showEditBoutModal: false,
|
|
131
179
|
selectedBout: {},
|
|
132
180
|
tabs,
|
|
133
|
-
viewName:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
isListView: false,
|
|
137
|
-
showAssignDirectorModal: false,
|
|
138
|
-
assigningBout: null,
|
|
181
|
+
viewName: 'Tableau',
|
|
182
|
+
boutsData: this.cloneBouts(this.bouts),
|
|
183
|
+
isListView: false
|
|
139
184
|
};
|
|
140
185
|
},
|
|
141
186
|
computed: {
|
|
142
|
-
|
|
143
|
-
return
|
|
187
|
+
showPlannedAssignmentPanel() {
|
|
188
|
+
return this.showPlannedDirectorAssignments || this.plannedDirectingStations.length > 0;
|
|
144
189
|
},
|
|
145
190
|
isCountingBackwardsMaxScore() {
|
|
146
191
|
// 1) see if PoolScoreDirection exists and is explicitly "false"
|
|
@@ -159,28 +204,20 @@ export default {
|
|
|
159
204
|
return Number.isFinite(n) && n > 0 ? n : null;
|
|
160
205
|
},
|
|
161
206
|
bracketSize() {
|
|
162
|
-
return this.boutsData && this.boutsData.length > 0 && this.boutsData[0].RoundLabel
|
|
207
|
+
return this.boutsData && this.boutsData.length > 0 && this.boutsData[0].RoundLabel
|
|
208
|
+
? this.boutsData[0].RoundLabel
|
|
209
|
+
: '';
|
|
163
210
|
},
|
|
164
|
-
|
|
165
|
-
return this.boutsData.
|
|
166
|
-
},
|
|
167
|
-
sortedBouts() {
|
|
168
|
-
return this.boutsData.slice().sort((a, b) => {
|
|
169
|
-
if (a.DEBoutId < b.DEBoutId) {
|
|
170
|
-
return -1;
|
|
171
|
-
}
|
|
172
|
-
if (a.DEBoutId > b.DEBoutId) {
|
|
173
|
-
return 1;
|
|
174
|
-
}
|
|
175
|
-
return 0;
|
|
176
|
-
});
|
|
211
|
+
sortedBouts() {
|
|
212
|
+
return this.boutsData.slice().sort((a, b) => Number(a.DEBoutId ?? 0) - Number(b.DEBoutId ?? 0));
|
|
177
213
|
}
|
|
178
214
|
},
|
|
179
215
|
watch: {
|
|
180
|
-
bouts: {
|
|
181
|
-
handler(newBouts) {
|
|
182
|
-
this.boutsData = this.cloneBouts(newBouts);
|
|
183
|
-
|
|
216
|
+
bouts: {
|
|
217
|
+
handler(newBouts) {
|
|
218
|
+
this.boutsData = this.cloneBouts(newBouts);
|
|
219
|
+
this.reconcileSelectedBout();
|
|
220
|
+
},
|
|
184
221
|
deep: true,
|
|
185
222
|
immediate: true
|
|
186
223
|
}
|
|
@@ -193,94 +230,53 @@ export default {
|
|
|
193
230
|
window.removeEventListener('resize', this.updateViewBasedOnScreenSize);
|
|
194
231
|
},
|
|
195
232
|
methods: {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
this.closeAssignDirectorModal();
|
|
205
|
-
},
|
|
206
|
-
openAssignDirector(bout) {
|
|
207
|
-
this.assigningBout = bout;
|
|
208
|
-
this.showAssignDirectorModal = true;
|
|
209
|
-
},
|
|
210
|
-
closeAssignDirectorModal() {
|
|
211
|
-
this.showAssignDirectorModal = false;
|
|
212
|
-
this.assigningBout = null;
|
|
213
|
-
},
|
|
214
|
-
handleCloseModal(bout) {
|
|
215
|
-
this.showDirectorModal = false;
|
|
216
|
-
this.showEditBoutModal = false;
|
|
217
|
-
|
|
218
|
-
if (!bout?.BoutId) return;
|
|
219
|
-
if (bout.Status !== 'Completed') {
|
|
220
|
-
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
221
|
-
if (!updatedBout) return;
|
|
222
|
-
|
|
223
|
-
updatedBout.Status = 'Scheduled';
|
|
224
|
-
updatedBout.Score1 = 0;
|
|
225
|
-
updatedBout.Score2 = 0;
|
|
226
|
-
this.$emit('update:bout', updatedBout);
|
|
227
|
-
}
|
|
233
|
+
handleCloseModal() {
|
|
234
|
+
const closedDirectingBout = this.showDirectorModal && this.selectedBout?.BoutId ? { ...this.selectedBout } : null;
|
|
235
|
+
this.showDirectorModal = false;
|
|
236
|
+
this.showEditBoutModal = false;
|
|
237
|
+
this.selectedBout = {};
|
|
238
|
+
if (closedDirectingBout) this.$emit('close:directing-bout', closedDirectingBout);
|
|
228
239
|
},
|
|
229
240
|
handleTabMenuClick(value) {
|
|
230
241
|
this.$emit('tab:menu-click', value);
|
|
231
242
|
},
|
|
232
243
|
handleViewChange(value) {
|
|
233
244
|
this.viewName = value;
|
|
245
|
+
this.isListView = value === 'List View';
|
|
246
|
+
},
|
|
247
|
+
handleUpdateBout(bout) {
|
|
248
|
+
if (!bout?.BoutId) return;
|
|
249
|
+
this.$emit('update:bout', { ...bout });
|
|
250
|
+
},
|
|
251
|
+
handleSubmitBout(bout) {
|
|
252
|
+
this.showEditBoutModal = false;
|
|
253
|
+
this.showDirectorModal = false;
|
|
254
|
+
if (!bout?.BoutId) return;
|
|
255
|
+
this.$emit('submit:bout', { ...bout });
|
|
256
|
+
this.selectedBout = {};
|
|
257
|
+
},
|
|
258
|
+
handleBoutActiveRequest(bout) {
|
|
259
|
+
this.showEditBoutModal = false;
|
|
260
|
+
if (!bout?.BoutId) return;
|
|
261
|
+
this.$emit('request:bout-active', { ...bout });
|
|
262
|
+
this.selectedBout = {};
|
|
263
|
+
},
|
|
264
|
+
directBout(bout) {
|
|
265
|
+
if (!this.canDirectBout(bout)) return;
|
|
234
266
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return
|
|
238
|
-
}
|
|
239
|
-
this.isListView = false;
|
|
240
|
-
},
|
|
241
|
-
handleUpdateBout(bout) {
|
|
242
|
-
if (!bout?.BoutId) return;
|
|
243
|
-
|
|
244
|
-
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
245
|
-
if (!updatedBout) return;
|
|
246
|
-
Object.assign(updatedBout, bout);
|
|
247
|
-
updatedBout.Status = 'Active';
|
|
248
|
-
this.$emit('update:bout', updatedBout);
|
|
249
|
-
},
|
|
250
|
-
handleSubmitBout(bout) {
|
|
251
|
-
this.showEditBoutModal = false;
|
|
252
|
-
this.showDirectorModal = false;
|
|
253
|
-
if (!bout?.BoutId) return;
|
|
254
|
-
|
|
255
|
-
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
256
|
-
if (!updatedBout) return;
|
|
257
|
-
|
|
258
|
-
Object.assign(updatedBout, bout);
|
|
259
|
-
updatedBout.Status = 'Completed';
|
|
260
|
-
updatedBout.Ended = new Date().toISOString();
|
|
267
|
+
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
268
|
+
if (!updatedBout) return;
|
|
261
269
|
|
|
262
|
-
this
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (!this.canDirectBout(bout)) return;
|
|
266
|
-
|
|
267
|
-
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
268
|
-
if (!updatedBout) return;
|
|
269
|
-
|
|
270
|
-
updatedBout.Status = 'Active';
|
|
271
|
-
this.showDirectorModal = true;
|
|
272
|
-
this.selectedBout = updatedBout;
|
|
273
|
-
this.$emit('update:directing-bout', updatedBout)
|
|
274
|
-
},
|
|
275
|
-
editBout(bout) {
|
|
276
|
-
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
277
|
-
if (!updatedBout) return;
|
|
278
|
-
|
|
279
|
-
this.showEditBoutModal = true;
|
|
280
|
-
this.selectedBout = updatedBout;
|
|
270
|
+
this.selectedBout = { ...updatedBout };
|
|
271
|
+
this.showDirectorModal = String(updatedBout.Status || '').toLowerCase() === 'active';
|
|
272
|
+
this.$emit('update:directing-bout', { ...updatedBout });
|
|
281
273
|
},
|
|
282
|
-
|
|
283
|
-
this.
|
|
274
|
+
editBout(bout) {
|
|
275
|
+
const updatedBout = this.boutsData.find(b => b.BoutId === bout.BoutId);
|
|
276
|
+
if (!updatedBout) return;
|
|
277
|
+
|
|
278
|
+
this.showEditBoutModal = true;
|
|
279
|
+
this.selectedBout = updatedBout;
|
|
284
280
|
},
|
|
285
281
|
updateViewBasedOnScreenSize() {
|
|
286
282
|
this.isListView = window.innerWidth <= 768;
|
|
@@ -289,21 +285,28 @@ export default {
|
|
|
289
285
|
this.$emit('penalty:update', penalty);
|
|
290
286
|
},
|
|
291
287
|
handleAddPenalty(penalty) {
|
|
292
|
-
|
|
293
288
|
this.$emit('penalty:add', penalty);
|
|
294
289
|
},
|
|
295
|
-
handleRemovePenalty(penalty) {
|
|
296
|
-
this.$emit('penalty:remove', penalty);
|
|
297
|
-
},
|
|
298
|
-
canDirectBout(bout) {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
290
|
+
handleRemovePenalty(penalty) {
|
|
291
|
+
this.$emit('penalty:remove', penalty);
|
|
292
|
+
},
|
|
293
|
+
canDirectBout(bout) {
|
|
294
|
+
return !invalidDirectingBoutPredicates.some(predicate => predicate(bout));
|
|
295
|
+
},
|
|
296
|
+
reconcileSelectedBout() {
|
|
297
|
+
const selectedBoutId = this.selectedBout?.BoutId;
|
|
298
|
+
if (!selectedBoutId) return;
|
|
299
|
+
|
|
300
|
+
const updatedBout = this.boutsData.find(bout => bout.BoutId === selectedBoutId);
|
|
301
|
+
if (!updatedBout) return;
|
|
302
|
+
|
|
303
|
+
this.selectedBout = { ...updatedBout };
|
|
304
|
+
if (String(updatedBout.Status || '').toLowerCase() !== 'active') return;
|
|
305
|
+
this.showDirectorModal = true;
|
|
306
|
+
},
|
|
307
|
+
cloneBouts(bouts) {
|
|
308
|
+
return Array.isArray(bouts) ? bouts.map(bout => ({ ...bout })) : [];
|
|
309
|
+
}
|
|
307
310
|
}
|
|
308
|
-
}
|
|
309
|
-
</script>
|
|
311
|
+
};
|
|
312
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import portraitUrl from '../../../../assets/portrait1.png';
|
|
2
|
+
|
|
3
|
+
const createBoutAssignments = (ringId, boutIds) => boutIds.map(DEBoutId => ({ DEBoutId, RingId: ringId }));
|
|
4
|
+
|
|
5
|
+
export const plannedDirectingStations = [
|
|
6
|
+
{
|
|
7
|
+
RingId: 1,
|
|
8
|
+
RingName: 'Ring 1',
|
|
9
|
+
Color: '#2563eb',
|
|
10
|
+
Director: { PersonId: 1001, DisplayName: 'Alex Morgan', PortraitUrl: portraitUrl }
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
RingId: 2,
|
|
14
|
+
RingName: 'Ring 2',
|
|
15
|
+
Color: '#dc2626',
|
|
16
|
+
Director: { PersonId: 1002, DisplayName: 'Jordan Lee', PortraitUrl: portraitUrl }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
RingId: 3,
|
|
20
|
+
RingName: 'Ring 3',
|
|
21
|
+
Color: '#059669',
|
|
22
|
+
Director: { PersonId: 1003, DisplayName: 'Sam Rivera', PortraitUrl: portraitUrl }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
RingId: 4,
|
|
26
|
+
RingName: 'Ring 4',
|
|
27
|
+
Color: '#d97706',
|
|
28
|
+
Director: { PersonId: 1004, DisplayName: 'Taylor Quinn', PortraitUrl: portraitUrl }
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export const plannedBoutAssignments = [
|
|
33
|
+
...createBoutAssignments(1, [65, 66, 67, 68, 69, 70, 71, 72, 97, 98, 99, 100, 113, 114, 121, 125]),
|
|
34
|
+
...createBoutAssignments(2, [73, 74, 75, 76, 77, 78, 79, 80, 101, 102, 103, 104, 115, 116, 122]),
|
|
35
|
+
...createBoutAssignments(3, [81, 82, 83, 84, 85, 86, 87, 88, 105, 106, 107, 108, 117, 118, 123, 126]),
|
|
36
|
+
...createBoutAssignments(4, [89, 90, 91, 92, 93, 94, 95, 96, 109, 110, 111, 112, 119, 120, 124, 127])
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export const plannedSuggestionViewerId = plannedDirectingStations[0].Director.PersonId;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const STORY_DIRECTOR = {
|
|
2
|
+
PersonId: -1,
|
|
3
|
+
DisplayName: 'Story Director'
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
const isSameBout = (bout, selectedBout) => String(bout.BoutId) === String(selectedBout.BoutId);
|
|
7
|
+
const isActiveBout = bout => String(bout?.Status || '').toLowerCase() === 'active';
|
|
8
|
+
const hasSameIdentity = (firstId, secondId) => String(firstId ?? '') === String(secondId ?? '');
|
|
9
|
+
|
|
10
|
+
export const cloneStoryBouts = bouts => (bouts || []).map(bout => ({ ...bout }));
|
|
11
|
+
|
|
12
|
+
export const canStoryDirectorDirectBout = (bout, directorId) =>
|
|
13
|
+
!isActiveBout(bout) || hasSameIdentity(bout.RefereeId, directorId);
|
|
14
|
+
|
|
15
|
+
export const getStoryDirectorId = station => station?.Director?.PersonId ?? STORY_DIRECTOR.PersonId;
|
|
16
|
+
|
|
17
|
+
export const activateStoryBout = (bout, station = null) => {
|
|
18
|
+
const director = station?.Director || STORY_DIRECTOR;
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
...bout,
|
|
22
|
+
Status: 'Active',
|
|
23
|
+
RefereeId: director.PersonId,
|
|
24
|
+
RefName: director.DisplayName,
|
|
25
|
+
RingName: station?.RingName || bout.RingName || 'DE Bracket',
|
|
26
|
+
TimerStatus: bout.TimerStatus || 'stopped',
|
|
27
|
+
TimeLeft: Number(bout.TimeLeft) > 0 ? Number(bout.TimeLeft) : 180
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const clearStoryBoutChrome = bout => ({
|
|
32
|
+
...bout,
|
|
33
|
+
RingName: '',
|
|
34
|
+
TimerStatus: 'stopped',
|
|
35
|
+
TimeLeft: 0
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const replaceStoryBout = (bouts, selectedBout) =>
|
|
39
|
+
bouts.map(bout => (isSameBout(bout, selectedBout) ? { ...selectedBout } : bout));
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
activateStoryBout,
|
|
4
|
+
canStoryDirectorDirectBout,
|
|
5
|
+
clearStoryBoutChrome,
|
|
6
|
+
replaceStoryBout
|
|
7
|
+
} from './BracketStoryHarness';
|
|
8
|
+
|
|
9
|
+
describe('Bracket story parent simulation', () => {
|
|
10
|
+
it('returns an Active parent-owned bout without mutating the selected bout', () => {
|
|
11
|
+
const scheduledBout = { BoutId: 42, Status: 'Scheduled', TimeLeft: 0, Score1: 2, Score2: 1 };
|
|
12
|
+
|
|
13
|
+
const activeBout = activateStoryBout(scheduledBout);
|
|
14
|
+
|
|
15
|
+
expect(activeBout).toMatchObject({
|
|
16
|
+
Status: 'Active',
|
|
17
|
+
RefereeId: -1,
|
|
18
|
+
RefName: 'Story Director',
|
|
19
|
+
RingName: 'DE Bracket',
|
|
20
|
+
TimerStatus: 'stopped',
|
|
21
|
+
TimeLeft: 180,
|
|
22
|
+
Score1: 2,
|
|
23
|
+
Score2: 1
|
|
24
|
+
});
|
|
25
|
+
expect(scheduledBout).toEqual({ BoutId: 42, Status: 'Scheduled', TimeLeft: 0, Score1: 2, Score2: 1 });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('replaces only the selected bout in the story-owned collection', () => {
|
|
29
|
+
const bouts = [
|
|
30
|
+
{ BoutId: 41, Status: 'Scheduled' },
|
|
31
|
+
{ BoutId: 42, Status: 'Scheduled' }
|
|
32
|
+
];
|
|
33
|
+
const activeBout = { BoutId: 42, Status: 'Active' };
|
|
34
|
+
|
|
35
|
+
expect(replaceStoryBout(bouts, activeBout)).toEqual([bouts[0], activeBout]);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('uses the viewer station when the story simulates pulling a scheduled bout', () => {
|
|
39
|
+
const scheduledBout = { BoutId: 42, Status: 'Scheduled' };
|
|
40
|
+
const station = {
|
|
41
|
+
RingName: 'Ring 1',
|
|
42
|
+
Director: { PersonId: 1001, DisplayName: 'Alex Morgan' }
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
expect(activateStoryBout(scheduledBout, station)).toMatchObject({
|
|
46
|
+
Status: 'Active',
|
|
47
|
+
RefereeId: 1001,
|
|
48
|
+
RefName: 'Alex Morgan',
|
|
49
|
+
RingName: 'Ring 1'
|
|
50
|
+
});
|
|
51
|
+
expect(scheduledBout).toEqual({ BoutId: 42, Status: 'Scheduled' });
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('allows scheduled bouts to move but protects an Active bout owned by another director', () => {
|
|
55
|
+
expect(canStoryDirectorDirectBout({ Status: 'Scheduled', RefereeId: 2002 }, 1001)).toBe(true);
|
|
56
|
+
expect(canStoryDirectorDirectBout({ Status: 'Active', RefereeId: 2002 }, 1001)).toBe(false);
|
|
57
|
+
expect(canStoryDirectorDirectBout({ Status: 'Active', RefereeId: 1001 }, '1001')).toBe(true);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('clears story-only ring and timer fields without resetting status or scores', () => {
|
|
61
|
+
const activeBout = {
|
|
62
|
+
BoutId: 42,
|
|
63
|
+
Status: 'Active',
|
|
64
|
+
Score1: 5,
|
|
65
|
+
Score2: 4,
|
|
66
|
+
RingName: 'Ring 3',
|
|
67
|
+
TimerStatus: 'running',
|
|
68
|
+
TimeLeft: 72
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
expect(clearStoryBoutChrome(activeBout)).toEqual({
|
|
72
|
+
...activeBout,
|
|
73
|
+
RingName: '',
|
|
74
|
+
TimerStatus: 'stopped',
|
|
75
|
+
TimeLeft: 0
|
|
76
|
+
});
|
|
77
|
+
expect(activeBout).toMatchObject({ Status: 'Active', Score1: 5, Score2: 4 });
|
|
78
|
+
});
|
|
79
|
+
});
|