@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import ToggleSwitch from '../../../Molecules/Inputs/Toggle/Toggle.vue';
|
|
4
|
+
import EditBout from './EditBout.vue';
|
|
5
|
+
|
|
6
|
+
const createBout = () => ({
|
|
7
|
+
BoutId: 42,
|
|
8
|
+
DEBoutId: null,
|
|
9
|
+
Status: 'Completed',
|
|
10
|
+
Score1: 4,
|
|
11
|
+
Score2: 3,
|
|
12
|
+
Person1: { PersonId: 1, DisplayName: 'Fencer One' },
|
|
13
|
+
Person2: { PersonId: 2, DisplayName: 'Fencer Two' }
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const mountEditBout = bout =>
|
|
17
|
+
shallowMount(EditBout, {
|
|
18
|
+
props: {
|
|
19
|
+
bout,
|
|
20
|
+
hostingClubColors: {},
|
|
21
|
+
eventRules: [{ Rules: { RuleName: 'PoolMaxPoints' }, RuleValue: '7' }]
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('EditBout intent', () => {
|
|
26
|
+
it('submits edited values without changing lifecycle fields', () => {
|
|
27
|
+
const bout = createBout();
|
|
28
|
+
const wrapper = mountEditBout(bout);
|
|
29
|
+
|
|
30
|
+
wrapper.vm.plus(true);
|
|
31
|
+
wrapper.vm.submitBout();
|
|
32
|
+
|
|
33
|
+
const submittedBout = wrapper.emitted('submit:bout')[0][0];
|
|
34
|
+
expect(submittedBout).toMatchObject({ Status: 'Completed', Score1: 5, Score2: 3 });
|
|
35
|
+
expect(submittedBout.Ended).toBeUndefined();
|
|
36
|
+
expect(bout.Score1).toBe(4);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('emits make-active intent without setting Status', async () => {
|
|
40
|
+
const bout = createBout();
|
|
41
|
+
const wrapper = mountEditBout(bout);
|
|
42
|
+
|
|
43
|
+
wrapper.findComponent(ToggleSwitch).vm.$emit('update:checked', true);
|
|
44
|
+
await wrapper.vm.$nextTick();
|
|
45
|
+
wrapper.vm.submitBout();
|
|
46
|
+
|
|
47
|
+
expect(wrapper.emitted('submit:bout')).toBeUndefined();
|
|
48
|
+
expect(wrapper.emitted('request:bout-active')).toEqual([[bout]]);
|
|
49
|
+
expect(bout.Status).toBe('Completed');
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="-m-6 mb-4 ml-4">
|
|
3
|
-
<ToggleSwitch :checked="makeActive" label="Make Active" @
|
|
3
|
+
<ToggleSwitch :checked="makeActive" label="Make Active" @update:checked="handleMakeActiveChange" />
|
|
4
4
|
</div>
|
|
5
5
|
<div class="flex items-center justify-between rounded-lg m-4">
|
|
6
6
|
<!-- Fencer 1 -->
|
|
@@ -8,17 +8,31 @@
|
|
|
8
8
|
<div class="flex space-x-4 items-center">
|
|
9
9
|
<div>
|
|
10
10
|
<div :class="`w-4 h-4 rounded-full bg-${computedColor(true)} absolute top-10 left-11`"></div>
|
|
11
|
-
<img :src="fencer1.portrait" alt="Portrait" class="w-12 h-12 rounded-full"/>
|
|
11
|
+
<img :src="fencer1.portrait" alt="Portrait" class="w-12 h-12 rounded-full" />
|
|
12
12
|
</div>
|
|
13
13
|
<div>
|
|
14
|
-
<BaseText :text="fencer1.name" size="md" color="primary" weight="bold"/>
|
|
15
|
-
<BaseText :text="fencer1.team" size="sm" color="quaternary"/>
|
|
14
|
+
<BaseText :text="fencer1.name" size="md" color="primary" weight="bold" />
|
|
15
|
+
<BaseText :text="fencer1.team" size="sm" color="quaternary" />
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="flex w-1/4 justify-between">
|
|
19
|
-
<BaseIcon
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<BaseIcon
|
|
20
|
+
icon-name="fa-square-minus"
|
|
21
|
+
size="4xl"
|
|
22
|
+
:color="computedColor(true)"
|
|
23
|
+
hover="quaternary"
|
|
24
|
+
:disabled="fencer1Score <= 0"
|
|
25
|
+
@click="minus(true)"
|
|
26
|
+
/>
|
|
27
|
+
<BaseText :text="fencer1Score" size="3xl" weight="bold" :class="`align-middle pt-0.5`" />
|
|
28
|
+
<BaseIcon
|
|
29
|
+
icon-name="fa-square-plus"
|
|
30
|
+
size="4xl"
|
|
31
|
+
:color="computedColor(true)"
|
|
32
|
+
hover="quaternary"
|
|
33
|
+
:disabled="fencer1Score >= maxPoints"
|
|
34
|
+
@click="plus(true)"
|
|
35
|
+
/>
|
|
22
36
|
</div>
|
|
23
37
|
</div>
|
|
24
38
|
|
|
@@ -26,18 +40,32 @@
|
|
|
26
40
|
<div class="flex justify-between shadow-lg drop-shadow p-2 rounded-xl bg-poolBox w-1/2 ml-4">
|
|
27
41
|
<div class="flex space-x-4 justify-between w-full">
|
|
28
42
|
<div class="flex w-1/4 justify-between">
|
|
29
|
-
<BaseIcon
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
<BaseIcon
|
|
44
|
+
icon-name="fa-square-minus"
|
|
45
|
+
size="4xl"
|
|
46
|
+
:color="computedColor(false)"
|
|
47
|
+
hover="quaternary"
|
|
48
|
+
:disabled="fencer2Score <= 0"
|
|
49
|
+
@click="minus(false)"
|
|
50
|
+
/>
|
|
51
|
+
<BaseText :text="fencer2Score" size="3xl" weight="bold" :class="`align-middle pt-0.5`" />
|
|
52
|
+
<BaseIcon
|
|
53
|
+
icon-name="fa-square-plus"
|
|
54
|
+
size="4xl"
|
|
55
|
+
:color="computedColor(false)"
|
|
56
|
+
hover="quaternary"
|
|
57
|
+
:disabled="fencer2Score >= maxPoints"
|
|
58
|
+
@click="plus(false)"
|
|
59
|
+
/>
|
|
32
60
|
</div>
|
|
33
61
|
<div class="flex space-x-4 items-center">
|
|
34
62
|
<div>
|
|
35
|
-
<BaseText :text="fencer2.name" size="md" color="primary" weight="bold" class="text-right"/>
|
|
36
|
-
<BaseText :text="fencer2.team" size="sm" color="quaternary" class="text-right"/>
|
|
63
|
+
<BaseText :text="fencer2.name" size="md" color="primary" weight="bold" class="text-right" />
|
|
64
|
+
<BaseText :text="fencer2.team" size="sm" color="quaternary" class="text-right" />
|
|
37
65
|
</div>
|
|
38
66
|
<div>
|
|
39
67
|
<div :class="`w-4 h-4 rounded-full bg-${computedColor(false)} absolute top-10 right-12`"></div>
|
|
40
|
-
<img :src="fencer2.portrait" alt="Portrait" class="w-12 h-12 rounded-full"/>
|
|
68
|
+
<img :src="fencer2.portrait" alt="Portrait" class="w-12 h-12 rounded-full" />
|
|
41
69
|
</div>
|
|
42
70
|
</div>
|
|
43
71
|
</div>
|
|
@@ -46,17 +74,27 @@
|
|
|
46
74
|
|
|
47
75
|
<div class="w-full flex justify-center mt-5">
|
|
48
76
|
<div class="w-1/2">
|
|
49
|
-
<BaseButton
|
|
77
|
+
<BaseButton label="Submit" type="grayAndBlue" :selected="true" @buttonClick="submitBout" />
|
|
50
78
|
</div>
|
|
51
79
|
</div>
|
|
52
80
|
</template>
|
|
53
81
|
|
|
54
82
|
<script>
|
|
55
|
-
import BaseButton from
|
|
56
|
-
import BaseText from
|
|
57
|
-
import missingPortrait from
|
|
58
|
-
import BaseIcon from
|
|
59
|
-
import ToggleSwitch from
|
|
83
|
+
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
84
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
85
|
+
import missingPortrait from '../../../../assets/portrait1.png';
|
|
86
|
+
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
87
|
+
import ToggleSwitch from '../../../Molecules/Inputs/Toggle/Toggle.vue';
|
|
88
|
+
|
|
89
|
+
const scoreFieldByFencer = {
|
|
90
|
+
true: 'Score1',
|
|
91
|
+
false: 'Score2'
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const submitEventByActiveSelection = {
|
|
95
|
+
true: 'request:bout-active',
|
|
96
|
+
false: 'submit:bout'
|
|
97
|
+
};
|
|
60
98
|
|
|
61
99
|
export default {
|
|
62
100
|
components: {
|
|
@@ -72,19 +110,19 @@ export default {
|
|
|
72
110
|
},
|
|
73
111
|
hostingClubColors: {
|
|
74
112
|
type: Object,
|
|
75
|
-
required: true
|
|
113
|
+
required: true
|
|
76
114
|
},
|
|
77
115
|
eventRules: {
|
|
78
|
-
type:
|
|
79
|
-
required: true
|
|
116
|
+
type: Array,
|
|
117
|
+
required: true
|
|
80
118
|
},
|
|
81
119
|
isCountingBackwardsMaxScore: {
|
|
82
120
|
type: Number,
|
|
83
121
|
default: 0
|
|
84
122
|
}
|
|
85
123
|
},
|
|
86
|
-
emits: ['
|
|
87
|
-
data(){
|
|
124
|
+
emits: ['request:bout-active', 'submit:bout'],
|
|
125
|
+
data() {
|
|
88
126
|
return {
|
|
89
127
|
missingPortrait,
|
|
90
128
|
localBout: { ...this.bout },
|
|
@@ -95,7 +133,7 @@ export default {
|
|
|
95
133
|
fencer1() {
|
|
96
134
|
const person1 = this.localBout.Person1 || {};
|
|
97
135
|
return {
|
|
98
|
-
portrait:
|
|
136
|
+
portrait: person1.Images && person1.Images.length ? person1.Images[0].URL : this.missingPortrait,
|
|
99
137
|
name: person1.DisplayName || 'Unknown',
|
|
100
138
|
team: (person1.Club && person1.Club.Name) || 'Unknown',
|
|
101
139
|
score: this.localBout.Score1
|
|
@@ -104,7 +142,7 @@ export default {
|
|
|
104
142
|
fencer2() {
|
|
105
143
|
const person2 = this.localBout.Person2 || {};
|
|
106
144
|
return {
|
|
107
|
-
portrait:
|
|
145
|
+
portrait: person2.Images && person2.Images.length ? person2.Images[0].URL : this.missingPortrait,
|
|
108
146
|
name: person2.DisplayName || 'Unknown',
|
|
109
147
|
team: (person2.Club && person2.Club.Name) || 'Unknown',
|
|
110
148
|
score: this.localBout.Score2
|
|
@@ -124,48 +162,38 @@ export default {
|
|
|
124
162
|
},
|
|
125
163
|
maxPoints() {
|
|
126
164
|
if (this.localBout.DEBoutId) {
|
|
127
|
-
const rule = this.eventRules.find(rule => rule.Rules.RuleName ===
|
|
165
|
+
const rule = this.eventRules.find(rule => rule.Rules.RuleName === 'DEMaxPoints');
|
|
128
166
|
return rule ? rule.RuleValue : 7;
|
|
129
167
|
}
|
|
130
|
-
const rule = this.eventRules.find(rule => rule.Rules.RuleName ===
|
|
168
|
+
const rule = this.eventRules.find(rule => rule.Rules.RuleName === 'PoolMaxPoints');
|
|
131
169
|
return rule ? rule.RuleValue : 7;
|
|
132
170
|
}
|
|
133
171
|
},
|
|
134
172
|
methods: {
|
|
135
173
|
minus(isFencer1) {
|
|
136
|
-
|
|
137
|
-
if (this.localBout.Score1 > 0) {
|
|
138
|
-
this.localBout.Score1--;
|
|
139
|
-
}
|
|
140
|
-
} else {
|
|
141
|
-
if (this.localBout.Score2 > 0) {
|
|
142
|
-
this.localBout.Score2--;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
174
|
+
this.adjustScore(isFencer1, -1);
|
|
145
175
|
},
|
|
146
176
|
plus(isFencer1) {
|
|
147
|
-
|
|
148
|
-
if (this.localBout.Score1 < this.maxPoints) {
|
|
149
|
-
this.localBout.Score1++;
|
|
150
|
-
}
|
|
151
|
-
} else {
|
|
152
|
-
if (this.localBout.Score2 < this.maxPoints) {
|
|
153
|
-
this.localBout.Score2++;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
177
|
+
this.adjustScore(isFencer1, 1);
|
|
156
178
|
},
|
|
157
|
-
|
|
158
|
-
|
|
179
|
+
adjustScore(isFencer1, amount) {
|
|
180
|
+
const scoreField = scoreFieldByFencer[String(isFencer1)];
|
|
181
|
+
const currentScore = Number(this.localBout[scoreField] || 0);
|
|
182
|
+
const nextScore = Math.min(Number(this.maxPoints), Math.max(0, currentScore + amount));
|
|
183
|
+
this.localBout = { ...this.localBout, [scoreField]: nextScore };
|
|
184
|
+
},
|
|
185
|
+
handleMakeActiveChange(makeActive) {
|
|
186
|
+
this.makeActive = makeActive;
|
|
159
187
|
},
|
|
160
188
|
computedColor(fencer1) {
|
|
161
|
-
return fencer1
|
|
189
|
+
return fencer1
|
|
190
|
+
? this.hostingClubColors.Color1?.toLowerCase() || 'red'
|
|
191
|
+
: this.hostingClubColors.Color2?.toLowerCase() || 'blue';
|
|
162
192
|
},
|
|
163
193
|
submitBout() {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
this.$emit('submit:bout', this.localBout);
|
|
194
|
+
const eventName = submitEventByActiveSelection[String(this.makeActive)];
|
|
195
|
+
this.$emit(eventName, { ...this.localBout });
|
|
168
196
|
}
|
|
169
197
|
}
|
|
170
|
-
}
|
|
198
|
+
};
|
|
171
199
|
</script>
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import EventCard from './EventCard.vue';
|
|
2
|
-
import singleEventMock from
|
|
2
|
+
import singleEventMock from '../../../../mocks/singleEventMock.js';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
5
|
+
title: 'Organisms/Cards/EventCard',
|
|
6
|
+
component: EventCard,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
args: {
|
|
9
|
+
event: singleEventMock
|
|
10
|
+
},
|
|
11
|
+
argTypes: {}
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
export const Default = {
|
|
16
|
-
|
|
15
|
+
event: singleEventMock
|
|
17
16
|
};
|
|
@@ -1,140 +1,160 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="flex items-center p-2 md:px-4 md:py-4 bg-eventBoxBlue md:bg-white border border-dropdownSelect rounded-lg md:shadow-md w-full mb-6 hover:border-bright"
|
|
4
|
+
@click="onManage"
|
|
5
|
+
>
|
|
3
6
|
<div class="w-full flex flex-col md:flex-row justify-between">
|
|
4
7
|
<section class="flex flex-row px-1 justify-start w-full">
|
|
5
8
|
<div class="flex flex-col w-full">
|
|
6
9
|
<div class="hidden md:flex mb-1">
|
|
7
10
|
<div class="flex">
|
|
8
|
-
<BaseIcon icon-name="fa-calendar" size="xs" color="quaternary" class="mr-2"/>
|
|
9
|
-
<BaseText :text="event.Date" size="xs" color="quinary" class="text-left"/>
|
|
11
|
+
<BaseIcon icon-name="fa-calendar" size="xs" color="quaternary" class="mr-2" />
|
|
12
|
+
<BaseText :text="event.Date" size="xs" color="quinary" class="text-left" />
|
|
10
13
|
</div>
|
|
11
14
|
<div class="flex pl-4">
|
|
12
|
-
<BaseIcon icon-name="fa-clock" size="xs" color="quaternary" class="mx-2"/>
|
|
13
|
-
<BaseText :text="formatStartTime(event.StartTime)" size="xs" color="quinary" class="text-left"/>
|
|
15
|
+
<BaseIcon icon-name="fa-clock" size="xs" color="quaternary" class="mx-2" />
|
|
16
|
+
<BaseText :text="formatStartTime(event.StartTime)" size="xs" color="quinary" class="text-left" />
|
|
14
17
|
</div>
|
|
15
18
|
<div class="flex pl-4">
|
|
16
|
-
<BaseIcon icon-name="fa-users" size="xs" color="quaternary" class="mx-2"/>
|
|
17
|
-
<BaseText :text="getMaxFencers" size="xs" color="quinary" class="text-right"/>
|
|
19
|
+
<BaseIcon icon-name="fa-users" size="xs" color="quaternary" class="mx-2" />
|
|
20
|
+
<BaseText :text="getMaxFencers" size="xs" color="quinary" class="text-right" />
|
|
18
21
|
</div>
|
|
19
22
|
</div>
|
|
20
23
|
|
|
21
|
-
<BaseText
|
|
22
|
-
|
|
24
|
+
<BaseText
|
|
25
|
+
:text="event.EventName"
|
|
26
|
+
size=""
|
|
27
|
+
color="quaternary"
|
|
28
|
+
weight="bold"
|
|
29
|
+
class="text-left text-md md:text-xl"
|
|
30
|
+
/>
|
|
31
|
+
<BaseText :text="eventSummary" size="xs" color="quaternary" class="text-left" />
|
|
23
32
|
|
|
24
33
|
<div class="flex flex-col md:hidden pt-2">
|
|
25
34
|
<div class="flex">
|
|
26
|
-
<BaseIcon icon-name="fa-calendar" size="xs" color="quaternary" class="mr-2"/>
|
|
27
|
-
<BaseText :text="event.Date" size="xs" color="quinary" class="text-left"/>
|
|
28
|
-
<BaseText :text="formatStartTime(event.StartTime)" size="xs" color="quinary" class="text-left ml-1"/>
|
|
29
|
-
<BaseIcon icon-name="fa-users" size="xs" color="quaternary" class="mr-2 ml-4"/>
|
|
30
|
-
<BaseText :text="getCombinedNumberOfFencers" size="xs" color="quinary" class="text-right"/>
|
|
35
|
+
<BaseIcon icon-name="fa-calendar" size="xs" color="quaternary" class="mr-2" />
|
|
36
|
+
<BaseText :text="event.Date" size="xs" color="quinary" class="text-left" />
|
|
37
|
+
<BaseText :text="formatStartTime(event.StartTime)" size="xs" color="quinary" class="text-left ml-1" />
|
|
38
|
+
<BaseIcon icon-name="fa-users" size="xs" color="quaternary" class="mr-2 ml-4" />
|
|
39
|
+
<BaseText :text="getCombinedNumberOfFencers" size="xs" color="quinary" class="text-right" />
|
|
31
40
|
</div>
|
|
32
41
|
|
|
33
42
|
<div class="flex flex-row mt-3 w-full">
|
|
34
43
|
<div class="flex flex-col w-1/2 bg-white rounded mr-1.5 pb-2 border">
|
|
35
|
-
<BaseText text="Pools" size="xs" color="quinary" class="text-center py-1"/>
|
|
44
|
+
<BaseText text="Pools" size="xs" color="quinary" class="text-center py-1" />
|
|
36
45
|
<div class="flex w-full">
|
|
37
46
|
<div class="flex w-full justify-center">
|
|
38
|
-
<BaseIcon icon-name="fa-sword" size="xs" color="quaternary" class="mr-2"/>
|
|
39
|
-
<BaseText :text="getMaxPoolPoints" size="xs" color="quinary" class="text-right"/>
|
|
47
|
+
<BaseIcon icon-name="fa-sword" size="xs" color="quaternary" class="mr-2" />
|
|
48
|
+
<BaseText :text="getMaxPoolPoints" size="xs" color="quinary" class="text-right" />
|
|
40
49
|
</div>
|
|
41
50
|
<div class="flex w-full">
|
|
42
|
-
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quaternary" class="mr-2"/>
|
|
43
|
-
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-right"/>
|
|
51
|
+
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quaternary" class="mr-2" />
|
|
52
|
+
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-right" />
|
|
44
53
|
</div>
|
|
45
54
|
</div>
|
|
46
55
|
</div>
|
|
47
56
|
<div class="flex flex-col w-1/2 bg-white rounded ml-1.5 pb-2 border">
|
|
48
|
-
<BaseText text="Direct Elim." size="xs" color="quinary" class="text-center py-1"/>
|
|
57
|
+
<BaseText text="Direct Elim." size="xs" color="quinary" class="text-center py-1" />
|
|
49
58
|
<div class="flex w-full">
|
|
50
59
|
<div class="flex w-full justify-center">
|
|
51
|
-
<BaseIcon icon-name="fa-sword" size="xs" color="quaternary" class="mr-2"/>
|
|
52
|
-
<BaseText :text="getMaxDEPoints" size="xs" color="quinary" class="text-right"/>
|
|
60
|
+
<BaseIcon icon-name="fa-sword" size="xs" color="quaternary" class="mr-2" />
|
|
61
|
+
<BaseText :text="getMaxDEPoints" size="xs" color="quinary" class="text-right" />
|
|
53
62
|
</div>
|
|
54
63
|
<div class="flex w-full">
|
|
55
|
-
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quaternary" class="mr-2"/>
|
|
56
|
-
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-right"/>
|
|
64
|
+
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quaternary" class="mr-2" />
|
|
65
|
+
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-right" />
|
|
57
66
|
</div>
|
|
58
67
|
</div>
|
|
59
68
|
</div>
|
|
60
69
|
</div>
|
|
61
|
-
|
|
62
70
|
</div>
|
|
63
71
|
<div class="hidden md:grid grid-cols-2 w-60 gap-1 mt-3">
|
|
64
72
|
<div class="flex flex-col rounded-md bg-eventBoxBlue mt-0.5 p-0.5">
|
|
65
73
|
<div>
|
|
66
|
-
<BaseText text="Pools" size="xs" color="quinary" class=""/>
|
|
74
|
+
<BaseText text="Pools" size="xs" color="quinary" class="" />
|
|
67
75
|
</div>
|
|
68
76
|
<div class="flex justify-around w-full px-2 mt-1">
|
|
69
77
|
<div class="flex">
|
|
70
|
-
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quinary" class="mr-2"/>
|
|
71
|
-
<BaseText :text="getPoolBoutTimeOrPasses" size="xs" color="quinary" class="text-left"/>
|
|
78
|
+
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quinary" class="mr-2" />
|
|
79
|
+
<BaseText :text="getPoolBoutTimeOrPasses" size="xs" color="quinary" class="text-left" />
|
|
72
80
|
</div>
|
|
73
81
|
<div class="flex">
|
|
74
|
-
<BaseIcon icon-name="fa-sword" size="xs" color="quinary" class="mr-2"/>
|
|
75
|
-
<BaseText :text="getMaxPoolPoints" size="xs" color="quinary" class="text-left"/>
|
|
82
|
+
<BaseIcon icon-name="fa-sword" size="xs" color="quinary" class="mr-2" />
|
|
83
|
+
<BaseText :text="getMaxPoolPoints" size="xs" color="quinary" class="text-left" />
|
|
76
84
|
</div>
|
|
77
85
|
</div>
|
|
78
86
|
</div>
|
|
79
87
|
|
|
80
88
|
<div class="flex flex-col rounded-md bg-eventBoxBlue mt-0.5">
|
|
81
89
|
<div>
|
|
82
|
-
<BaseText text="Bracket" size="xs" color="quinary" class=""/>
|
|
90
|
+
<BaseText text="Bracket" size="xs" color="quinary" class="" />
|
|
83
91
|
</div>
|
|
84
92
|
<div class="flex justify-around w-full p-1">
|
|
85
93
|
<div class="flex">
|
|
86
|
-
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quinary" class="mr-2 mt-[1px]"/>
|
|
87
|
-
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-left"/>
|
|
94
|
+
<BaseIcon icon-name="fa-clock-desk" size="xs" color="quinary" class="mr-2 mt-[1px]" />
|
|
95
|
+
<BaseText :text="getDEBoutTimeOrPasses" size="xs" color="quinary" class="text-left" />
|
|
88
96
|
</div>
|
|
89
97
|
<div class="flex">
|
|
90
|
-
<BaseIcon icon-name="fa-sword" size="xs" color="quinary" class="mr-2 mt-[1px]"/>
|
|
91
|
-
<BaseText :text="getMaxDEPoints" size="xs" color="quinary" class="text-left"/>
|
|
98
|
+
<BaseIcon icon-name="fa-sword" size="xs" color="quinary" class="mr-2 mt-[1px]" />
|
|
99
|
+
<BaseText :text="getMaxDEPoints" size="xs" color="quinary" class="text-left" />
|
|
92
100
|
</div>
|
|
93
101
|
</div>
|
|
94
102
|
</div>
|
|
95
103
|
</div>
|
|
96
|
-
|
|
97
104
|
</div>
|
|
98
105
|
</section>
|
|
99
106
|
|
|
100
107
|
<!-- right side -->
|
|
101
108
|
<div class="flex flex-col">
|
|
102
109
|
<div class="flex flex-row pb-2 mt-4 md:mt-2">
|
|
103
|
-
<BaseButton
|
|
104
|
-
|
|
110
|
+
<BaseButton
|
|
111
|
+
label="Manage"
|
|
112
|
+
size=""
|
|
113
|
+
type="primary"
|
|
114
|
+
@buttonClick="onManage"
|
|
115
|
+
:class="[event.Status !== 'completed' ? 'w-1/2' : 'w-full', 'text-xs md:text-md']"
|
|
116
|
+
/>
|
|
117
|
+
<BaseButton
|
|
118
|
+
v-if="event.Status !== 'completed'"
|
|
119
|
+
label="Delete"
|
|
120
|
+
size=""
|
|
121
|
+
type="primary"
|
|
122
|
+
@buttonClick="onDelete"
|
|
123
|
+
class="w-1/2 text-xs md:text-md"
|
|
124
|
+
/>
|
|
105
125
|
</div>
|
|
106
126
|
<div class="hidden md:flex flex-row">
|
|
107
|
-
<EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxBlue"/>
|
|
108
|
-
<EventStatusBox :status-count="event.Absent" status-label="ABSENT" box-color="bg-eventBoxGreen"/>
|
|
127
|
+
<EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxBlue" />
|
|
128
|
+
<EventStatusBox :status-count="event.Absent" status-label="ABSENT" box-color="bg-eventBoxGreen" />
|
|
109
129
|
</div>
|
|
110
130
|
</div>
|
|
111
131
|
</div>
|
|
112
132
|
</div>
|
|
113
133
|
<section>
|
|
114
134
|
<BaseModal
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
headerText="Remove This Event?"
|
|
136
|
+
bodyText="Pressing Delete will permanently remove this event. This action cannot be undone."
|
|
137
|
+
buttonText="Delete This Event"
|
|
138
|
+
iconColor="alarm"
|
|
139
|
+
iconBackgroundColor="alarmHighlight"
|
|
140
|
+
iconName="fa-circle-xmark"
|
|
141
|
+
:show="showModal"
|
|
142
|
+
@update:show="close"
|
|
143
|
+
@submitModal="handleSubmit"
|
|
124
144
|
/>
|
|
125
145
|
</section>
|
|
126
146
|
</template>
|
|
127
147
|
|
|
128
148
|
<script>
|
|
129
|
-
import BaseText from
|
|
130
|
-
import BaseButton from
|
|
131
|
-
import EventStatusBox from
|
|
132
|
-
import BaseIcon from
|
|
133
|
-
import BaseModal from
|
|
149
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
150
|
+
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
151
|
+
import EventStatusBox from '../../../Molecules/Boxes/EventStatusBox/EventStatusBox.vue';
|
|
152
|
+
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
153
|
+
import BaseModal from '../../../Molecules/Modals/BaseModal/BaseModal.vue';
|
|
134
154
|
|
|
135
155
|
export default {
|
|
136
156
|
name: 'EventCard',
|
|
137
|
-
components: {BaseModal, BaseIcon, EventStatusBox, BaseButton, BaseText},
|
|
157
|
+
components: { BaseModal, BaseIcon, EventStatusBox, BaseButton, BaseText },
|
|
138
158
|
emits: ['manage', 'edit', 'delete'],
|
|
139
159
|
props: {
|
|
140
160
|
event: {
|
|
@@ -145,7 +165,7 @@ export default {
|
|
|
145
165
|
data() {
|
|
146
166
|
return {
|
|
147
167
|
showModal: false
|
|
148
|
-
}
|
|
168
|
+
};
|
|
149
169
|
},
|
|
150
170
|
computed: {
|
|
151
171
|
eventSummary() {
|
|
@@ -157,7 +177,8 @@ export default {
|
|
|
157
177
|
|
|
158
178
|
const poolSummary = poolRule ? 'Pools' : '';
|
|
159
179
|
const deSummary = deType?.RuleValue === 'single' ? 'Single Elim' : 'Double Elim';
|
|
160
|
-
const thirdPlaceSummary =
|
|
180
|
+
const thirdPlaceSummary =
|
|
181
|
+
deThirdFenceOff && deThirdFenceOff.RuleValue === 'true' ? '3rd Place Fence off' : 'Tie for 3rd Place';
|
|
161
182
|
|
|
162
183
|
return [poolSummary, deSummary, thirdPlaceSummary].filter(Boolean).join(' -> ');
|
|
163
184
|
},
|
|
@@ -165,7 +186,7 @@ export default {
|
|
|
165
186
|
const maxRule = this.event.EventRules.find(rule => rule.Rules.RuleName === 'CutOffNumber');
|
|
166
187
|
return maxRule.RuleValue === 0 ? 'Unlimited' : maxRule.RuleValue;
|
|
167
188
|
},
|
|
168
|
-
getCombinedNumberOfFencers(){
|
|
189
|
+
getCombinedNumberOfFencers() {
|
|
169
190
|
const combined = this.event.Present + this.event.Absent;
|
|
170
191
|
return combined + ' / ' + this.getMaxFencers;
|
|
171
192
|
},
|
|
@@ -196,19 +217,19 @@ export default {
|
|
|
196
217
|
if (DETimeRule) return this.formatTime(DETimeRule.RuleValue);
|
|
197
218
|
if (passesRule) return passesRule.RuleValue;
|
|
198
219
|
return '';
|
|
199
|
-
}
|
|
220
|
+
}
|
|
200
221
|
},
|
|
201
222
|
methods: {
|
|
202
223
|
onDelete(event) {
|
|
203
224
|
event.stopPropagation();
|
|
204
|
-
this.showModal = true
|
|
225
|
+
this.showModal = true;
|
|
205
226
|
},
|
|
206
227
|
onManage(event) {
|
|
207
228
|
event.stopPropagation();
|
|
208
229
|
this.$emit('manage', this.event);
|
|
209
230
|
},
|
|
210
231
|
close() {
|
|
211
|
-
this.showModal = false
|
|
232
|
+
this.showModal = false;
|
|
212
233
|
},
|
|
213
234
|
handleSubmit() {
|
|
214
235
|
this.$emit('delete', this.event);
|
|
@@ -225,7 +246,6 @@ export default {
|
|
|
225
246
|
|
|
226
247
|
return `${adjustedHours}:${minutes.toString().padStart(2, '0')}${period}`;
|
|
227
248
|
}
|
|
228
|
-
|
|
229
249
|
}
|
|
230
|
-
}
|
|
250
|
+
};
|
|
231
251
|
</script>
|