@dcrackel/hematournamentui 1.0.706 → 1.0.707
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +7 -1
- package/.storybook/main.js +5 -12
- package/.storybook/preview-head.html +10 -3
- package/.storybook/preview.js +5 -13
- package/AGENTS.md +31 -1
- package/README.md +29 -22
- package/dist/HemaTournamentUI-lib.es.js +7189 -7467
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +0 -24
- package/dist/hematournamentui.css +1 -1
- package/eslint.config.js +49 -23
- package/package.json +6 -2
- package/postcss.config.js +3 -3
- package/prettier.config.js +16 -10
- package/src/config/boutScreenConfigurations.js +52 -50
- package/src/main.js +1 -1
- package/src/mocks/EventQuestionsMock.js +43 -55
- package/src/mocks/assignments.js +180 -181
- package/src/mocks/clubGetAllMock.js +8143 -8143
- package/src/mocks/eventMock.js +205 -205
- package/src/mocks/eventPersonGetInitalPoolAssignmentsLivePools.js +541 -542
- package/src/mocks/eventPersonGetInitalPoolAssignmentsPreparing.js +522 -523
- package/src/mocks/eventPersonGetInitialPoolAssignments.js +386 -387
- package/src/mocks/eventPersonGetInitialPoolAssignments2.js +2267 -2268
- package/src/mocks/eventPersonGetInitialStaff.js +94 -95
- package/src/mocks/eventPersonGetPoolAssignmentEvent.js +161 -162
- package/src/mocks/eventRules.js +87 -86
- package/src/mocks/eventpersonGetEventById.js +1737 -1737
- package/src/mocks/getAllClubs.js +8143 -8143
- package/src/mocks/getAllStaffByTournamentId.js +74 -75
- package/src/mocks/getAllWeapons.js +81 -82
- package/src/mocks/getAttendance.js +43 -44
- package/src/mocks/getClub.js +43 -44
- package/src/mocks/getClubDisplayByClubId.js +104 -105
- package/src/mocks/getDEBouts-128Fencers.js +3247 -3248
- package/src/mocks/getDEBouts-42Fencers.js +3736 -3737
- package/src/mocks/getDEBouts-67Fencers.js +6684 -6690
- package/src/mocks/getDEBouts-DoubleElim.js +4198 -4199
- package/src/mocks/getDEWithBouts.js +628 -629
- package/src/mocks/getDeBouts-12fencers.js +1255 -1256
- package/src/mocks/getDeBouts-15fencers.js +925 -927
- package/src/mocks/getDeBouts-22fencers.js +1683 -1685
- package/src/mocks/getDeBouts-6fencers.js +818 -818
- package/src/mocks/getEventByTournamentId.js +47 -48
- package/src/mocks/getFinalEventResult.js +304 -305
- package/src/mocks/getPenaltiesByEvent.js +655 -656
- package/src/mocks/getPoolResults.js +1533 -1534
- package/src/mocks/getPoolsWithBouts.js +662 -663
- package/src/mocks/getPoolsWithBouts6PoolId139.js +885 -886
- package/src/mocks/getPoolsWithBoutsByPoolId.js +841 -841
- package/src/mocks/getPoolsWithBoutsClubColors.js +4 -4
- package/src/mocks/getPoolsWithBoutsComplete.js +919 -921
- package/src/mocks/locationMock.js +3213 -3214
- package/src/mocks/mockRoutes.js +3 -3
- package/src/mocks/personGetAllMock.js +2536 -2537
- package/src/mocks/personsMock.js +17569 -17570
- package/src/mocks/singleEventMock.js +249 -250
- package/src/mocks/tournamentMock.js +1988 -1927
- package/src/stories/Atoms/CheckBox/BaseCheckbox.stories.js +25 -23
- package/src/stories/Atoms/CheckBox/BaseCheckbox.vue +30 -24
- package/src/stories/Atoms/Icon/BaseIcon.stories.js +63 -64
- package/src/stories/Atoms/Icon/BaseIcon.test.js +67 -69
- package/src/stories/Atoms/Icon/BaseIcon.vue +2 -3
- package/src/stories/Atoms/Input/BaseInput.stories.js +18 -18
- package/src/stories/Atoms/Input/BaseInput.test.js +65 -67
- package/src/stories/Atoms/Input/BaseInput.vue +36 -31
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.stories.js +21 -21
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.test.js +31 -31
- package/src/stories/Atoms/RadioGroup/BaseRadioGroup.vue +23 -18
- package/src/stories/Atoms/Tag/BaseTag.stories.js +21 -21
- package/src/stories/Atoms/Tag/BaseTag.test.js +26 -30
- package/src/stories/Atoms/Tag/BaseTag.vue +18 -19
- package/src/stories/Atoms/Text/BaseText.stories.js +54 -62
- package/src/stories/Atoms/Text/BaseText.test.js +152 -154
- package/src/stories/Atoms/Text/BaseText.vue +103 -81
- package/src/stories/Configure.mdx +5 -3
- package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.stories.js +24 -24
- package/src/stories/Molecules/Boxes/BoutBoxes/HandshotCounterBox/HandshotCounterBox.vue +33 -15
- package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.stories.js +46 -48
- package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.vue +38 -25
- package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.stories.js +4 -4
- package/src/stories/Molecules/Boxes/BoutBoxes/PenaltyConfirmationBox/PenaltyConfirmationBox.vue +9 -4
- package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.stories.js +90 -90
- package/src/stories/Molecules/Boxes/BoutBoxes/ScoreBox/ScoreBox.vue +51 -32
- package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.stories.js +25 -25
- package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +47 -12
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.stories.js +19 -19
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +25 -19
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.stories.js +25 -28
- package/src/stories/Molecules/Boxes/EventStatusBox/EventStatusBox.vue +7 -7
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.stories.js +28 -29
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.test.js +58 -58
- package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.vue +15 -15
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.stories.js +86 -86
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.test.js +101 -103
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +87 -24
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +31 -31
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +19 -21
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.stories.js +57 -57
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.test.js +64 -64
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.vue +17 -16
- package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.stories.js +19 -19
- package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue +18 -7
- package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.stories.js +16 -18
- package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue +31 -13
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.stories.js +27 -27
- package/src/stories/Molecules/Indicators/ServerConnected/ServerConnected.vue +6 -5
- package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.stories.js +35 -35
- package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.vue +13 -8
- package/src/stories/Molecules/Inputs/Toggle/Toggle.stories.js +27 -27
- package/src/stories/Molecules/Inputs/Toggle/Toggle.vue +8 -5
- package/src/stories/Molecules/Menus/TabBar/TabBar.stories.js +18 -18
- package/src/stories/Molecules/Menus/TabBar/TabBar.vue +1 -2
- package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplay.stories.js +36 -27
- package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplayModal.vue +25 -15
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.stories.js +66 -65
- package/src/stories/Molecules/Modals/BaseModal/BaseModal.vue +47 -9
- package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.stories.js +23 -23
- package/src/stories/Molecules/Modals/ConfirmModal/ConfirmModal.vue +59 -11
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +37 -37
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +27 -22
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.stories.js +41 -41
- package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +27 -15
- package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.stories.js +29 -30
- package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.vue +18 -16
- package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.stories.js +21 -21
- package/src/stories/Molecules/Modals/LoadingModal/LoadingModal.vue +7 -7
- package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.stories.js +24 -24
- package/src/stories/Molecules/Modals/PenaltyModal/PenaltyModal.vue +30 -25
- package/src/stories/Molecules/Reorder/ReorderableShell.stories.js +81 -77
- package/src/stories/Molecules/Reorder/ReorderableShell.vue +46 -43
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.stories.js +40 -40
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue +23 -25
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.stories.js +34 -29
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +69 -66
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.stories.js +24 -22
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +53 -41
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.stories.js +24 -37
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +88 -103
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardReorder/BoutCardReorder.vue +13 -14
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.stories.js +5 -5
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardWaiting/BoutCardWaiting.vue +22 -21
- package/src/stories/Organisms/Cards/ClubCard/ClubCard.stories.js +14 -17
- package/src/stories/Organisms/Cards/ClubCard/ClubCard.vue +25 -18
- package/src/stories/Organisms/Cards/Director/DirectorCard.stories.js +23 -23
- package/src/stories/Organisms/Cards/Director/DirectorCard.vue +159 -103
- package/src/stories/Organisms/Cards/EditBout/EditBout.stories.js +47 -47
- package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -0
- package/src/stories/Organisms/Cards/EditBout/EditBout.vue +82 -54
- package/src/stories/Organisms/Cards/EventCard/EventCard.stories.js +9 -10
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +83 -63
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +105 -105
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +142 -58
- package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.stories.js +14 -14
- package/src/stories/Organisms/Cards/FencerFinalResultCard/FencerFinalResultCard.vue +37 -26
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResults.stories.js +24 -24
- package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue +95 -28
- package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.stories.js +59 -60
- package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.vue +13 -7
- package/src/stories/Organisms/Cards/KioskCard/KioskCard.stories.js +34 -34
- package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +149 -104
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.stories.js +19 -20
- package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +207 -163
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.stories.js +17 -17
- package/src/stories/Organisms/Cards/PenaltyFencerCard/PenaltyFencerCard.vue +88 -46
- package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.stories.js +182 -182
- package/src/stories/Organisms/Cards/PoolBoutMatchCard/PoolBoutMatchCard.vue +21 -12
- package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.stories.js +25 -28
- package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.vue +28 -22
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.stories.js +62 -62
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +27 -22
- package/src/stories/Organisms/Cards/TableauBoutCard/SpacingConfig.js +103 -103
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +73 -73
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +44 -0
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +69 -56
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +80 -81
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +39 -22
- package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdmin.stories.js +20 -20
- package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdminCard.vue +62 -33
- package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +44 -30
- package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.stories.js +6 -7
- package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue +7 -8
- package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.stories.js +31 -31
- package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.vue +30 -35
- package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.stories.js +13 -16
- package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +68 -70
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.stories.js +32 -34
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +48 -25
- package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.stories.js +21 -21
- package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.vue +65 -38
- package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.stories.js +19 -20
- package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.vue +46 -21
- package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.stories.js +22 -22
- package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.vue +68 -23
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +13 -13
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +25 -24
- package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.stories.js +6 -10
- package/src/stories/Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.vue +112 -48
- package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.stories.js +43 -44
- package/src/stories/Organisms/Containers/BoutsSection/BoutsSection.vue +30 -23
- package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.stories.js +20 -20
- package/src/stories/Organisms/Containers/FinalResults/FinalResultsTable.vue +12 -12
- package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.stories.js +24 -25
- package/src/stories/Organisms/Containers/KioskContainer/KioskContainer.vue +112 -87
- package/src/stories/Organisms/Containers/Pool/Pool.stories.js +54 -54
- package/src/stories/Organisms/Containers/Pool/Pool.vue +64 -41
- package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.stories.js +17 -19
- package/src/stories/Organisms/Containers/PoolGrid/PoolGrid.vue +189 -135
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.stories.js +53 -54
- package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +107 -73
- package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +23 -24
- package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +49 -10
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +96 -173
- package/src/stories/Organisms/Containers/TableauColumn/TabeauColumn.stories.js +26 -27
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +20 -17
- package/src/stories/Organisms/Containers/TableauLines/SpacingConfig.js +153 -103
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.stories.js +13 -15
- package/src/stories/Organisms/Containers/TableauLines/TableauLines.vue +7 -8
- package/src/stories/Organisms/Form/AddDisplay/AddDisplay.stories.js +26 -26
- package/src/stories/Organisms/Form/AddDisplay/AddDisplay.vue +130 -118
- package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.stories.js +14 -15
- package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.vue +94 -88
- package/src/stories/Organisms/Grids/GridContainer.stories.js +101 -101
- package/src/stories/Organisms/Grids/GridContainer.vue +160 -136
- package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.stories.js +47 -47
- package/src/stories/Organisms/Headers/AttendanceSummary/AttendanceSummary.vue +65 -54
- package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.stories.js +27 -27
- package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.vue +38 -22
- package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.stories.js +80 -80
- package/src/stories/Organisms/Headers/PenaltySummary/PenaltySummary.vue +14 -6
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.stories.js +34 -34
- package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +36 -36
- package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.stories.js +21 -21
- package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.vue +56 -29
- package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.stories.js +38 -38
- package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.vue +19 -20
- package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.stories.js +12 -13
- package/src/stories/Organisms/RankCalculator/ByLetter/RankCalculator.vue +47 -41
- package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.stories.js +12 -13
- package/src/stories/Organisms/RankCalculator/ByPoints/RankCalculatorByPoints.vue +66 -37
- package/src/stories/Organisms/Skeletons/ClubManagement/ClubManagement.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/ClubManagement/ClubMangementSkeleton.vue +2 -2
- package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/EventCard/EventCardSkeleton.vue +2 -3
- package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/FencerCard/FencerCardSkeleton.vue +1 -1
- package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.stories.js +6 -9
- package/src/stories/Organisms/Skeletons/PersonManagement/PersonManagementSkeleton.vue +2 -2
- package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/PoolSkeleton/PoolSkeleton.vue +10 -4
- package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.stories.js +6 -10
- package/src/stories/Organisms/Skeletons/TournamentCard/TournamentCardSkeleton.vue +2 -2
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +34 -34
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +106 -56
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.stories.js +95 -95
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +129 -69
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.stories.js +87 -88
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +105 -60
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +82 -82
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +150 -177
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.stories.js +28 -28
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +96 -36
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.stories.js +99 -99
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +115 -67
- package/src/stories/Templates/Assignment/Assignment.stories.js +22 -23
- package/src/stories/Templates/Assignment/Assignment.vue +210 -161
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.stories.js +90 -90
- package/src/stories/Templates/ClubManagement/ClubBasic/ClubBasic.vue +68 -55
- package/src/stories/Templates/ClubManagement/ClubManagement.stories.js +87 -87
- package/src/stories/Templates/ClubManagement/ClubManagement.vue +167 -147
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +82 -103
- package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +88 -43
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +167 -200
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +49 -50
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +21 -21
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.stories.js +105 -103
- package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +289 -226
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.stories.js +30 -30
- package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +27 -22
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.stories.js +44 -45
- package/src/stories/Templates/EventManagement/KioskDisplay/KioskDisplay.vue +52 -43
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.stories.js +28 -29
- package/src/stories/Templates/EventManagement/Penalties/PenaltyReport.vue +54 -39
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +80 -111
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -0
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +290 -255
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +109 -107
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +144 -87
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.stories.js +56 -57
- package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +132 -123
- package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +56 -57
- package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +84 -47
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +29 -29
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.vue +71 -67
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +39 -40
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +79 -71
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +47 -47
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +39 -42
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +54 -54
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +27 -31
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +69 -69
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +78 -89
- package/src/stories/Templates/PersonManagement/Attendance/Attendance.stories.js +22 -22
- package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +61 -33
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.stories.js +29 -29
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +80 -53
- package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +84 -86
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +107 -82
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.stories.js +31 -31
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +70 -51
- package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +79 -79
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +275 -230
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +113 -113
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +175 -146
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.stories.js +77 -77
- package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TournamentPageTwo.vue +208 -185
- package/src/stories/Util/Validations/AddNewPersonModalValidation.js +23 -19
- package/src/stories/Util/Validations/ClubManagementValidations.js +17 -21
- package/src/stories/Util/Validations/PersonManagementValidations.js +26 -22
- package/src/stories/Util/Validations/TournamentFieldsValidations.js +20 -18
- package/src/stories/Util/seeding.js +131 -131
- package/src/stories/Util/tabs.js +75 -75
- package/tailwind/tailwind.css +5 -7
- package/tailwind.config.js +12 -15
- package/vite.config.js +3 -3
- package/src/mocks/getDirectors.js +0 -18
- package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.stories.js +0 -45
- package/src/stories/Molecules/Modals/AssignDirectorModal/AssignDirectorModal.vue +0 -111
- package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.stories.js +0 -45
- package/src/stories/Organisms/Cards/DirectorAssignmentCard/DirectorAssignmentCard.vue +0 -83
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="p-4 max-h-screen overflow-y-auto">
|
|
3
3
|
<BasicEventInfo
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
v-if="currentStep === 1"
|
|
5
|
+
:eventConfig="eventConfig"
|
|
6
|
+
:weapons="weapons"
|
|
7
|
+
:validation="validation"
|
|
8
|
+
:steps="steps"
|
|
9
|
+
:currentStep="currentStep - 1"
|
|
10
|
+
:userLevel="userLevel"
|
|
11
|
+
@update="handleValueChange"
|
|
12
|
+
@update:back="handleCancel"
|
|
13
|
+
@update:next="handleUpdate"
|
|
14
14
|
/>
|
|
15
15
|
<EventCustomization
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
v-if="currentStep === 2"
|
|
17
|
+
:eventConfig="eventConfig"
|
|
18
|
+
:steps="steps"
|
|
19
|
+
:currentStep="currentStep - 1"
|
|
20
|
+
@update="handleValueChange"
|
|
21
|
+
@update:back="handleBack"
|
|
22
|
+
@update:next="handleUpdate"
|
|
23
23
|
/>
|
|
24
24
|
<PoolConfiguration
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
v-if="currentStep === 3"
|
|
26
|
+
:eventConfig="eventConfig"
|
|
27
|
+
:seedWithOptions="seedWithOptions"
|
|
28
|
+
:validation="validation"
|
|
29
|
+
:steps="steps"
|
|
30
|
+
:currentStep="currentStep - 1"
|
|
31
|
+
@update="handleValueChange"
|
|
32
|
+
@update:back="handleBack"
|
|
33
|
+
@update:next="handleUpdate"
|
|
34
34
|
/>
|
|
35
35
|
<DirectEliminationPromotion
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
v-if="currentStep === 4"
|
|
37
|
+
:eventConfig="eventConfig"
|
|
38
|
+
:validation="validation"
|
|
39
|
+
:steps="steps"
|
|
40
|
+
:currentStep="currentStep - 1"
|
|
41
|
+
@update="handleValueChange"
|
|
42
|
+
@update:DEPromotionType="handleDEPromotionType"
|
|
43
|
+
@update:back="handleBack"
|
|
44
|
+
@update:next="handleUpdate"
|
|
45
45
|
/>
|
|
46
46
|
<DirectElimination
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
v-if="currentStep === 5"
|
|
48
|
+
:eventConfig="eventConfig"
|
|
49
|
+
:validation="validation"
|
|
50
|
+
:steps="steps"
|
|
51
|
+
:currentStep="currentStep - 1"
|
|
52
|
+
:DEFormats="DEFormats"
|
|
53
|
+
@update="handleValueChange"
|
|
54
|
+
@update:back="handleBack"
|
|
55
|
+
@update:submit="handleSubmit"
|
|
56
56
|
/>
|
|
57
57
|
</div>
|
|
58
58
|
</template>
|
|
@@ -61,87 +61,60 @@
|
|
|
61
61
|
import BasicEventInfo from './BasicEventInfo/BasicEventInfo.vue';
|
|
62
62
|
import PoolConfiguration from './PoolConfiguration/PoolConfiguration.vue';
|
|
63
63
|
import DirectElimination from './DirectElimination/DirectElimination.vue';
|
|
64
|
-
import BaseButton from
|
|
65
|
-
import StepIndicator from
|
|
66
|
-
import DirectEliminationPromotion from
|
|
67
|
-
import EventCustomization from
|
|
68
|
-
|
|
69
|
-
const ruleValueIsTrue = (rule, fallbackField) =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
11: (eventConfig, rule) => {
|
|
106
|
-
eventConfig.seedWith = rule.RuleValue;
|
|
107
|
-
},
|
|
108
|
-
14: (eventConfig, rule) => {
|
|
109
|
-
eventConfig.CutOffNumber = rule.RuleValue;
|
|
110
|
-
},
|
|
111
|
-
15: (eventConfig, rule) => {
|
|
112
|
-
eventConfig.DEType = rule.RuleValue;
|
|
113
|
-
},
|
|
114
|
-
16: (eventConfig, rule) => {
|
|
115
|
-
eventConfig.PoolScoreDirection = ruleValueIsTrue(rule, 'PoolScoreDirection');
|
|
116
|
-
},
|
|
117
|
-
17: (eventConfig, rule) => {
|
|
118
|
-
eventConfig.DEPromoteBy = rule.RuleValue;
|
|
119
|
-
},
|
|
120
|
-
19: (eventConfig, rule) => {
|
|
121
|
-
eventConfig.CountHandshots = ruleValueIsTrue(rule, 'CountHandshots');
|
|
122
|
-
},
|
|
123
|
-
20: (eventConfig, rule) => {
|
|
124
|
-
eventConfig.CountDoubles = ruleValueIsTrue(rule, 'CountDoubles');
|
|
125
|
-
},
|
|
126
|
-
21: (eventConfig, rule) => {
|
|
127
|
-
eventConfig.PenaltiesReset = ruleValueIsTrue(rule, 'PenaltiesReset');
|
|
128
|
-
},
|
|
129
|
-
22: (eventConfig, rule) => {
|
|
130
|
-
eventConfig.IncludeInRatings = ruleValueIsTrue(rule, 'IncludeInRatings');
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export default {
|
|
64
|
+
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
65
|
+
import StepIndicator from '../../../Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue';
|
|
66
|
+
import DirectEliminationPromotion from './DirectEliminationPromotion/DirectEliminationPromotion.vue';
|
|
67
|
+
import EventCustomization from '../../..//Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue';
|
|
68
|
+
|
|
69
|
+
const ruleValueIsTrue = (rule, fallbackField) =>
|
|
70
|
+
rule.RuleValue === 'true' || rule.RuleValue === true || rule[fallbackField] === true;
|
|
71
|
+
|
|
72
|
+
const rulePatchCreators = {
|
|
73
|
+
1: rule => ({ poolTime: rule.RuleValue, poolTimer: true }),
|
|
74
|
+
2: rule => ({ poolMaxPoints: rule.RuleValue, poolMax: true }),
|
|
75
|
+
3: rule => ({ DETime: rule.RuleValue, DETimer: true }),
|
|
76
|
+
4: rule => ({ DEMaxPoints: rule.RuleValue, DEMax: true }),
|
|
77
|
+
5: rule => ({ thirdPlaceBout: ruleValueIsTrue(rule, 'thirdPlaceBout') }),
|
|
78
|
+
6: rule => ({ boutCount: rule.RuleValue, boutCounter: true }),
|
|
79
|
+
7: rule => ({ DEBoutCount: rule.RuleValue, DEBoutCounter: true }),
|
|
80
|
+
9: rule => ({ DEPromotionOrder: rule.RuleValue.split(',') }),
|
|
81
|
+
10: rule => ({ DEPromotionAmount: rule.RuleValue }),
|
|
82
|
+
11: rule => ({ seedWith: rule.RuleValue }),
|
|
83
|
+
14: rule => ({ CutOffNumber: rule.RuleValue }),
|
|
84
|
+
15: rule => ({ DEType: rule.RuleValue }),
|
|
85
|
+
16: rule => ({ PoolScoreDirection: ruleValueIsTrue(rule, 'PoolScoreDirection') }),
|
|
86
|
+
17: rule => ({ DEPromoteBy: rule.RuleValue }),
|
|
87
|
+
19: rule => ({ CountHandshots: ruleValueIsTrue(rule, 'CountHandshots') }),
|
|
88
|
+
20: rule => ({ CountDoubles: ruleValueIsTrue(rule, 'CountDoubles') }),
|
|
89
|
+
21: rule => ({ PenaltiesReset: ruleValueIsTrue(rule, 'PenaltiesReset') }),
|
|
90
|
+
22: rule => ({ IncludeInRatings: ruleValueIsTrue(rule, 'IncludeInRatings') })
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const createRulePatch = rule => (rulePatchCreators[rule.RuleId] || (() => ({})))(rule);
|
|
94
|
+
|
|
95
|
+
const applyRulesToEventConfig = (eventConfig, rules) =>
|
|
96
|
+
rules.reduce((currentConfig, rule) => ({ ...currentConfig, ...createRulePatch(rule) }), { ...eventConfig });
|
|
97
|
+
|
|
98
|
+
const cloneEvent = event => ({
|
|
99
|
+
...(event || {}),
|
|
100
|
+
rules: Array.isArray(event?.rules) ? event.rules.map(rule => ({ ...rule })) : []
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export default {
|
|
135
104
|
name: 'EditEventWizard',
|
|
136
105
|
components: {
|
|
137
106
|
EventCustomization,
|
|
138
107
|
DirectEliminationPromotion,
|
|
139
|
-
StepIndicator,
|
|
108
|
+
StepIndicator,
|
|
109
|
+
BasicEventInfo,
|
|
110
|
+
PoolConfiguration,
|
|
111
|
+
DirectElimination,
|
|
112
|
+
BaseButton
|
|
140
113
|
},
|
|
141
|
-
emits: ['update:submit','update:cancel'],
|
|
114
|
+
emits: ['update:submit', 'update:cancel'],
|
|
142
115
|
props: {
|
|
143
116
|
event: {
|
|
144
|
-
type: Object
|
|
117
|
+
type: Object
|
|
145
118
|
},
|
|
146
119
|
weapons: {
|
|
147
120
|
type: Array,
|
|
@@ -149,13 +122,13 @@ export default {
|
|
|
149
122
|
},
|
|
150
123
|
saveButtonLabel: {
|
|
151
124
|
type: String,
|
|
152
|
-
default: 'Save'
|
|
125
|
+
default: 'Save'
|
|
153
126
|
},
|
|
154
127
|
DEFormats: {
|
|
155
128
|
type: Array,
|
|
156
129
|
default: () => [
|
|
157
|
-
{link: 1, text: 'Single Elimination'},
|
|
158
|
-
{link: 2, text: 'Double Elimination'}
|
|
130
|
+
{ link: 1, text: 'Single Elimination' },
|
|
131
|
+
{ link: 2, text: 'Double Elimination' }
|
|
159
132
|
]
|
|
160
133
|
},
|
|
161
134
|
userLevel: {
|
|
@@ -166,10 +139,10 @@ export default {
|
|
|
166
139
|
data() {
|
|
167
140
|
return {
|
|
168
141
|
currentStep: 1,
|
|
169
|
-
localEvent: this.event,
|
|
142
|
+
localEvent: cloneEvent(this.event),
|
|
170
143
|
hasClickedNext: false,
|
|
171
144
|
validation: {
|
|
172
|
-
EventName: { invalid: false, message: '' }
|
|
145
|
+
EventName: { invalid: false, message: '' }
|
|
173
146
|
},
|
|
174
147
|
eventConfig: {
|
|
175
148
|
EventName: this.event.EventName,
|
|
@@ -177,7 +150,7 @@ export default {
|
|
|
177
150
|
StartTime: this.event.startTime,
|
|
178
151
|
NumberOfRings: this.event.NumberOfRings,
|
|
179
152
|
WeaponId: this.event.WeaponId,
|
|
180
|
-
seedWith: {text: 'M2 - MeyerSquared', link: 'M2'},
|
|
153
|
+
seedWith: { text: 'M2 - MeyerSquared', link: 'M2' },
|
|
181
154
|
CutOffNumber: undefined,
|
|
182
155
|
boutCounter: false,
|
|
183
156
|
boutCount: 5,
|
|
@@ -195,7 +168,7 @@ export default {
|
|
|
195
168
|
DEMaxPoints: 12,
|
|
196
169
|
DEPromotionAmount: '100%',
|
|
197
170
|
DEPromotionOrder: ['Win Percent', 'Win Count', 'Indicator', 'Points Scored'],
|
|
198
|
-
DEPromoteBy: ['Top Percent','Top Count','Top Count of Each Pool'],
|
|
171
|
+
DEPromoteBy: ['Top Percent', 'Top Count', 'Top Count of Each Pool'],
|
|
199
172
|
DEType: 'single',
|
|
200
173
|
CountHandshots: false,
|
|
201
174
|
CountDoubles: false,
|
|
@@ -203,16 +176,16 @@ export default {
|
|
|
203
176
|
IncludeInRatings: true
|
|
204
177
|
},
|
|
205
178
|
seedWithOptions: [
|
|
206
|
-
{text: 'M2 - MeyerSquared', link: 'M2'},
|
|
207
|
-
{text: 'HR - Hema Rating', link: 'HR'},
|
|
208
|
-
{text: 'Manual', link: 'MN'}
|
|
179
|
+
{ text: 'M2 - MeyerSquared', link: 'M2' },
|
|
180
|
+
{ text: 'HR - Hema Rating', link: 'HR' },
|
|
181
|
+
{ text: 'Manual', link: 'MN' }
|
|
209
182
|
],
|
|
210
183
|
steps: [
|
|
211
|
-
{name:
|
|
212
|
-
{name:
|
|
213
|
-
{name:
|
|
214
|
-
{name:
|
|
215
|
-
{name:
|
|
184
|
+
{ name: 'Basic Info', icon: 'fa-circle-info' },
|
|
185
|
+
{ name: 'Customization', icon: 'fa-star' },
|
|
186
|
+
{ name: 'Pool Setup', icon: 'fa-table-columns' },
|
|
187
|
+
{ name: 'DE Promotion', icon: 'fa-list' },
|
|
188
|
+
{ name: 'Direct Elimination', icon: 'fa-diagram-sankey' }
|
|
216
189
|
]
|
|
217
190
|
};
|
|
218
191
|
},
|
|
@@ -222,17 +195,14 @@ export default {
|
|
|
222
195
|
},
|
|
223
196
|
watch: {
|
|
224
197
|
event(newEvent) {
|
|
225
|
-
this.localEvent = newEvent;
|
|
198
|
+
this.localEvent = cloneEvent(newEvent);
|
|
226
199
|
}
|
|
227
200
|
},
|
|
228
201
|
methods: {
|
|
229
|
-
setInitialValues() {
|
|
230
|
-
if (!this.event.rules) return;
|
|
231
|
-
this.event.rules
|
|
232
|
-
|
|
233
|
-
if (applyRule) applyRule(this.eventConfig, rule);
|
|
234
|
-
});
|
|
235
|
-
},
|
|
202
|
+
setInitialValues() {
|
|
203
|
+
if (!this.event.rules) return;
|
|
204
|
+
this.eventConfig = applyRulesToEventConfig(this.eventConfig, this.event.rules);
|
|
205
|
+
},
|
|
236
206
|
handleValueChange(change) {
|
|
237
207
|
const [key, value] = Object.entries(change)[0];
|
|
238
208
|
|
|
@@ -243,7 +213,7 @@ export default {
|
|
|
243
213
|
this.localEvent[key] = value;
|
|
244
214
|
|
|
245
215
|
if (this.hasClickedNext) {
|
|
246
|
-
this.validateAll()
|
|
216
|
+
this.validateAll();
|
|
247
217
|
}
|
|
248
218
|
},
|
|
249
219
|
handleDEPromotionType(change) {
|
|
@@ -257,7 +227,7 @@ export default {
|
|
|
257
227
|
if (!this.eventConfig.EventName || this.eventConfig.EventName.trim().length < 4) {
|
|
258
228
|
this.validation.EventName = {
|
|
259
229
|
invalid: true,
|
|
260
|
-
message:
|
|
230
|
+
message: 'Event Name must be at least 3 characters long.'
|
|
261
231
|
};
|
|
262
232
|
isValid = false;
|
|
263
233
|
return isValid;
|
|
@@ -266,13 +236,13 @@ export default {
|
|
|
266
236
|
if (forbiddenChars.test(this.eventConfig.EventName)) {
|
|
267
237
|
this.validation.EventName = {
|
|
268
238
|
invalid: true,
|
|
269
|
-
message:
|
|
239
|
+
message: 'Event Name contains invalid characters.'
|
|
270
240
|
};
|
|
271
241
|
isValid = false;
|
|
272
242
|
return isValid;
|
|
273
243
|
}
|
|
274
244
|
|
|
275
|
-
this.validation.EventName = { invalid: false, message:
|
|
245
|
+
this.validation.EventName = { invalid: false, message: '' };
|
|
276
246
|
return isValid;
|
|
277
247
|
},
|
|
278
248
|
handleUpdate(eventConfig) {
|
|
@@ -284,7 +254,7 @@ export default {
|
|
|
284
254
|
}
|
|
285
255
|
}
|
|
286
256
|
|
|
287
|
-
this.eventConfig = {...this.eventConfig, ...eventConfig};
|
|
257
|
+
this.eventConfig = { ...this.eventConfig, ...eventConfig };
|
|
288
258
|
this.currentStep += 1;
|
|
289
259
|
},
|
|
290
260
|
handleBack() {
|
|
@@ -292,45 +262,48 @@ export default {
|
|
|
292
262
|
},
|
|
293
263
|
convertEventConfigToRules(eventConfig) {
|
|
294
264
|
const mapping = {
|
|
295
|
-
poolTime: { RuleId: 1, RuleName:
|
|
296
|
-
poolMaxPoints: { RuleId: 2, RuleName:
|
|
297
|
-
DETime: { RuleId: 3, RuleName:
|
|
298
|
-
DEMaxPoints: { RuleId: 4, RuleName:
|
|
299
|
-
thirdPlaceBout: { RuleId: 5, RuleName:
|
|
300
|
-
boutCount: { RuleId: 6, RuleName:
|
|
301
|
-
DEBoutCount: { RuleId: 7, RuleName:
|
|
302
|
-
DEPromotionAmount: { RuleId: 10, RuleName:
|
|
303
|
-
DEPromotionOrder: { RuleId: 9, RuleName:
|
|
304
|
-
seedWith: { RuleId: 11, RuleName:
|
|
305
|
-
CutOffNumber: { RuleId: 14, RuleName:
|
|
306
|
-
DEType: { RuleId: 15, RuleName:
|
|
307
|
-
PoolScoreDirection: { RuleId: 16, RuleName:
|
|
308
|
-
DEPromoteBy: { RuleId: 17, RuleName:
|
|
309
|
-
CountHandshots: { RuleId: 19, RuleName:
|
|
310
|
-
CountDoubles: { RuleId: 20, RuleName:
|
|
311
|
-
PenaltiesReset: { RuleId: 21, RuleName:
|
|
265
|
+
poolTime: { RuleId: 1, RuleName: 'PoolTime', Context: 'pool', dependsOn: 'poolTimer' },
|
|
266
|
+
poolMaxPoints: { RuleId: 2, RuleName: 'PoolMaxPoints', Context: 'pool' },
|
|
267
|
+
DETime: { RuleId: 3, RuleName: 'DETime', Context: 'de', dependsOn: 'DETimer' },
|
|
268
|
+
DEMaxPoints: { RuleId: 4, RuleName: 'DEMaxPoints', Context: 'de' },
|
|
269
|
+
thirdPlaceBout: { RuleId: 5, RuleName: 'DE3rdFenceOff', Context: 'de' },
|
|
270
|
+
boutCount: { RuleId: 6, RuleName: 'PoolNumOfPasses', Context: 'pool', dependsOn: 'boutCounter' },
|
|
271
|
+
DEBoutCount: { RuleId: 7, RuleName: 'DENumOfPasses', Context: 'de', dependsOn: 'DEBoutCounter' },
|
|
272
|
+
DEPromotionAmount: { RuleId: 10, RuleName: 'DENumOfPromotion', Context: 'de' },
|
|
273
|
+
DEPromotionOrder: { RuleId: 9, RuleName: 'DEPromotionOrder', Context: 'de' },
|
|
274
|
+
seedWith: { RuleId: 11, RuleName: 'PoolSeeding', Context: 'pool' },
|
|
275
|
+
CutOffNumber: { RuleId: 14, RuleName: 'CutOffNumber', Context: 'event' },
|
|
276
|
+
DEType: { RuleId: 15, RuleName: 'DEType', Context: 'de' },
|
|
277
|
+
PoolScoreDirection: { RuleId: 16, RuleName: 'PoolScoreDirection', Context: 'de' },
|
|
278
|
+
DEPromoteBy: { RuleId: 17, RuleName: 'DEPromoteBy', Context: 'de' },
|
|
279
|
+
CountHandshots: { RuleId: 19, RuleName: 'CountHandshots', Context: 'event' },
|
|
280
|
+
CountDoubles: { RuleId: 20, RuleName: 'CountDoubles', Context: 'event' },
|
|
281
|
+
PenaltiesReset: { RuleId: 21, RuleName: 'PenaltiesReset', Context: 'event' }
|
|
312
282
|
};
|
|
313
283
|
|
|
314
284
|
return Object.entries(eventConfig)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
285
|
+
.filter(([key]) => mapping[key])
|
|
286
|
+
.filter(([key]) => {
|
|
287
|
+
const dependency = mapping[key].dependsOn;
|
|
288
|
+
return !dependency || eventConfig[dependency];
|
|
289
|
+
})
|
|
290
|
+
.map(([key, value]) => ({
|
|
291
|
+
RuleId: mapping[key].RuleId,
|
|
292
|
+
RuleName: mapping[key].RuleName,
|
|
293
|
+
RuleValue: Array.isArray(value) ? value.join(',') : String(value),
|
|
294
|
+
Context: mapping[key].Context
|
|
295
|
+
}));
|
|
326
296
|
},
|
|
327
297
|
handleSubmit() {
|
|
328
|
-
this.localEvent
|
|
329
|
-
|
|
298
|
+
this.localEvent = {
|
|
299
|
+
...this.localEvent,
|
|
300
|
+
rules: this.convertEventConfigToRules(this.eventConfig)
|
|
301
|
+
};
|
|
302
|
+
this.$emit('update:submit', { ...this.localEvent });
|
|
330
303
|
},
|
|
331
304
|
handleCancel() {
|
|
332
305
|
this.$emit('update:cancel');
|
|
333
|
-
}
|
|
306
|
+
}
|
|
334
307
|
}
|
|
335
308
|
};
|
|
336
309
|
</script>
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import CustomEventRules from './EventCustomization.vue';
|
|
2
|
-
import singleEventMock from
|
|
2
|
+
import singleEventMock from '../../../../../mocks/singleEventMock.js';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
event: singleEventMock,
|
|
9
|
-
currentStep: 1,
|
|
10
|
-
steps: [
|
|
11
|
-
{name: "Basic Info", icon: "fa-circle-info"},
|
|
12
|
-
{name: "Customization", icon: "fa-star"},
|
|
13
|
-
{name: "Pool Setup", icon: "fa-table-columns"},
|
|
14
|
-
{name: "DE Promotion", icon: "fa-list"},
|
|
15
|
-
{name: "Direct Elimination", icon: "fa-diagram-sankey"}
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
argTypes: {
|
|
19
|
-
event: { control: 'object' },
|
|
20
|
-
seedWithOptions: { control: 'Array' },
|
|
21
|
-
validation: { control: 'object' },
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Default = {
|
|
5
|
+
title: 'Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization',
|
|
6
|
+
component: CustomEventRules,
|
|
7
|
+
args: {
|
|
26
8
|
event: singleEventMock,
|
|
27
|
-
currentStep:
|
|
9
|
+
currentStep: 1,
|
|
28
10
|
steps: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
11
|
+
{ name: 'Basic Info', icon: 'fa-circle-info' },
|
|
12
|
+
{ name: 'Customization', icon: 'fa-star' },
|
|
13
|
+
{ name: 'Pool Setup', icon: 'fa-table-columns' },
|
|
14
|
+
{ name: 'DE Promotion', icon: 'fa-list' },
|
|
15
|
+
{ name: 'Direct Elimination', icon: 'fa-diagram-sankey' }
|
|
34
16
|
]
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
event: { control: 'object' },
|
|
20
|
+
seedWithOptions: { control: 'Array' },
|
|
21
|
+
validation: { control: 'object' }
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Default = {
|
|
26
|
+
event: singleEventMock,
|
|
27
|
+
currentStep: 2,
|
|
28
|
+
steps: [
|
|
29
|
+
{ name: 'Basic Info', icon: 'fa-circle-info' },
|
|
30
|
+
{ name: 'Customization', icon: 'fa-star' },
|
|
31
|
+
{ name: 'Pool Setup', icon: 'fa-table-columns' },
|
|
32
|
+
{ name: 'DE Promotion', icon: 'fa-list' },
|
|
33
|
+
{ name: 'Direct Elimination', icon: 'fa-diagram-sankey' }
|
|
34
|
+
]
|
|
35
35
|
};
|