@dcrackel/hematournamentui 1.0.86 → 1.0.88
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/dist/HemaTouranmentUI-lib.es.js +6906 -6370
- package/dist/HemaTouranmentUI-lib.umd.js +28 -28
- package/package.json +1 -1
- package/src/index.js +2 -1
- package/src/mocks/eventPersonGetInitialPoolAssignments.js +146 -134
- package/src/mocks/eventPersonGetInitialPoolAssignments2.js +420 -0
- package/src/mocks/eventPersonGetInitialStaff.js +38 -0
- package/src/mocks/eventPersonGetPoolAssignmentEvent.js +1 -1
- package/src/mocks/getAllStaffByTournamentId.js +80 -0
- package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +6 -2
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +43 -50
- package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.vue +4 -1
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.stories.js +73 -0
- package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +73 -0
- package/src/stories/Organisms/Containers/Pool/Pool.vue +21 -7
- package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.vue +46 -9
- package/src/stories/Organisms/Headers/StaffSummary/StaffSummary.stories.js +35 -0
- package/src/stories/Organisms/Headers/StaffSummary/StaffSummary.vue +55 -0
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.stories.js +45 -20
- package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +83 -34
- package/src/stories/Templates/EventManagement/StaffList/StaffList.stories.js +58 -0
- package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +136 -0
- package/src/stories/Templates/Menus/EditEventsTopMenu/EditEventsTopMenu.vue +6 -1
- package/tailwind.config.js +2 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button :class="
|
|
2
|
+
<button :class="computedClasses" data-testid="base-button" type="button" @click="handleClick">
|
|
3
3
|
<BaseIcon v-if="iconName && iconLeft" :color="textColor" :icon-name="iconName" :size="size" :style="iconStyle" data-testid="base-icon"/>
|
|
4
|
-
<BaseText :color="textColor" :size="size" :text="label" data-testid="base-text" weight="normal"/>
|
|
4
|
+
<BaseText :color="textColor" :size="size" :text="label" data-testid="base-text" weight="normal" />
|
|
5
5
|
<BaseIcon v-if="iconName && !iconLeft" :color="textColor" :icon-name="iconName" :size="size" :style="iconStyle" data-testid="base-icon"/>
|
|
6
6
|
</button>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
import { computed } from 'vue';
|
|
10
|
+
import { computed, watch } from 'vue';
|
|
11
11
|
import BaseText from '../../../Atoms/Text/BaseText.vue';
|
|
12
12
|
import BaseIcon from '../../../Atoms/Icon/BaseIcon.vue';
|
|
13
13
|
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
type: {
|
|
41
41
|
type: String,
|
|
42
42
|
default: 'primary',
|
|
43
|
-
validator: value => ['primary', 'secondary', 'tertiary', 'bright', 'admin', 'adminSecondary', 'iconOnly', 'editor', 'square', 'tabBar'].includes(value)
|
|
43
|
+
validator: value => ['primary', 'secondary', 'tertiary', 'bright', 'admin', 'adminSecondary', 'iconOnly', 'editor', 'square', 'tabBar', 'graySecondary'].includes(value)
|
|
44
44
|
},
|
|
45
45
|
selected: {
|
|
46
46
|
type: Boolean,
|
|
@@ -49,53 +49,50 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
emits: ['click'],
|
|
51
51
|
setup(props, { emit }) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
watch(() => props.selected, (newVal) => {
|
|
53
|
+
console.log('selected prop changed to:', newVal);
|
|
54
|
+
console.log('props.selected:', props.selected);
|
|
55
|
+
console.log('props.type:', props.type); // Access type using props
|
|
56
|
+
});
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
const computedClasses = computed(() => {
|
|
59
|
+
const baseClasses = 'inline-flex';
|
|
60
|
+
const sizeClass = {
|
|
61
|
+
xs: 'text-xs',
|
|
62
|
+
sm: 'text-sm',
|
|
63
|
+
md: 'text-md',
|
|
64
|
+
lg: 'text-lg',
|
|
65
|
+
xl: 'text-xl',
|
|
66
|
+
'2xl': 'text-2xl',
|
|
67
|
+
'3xl': 'text-3xl',
|
|
68
|
+
'4xl': 'text-4xl',
|
|
69
|
+
}[props.size];
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
const typeClass = {
|
|
72
|
+
primary: `mx-1 p-2 items-center gap-2.5 text-center rounded-md shadow border border-dropdownSelect justify-center hover:bg-tertiary ${props.selected ? 'bg-dropdownSelect' : 'bg-neutral'}`,
|
|
73
|
+
secondary: `px-2.5 items-center gap-2.5 text-center my-1 p-3 w-full rounded-lg flex flex-row justify-center hover:bg-primaryHighlight ${props.selected ? 'bg-secondary' : 'bg-primary'}`,
|
|
74
|
+
tertiary: `px-2.5 py-0.5 items-center gap-2.5 rounded-md text-center justify-center hover:bg-primary text-primary ${props.selected ? 'bg-primary' : 'bg-tertiary'}`,
|
|
75
|
+
bright: `px-3 py-1 items-center gap-2.5 rounded-md text-center justify-center hover:bg-primary text-neutral ${props.selected ? 'bg-primary' : 'bg-bright'}`,
|
|
76
|
+
admin: `px-2.5 py-2 items-center rounded-md gap-2.5 text-center my-1 text-neutral hover:bg-primaryHighlight ${props.selected ? 'bg-primary' : 'bg-primary'}`,
|
|
77
|
+
adminSecondary: `px-2.5 py-2 rounded-xl items-center gap-2.5 text-center my-1 pb-2 border-b border-secondary hover:bg-bright w-11/12 text-neutral ${props.selected ? 'bg-primary' : 'bg-primary'}`,
|
|
78
|
+
iconOnly: `px-0.5 items-center rounded-full text-center text-tertiary shadow border border-dropdownSelect justify-center bg-primaryHighlight`,
|
|
79
|
+
editor: `px-1 items-center rounded-md text-center justify-center hover:bg-tertiary`,
|
|
80
|
+
square: `p-8 my-3 items-center gap-2.5 rounded-md text-center shadow border border-dropdownSelect justify-center hover:bg-tertiary ${props.selected ? 'bg-dropdownSelect' : 'bg-neutral'}`,
|
|
81
|
+
tabBar: `p-2 items-center justify-center text-center hover:border-b hover:border-b-bright text-primaryHighlight ${props.selected ? 'border-b border-b-bright' : 'border-b border-b-neutral text-bright'}`,
|
|
82
|
+
graySecondary: `px-2.5 items-center gap-2.5 text-center my-1 p-3 w-full rounded-lg flex flex-row justify-center hover:bg-quinary ${props.selected ? 'bg-secondary' : 'bg-graySecondary'}`,
|
|
83
|
+
whiteSecondary: `px-2.5 items-center gap-2.5 text-center my-1 p-3 w-full rounded-lg flex flex-row justify-center border border-poolBox hover:border-dropdownSelect ${props.selected ? 'bg-neutral shadow' : 'bg-poolBox'}`,
|
|
84
|
+
liteGraySecondary: `px-2.5 items-center gap-2.5 text-center my-1 p-3 w-full rounded-lg flex flex-row justify-center border border-poolBox hover:border-dropdownSelect ${props.selected ? 'bg-neutral shadow' : 'bg-poolBox'}`,
|
|
85
|
+
}[props.type];
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
admin: 'px-2.5 py-2 items-center rounded-md gap-2.5 text-center my-1 text-neutral hover:bg-primaryHighlight ' +
|
|
66
|
-
(props.selected ? 'bg-primary' : 'bg-primary'),
|
|
67
|
-
|
|
68
|
-
adminSecondary: 'px-2.5 py-2 rounded-xl items-center gap-2.5 text-center my-1 pb-2 border-b border-secondary hover:bg-bright w-11/12 text-neutral ' +
|
|
69
|
-
(props.selected ? 'bg-primary' : 'bg-primary'),
|
|
70
|
-
|
|
71
|
-
iconOnly: 'px-0.5 items-center rounded-full text-center text-tertiary shadow border border-dropdownSelect justify-center bg-primaryHighlight',
|
|
72
|
-
|
|
73
|
-
editor: 'px-1 items-center rounded-md text-center justify-center hover:bg-tertiary',
|
|
74
|
-
|
|
75
|
-
square: 'p-8 my-3 items-center gap-2.5 rounded-md text-center shadow border border-dropdownSelect justify-center hover:bg-tertiary ' +
|
|
76
|
-
(props.selected ? 'bg-dropdownSelect' : 'bg-neutral'),
|
|
77
|
-
|
|
78
|
-
tabBar: 'p-2 items-center justify-center text-center hover:border-b hover:border-b-bright text-primaryHighlight ' +
|
|
79
|
-
(props.selected ? 'border-b border-b-bright' : 'border-b border-b-neutral'),
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const sizeClasses = {
|
|
83
|
-
xs: 'text-xs',
|
|
84
|
-
sm: 'text-sm',
|
|
85
|
-
md: 'text-md',
|
|
86
|
-
lg: 'text-lg',
|
|
87
|
-
xl: 'text-xl',
|
|
88
|
-
'2xl': 'text-2xl',
|
|
89
|
-
'3xl': 'text-3xl',
|
|
90
|
-
'4xl': 'text-4xl',
|
|
91
|
-
};
|
|
87
|
+
return `${baseClasses} ${typeClass} ${sizeClass}`;
|
|
88
|
+
});
|
|
92
89
|
|
|
93
90
|
return {
|
|
94
91
|
textColor: computed(() => {
|
|
95
92
|
const colorMap = {
|
|
96
93
|
primary: 'primary',
|
|
97
94
|
secondary: 'neutral',
|
|
98
|
-
tertiary: '
|
|
95
|
+
tertiary: 'primary',
|
|
99
96
|
bright: 'neutral',
|
|
100
97
|
admin: 'neutral',
|
|
101
98
|
adminSecondary: 'neutral',
|
|
@@ -103,17 +100,13 @@ export default {
|
|
|
103
100
|
editor: props.selected ? 'bright' : 'quaternary',
|
|
104
101
|
square: 'primary',
|
|
105
102
|
tabBar: 'primaryHighlight',
|
|
103
|
+
graySecondary: 'neutral',
|
|
104
|
+
whiteSecondary: 'primary',
|
|
105
|
+
liteGraySecondary: 'primary'
|
|
106
106
|
};
|
|
107
107
|
return colorMap[props.type];
|
|
108
108
|
}),
|
|
109
|
-
|
|
110
|
-
let baseClasses = 'inline-flex';
|
|
111
|
-
|
|
112
|
-
let typeClass = typeClasses[props.type];
|
|
113
|
-
|
|
114
|
-
let sizeClass = sizeClasses[props.size];
|
|
115
|
-
return `${baseClasses} ${typeClass} ${sizeClass}`;
|
|
116
|
-
}),
|
|
109
|
+
computedClasses,
|
|
117
110
|
handleClick(event) {
|
|
118
111
|
emit('click', event);
|
|
119
112
|
}
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
<img :src="portrait" alt="Fencer Portrait" class="w-full h-full object-cover" />
|
|
16
16
|
</div>
|
|
17
17
|
<div class="flex-1 ml-4">
|
|
18
|
-
<
|
|
18
|
+
<p class="flex">
|
|
19
|
+
<BaseText :text="name" size="md" />
|
|
20
|
+
<BaseText v-if="seed !== poolPosition" :text="`${seed}`" size="xs" class="ml-1" color="bright" />
|
|
21
|
+
</p>
|
|
19
22
|
<BaseText :text="club" size="xs" />
|
|
20
23
|
</div>
|
|
21
24
|
<BaseIcon icon-name="fa-grip-dots-vertical" size="2xl" />
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import getAllStaffByTournamentId from '../../../../mocks/getAllStaffByTournamentId.js';
|
|
2
|
+
import StaffCard from './StaffCard.vue';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Organisms/Cards/StaffCard',
|
|
6
|
+
component: StaffCard,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
args: {
|
|
9
|
+
staff: {
|
|
10
|
+
"Id": 2,
|
|
11
|
+
"TournamentId": 4,
|
|
12
|
+
"EventId": 5,
|
|
13
|
+
"PoolId": 102,
|
|
14
|
+
"PersonId": 23,
|
|
15
|
+
"Role": "Director",
|
|
16
|
+
"Person": {
|
|
17
|
+
"DisplayName": "Lucas Garcia",
|
|
18
|
+
"Club": {
|
|
19
|
+
"ClubId": 1,
|
|
20
|
+
"Name": "Acme Fencing Club"
|
|
21
|
+
},
|
|
22
|
+
"Images": [
|
|
23
|
+
{
|
|
24
|
+
"URL": "https://randomuser.me/api/portraits/men/77.jpg"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"Pool": {
|
|
29
|
+
"PoolId": 102,
|
|
30
|
+
"Name": "Pool 1",
|
|
31
|
+
"RingName": "Ring 1"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
argTypes: {
|
|
36
|
+
staff: {
|
|
37
|
+
control: 'object'
|
|
38
|
+
},
|
|
39
|
+
'update:assignment': {
|
|
40
|
+
action: 'update:assignment'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const Default = {
|
|
46
|
+
args: {
|
|
47
|
+
staff: {
|
|
48
|
+
"Id": 2,
|
|
49
|
+
"TournamentId": 4,
|
|
50
|
+
"EventId": 5,
|
|
51
|
+
"PoolId": 102,
|
|
52
|
+
"PersonId": 23,
|
|
53
|
+
"Role": "Director",
|
|
54
|
+
"Person": {
|
|
55
|
+
"DisplayName": "Lucas Garcia",
|
|
56
|
+
"Club": {
|
|
57
|
+
"ClubId": 1,
|
|
58
|
+
"Name": "Acme Fencing Club"
|
|
59
|
+
},
|
|
60
|
+
"Images": [
|
|
61
|
+
{
|
|
62
|
+
"URL": "https://randomuser.me/api/portraits/men/77.jpg"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"Pool": {
|
|
67
|
+
"PoolId": 102,
|
|
68
|
+
"Name": "Pool 1",
|
|
69
|
+
"RingName": "Ring 1"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-center border border-dropdownSelect rounded-lg shadow-md bg-white hover:border-bright">
|
|
3
|
+
<div class="mr-4 h-20 pl-4 pt-2.5">
|
|
4
|
+
<div v-if="!portraitURL" class="w-10 h-10 mt-2 rounded-xl bg-dropdownSelect flex items-center justify-center">
|
|
5
|
+
<BaseText text="" size="sm" color="neutral" weight="bold"/>
|
|
6
|
+
</div>
|
|
7
|
+
<img v-if="portraitURL" :src="portraitURL" alt="Portrait" class="mt-2 w-12 h-12 rounded-xl">
|
|
8
|
+
</div>
|
|
9
|
+
<div class="flex flex-col w-4/12 justify-star">
|
|
10
|
+
<span class="w-full flex justify-start">
|
|
11
|
+
<BaseText :text="fullName" size="md" color="primary" weight="bold"/>
|
|
12
|
+
</span>
|
|
13
|
+
<span class="w-full flex justify-start">
|
|
14
|
+
<BaseText :text="staff.Person.Club.Name" size="xs" color="primary" weight="normal"/>
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="mr-4 ml-auto">
|
|
19
|
+
<ButtonBar
|
|
20
|
+
:buttons="buttons"
|
|
21
|
+
:selected="computedSelected"
|
|
22
|
+
@update:selected="handleAssignment"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
30
|
+
import ButtonBar from "../../../Molecules/Buttons/ButtonBar/ButtonBar.vue";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'StaffCard',
|
|
34
|
+
components: { ButtonBar, BaseText },
|
|
35
|
+
props: {
|
|
36
|
+
staff: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
view: "Staff List"
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
computed: {
|
|
47
|
+
fullName() {
|
|
48
|
+
return `${this.staff.Person.DisplayName}`;
|
|
49
|
+
},
|
|
50
|
+
portraitURL() {
|
|
51
|
+
const images = this.staff.Person.Images || [];
|
|
52
|
+
const portrait = images.find(image => image.URL);
|
|
53
|
+
return portrait ? portrait.URL : '';
|
|
54
|
+
},
|
|
55
|
+
buttons() {
|
|
56
|
+
return [
|
|
57
|
+
{ id: 'Director', label: 'Director', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxBlue' },
|
|
58
|
+
{ id: 'Line Judge', label: 'Line Judge', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxBlue' },
|
|
59
|
+
{ id: 'List Table', label: 'List Table', defaultBgColor: 'bg-natural', selectedBgColor: 'bg-eventBoxBlue' }
|
|
60
|
+
];
|
|
61
|
+
},
|
|
62
|
+
computedSelected() {
|
|
63
|
+
return this.staff.Role;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
handleAssignment(selected) {
|
|
68
|
+
const staff = { ...this.staff, Status: selected };
|
|
69
|
+
this.$emit('update:assignment', staff);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
</script>
|
|
@@ -62,21 +62,30 @@ export default {
|
|
|
62
62
|
pool: {
|
|
63
63
|
type: Array,
|
|
64
64
|
required: true
|
|
65
|
+
},
|
|
66
|
+
staff: {
|
|
67
|
+
type: Array,
|
|
68
|
+
required: true
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
data() {
|
|
68
72
|
return {
|
|
69
|
-
selectedDirector: { text: this.directorName,link: this.directorName }
|
|
70
|
-
directors: [
|
|
71
|
-
{ text: 'Lucas Garcia', link: 'he-him' },
|
|
72
|
-
{ text: 'Mia Rodriguez', link: 'she-her' },
|
|
73
|
-
{ text: 'Isabella Hernandez', link: 'they-them' }
|
|
74
|
-
],
|
|
73
|
+
selectedDirector: { text: this.directorName, link: this.directorName }
|
|
75
74
|
};
|
|
76
75
|
},
|
|
76
|
+
computed: {
|
|
77
|
+
directors() {
|
|
78
|
+
return this.staff
|
|
79
|
+
//.filter(staffMember => staffMember.Role === 'Director')
|
|
80
|
+
.map(staffMember => ({
|
|
81
|
+
text: staffMember.Person.DisplayName,
|
|
82
|
+
link: staffMember.PersonId // Assuming PersonId is a suitable unique identifier
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
},
|
|
77
86
|
methods: {
|
|
78
87
|
handleSwap({ droppedData, toPosition }) {
|
|
79
|
-
this.$emit('
|
|
88
|
+
this.$emit('update:swapFencers', {
|
|
80
89
|
draggedPerson: droppedData,
|
|
81
90
|
toPosition
|
|
82
91
|
});
|
|
@@ -85,6 +94,11 @@ export default {
|
|
|
85
94
|
const socialMediaLinks = person.Person.Club.SocialMedia || [];
|
|
86
95
|
const portrait = socialMediaLinks.find(link => link.Type === 'Web');
|
|
87
96
|
return portrait ? portrait.Link : '';
|
|
97
|
+
},
|
|
98
|
+
handleSelectedItem(event){
|
|
99
|
+
console.log(event)
|
|
100
|
+
this.selectedDirector = { text: event.text, link: event.link }
|
|
101
|
+
this.$emit('update:setDirector', event.link)
|
|
88
102
|
}
|
|
89
103
|
}
|
|
90
104
|
};
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-poolSetup
|
|
3
|
-
<section class="flex flex-col
|
|
4
|
-
<BaseText :text="event.EventName" size="lg" color="primary" weight="bold" />
|
|
2
|
+
<div class="bg-poolSetup px-4 rounded-xl flex justify-between items-center shadow border border-dropdownSelect">
|
|
3
|
+
<section class="flex flex-col w-1/3 mt-2">
|
|
4
|
+
<BaseText :text="event.EventName" size="lg" color="primary" weight="bold" class="pt-4" />
|
|
5
5
|
<BaseText :text="event.RuleSummary" size="md" color="quinary" weight="normal" />
|
|
6
6
|
<span class="h-8"></span>
|
|
7
7
|
</section>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
8
|
+
|
|
9
|
+
<section v-if="mode === 'Planning'" class="flex rounded-xl border border-dropdownSelect mt-2 px-4 pt-2 pb-4 bg-neutral w-1/3 shadow">
|
|
10
|
+
<div class="mt-1 w-10 pr-4">
|
|
11
|
+
<BaseIcon icon-name="fa-clipboard-list" size="3xl" color="primaryHighlight" class="" />
|
|
12
|
+
</div>
|
|
13
|
+
<span class="w-full">
|
|
14
|
+
<BaseText text="Pools are in Planning Mode" size="lg" color="quaternary" weight="bold" class="" />
|
|
15
|
+
<BaseText text="click start pools when ready to start event" size="xs" color="primaryHighlight" />
|
|
16
|
+
</span>
|
|
17
|
+
|
|
18
|
+
</section>
|
|
19
|
+
<section v-if="mode === 'Preparation'" class="flex rounded-xl border border-dropdownSelect mt-2 px-4 pt-2 pb-4 bg-neutral w-1/3 shadow">
|
|
20
|
+
<div class="mt-1 w-10 pr-4">
|
|
21
|
+
<BaseIcon icon-name="fa-wrench" size="3xl" color="primaryHighlight" class="" />
|
|
22
|
+
</div>
|
|
23
|
+
<span class="w-full">
|
|
24
|
+
<BaseText text="Pools are Preparation Mode" size="lg" color="quaternary" weight="bold" class="" />
|
|
25
|
+
<BaseText text="only fencers that are present will show" size="xs" color="primaryHighlight" />
|
|
26
|
+
</span>
|
|
27
|
+
</section>
|
|
28
|
+
<section v-if="mode === 'Live'" class="flex rounded-xl border border-dropdownSelect mt-2 px-4 pt-2 pb-4 bg-neutral w-1/3 shadow">
|
|
29
|
+
<div class="mt-1 w-10 pr-4">
|
|
30
|
+
<BaseIcon icon-name="fa-play" size="3xl" color="primaryHighlight" class="" />
|
|
31
|
+
</div>
|
|
32
|
+
<span class="w-full">
|
|
33
|
+
<BaseText text="Pools are now live!" size="lg" color="quaternary" weight="bold" class="" />
|
|
34
|
+
<BaseText text="Pools can now be run" size="xs" color="primaryHighlight" />
|
|
35
|
+
</span>
|
|
36
|
+
</section>
|
|
37
|
+
|
|
38
|
+
<section class="flex flex-row w-1/3 justify-end">
|
|
39
|
+
<CounterBox :recommended="7" :count="poolSize" label="Pool Size" :textColor="'quaternary'" @update:count="handlePoolSizeChange" />
|
|
40
|
+
<CounterBox :recommended="2" :count="numberOfRings" label="Num Rings" :textColor="'quaternary'" @update:count="handleNumOfRingsChange" />
|
|
11
41
|
</section>
|
|
12
42
|
</div>
|
|
13
43
|
</template>
|
|
@@ -16,10 +46,12 @@
|
|
|
16
46
|
import EventStatusBox from "../../../Molecules/Boxes/EventStatusBox/EventStatusBox.vue";
|
|
17
47
|
import CounterBox from "../../../Molecules/Boxes/CounterBox/CounterBox.vue";
|
|
18
48
|
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
49
|
+
import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
50
|
+
import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
|
|
19
51
|
|
|
20
52
|
export default {
|
|
21
53
|
name: 'PoolSummary',
|
|
22
|
-
components: {BaseText, CounterBox, EventStatusBox },
|
|
54
|
+
components: {BaseIcon, BaseButton, BaseText, CounterBox, EventStatusBox },
|
|
23
55
|
props: {
|
|
24
56
|
event: {
|
|
25
57
|
type: Object,
|
|
@@ -37,6 +69,11 @@ export default {
|
|
|
37
69
|
return true;
|
|
38
70
|
},
|
|
39
71
|
},
|
|
72
|
+
mode: {
|
|
73
|
+
type: String,
|
|
74
|
+
required: true,
|
|
75
|
+
validator: value => ['Planning', 'Preparation', 'Live', 'Complete'].includes(value)
|
|
76
|
+
}
|
|
40
77
|
},
|
|
41
78
|
computed: {
|
|
42
79
|
poolSize() {
|
|
@@ -54,7 +91,7 @@ export default {
|
|
|
54
91
|
},
|
|
55
92
|
handleNumOfRingsChange(numberOfRings) {
|
|
56
93
|
this.$emit('update:numberOfRings', numberOfRings);
|
|
57
|
-
}
|
|
94
|
+
}
|
|
58
95
|
},
|
|
59
96
|
};
|
|
60
|
-
</script>
|
|
97
|
+
</script>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import StaffSummary from './StaffSummary.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/Headers/StaffBanner',
|
|
5
|
+
component: StaffSummary,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
eventName: 'Sample Event',
|
|
9
|
+
currentSelection: 'Staff List'
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
eventName: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Name of the event'
|
|
15
|
+
},
|
|
16
|
+
currentSelection: {
|
|
17
|
+
control: 'radio',
|
|
18
|
+
options: ['Staff List', 'Staff Assignments'],
|
|
19
|
+
description: 'Currently selected view'
|
|
20
|
+
},
|
|
21
|
+
'update:selection': { action: 'update:selection' }
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Default = {
|
|
26
|
+
args: {
|
|
27
|
+
currentSelection: 'Staff List'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const StaffAssignmentsSelected = {
|
|
32
|
+
args: {
|
|
33
|
+
currentSelection: 'Staff Assignments'
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bg-bannerBackground px-4 py-4 rounded-xl flex justify-center border border-dropdownSelect">
|
|
3
|
+
<section class="flex flex-row w-3/4 justify-center bg-poolBox rounded-lg p-0.5 border border-dropdownSelect">
|
|
4
|
+
<BaseButton
|
|
5
|
+
label="Staff List"
|
|
6
|
+
:selected="view === 'Staff List'"
|
|
7
|
+
size="md"
|
|
8
|
+
type="whiteSecondary"
|
|
9
|
+
class="mx-2 w-1/2"
|
|
10
|
+
@click="handleSelection('Staff List')"
|
|
11
|
+
/>
|
|
12
|
+
<BaseButton
|
|
13
|
+
label="Staff Assignments"
|
|
14
|
+
:selected="view === 'Staff Assignments'"
|
|
15
|
+
size="md"
|
|
16
|
+
type="liteGraySecondary"
|
|
17
|
+
class="mx-2 w-1/2"
|
|
18
|
+
@click="handleSelection('Staff Assignments')"
|
|
19
|
+
/>
|
|
20
|
+
</section>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
26
|
+
import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: 'StaffSummary',
|
|
30
|
+
components: { BaseText, BaseButton },
|
|
31
|
+
props: {
|
|
32
|
+
currentSelection: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
validator: value => ['Staff List', 'Staff Assignments'].includes(value)
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
view: this.currentSelection
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
currentSelection(newValue) {
|
|
45
|
+
this.view = newValue;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
handleSelection(selection) {
|
|
50
|
+
this.view = selection;
|
|
51
|
+
this.$emit('update:selection', selection);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EditEvents from './PoolManagement.vue';
|
|
2
|
-
import eventPersonGetInitialPoolAssignments from '../../../../mocks/
|
|
2
|
+
import eventPersonGetInitialPoolAssignments from '../../../../mocks/eventPersonGetInitialPoolAssignments2.js';
|
|
3
3
|
import eventPersonGetPoolAssignmentEvent from '../../../../mocks/eventPersonGetPoolAssignmentEvent.js';
|
|
4
|
+
import eventPersonGetInitialStaff from '../../../../mocks/eventPersonGetInitialStaff.js';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: 'Templates/EventManagement/PoolManagement',
|
|
@@ -8,7 +9,8 @@ export default {
|
|
|
8
9
|
tags: ['autodocs'],
|
|
9
10
|
args: {
|
|
10
11
|
event: eventPersonGetPoolAssignmentEvent,
|
|
11
|
-
poolAssignments: eventPersonGetInitialPoolAssignments
|
|
12
|
+
poolAssignments: eventPersonGetInitialPoolAssignments,
|
|
13
|
+
staff: eventPersonGetInitialStaff
|
|
12
14
|
},
|
|
13
15
|
argTypes: {
|
|
14
16
|
event: {
|
|
@@ -22,26 +24,49 @@ export default {
|
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
|
|
27
|
+
const modifiedEvent = { ...eventPersonGetPoolAssignmentEvent, Flights: 1 };
|
|
28
|
+
|
|
25
29
|
export const Default = {
|
|
26
30
|
args: {
|
|
27
|
-
event:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
event:eventPersonGetPoolAssignmentEvent,
|
|
32
|
+
poolAssignments: eventPersonGetInitialPoolAssignments,
|
|
33
|
+
staff: eventPersonGetInitialStaff,
|
|
34
|
+
mode: 'Planning'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const planningMode = {
|
|
39
|
+
args: {
|
|
40
|
+
event:eventPersonGetPoolAssignmentEvent,
|
|
41
|
+
poolAssignments: eventPersonGetInitialPoolAssignments,
|
|
42
|
+
staff: eventPersonGetInitialStaff,
|
|
43
|
+
mode: 'Planning'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const singleFlight = {
|
|
48
|
+
args: {
|
|
49
|
+
event:modifiedEvent,
|
|
50
|
+
poolAssignments: eventPersonGetInitialPoolAssignments,
|
|
51
|
+
staff: eventPersonGetInitialStaff,
|
|
52
|
+
mode: 'Preparation'
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const NoPoolsYet = {
|
|
57
|
+
args: {
|
|
58
|
+
event:modifiedEvent,
|
|
59
|
+
poolAssignments: [],
|
|
60
|
+
staff: [],
|
|
61
|
+
mode: 'Preparation'
|
|
45
62
|
}
|
|
46
63
|
};
|
|
47
64
|
|
|
65
|
+
export const liveMode = {
|
|
66
|
+
args: {
|
|
67
|
+
event:eventPersonGetPoolAssignmentEvent,
|
|
68
|
+
poolAssignments: eventPersonGetInitialPoolAssignments,
|
|
69
|
+
staff: eventPersonGetInitialStaff,
|
|
70
|
+
mode: 'Live'
|
|
71
|
+
}
|
|
72
|
+
};
|