@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,67 +1,113 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bg-neutral w-full">
|
|
3
|
-
<EditEventsTopMenu :tabs="filteredTabs" :currentTab="currentTab" @tabMenuClick="handleTab"/>
|
|
4
|
-
<TournamentPageOne
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
<EditEventsTopMenu :tabs="filteredTabs" :currentTab="currentTab" @tabMenuClick="handleTab" />
|
|
4
|
+
<TournamentPageOne
|
|
5
|
+
v-if="currentTab === 'Basic'"
|
|
6
|
+
:tournament="localTournament"
|
|
7
|
+
:locations="locations"
|
|
8
|
+
:persons="personsList"
|
|
9
|
+
:validation="validation"
|
|
10
|
+
:imageServer="imageServer"
|
|
11
|
+
:uploadImageName="uploadImageName"
|
|
12
|
+
:uploadServer="uploadServer"
|
|
13
|
+
:isNewTournament="isNewTournament"
|
|
14
|
+
:userLevel="userLevel"
|
|
15
|
+
@add:newAddress="handleAddNewAddress"
|
|
16
|
+
@add:newPerson="handleAddNewPerson"
|
|
17
|
+
@update:address="handleAddressUpdate"
|
|
18
|
+
@update:image="handleNewImageUrl"
|
|
19
|
+
@update:tournament="updateTournament"
|
|
19
20
|
/>
|
|
20
21
|
|
|
21
|
-
<TournamentPageTwo
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
<TournamentPageTwo
|
|
23
|
+
v-if="currentTab === 'Hosting'"
|
|
24
|
+
:tournament="localTournament"
|
|
25
|
+
:isNewTournament="isNewTournament"
|
|
26
|
+
@update:tournament="updateTournament"
|
|
27
|
+
@go:results-import="handleTab('ResultsImport')"
|
|
26
28
|
/>
|
|
27
29
|
|
|
28
30
|
<div v-if="isNewTournament" class="flex flex-row justify-center h-12 mt-4">
|
|
29
|
-
<BaseButton
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<BaseButton
|
|
32
|
+
v-if="currentTab === 'Basic'"
|
|
33
|
+
class="w-1/2 ml-1 h-12"
|
|
34
|
+
color="neutral"
|
|
35
|
+
label="Cancel"
|
|
36
|
+
size="sm"
|
|
37
|
+
type="primary"
|
|
38
|
+
@buttonClick="handleCancel"
|
|
39
|
+
/>
|
|
40
|
+
<BaseButton
|
|
41
|
+
v-if="currentTab === 'Hosting'"
|
|
42
|
+
class="w-1/2 ml-1 h-12"
|
|
43
|
+
color="neutral"
|
|
44
|
+
label="Back"
|
|
45
|
+
size="sm"
|
|
46
|
+
type="primary"
|
|
47
|
+
@buttonClick="handleBack"
|
|
48
|
+
/>
|
|
33
49
|
|
|
34
|
-
<BaseButton
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
<BaseButton
|
|
51
|
+
v-if="currentTab === 'Basic'"
|
|
52
|
+
class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
|
|
53
|
+
color="neutral"
|
|
54
|
+
label="Next"
|
|
55
|
+
:selected="true"
|
|
56
|
+
size="sm"
|
|
57
|
+
type="primary"
|
|
58
|
+
@buttonClick="handleNext"
|
|
59
|
+
/>
|
|
60
|
+
<BaseButton
|
|
61
|
+
v-if="currentTab === 'Hosting'"
|
|
62
|
+
class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
|
|
63
|
+
color="neutral"
|
|
64
|
+
:label="submitButtonLabel"
|
|
65
|
+
:selected="true"
|
|
66
|
+
size="sm"
|
|
67
|
+
type="primary"
|
|
68
|
+
@buttonClick="handleSubmit"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div v-if="!isNewTournament" class="flex flex-row justify-center h-12 mt-4">
|
|
73
|
+
<BaseButton
|
|
74
|
+
class="w-1/2 mr-1 transition-all duration-300 ease-in-out h-12"
|
|
75
|
+
color="neutral"
|
|
76
|
+
:label="submitButtonLabel"
|
|
77
|
+
:selected="true"
|
|
78
|
+
size="sm"
|
|
79
|
+
type="primary"
|
|
80
|
+
@buttonClick="handleSubmit"
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
45
83
|
</div>
|
|
46
84
|
</template>
|
|
47
85
|
|
|
48
86
|
<script>
|
|
49
|
-
import TournamentPageOne from
|
|
50
|
-
import BaseButton from
|
|
51
|
-
import EditEventsTopMenu from
|
|
52
|
-
import {tournamentTabs} from
|
|
53
|
-
import TournamentPageTwo from
|
|
54
|
-
import {validateField} from
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
title: 'TournamentManagement',
|
|
58
|
-
components: {
|
|
59
|
-
TournamentPageTwo,
|
|
60
|
-
EditEventsTopMenu,
|
|
61
|
-
BaseButton,
|
|
62
|
-
TournamentPageOne
|
|
63
|
-
},
|
|
64
|
-
emits: [
|
|
87
|
+
import TournamentPageOne from './TournamentPageOne/TournamentPageOne.vue';
|
|
88
|
+
import BaseButton from '../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
89
|
+
import EditEventsTopMenu from '../Menus/EditEventsTopMenu/EditEventsTopMenu.vue';
|
|
90
|
+
import { tournamentTabs } from '../../Util/tabs.js';
|
|
91
|
+
import TournamentPageTwo from './TournamentPageTwo/TournamentPageTwo.vue';
|
|
92
|
+
import { validateField } from '../../Util/Validations/TournamentFieldsValidations.js';
|
|
93
|
+
|
|
94
|
+
export default {
|
|
95
|
+
title: 'TournamentManagement',
|
|
96
|
+
components: {
|
|
97
|
+
TournamentPageTwo,
|
|
98
|
+
EditEventsTopMenu,
|
|
99
|
+
BaseButton,
|
|
100
|
+
TournamentPageOne
|
|
101
|
+
},
|
|
102
|
+
emits: [
|
|
103
|
+
'submit:tournament',
|
|
104
|
+
'cancel',
|
|
105
|
+
'add:newAddress',
|
|
106
|
+
'add:newPerson',
|
|
107
|
+
'update:address',
|
|
108
|
+
'update:image',
|
|
109
|
+
'tab:menu-click'
|
|
110
|
+
],
|
|
65
111
|
props: {
|
|
66
112
|
tournament: {
|
|
67
113
|
type: Object,
|
|
@@ -92,129 +138,128 @@ export default {
|
|
|
92
138
|
type: String,
|
|
93
139
|
default: 'Basic'
|
|
94
140
|
},
|
|
95
|
-
userLevel: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: 'Club'
|
|
98
|
-
},
|
|
99
|
-
submitButtonLabel: {
|
|
100
|
-
type: String,
|
|
101
|
-
default: 'Save'
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
data() {
|
|
105
|
-
return {
|
|
106
|
-
currentTab: this.showTab,
|
|
107
|
-
localTournament: this.createNewTournamentDraft(),
|
|
108
|
-
isNewTournament: true,
|
|
109
|
-
validation: {
|
|
110
|
-
Name: {invalid: false, message:
|
|
111
|
-
Address: {invalid: false, message:
|
|
112
|
-
StartDate: {invalid: false, message:
|
|
113
|
-
TotalDays: {invalid: false, message:
|
|
114
|
-
RegistrationCutOff: {invalid: false, message:
|
|
115
|
-
Description: {invalid: false, message:
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
watch: {
|
|
120
|
-
tournament: {
|
|
121
|
-
handler: 'initializeTournamentDraft'
|
|
122
|
-
},
|
|
123
|
-
showTab(tab) {
|
|
124
|
-
this.currentTab = tab;
|
|
125
|
-
},
|
|
126
|
-
'localTournament.StartDate': 'setEndDate',
|
|
127
|
-
'localTournament.TotalDays': 'setEndDate'
|
|
128
|
-
},
|
|
129
|
-
mounted() {
|
|
130
|
-
this.initializeTournamentDraft();
|
|
141
|
+
userLevel: {
|
|
142
|
+
type: String,
|
|
143
|
+
default: 'Club'
|
|
144
|
+
},
|
|
145
|
+
submitButtonLabel: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: 'Save'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
data() {
|
|
151
|
+
return {
|
|
152
|
+
currentTab: this.showTab,
|
|
153
|
+
localTournament: this.createNewTournamentDraft(),
|
|
154
|
+
isNewTournament: true,
|
|
155
|
+
validation: {
|
|
156
|
+
Name: { invalid: false, message: '' },
|
|
157
|
+
Address: { invalid: false, message: '' },
|
|
158
|
+
StartDate: { invalid: false, message: '' },
|
|
159
|
+
TotalDays: { invalid: false, message: '' },
|
|
160
|
+
RegistrationCutOff: { invalid: false, message: '' },
|
|
161
|
+
Description: { invalid: false, message: '' }
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
watch: {
|
|
166
|
+
tournament: {
|
|
167
|
+
handler: 'initializeTournamentDraft'
|
|
168
|
+
},
|
|
169
|
+
showTab(tab) {
|
|
170
|
+
this.currentTab = tab;
|
|
171
|
+
},
|
|
172
|
+
'localTournament.StartDate': 'setEndDate',
|
|
173
|
+
'localTournament.TotalDays': 'setEndDate'
|
|
174
|
+
},
|
|
175
|
+
mounted() {
|
|
176
|
+
this.initializeTournamentDraft();
|
|
131
177
|
},
|
|
132
178
|
computed: {
|
|
133
179
|
filteredTabs() {
|
|
134
|
-
return this.isNewTournament
|
|
135
|
-
? tournamentTabs().filter(tab => tab.label !== "Events")
|
|
136
|
-
: tournamentTabs();
|
|
180
|
+
return this.isNewTournament ? tournamentTabs().filter(tab => tab.label !== 'Events') : tournamentTabs();
|
|
137
181
|
},
|
|
138
182
|
personsList() {
|
|
139
|
-
return Array.isArray(this.persons) ? this.persons :
|
|
140
|
-
}
|
|
183
|
+
return Array.isArray(this.persons) ? this.persons : this.persons ? [this.persons] : [];
|
|
184
|
+
}
|
|
141
185
|
},
|
|
142
186
|
methods: {
|
|
143
|
-
tournamentTabs,
|
|
144
|
-
handleTab(tab) {
|
|
145
|
-
this.currentTab = tab;
|
|
146
|
-
this.$emit('tab:menu-click', tab);
|
|
147
|
-
},
|
|
148
|
-
initializeTournamentDraft() {
|
|
149
|
-
if (!this.tournament || Object.keys(this.tournament).length === 0 || !this.tournament.Name) {
|
|
150
|
-
this.isNewTournament = true;
|
|
151
|
-
this.localTournament = this.createNewTournamentDraft();
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
this.isNewTournament = false;
|
|
156
|
-
this.localTournament = this.createExistingTournamentDraft(this.tournament);
|
|
157
|
-
this.setEndDate();
|
|
158
|
-
},
|
|
159
|
-
createNewTournamentDraft() {
|
|
160
|
-
const today = new Date().toISOString().slice(0, 10);
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
TournamentId: 0,
|
|
164
|
-
Name:
|
|
165
|
-
Address:
|
|
166
|
-
TotalDays: 1,
|
|
167
|
-
StartDate: today,
|
|
168
|
-
RegistrationCutOff: today,
|
|
169
|
-
Description:
|
|
170
|
-
HostedOnM2: false,
|
|
171
|
-
ResultsEnabled: false,
|
|
172
|
-
Visibility:
|
|
173
|
-
WaiverScope:
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
|
-
createExistingTournamentDraft(tournament) {
|
|
177
|
-
const tournamentDraft = this.cloneTournamentData(tournament);
|
|
178
|
-
const startDate = new Date(tournamentDraft.StartDate);
|
|
179
|
-
const endDate = new Date(tournamentDraft.EndDate);
|
|
180
|
-
const TotalDays =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
this
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
187
|
+
tournamentTabs,
|
|
188
|
+
handleTab(tab) {
|
|
189
|
+
this.currentTab = tab;
|
|
190
|
+
this.$emit('tab:menu-click', tab);
|
|
191
|
+
},
|
|
192
|
+
initializeTournamentDraft() {
|
|
193
|
+
if (!this.tournament || Object.keys(this.tournament).length === 0 || !this.tournament.Name) {
|
|
194
|
+
this.isNewTournament = true;
|
|
195
|
+
this.localTournament = this.createNewTournamentDraft();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
this.isNewTournament = false;
|
|
200
|
+
this.localTournament = this.createExistingTournamentDraft(this.tournament);
|
|
201
|
+
this.setEndDate();
|
|
202
|
+
},
|
|
203
|
+
createNewTournamentDraft() {
|
|
204
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
TournamentId: 0,
|
|
208
|
+
Name: '',
|
|
209
|
+
Address: '',
|
|
210
|
+
TotalDays: 1,
|
|
211
|
+
StartDate: today,
|
|
212
|
+
RegistrationCutOff: today,
|
|
213
|
+
Description: '',
|
|
214
|
+
HostedOnM2: false,
|
|
215
|
+
ResultsEnabled: false,
|
|
216
|
+
Visibility: 'Open',
|
|
217
|
+
WaiverScope: 'None'
|
|
218
|
+
};
|
|
219
|
+
},
|
|
220
|
+
createExistingTournamentDraft(tournament) {
|
|
221
|
+
const tournamentDraft = this.cloneTournamentData(tournament);
|
|
222
|
+
const startDate = new Date(tournamentDraft.StartDate);
|
|
223
|
+
const endDate = new Date(tournamentDraft.EndDate);
|
|
224
|
+
const TotalDays =
|
|
225
|
+
!isNaN(startDate.getTime()) && !isNaN(endDate.getTime())
|
|
226
|
+
? Math.max(1, (endDate - startDate) / (1000 * 60 * 60 * 24) + 1)
|
|
227
|
+
: 1;
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
...tournamentDraft,
|
|
231
|
+
TotalDays,
|
|
232
|
+
StartDate: this.formatDateOnly(tournamentDraft.StartDate),
|
|
233
|
+
EndDate: this.formatDateOnly(tournamentDraft.EndDate),
|
|
234
|
+
RegistrationCutOff: this.formatDateOnly(tournamentDraft.RegistrationCutOff),
|
|
235
|
+
Visibility: tournamentDraft.Visibility ?? 'Open',
|
|
236
|
+
WaiverScope: tournamentDraft.WaiverScope ?? 'None',
|
|
237
|
+
ResultsEnabled: tournamentDraft.ResultsEnabled ?? false
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
cloneTournamentData(tournament) {
|
|
241
|
+
return JSON.parse(JSON.stringify(tournament));
|
|
242
|
+
},
|
|
243
|
+
handleAddNewAddress(newAddress) {
|
|
244
|
+
this.updateTournament({ AddressId: 0, Address: newAddress });
|
|
245
|
+
this.$emit('add:newAddress', newAddress);
|
|
246
|
+
},
|
|
247
|
+
handleAddNewPerson(personName) {
|
|
248
|
+
this.$emit('add:newPerson', personName);
|
|
249
|
+
},
|
|
250
|
+
handleAddressUpdate(updatedAddress) {
|
|
251
|
+
if (updatedAddress) {
|
|
252
|
+
this.updateTournament({
|
|
253
|
+
AddressId: updatedAddress.AddressId,
|
|
254
|
+
Address: updatedAddress
|
|
255
|
+
});
|
|
256
|
+
this.$emit('update:address', updatedAddress);
|
|
257
|
+
this.validation.Address = validateField('Address', updatedAddress);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
this.updateTournament({ AddressId: 0, Address: '' });
|
|
262
|
+
},
|
|
218
263
|
validateAllFields() {
|
|
219
264
|
const fieldsToValidate = ['Name', 'TotalDays', 'Address'];
|
|
220
265
|
fieldsToValidate.forEach(field => {
|
|
@@ -222,71 +267,71 @@ export default {
|
|
|
222
267
|
});
|
|
223
268
|
return !Object.values(this.validation).some(field => field.invalid);
|
|
224
269
|
},
|
|
225
|
-
handleNewImageUrl(imageUpdate) {
|
|
226
|
-
this.updateTournament(imageUpdate);
|
|
227
|
-
this.$emit('update:image', imageUpdate);
|
|
228
|
-
},
|
|
229
|
-
updateTournament(updatedData) {
|
|
230
|
-
const normalizedData = this.normalizeTournamentUpdate(updatedData);
|
|
231
|
-
this.localTournament = {...this.localTournament, ...normalizedData};
|
|
232
|
-
Object.keys(normalizedData).forEach(field => {
|
|
233
|
-
if (this.validation[field]) {
|
|
234
|
-
this.validation[field] = validateField(field, normalizedData[field]);
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
},
|
|
238
|
-
normalizeTournamentUpdate(updatedData) {
|
|
239
|
-
const normalizedData = {...updatedData};
|
|
240
|
-
const dateFields = ['StartDate', 'EndDate', 'RegistrationCutOff'];
|
|
241
|
-
|
|
242
|
-
dateFields.forEach(field => {
|
|
243
|
-
if (field in normalizedData) {
|
|
244
|
-
normalizedData[field] = this.formatDateOnly(normalizedData[field]);
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
return normalizedData;
|
|
249
|
-
},
|
|
250
|
-
formatDateOnly(dateValue) {
|
|
251
|
-
if (!dateValue) return
|
|
252
|
-
if (typeof dateValue === 'string') return dateValue.slice(0, 10);
|
|
253
|
-
|
|
254
|
-
const date = new Date(dateValue);
|
|
255
|
-
if (isNaN(date.getTime())) return
|
|
256
|
-
|
|
257
|
-
const year = date.getFullYear();
|
|
258
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
259
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
260
|
-
return `${year}-${month}-${day}`;
|
|
261
|
-
},
|
|
262
|
-
addDaysInclusiveYMD(startYmd, totalDays) {
|
|
263
|
-
const [y, m, d] = startYmd.split('-').map(Number);
|
|
264
|
-
const start = new Date(Date.UTC(y, m - 1, d));
|
|
270
|
+
handleNewImageUrl(imageUpdate) {
|
|
271
|
+
this.updateTournament(imageUpdate);
|
|
272
|
+
this.$emit('update:image', imageUpdate);
|
|
273
|
+
},
|
|
274
|
+
updateTournament(updatedData) {
|
|
275
|
+
const normalizedData = this.normalizeTournamentUpdate(updatedData);
|
|
276
|
+
this.localTournament = { ...this.localTournament, ...normalizedData };
|
|
277
|
+
Object.keys(normalizedData).forEach(field => {
|
|
278
|
+
if (this.validation[field]) {
|
|
279
|
+
this.validation[field] = validateField(field, normalizedData[field]);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
normalizeTournamentUpdate(updatedData) {
|
|
284
|
+
const normalizedData = { ...updatedData };
|
|
285
|
+
const dateFields = ['StartDate', 'EndDate', 'RegistrationCutOff'];
|
|
286
|
+
|
|
287
|
+
dateFields.forEach(field => {
|
|
288
|
+
if (field in normalizedData) {
|
|
289
|
+
normalizedData[field] = this.formatDateOnly(normalizedData[field]);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
return normalizedData;
|
|
294
|
+
},
|
|
295
|
+
formatDateOnly(dateValue) {
|
|
296
|
+
if (!dateValue) return '';
|
|
297
|
+
if (typeof dateValue === 'string') return dateValue.slice(0, 10);
|
|
298
|
+
|
|
299
|
+
const date = new Date(dateValue);
|
|
300
|
+
if (isNaN(date.getTime())) return '';
|
|
301
|
+
|
|
302
|
+
const year = date.getFullYear();
|
|
303
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
304
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
305
|
+
return `${year}-${month}-${day}`;
|
|
306
|
+
},
|
|
307
|
+
addDaysInclusiveYMD(startYmd, totalDays) {
|
|
308
|
+
const [y, m, d] = startYmd.split('-').map(Number);
|
|
309
|
+
const start = new Date(Date.UTC(y, m - 1, d));
|
|
265
310
|
const end = new Date(start);
|
|
266
311
|
end.setUTCDate(end.getUTCDate() + Math.max(1, Number(totalDays) || 1) - 1);
|
|
267
312
|
return end.toISOString().slice(0, 10); // 'YYYY-MM-DD'
|
|
268
313
|
},
|
|
269
|
-
setEndDate() {
|
|
270
|
-
if (!this.localTournament?.StartDate) return;
|
|
271
|
-
const startDate = this.formatDateOnly(this.localTournament.StartDate);
|
|
272
|
-
if (!startDate) return;
|
|
273
|
-
|
|
274
|
-
const days = Math.max(1, Number(this.localTournament.TotalDays) || 1);
|
|
275
|
-
this.localTournament.EndDate = this.addDaysInclusiveYMD(startDate, days);
|
|
276
|
-
},
|
|
277
|
-
handleCancel() {
|
|
278
|
-
this.$emit('cancel');
|
|
314
|
+
setEndDate() {
|
|
315
|
+
if (!this.localTournament?.StartDate) return;
|
|
316
|
+
const startDate = this.formatDateOnly(this.localTournament.StartDate);
|
|
317
|
+
if (!startDate) return;
|
|
318
|
+
|
|
319
|
+
const days = Math.max(1, Number(this.localTournament.TotalDays) || 1);
|
|
320
|
+
this.localTournament.EndDate = this.addDaysInclusiveYMD(startDate, days);
|
|
321
|
+
},
|
|
322
|
+
handleCancel() {
|
|
323
|
+
this.$emit('cancel');
|
|
279
324
|
},
|
|
280
325
|
transition(action) {
|
|
281
326
|
const table = {
|
|
282
327
|
Basic: {
|
|
283
|
-
NEXT: {to: 'Hosting', guard: () => this.validateAllFields()},
|
|
284
|
-
BACK: {to: 'Hosting'}
|
|
328
|
+
NEXT: { to: 'Hosting', guard: () => this.validateAllFields() },
|
|
329
|
+
BACK: { to: 'Hosting' }
|
|
285
330
|
},
|
|
286
331
|
Hosting: {
|
|
287
|
-
NEXT: {to: 'Basic'},
|
|
288
|
-
BACK: {to: 'Basic'}
|
|
289
|
-
}
|
|
332
|
+
NEXT: { to: 'Basic' },
|
|
333
|
+
BACK: { to: 'Basic' }
|
|
334
|
+
}
|
|
290
335
|
};
|
|
291
336
|
|
|
292
337
|
const state = table[this.currentTab];
|
|
@@ -305,11 +350,11 @@ export default {
|
|
|
305
350
|
handleBack() {
|
|
306
351
|
this.transition('BACK');
|
|
307
352
|
},
|
|
308
|
-
handleSubmit() {
|
|
309
|
-
if (this.validateAllFields()) {
|
|
310
|
-
this.$emit('submit:tournament', this.localTournament);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
353
|
+
handleSubmit() {
|
|
354
|
+
if (this.validateAllFields()) {
|
|
355
|
+
this.$emit('submit:tournament', this.localTournament);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
314
359
|
};
|
|
315
|
-
</script>
|
|
360
|
+
</script>
|