@dcrackel/hematournamentui 1.0.712 → 1.0.714
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 -7
- package/.storybook/main.js +3 -1
- package/README.md +42 -0
- package/dist/HemaTournamentUI-lib.es.js +6856 -6243
- package/dist/HemaTournamentUI-lib.umd.js +27 -27
- package/dist/hematournamentui-tailwind.css +79 -9
- package/package.json +96 -96
- package/prettier.config.js +16 -16
- package/src/index.js +43 -42
- package/src/main.js +1 -1
- package/src/mocks/getDEBouts-TableOf128.js +37 -37
- package/src/mocks/getDEBouts-TableOf64.js +35 -35
- package/src/stories/Atoms/Input/BaseInput.test.js +97 -97
- package/src/stories/Atoms/Input/BaseInput.vue +149 -149
- package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.stories.js +23 -23
- package/src/stories/Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue +35 -35
- package/src/stories/Molecules/Indicators/RegistrationStatus/RegistrationStatus.vue +30 -30
- package/src/stories/Molecules/Menus/HoverActions/HoverActions.test.js +138 -0
- package/src/stories/Molecules/Menus/HoverActions/HoverActions.vue +212 -0
- package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.stories.js +49 -0
- package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.test.js +129 -0
- package/src/stories/Molecules/Modals/BracketDirectorsModal/BracketDirectorsModal.vue +165 -0
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.stories.js +6 -0
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.test.js +18 -18
- package/src/stories/Molecules/Modals/DirectorModal/DirectorModal.vue +1 -1
- package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +5 -1
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +19 -10
- package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +11 -7
- package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.stories.js +42 -33
- package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.test.js +76 -45
- package/src/stories/Organisms/Cards/BracketDirectorAssignmentCard/BracketDirectorAssignmentCard.vue +122 -103
- package/src/stories/Organisms/Cards/Director/DirectorCard.test.js +82 -0
- package/src/stories/Organisms/Cards/Director/DirectorCard.vue +32 -51
- package/src/stories/Organisms/Cards/EditBout/EditBout.test.js +51 -51
- package/src/stories/Organisms/Cards/EventCard/EventCard.test.js +106 -106
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +298 -298
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.stories.js +77 -60
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.test.js +144 -143
- package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +289 -256
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.stories.js +69 -69
- package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +80 -80
- package/src/stories/Organisms/Cards/WaitlistFencerCard/WaitlistFencerCard.vue +153 -153
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +4 -0
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.stories.js +31 -31
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.test.js +109 -109
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +192 -192
- package/src/stories/Organisms/Containers/Tableau/Tableau.stories.js +1 -0
- package/src/stories/Organisms/Containers/Tableau/Tableau.test.js +247 -204
- package/src/stories/Organisms/Containers/Tableau/Tableau.vue +89 -15
- package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.test.js +51 -29
- package/src/stories/Organisms/Containers/Tableau/components/BracketDirectorAssignmentPanel.vue +63 -46
- package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.test.js +21 -21
- package/src/stories/Organisms/Containers/Tableau/components/TableauSvgOverlay.vue +39 -39
- package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.js +145 -145
- package/src/stories/Organisms/Containers/Tableau/layout/TableauLayoutEngine.test.js +64 -64
- package/src/stories/Organisms/Containers/Tableau/plannedAssignments.js +36 -57
- package/src/stories/Organisms/Containers/Tableau/plannedAssignments.test.js +101 -65
- package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +14 -1
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.stories.js +52 -52
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +10 -3
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination.vue +226 -226
- package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +204 -204
- package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.stories.js +137 -137
- package/src/stories/Organisms/Wizards/EditEventWizard/EventCustomization/EventCustomization.vue +172 -172
- package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +216 -216
- package/src/stories/Organisms/Wizards/EditEventWizard/PriceFields.test.js +79 -79
- package/src/stories/Organisms/Wizards/EditEventWizard/RuleSerialization.test.js +29 -29
- package/src/stories/Organisms/Wizards/EditEventWizard/WeaponSelection.test.js +138 -0
- package/src/stories/Templates/EventManagement/Bracket/Bracket.stories.js +149 -9
- package/src/stories/Templates/EventManagement/Bracket/Bracket.test.js +54 -2
- package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +77 -8
- package/src/stories/Templates/EventManagement/Bracket/BracketDirectorAssignment.test.js +242 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketMobile.test.js +131 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketPlannedSuggestions.js +50 -39
- package/src/stories/Templates/EventManagement/Bracket/BracketStories.test.js +201 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.js +93 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryAssignments.test.js +152 -0
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.js +39 -39
- package/src/stories/Templates/EventManagement/Bracket/BracketStoryHarness.test.js +79 -79
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.stories.js +93 -93
- package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +91 -91
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.test.js +121 -121
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.stories.js +9 -2
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +5 -4
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.stories.js +81 -81
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.test.js +39 -39
- package/src/stories/Templates/PersonManagement/Admin/Administration/Administration.vue +101 -101
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.stories.js +71 -71
- package/src/stories/Templates/PersonManagement/Admin/FencerAdmin/FencerAdmin.vue +86 -86
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.stories.js +86 -86
- package/src/stories/Templates/PersonManagement/Admin/MergeAccounts/MergeAccounts.vue +247 -247
- package/src/stories/Templates/PersonManagement/Basic/BasicEdit.vue +170 -170
- package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +156 -156
- package/src/stories/Templates/PersonManagement/PersonManagement.test.js +329 -329
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +329 -329
- package/src/stories/Templates/PersonManagement/PersonManagementDraft.js +42 -42
- package/src/stories/Templates/TournamentManagement/TournamentManagement.stories.js +84 -84
- package/src/stories/Templates/TournamentManagement/TournamentManagement.test.js +114 -114
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +363 -363
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.stories.js +116 -116
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +307 -307
- package/src/stories/Util/Validations/PersonManagementValidations.js +45 -45
- package/src/stories/Util/Validations/PriceValidation.js +6 -6
- package/src/stories/Util/boutDirectorAssignment.js +46 -0
- package/src/stories/Util/bracketDirectors.js +86 -0
- package/src/stories/Util/registrationStatus.js +11 -11
- package/src/stories/Util/tabs.js +19 -47
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import TableauFencerCard from './TableauFencerCard.vue';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Organisms/Cards/TableauFencerCard',
|
|
5
|
-
component: TableauFencerCard,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
args: {
|
|
8
|
-
fencer: { DisplayName: 'John Doe' },
|
|
9
|
-
score: '15',
|
|
10
|
-
position: '1',
|
|
11
|
-
color: 'blue',
|
|
12
|
-
scoreColor: 'bg-winGreen',
|
|
13
|
-
showScore: true,
|
|
14
|
-
corners: 'top'
|
|
15
|
-
},
|
|
16
|
-
argTypes: {
|
|
17
|
-
fencer: {
|
|
18
|
-
control: 'object',
|
|
19
|
-
description: 'Fencer displayed in the bracket row'
|
|
20
|
-
},
|
|
21
|
-
score: {
|
|
22
|
-
control: 'text',
|
|
23
|
-
description: 'Displayed bout score'
|
|
24
|
-
},
|
|
25
|
-
position: {
|
|
26
|
-
control: 'text',
|
|
27
|
-
description: 'Seed or direct-elimination position'
|
|
28
|
-
},
|
|
29
|
-
color: {
|
|
30
|
-
control: 'text',
|
|
31
|
-
description: 'Tailwind theme color used for the seed strip'
|
|
32
|
-
},
|
|
33
|
-
scoreColor: {
|
|
34
|
-
control: 'text',
|
|
35
|
-
description: 'Tailwind background class used for the score cell'
|
|
36
|
-
},
|
|
37
|
-
showScore: {
|
|
38
|
-
control: 'boolean',
|
|
39
|
-
description: 'Whether the score cell displays a value'
|
|
40
|
-
},
|
|
41
|
-
corners: {
|
|
42
|
-
control: 'select',
|
|
43
|
-
options: ['none', 'top', 'bottom'],
|
|
44
|
-
description: 'Rounds the outside corners when used as the top or bottom bout row'
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const Default = {};
|
|
50
|
-
|
|
51
|
-
export const LosingScore = {
|
|
52
|
-
args: {
|
|
53
|
-
fencer: { DisplayName: 'Jane Doe' },
|
|
54
|
-
score: '12',
|
|
55
|
-
position: '2',
|
|
56
|
-
color: 'red',
|
|
57
|
-
scoreColor: 'bg-lossRed',
|
|
58
|
-
corners: 'bottom'
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const PendingFencer = {
|
|
63
|
-
args: {
|
|
64
|
-
fencer: { DisplayName: '' },
|
|
65
|
-
score: '0',
|
|
66
|
-
position: '',
|
|
67
|
-
showScore: false
|
|
68
|
-
}
|
|
69
|
-
};
|
|
1
|
+
import TableauFencerCard from './TableauFencerCard.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Cards/TableauFencerCard',
|
|
5
|
+
component: TableauFencerCard,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
fencer: { DisplayName: 'John Doe' },
|
|
9
|
+
score: '15',
|
|
10
|
+
position: '1',
|
|
11
|
+
color: 'blue',
|
|
12
|
+
scoreColor: 'bg-winGreen',
|
|
13
|
+
showScore: true,
|
|
14
|
+
corners: 'top'
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
fencer: {
|
|
18
|
+
control: 'object',
|
|
19
|
+
description: 'Fencer displayed in the bracket row'
|
|
20
|
+
},
|
|
21
|
+
score: {
|
|
22
|
+
control: 'text',
|
|
23
|
+
description: 'Displayed bout score'
|
|
24
|
+
},
|
|
25
|
+
position: {
|
|
26
|
+
control: 'text',
|
|
27
|
+
description: 'Seed or direct-elimination position'
|
|
28
|
+
},
|
|
29
|
+
color: {
|
|
30
|
+
control: 'text',
|
|
31
|
+
description: 'Tailwind theme color used for the seed strip'
|
|
32
|
+
},
|
|
33
|
+
scoreColor: {
|
|
34
|
+
control: 'text',
|
|
35
|
+
description: 'Tailwind background class used for the score cell'
|
|
36
|
+
},
|
|
37
|
+
showScore: {
|
|
38
|
+
control: 'boolean',
|
|
39
|
+
description: 'Whether the score cell displays a value'
|
|
40
|
+
},
|
|
41
|
+
corners: {
|
|
42
|
+
control: 'select',
|
|
43
|
+
options: ['none', 'top', 'bottom'],
|
|
44
|
+
description: 'Rounds the outside corners when used as the top or bottom bout row'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Default = {};
|
|
50
|
+
|
|
51
|
+
export const LosingScore = {
|
|
52
|
+
args: {
|
|
53
|
+
fencer: { DisplayName: 'Jane Doe' },
|
|
54
|
+
score: '12',
|
|
55
|
+
position: '2',
|
|
56
|
+
color: 'red',
|
|
57
|
+
scoreColor: 'bg-lossRed',
|
|
58
|
+
corners: 'bottom'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const PendingFencer = {
|
|
63
|
+
args: {
|
|
64
|
+
fencer: { DisplayName: '' },
|
|
65
|
+
score: '0',
|
|
66
|
+
position: '',
|
|
67
|
+
showScore: false
|
|
68
|
+
}
|
|
69
|
+
};
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="flex h-7 w-40 overflow-hidden border border-poolSetup bg-poolSetup" :class="cornerClass">
|
|
3
|
-
<div class="flex w-5 shrink-0 items-center justify-center px-1" :class="positionColorClass">
|
|
4
|
-
<BaseText :text="position" size="xs" color="neutral" />
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div class="flex min-w-0 flex-1 items-center px-2">
|
|
8
|
-
<BaseText :text="name" size="xs" color="quaternary" class="truncate whitespace-nowrap" />
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="flex w-7 shrink-0 items-center justify-center border-l border-poolSetup" :class="scoreColor">
|
|
12
|
-
<BaseText v-if="showScore" :text="displayedScore" size="xs" color="neutral" />
|
|
13
|
-
</div>
|
|
14
|
-
</section>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
19
|
-
|
|
20
|
-
const cornerClasses = {
|
|
21
|
-
none: '',
|
|
22
|
-
top: 'rounded-t',
|
|
23
|
-
bottom: 'rounded-b'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
name: 'TableauFencerCard',
|
|
28
|
-
components: { BaseText },
|
|
29
|
-
props: {
|
|
30
|
-
fencer: {
|
|
31
|
-
type: Object,
|
|
32
|
-
required: true
|
|
33
|
-
},
|
|
34
|
-
score: {
|
|
35
|
-
type: String,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
position: {
|
|
39
|
-
type: [String, Number],
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
color: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: ''
|
|
45
|
-
},
|
|
46
|
-
scoreColor: {
|
|
47
|
-
type: String,
|
|
48
|
-
required: true
|
|
49
|
-
},
|
|
50
|
-
showScore: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
isCountingBackwardsMaxScore: {
|
|
55
|
-
type: Number,
|
|
56
|
-
default: 0
|
|
57
|
-
},
|
|
58
|
-
corners: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: 'none',
|
|
61
|
-
validator: value => Object.hasOwn(cornerClasses, value)
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
cornerClass() {
|
|
66
|
-
return cornerClasses[this.corners];
|
|
67
|
-
},
|
|
68
|
-
displayedScore() {
|
|
69
|
-
const score = Number(this.score || 0);
|
|
70
|
-
return this.isCountingBackwardsMaxScore > 0 ? this.isCountingBackwardsMaxScore - score : score;
|
|
71
|
-
},
|
|
72
|
-
name() {
|
|
73
|
-
return String(this.fencer?.DisplayName || '');
|
|
74
|
-
},
|
|
75
|
-
positionColorClass() {
|
|
76
|
-
return this.color ? `bg-${this.color}` : 'bg-dropdownSelect';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<section class="flex h-7 w-40 overflow-hidden border border-poolSetup bg-poolSetup" :class="cornerClass">
|
|
3
|
+
<div class="flex w-5 shrink-0 items-center justify-center px-1" :class="positionColorClass">
|
|
4
|
+
<BaseText :text="position" size="xs" color="neutral" />
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="flex min-w-0 flex-1 items-center px-2">
|
|
8
|
+
<BaseText :text="name" size="xs" color="quaternary" class="truncate whitespace-nowrap" />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="flex w-7 shrink-0 items-center justify-center border-l border-poolSetup" :class="scoreColor">
|
|
12
|
+
<BaseText v-if="showScore" :text="displayedScore" size="xs" color="neutral" />
|
|
13
|
+
</div>
|
|
14
|
+
</section>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
19
|
+
|
|
20
|
+
const cornerClasses = {
|
|
21
|
+
none: '',
|
|
22
|
+
top: 'rounded-t',
|
|
23
|
+
bottom: 'rounded-b'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'TableauFencerCard',
|
|
28
|
+
components: { BaseText },
|
|
29
|
+
props: {
|
|
30
|
+
fencer: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
score: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
position: {
|
|
39
|
+
type: [String, Number],
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
color: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
46
|
+
scoreColor: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
showScore: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
isCountingBackwardsMaxScore: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0
|
|
57
|
+
},
|
|
58
|
+
corners: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'none',
|
|
61
|
+
validator: value => Object.hasOwn(cornerClasses, value)
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
cornerClass() {
|
|
66
|
+
return cornerClasses[this.corners];
|
|
67
|
+
},
|
|
68
|
+
displayedScore() {
|
|
69
|
+
const score = Number(this.score || 0);
|
|
70
|
+
return this.isCountingBackwardsMaxScore > 0 ? this.isCountingBackwardsMaxScore - score : score;
|
|
71
|
+
},
|
|
72
|
+
name() {
|
|
73
|
+
return String(this.fencer?.DisplayName || '');
|
|
74
|
+
},
|
|
75
|
+
positionColorClass() {
|
|
76
|
+
return this.color ? `bg-${this.color}` : 'bg-dropdownSelect';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
</script>
|
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="person"
|
|
4
|
-
class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-poolBox hover:border-bright"
|
|
5
|
-
>
|
|
6
|
-
<div class="hidden md:block mr-4 border-r border-dropdownSelect h-20 w-10 items-center text-center pt-7">
|
|
7
|
-
<BaseText :text="queueLabel" size="md" color="quaternary" weight="bold" />
|
|
8
|
-
</div>
|
|
9
|
-
<div class="block md:hidden mr-4 border-r border-dropdownSelect h-16 w-5 items-center text-center pt-5">
|
|
10
|
-
<BaseText :text="queueLabel" size="sm" color="quaternary" weight="bold" />
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div class="hidden md:block mr-4">
|
|
14
|
-
<div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
|
|
15
|
-
<BaseText text="" size="sm" color="neutral" weight="bold" />
|
|
16
|
-
</div>
|
|
17
|
-
<img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-14 h-14 rounded-xl" />
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div class="flex flex-col w-3/4 md:w-4/12 justify-start">
|
|
21
|
-
<div class="flex items-center justify-start gap-2 min-w-0">
|
|
22
|
-
<button class="min-w-0 text-left" type="button" @click="handleForwardToProfile">
|
|
23
|
-
<BaseText
|
|
24
|
-
:text="displayName"
|
|
25
|
-
size="md"
|
|
26
|
-
color="quaternary"
|
|
27
|
-
weight="bold"
|
|
28
|
-
class="text-sm md:text-xl truncate"
|
|
29
|
-
/>
|
|
30
|
-
</button>
|
|
31
|
-
<MissingHemaRatingsId :person="person.Person" />
|
|
32
|
-
</div>
|
|
33
|
-
<span class="w-full flex justify-start">
|
|
34
|
-
<BaseText :text="clubName" size="md" color="quinary" weight="normal" class="hidden md:block" />
|
|
35
|
-
<BaseText :text="clubShortName" size="xs" color="quinary" weight="normal" class="block md:hidden" />
|
|
36
|
-
</span>
|
|
37
|
-
|
|
38
|
-
<div class="grid md:hidden grid-cols-2 gap-x-4 mr-10">
|
|
39
|
-
<div class="flex">
|
|
40
|
-
<BaseText text="M2: " size="xs" color="quaternary" weight="normal" class="mr-1" />
|
|
41
|
-
<BaseText :text="M2Rating" size="xs" color="quinary" weight="bold" class="ml-1" />
|
|
42
|
-
</div>
|
|
43
|
-
<div class="flex">
|
|
44
|
-
<BaseText text="HR: " size="xs" color="quaternary" weight="normal" class="mr-1" />
|
|
45
|
-
<BaseText :text="HEMARating" size="xs" color="quinary" weight="bold" class="ml-1" />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="hidden md:grid grid-cols-1 gap-x-4 mr-4 w-36">
|
|
51
|
-
<div class="flex">
|
|
52
|
-
<BaseText text="M2Rating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
|
|
53
|
-
<BaseText :text="M2Rating" size="sm" color="quinary" weight="bold" class="pt-0.5" />
|
|
54
|
-
</div>
|
|
55
|
-
<div class="flex">
|
|
56
|
-
<BaseText text="HemaRating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
|
|
57
|
-
<BaseText :text="HEMARating" size="sm" color="quinary" weight="bold" />
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div class="mr-2 md:mr-4 md:ml-auto flex flex-row">
|
|
62
|
-
<div class="flex justify-center w-20">
|
|
63
|
-
<div class="hidden md:flex border border-dropdownSelect shadow-md rounded-lg bg-natural h-9 px-3 items-center">
|
|
64
|
-
<BaseText text="Unpaid" size="xs" color="quinary" weight="bold" />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="w-44 flex justify-end">
|
|
68
|
-
<BaseButton
|
|
69
|
-
label="Move to Active"
|
|
70
|
-
size="xs"
|
|
71
|
-
type="primary"
|
|
72
|
-
icon-name="fa-arrow-up-from-bracket"
|
|
73
|
-
class="border border-dropdownSelect shadow-md rounded-l-lg bg-natural w-40 m-0! p-0! h-10"
|
|
74
|
-
@buttonClick="handleMoveToActive"
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div
|
|
80
|
-
class="block md:ml-4 border-l border-dropdownSelect h-16 w-9 md:h-20 md:w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg pt-5 md:pt-6"
|
|
81
|
-
>
|
|
82
|
-
<BaseIcon
|
|
83
|
-
icon-name="fa-circle-xmark"
|
|
84
|
-
size=""
|
|
85
|
-
color="quinary"
|
|
86
|
-
hover="alarm"
|
|
87
|
-
@click="handleRemoveFencer"
|
|
88
|
-
class="text-md md:text-2xl"
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</template>
|
|
93
|
-
|
|
94
|
-
<script>
|
|
95
|
-
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
96
|
-
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
97
|
-
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
98
|
-
import MissingHemaRatingsId from '../../../Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue';
|
|
99
|
-
|
|
100
|
-
export default {
|
|
101
|
-
name: 'WaitlistFencerCard',
|
|
102
|
-
components: { BaseButton, BaseIcon, BaseText, MissingHemaRatingsId },
|
|
103
|
-
emits: ['forward:toProfile', 'move:active', 'remove:fencer'],
|
|
104
|
-
props: {
|
|
105
|
-
person: {
|
|
106
|
-
type: Object,
|
|
107
|
-
required: true
|
|
108
|
-
},
|
|
109
|
-
queuePosition: {
|
|
110
|
-
type: Number,
|
|
111
|
-
required: true
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
computed: {
|
|
115
|
-
queueLabel() {
|
|
116
|
-
return `#${this.queuePosition}`;
|
|
117
|
-
},
|
|
118
|
-
displayName() {
|
|
119
|
-
return this.person?.Person?.DisplayName || 'Unknown fencer';
|
|
120
|
-
},
|
|
121
|
-
clubName() {
|
|
122
|
-
return this.person?.Person?.Club?.Name || 'No club listed';
|
|
123
|
-
},
|
|
124
|
-
clubShortName() {
|
|
125
|
-
return this.person?.Person?.Club?.ShortName || this.clubName;
|
|
126
|
-
},
|
|
127
|
-
portraitURL() {
|
|
128
|
-
const images = this.person?.Person?.Images || [];
|
|
129
|
-
const portrait = images.find(image => image.Type === 'Portrait');
|
|
130
|
-
return portrait ? portrait.URL : '';
|
|
131
|
-
},
|
|
132
|
-
HEMARating() {
|
|
133
|
-
const rating = this.person?.Person?.HEMARatings?.[0]?.Rating;
|
|
134
|
-
return rating || 0;
|
|
135
|
-
},
|
|
136
|
-
M2Rating() {
|
|
137
|
-
const rating = this.person?.Person?.M2Ratings?.[0]?.Rating;
|
|
138
|
-
return rating || 'U';
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
methods: {
|
|
142
|
-
handleMoveToActive() {
|
|
143
|
-
this.$emit('move:active', { ...this.person });
|
|
144
|
-
},
|
|
145
|
-
handleRemoveFencer() {
|
|
146
|
-
this.$emit('remove:fencer', { ...this.person });
|
|
147
|
-
},
|
|
148
|
-
handleForwardToProfile() {
|
|
149
|
-
this.$emit('forward:toProfile', this.person.PersonId);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="person"
|
|
4
|
+
class="flex items-center border border-dropdownSelect rounded-lg shadow-lg bg-poolBox hover:border-bright"
|
|
5
|
+
>
|
|
6
|
+
<div class="hidden md:block mr-4 border-r border-dropdownSelect h-20 w-10 items-center text-center pt-7">
|
|
7
|
+
<BaseText :text="queueLabel" size="md" color="quaternary" weight="bold" />
|
|
8
|
+
</div>
|
|
9
|
+
<div class="block md:hidden mr-4 border-r border-dropdownSelect h-16 w-5 items-center text-center pt-5">
|
|
10
|
+
<BaseText :text="queueLabel" size="sm" color="quaternary" weight="bold" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="hidden md:block mr-4">
|
|
14
|
+
<div v-if="!portraitURL" class="w-14 h-14 rounded-xl bg-dropdownSelect flex items-center justify-center">
|
|
15
|
+
<BaseText text="" size="sm" color="neutral" weight="bold" />
|
|
16
|
+
</div>
|
|
17
|
+
<img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="w-14 h-14 rounded-xl" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="flex flex-col w-3/4 md:w-4/12 justify-start">
|
|
21
|
+
<div class="flex items-center justify-start gap-2 min-w-0">
|
|
22
|
+
<button class="min-w-0 text-left" type="button" @click="handleForwardToProfile">
|
|
23
|
+
<BaseText
|
|
24
|
+
:text="displayName"
|
|
25
|
+
size="md"
|
|
26
|
+
color="quaternary"
|
|
27
|
+
weight="bold"
|
|
28
|
+
class="text-sm md:text-xl truncate"
|
|
29
|
+
/>
|
|
30
|
+
</button>
|
|
31
|
+
<MissingHemaRatingsId :person="person.Person" />
|
|
32
|
+
</div>
|
|
33
|
+
<span class="w-full flex justify-start">
|
|
34
|
+
<BaseText :text="clubName" size="md" color="quinary" weight="normal" class="hidden md:block" />
|
|
35
|
+
<BaseText :text="clubShortName" size="xs" color="quinary" weight="normal" class="block md:hidden" />
|
|
36
|
+
</span>
|
|
37
|
+
|
|
38
|
+
<div class="grid md:hidden grid-cols-2 gap-x-4 mr-10">
|
|
39
|
+
<div class="flex">
|
|
40
|
+
<BaseText text="M2: " size="xs" color="quaternary" weight="normal" class="mr-1" />
|
|
41
|
+
<BaseText :text="M2Rating" size="xs" color="quinary" weight="bold" class="ml-1" />
|
|
42
|
+
</div>
|
|
43
|
+
<div class="flex">
|
|
44
|
+
<BaseText text="HR: " size="xs" color="quaternary" weight="normal" class="mr-1" />
|
|
45
|
+
<BaseText :text="HEMARating" size="xs" color="quinary" weight="bold" class="ml-1" />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="hidden md:grid grid-cols-1 gap-x-4 mr-4 w-36">
|
|
51
|
+
<div class="flex">
|
|
52
|
+
<BaseText text="M2Rating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
|
|
53
|
+
<BaseText :text="M2Rating" size="sm" color="quinary" weight="bold" class="pt-0.5" />
|
|
54
|
+
</div>
|
|
55
|
+
<div class="flex">
|
|
56
|
+
<BaseText text="HemaRating:" size="sm" color="quaternary" weight="normal" class="mr-2" />
|
|
57
|
+
<BaseText :text="HEMARating" size="sm" color="quinary" weight="bold" />
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div class="mr-2 md:mr-4 md:ml-auto flex flex-row">
|
|
62
|
+
<div class="flex justify-center w-20">
|
|
63
|
+
<div class="hidden md:flex border border-dropdownSelect shadow-md rounded-lg bg-natural h-9 px-3 items-center">
|
|
64
|
+
<BaseText text="Unpaid" size="xs" color="quinary" weight="bold" />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="w-44 flex justify-end">
|
|
68
|
+
<BaseButton
|
|
69
|
+
label="Move to Active"
|
|
70
|
+
size="xs"
|
|
71
|
+
type="primary"
|
|
72
|
+
icon-name="fa-arrow-up-from-bracket"
|
|
73
|
+
class="border border-dropdownSelect shadow-md rounded-l-lg bg-natural w-40 m-0! p-0! h-10"
|
|
74
|
+
@buttonClick="handleMoveToActive"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
class="block md:ml-4 border-l border-dropdownSelect h-16 w-9 md:h-20 md:w-10 items-center text-center hover:bg-eventBoxRed rounded-tr-lg rounded-br-lg pt-5 md:pt-6"
|
|
81
|
+
>
|
|
82
|
+
<BaseIcon
|
|
83
|
+
icon-name="fa-circle-xmark"
|
|
84
|
+
size=""
|
|
85
|
+
color="quinary"
|
|
86
|
+
hover="alarm"
|
|
87
|
+
@click="handleRemoveFencer"
|
|
88
|
+
class="text-md md:text-2xl"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<script>
|
|
95
|
+
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
96
|
+
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
97
|
+
import BaseButton from '../../../Molecules/Buttons/BaseButton/BaseButton.vue';
|
|
98
|
+
import MissingHemaRatingsId from '../../../Molecules/Indicators/MissingHemaRatingsId/MissingHemaRatingsId.vue';
|
|
99
|
+
|
|
100
|
+
export default {
|
|
101
|
+
name: 'WaitlistFencerCard',
|
|
102
|
+
components: { BaseButton, BaseIcon, BaseText, MissingHemaRatingsId },
|
|
103
|
+
emits: ['forward:toProfile', 'move:active', 'remove:fencer'],
|
|
104
|
+
props: {
|
|
105
|
+
person: {
|
|
106
|
+
type: Object,
|
|
107
|
+
required: true
|
|
108
|
+
},
|
|
109
|
+
queuePosition: {
|
|
110
|
+
type: Number,
|
|
111
|
+
required: true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
queueLabel() {
|
|
116
|
+
return `#${this.queuePosition}`;
|
|
117
|
+
},
|
|
118
|
+
displayName() {
|
|
119
|
+
return this.person?.Person?.DisplayName || 'Unknown fencer';
|
|
120
|
+
},
|
|
121
|
+
clubName() {
|
|
122
|
+
return this.person?.Person?.Club?.Name || 'No club listed';
|
|
123
|
+
},
|
|
124
|
+
clubShortName() {
|
|
125
|
+
return this.person?.Person?.Club?.ShortName || this.clubName;
|
|
126
|
+
},
|
|
127
|
+
portraitURL() {
|
|
128
|
+
const images = this.person?.Person?.Images || [];
|
|
129
|
+
const portrait = images.find(image => image.Type === 'Portrait');
|
|
130
|
+
return portrait ? portrait.URL : '';
|
|
131
|
+
},
|
|
132
|
+
HEMARating() {
|
|
133
|
+
const rating = this.person?.Person?.HEMARatings?.[0]?.Rating;
|
|
134
|
+
return rating || 0;
|
|
135
|
+
},
|
|
136
|
+
M2Rating() {
|
|
137
|
+
const rating = this.person?.Person?.M2Ratings?.[0]?.Rating;
|
|
138
|
+
return rating || 'U';
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
handleMoveToActive() {
|
|
143
|
+
this.$emit('move:active', { ...this.person });
|
|
144
|
+
},
|
|
145
|
+
handleRemoveFencer() {
|
|
146
|
+
this.$emit('remove:fencer', { ...this.person });
|
|
147
|
+
},
|
|
148
|
+
handleForwardToProfile() {
|
|
149
|
+
this.$emit('forward:toProfile', this.person.PersonId);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
</script>
|
|
@@ -90,6 +90,10 @@ export default {
|
|
|
90
90
|
document.removeEventListener('click', this.handleClickOutside, true);
|
|
91
91
|
},
|
|
92
92
|
watch: {
|
|
93
|
+
selectedItem(newItem) {
|
|
94
|
+
this.localSelectedItem = newItem;
|
|
95
|
+
this.backupSelectedItem = { ...newItem };
|
|
96
|
+
},
|
|
93
97
|
items(newItems) {
|
|
94
98
|
this.localItems = newItems;
|
|
95
99
|
}
|