@dcrackel/hematournamentui 1.0.43 → 1.0.45
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/.storybook/main.js +3 -4
- package/.storybook/preview.js +1 -2
- package/dist/HemaTouranmentUI-lib.es.js +1 -1
- package/dist/HemaTouranmentUI-lib.umd.js +1 -1
- package/package.json +20 -17
- package/postcss.config.js +1 -0
- package/src/assets/empty_desert_icon.png +0 -0
- package/src/mocks/EventQuestionsMock.js +59 -0
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.stories.js +9 -1
- package/src/stories/Molecules/Buttons/BaseButton/BaseButton.vue +8 -2
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.stories.js +42 -0
- package/src/stories/Molecules/Buttons/ButtonBar/ButtonBar.vue +50 -0
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.js +29 -0
- package/src/stories/Molecules/Cards/AdminFencerCard/AdminFencerCard.vue +67 -0
- package/src/stories/Molecules/Cards/Detail/TournamentCardDetail.vue +7 -2
- package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.vue +1 -1
- package/src/stories/Molecules/Menus/TabBar/TabBar.stories.js +26 -0
- package/src/stories/Molecules/Menus/TabBar/TabBar.vue +14 -0
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.stories.js +20 -0
- package/src/stories/Molecules/StepIndicator/BaseStepIndicator/StepIndicator.vue +100 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.stories.js +1 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.vue +7 -2
- package/src/stories/Organisms/ComplexInputs/FindLocation/FindLocation.vue +38 -32
- package/src/stories/Organisms/Grids/GridContainer.vue +4 -1
- package/src/stories/Templates/Menus/Admin/AdminLeftMenu.stories.js +6 -6
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.stories.js +11 -0
- package/src/stories/Templates/Menus/EditTournamentMenu/EditTournamentMenu.vue +68 -0
- package/src/stories/Templates/TournamentManagement/AddTournament/PageOne/AddTournamentPageOne.vue +13 -10
- package/src/stories/Templates/TournamentManagement/EditTournament/EditEvents/EditEvents.stories.js +13 -0
- package/src/stories/Templates/TournamentManagement/EditTournament/EditEvents/EditEvents.vue +39 -0
- package/src/stories/{Organisms/Forms/EditTournamentForm1.stories.js → Templates/TournamentManagement/EditTournament/EditPageOne/EditTournamentPageOne.stories.js} +4 -3
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageOne/EditTournamentPageOne.vue +116 -0
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageTwo/EditTournamentPageTwo.stories.js +30 -0
- package/src/stories/Templates/TournamentManagement/EditTournament/EditPageTwo/EditTournamentPageTwo.vue +112 -0
- package/src/stories/Molecules/Menus/EditTournamentMenu/EditTournamentMenu.stories.js +0 -30
- package/src/stories/Molecules/Menus/EditTournamentMenu/EditTournamentMenu.vue +0 -31
- package/src/stories/Organisms/Forms/EditTournamentForm1.vue +0 -66
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
<div v-if="!showNewLocation" class="relative">
|
|
4
|
+
<BaseInput
|
|
5
|
+
:addBorder="addBorder"
|
|
6
|
+
:value="inputValue"
|
|
7
|
+
placeholder="Enter Location Name"
|
|
8
|
+
@input="updateInput"
|
|
9
|
+
/>
|
|
10
|
+
<div v-if="showDropdown" class="absolute z-10 w-full bg-white border border-gray-300 rounded-md mt-1">
|
|
11
|
+
<ul>
|
|
12
|
+
<li v-for="(item, index) in filteredLocations" :key="index" class="p-2 hover:bg-gray-100 cursor-pointer"
|
|
13
|
+
@click="selectItem(item)">
|
|
14
|
+
{{ item.Name }}
|
|
15
|
+
</li>
|
|
16
|
+
</ul>
|
|
17
|
+
<div class="p-2 hover:bg-gray-100 cursor-pointer" @click="addNewItem">
|
|
18
|
+
<base-button
|
|
19
|
+
iconName="fa-location-dot"
|
|
20
|
+
label="Add New Location"
|
|
21
|
+
type="secondary"
|
|
22
|
+
v-on:click="showNewLocation = true"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
23
25
|
</div>
|
|
24
26
|
</div>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<div v-if="showNewLocation">
|
|
28
|
+
<BaseModal :show="showNewLocation" buttonText="Add Location" iconName="fa-location-plus"
|
|
29
|
+
@submit-modal="handleSubmit" @update:show="showNewLocation = false">
|
|
30
|
+
<template #modal-content>
|
|
31
|
+
<BaseInput :addBorder="true" :invalid="false" :value="locationName" class="pb-2"
|
|
32
|
+
placeholder="Enter Location Name" type="formInput" @update:value="handleLocationName"/>
|
|
33
|
+
<AddressAutocomplete v-model="formData.address" :invalid="validAddress" class="text-lg"
|
|
34
|
+
@update:address="handleAddressUpdate"/>
|
|
35
|
+
</template>
|
|
36
|
+
</BaseModal>
|
|
37
|
+
</div>
|
|
34
38
|
</section>
|
|
35
39
|
</template>
|
|
36
40
|
|
|
@@ -44,7 +48,7 @@ import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
|
44
48
|
|
|
45
49
|
export default {
|
|
46
50
|
name: 'FindLocation',
|
|
47
|
-
components: {BaseText, BaseModal, AddressAutocomplete, BaseButton, BaseIcon, BaseInput
|
|
51
|
+
components: {BaseText, BaseModal, AddressAutocomplete, BaseButton, BaseIcon, BaseInput},
|
|
48
52
|
props: {
|
|
49
53
|
locations: {
|
|
50
54
|
type: Array,
|
|
@@ -113,11 +117,13 @@ export default {
|
|
|
113
117
|
this.formData.locationName = newName
|
|
114
118
|
},
|
|
115
119
|
handleAddressUpdate(newAddress) {
|
|
120
|
+
console.log("handle address update:")
|
|
121
|
+
console.log(newAddress)
|
|
116
122
|
this.formData.address = newAddress.address
|
|
117
123
|
this.formData.coordinates = newAddress.coordinates
|
|
118
124
|
},
|
|
119
|
-
handleSubmit(
|
|
120
|
-
this.$emit('update-location', formData);
|
|
125
|
+
handleSubmit() {
|
|
126
|
+
this.$emit('update-location', this.formData);
|
|
121
127
|
this.showNewLocation = false;
|
|
122
128
|
}
|
|
123
129
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 3xl:grid-cols-4 gap-6 w-full">
|
|
10
10
|
<div v-for="item in filteredItems" :key="item.id">
|
|
11
|
-
<component :is="component" :detail="item" />
|
|
11
|
+
<component :is="component" :detail="item" @click="onClick(item)" />
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -102,6 +102,9 @@ export default {
|
|
|
102
102
|
},
|
|
103
103
|
handleTimeFrameChange(timeFrame) {
|
|
104
104
|
this.selectedTimeFrame = timeFrame;
|
|
105
|
+
},
|
|
106
|
+
onClick(item){
|
|
107
|
+
this.$emit('edit', item.TournamentId);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import AdminLeftMenu from './AdminLeftMenu.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Templates/Admin/AdminLeftMenu',
|
|
4
|
+
title: 'Templates/Menus/Admin/AdminLeftMenu',
|
|
5
5
|
component: AdminLeftMenu,
|
|
6
6
|
tags: ['autodocs']
|
|
7
7
|
};
|
|
8
8
|
const Template = args => ({
|
|
9
|
-
components: {
|
|
9
|
+
components: {AdminLeftMenu},
|
|
10
10
|
setup() {
|
|
11
|
-
return {
|
|
11
|
+
return {args};
|
|
12
12
|
},
|
|
13
13
|
methods: {
|
|
14
14
|
onMenuClick(index) {
|
|
@@ -20,9 +20,9 @@ const Template = args => ({
|
|
|
20
20
|
export const Default = {
|
|
21
21
|
args: {
|
|
22
22
|
items: [
|
|
23
|
-
{
|
|
24
|
-
{
|
|
25
|
-
{
|
|
23
|
+
{text: 'Home', link: '/'},
|
|
24
|
+
{text: 'Category', link: '/category'},
|
|
25
|
+
{text: 'Product', link: ''}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TabBar class="border-b mb-5">
|
|
3
|
+
<BaseButton
|
|
4
|
+
:selected="currentTab === 'Basic'"
|
|
5
|
+
class="flex flex-row mx-3"
|
|
6
|
+
color="primaryHighlight"
|
|
7
|
+
label="Basic"
|
|
8
|
+
type="tabBar"
|
|
9
|
+
@click="handleButtonClick('Basic')"
|
|
10
|
+
></BaseButton>
|
|
11
|
+
<BaseButton
|
|
12
|
+
:selected="currentTab === 'Details'"
|
|
13
|
+
class="flex flex-row mx-3"
|
|
14
|
+
color="primaryHighlight"
|
|
15
|
+
label="Details"
|
|
16
|
+
type="tabBar"
|
|
17
|
+
@click="handleButtonClick('Details')"
|
|
18
|
+
></BaseButton>
|
|
19
|
+
<BaseButton
|
|
20
|
+
:selected="currentTab === 'Events'"
|
|
21
|
+
class="flex flex-row mx-3"
|
|
22
|
+
color="primaryHighlight"
|
|
23
|
+
label="Events"
|
|
24
|
+
type="tabBar"
|
|
25
|
+
@click="handleButtonClick('Events')"
|
|
26
|
+
></BaseButton>
|
|
27
|
+
<BaseButton
|
|
28
|
+
:selected="currentTab === 'Payments'"
|
|
29
|
+
class="flex flex-row mx-3"
|
|
30
|
+
color="primaryHighlight"
|
|
31
|
+
label="Payments"
|
|
32
|
+
type="tabBar"
|
|
33
|
+
@click="handleButtonClick('Payments')"
|
|
34
|
+
></BaseButton>
|
|
35
|
+
<BaseButton
|
|
36
|
+
:selected="currentTab === 'Staff'"
|
|
37
|
+
class="flex flex-row mx-3"
|
|
38
|
+
color="primaryHighlight"
|
|
39
|
+
label="Staff"
|
|
40
|
+
type="tabBar"
|
|
41
|
+
@click="handleButtonClick('Staff')"
|
|
42
|
+
></BaseButton>
|
|
43
|
+
</TabBar>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import TabBar from "../../../Molecules/Menus/TabBar/TabBar.vue";
|
|
48
|
+
import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
components: {
|
|
52
|
+
TabBar,
|
|
53
|
+
BaseButton
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
currentTab: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true,
|
|
59
|
+
default: ''
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
handleButtonClick(button) {
|
|
64
|
+
this.$emit('button-click', button);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</script>
|
package/src/stories/Templates/TournamentManagement/AddTournament/PageOne/AddTournamentPageOne.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<BaseText :color="'quaternary'" :size="'sm'" :text="'Step 1 out of 2'" :weight="'normal'"
|
|
5
5
|
data-testid="text-step"/>
|
|
6
6
|
</div>
|
|
7
|
-
<div class="w-full my-4">
|
|
7
|
+
<div class="w-full flex flex-row justify-center my-4">
|
|
8
8
|
<BaseText :color="'primaryHighlight'" :size="'2xl'" :text="'Add Tournament'" :weight="'normal'"
|
|
9
9
|
data-testid="text-add-tournament"/>
|
|
10
10
|
</div>
|
|
@@ -12,13 +12,15 @@
|
|
|
12
12
|
<ImageCropper :personID="1"/>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<div class="w-
|
|
15
|
+
<div class="w-full flex flex-row justify-center">
|
|
16
16
|
<section class="w-96">
|
|
17
|
-
<TitledInput :
|
|
17
|
+
<TitledInput :inputValue="tournament.name" :invalid="validation.name" placeholder="Enter Tournament Name"
|
|
18
|
+
title="Tournament Name" @update:value="value => tournament.name = value"></TitledInput>
|
|
18
19
|
<div class="flex flex-col mb-3">
|
|
19
|
-
<BaseText :color="'primaryHighlight'" :invalid="validation.
|
|
20
|
+
<BaseText :color="'primaryHighlight'" :invalid="validation.address" :size="'sm'" :text="'Location'"
|
|
20
21
|
:weight="'normal'" class="mb-1" data-testid="text-address"/>
|
|
21
|
-
<FindLocation :addBorder="true" :locations="locations" addNewText="Add New"
|
|
22
|
+
<FindLocation :addBorder="true" :locations="locations" addNewText="Add New"
|
|
23
|
+
@update-location="handleAddressUpdate"/>
|
|
22
24
|
</div>
|
|
23
25
|
<div class="flex flex-row mb-3">
|
|
24
26
|
<div class="w-3/4 mr-1">
|
|
@@ -28,7 +30,8 @@
|
|
|
28
30
|
@update:selectedDate="handleDateUpdate"/>
|
|
29
31
|
</div>
|
|
30
32
|
<div>
|
|
31
|
-
<TitledInput :
|
|
33
|
+
<TitledInput :inputValue="tournament.totalDays" :invalid="validation.totalDays" placeholder="1"
|
|
34
|
+
title="Number of Days" @update:value="value => tournament.totalDays = value"></TitledInput>
|
|
32
35
|
</div>
|
|
33
36
|
</div>
|
|
34
37
|
<div class="flex flex-col mb-3">
|
|
@@ -38,8 +41,8 @@
|
|
|
38
41
|
</div>
|
|
39
42
|
<div class="flex flex-col pb-4">
|
|
40
43
|
<BaseText :color="'primaryHighlight'" :invalid="false" :size="'sm'" :text="'Primary Contact'"
|
|
41
|
-
:weight="'normal'" class="mb-1" data-testid="text-
|
|
42
|
-
<FindPerson :addBorder="true" :persons="persons" addNewText="Add New Person"
|
|
44
|
+
:weight="'normal'" class="mb-1" data-testid="text-primary-contact"/>
|
|
45
|
+
<FindPerson :addBorder="true" :persons="persons" addNewText="Add New Person"/>
|
|
43
46
|
</div>
|
|
44
47
|
<div class="flex flex-col pb-4">
|
|
45
48
|
<BaseText :color="'primaryHighlight'" :invalid="validation.visibility" :size="'sm'"
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
</div>
|
|
50
53
|
<div>
|
|
51
54
|
<BaseButton class="w-full" color="neutral" label="Continue" size="sm" type="secondary"
|
|
52
|
-
|
|
55
|
+
@click="handleSubmit()"/>
|
|
53
56
|
</div>
|
|
54
57
|
</section>
|
|
55
58
|
</div>
|
|
@@ -93,7 +96,7 @@ export default {
|
|
|
93
96
|
tournament: {
|
|
94
97
|
name: '',
|
|
95
98
|
imageLink: '',
|
|
96
|
-
|
|
99
|
+
address: [
|
|
97
100
|
{
|
|
98
101
|
"Name": "",
|
|
99
102
|
"Address1": "",
|
package/src/stories/Templates/TournamentManagement/EditTournament/EditEvents/EditEvents.stories.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import EditEvents from "./EditEvents.vue";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Templates/TournamentManagement/EditTournament/EditEvents',
|
|
5
|
+
component: EditEvents,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {},
|
|
8
|
+
argTypes: {}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Default = {
|
|
12
|
+
args: {}
|
|
13
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EditTournamentMenu currentTab="Events"></EditTournamentMenu>
|
|
3
|
+
<div class="w-full flex flex-row justify-center">
|
|
4
|
+
<section class="w-96">
|
|
5
|
+
<div class="w-full flex flex-col justify-center items-center mb-5" style="text-align: center">
|
|
6
|
+
<img alt="Small desert scene with wind blowing." height="74"
|
|
7
|
+
src="/src/assets/empty_desert_icon.png"
|
|
8
|
+
width="132">
|
|
9
|
+
<BaseText :color="'primaryHighlight'" :size="'sm'" :text="'0 events added yet.'"
|
|
10
|
+
:weight="'normal'" data-testid="text-num-events"/>
|
|
11
|
+
<BaseText :color="'primaryHighlight'" :size="'sm'" :text="'Click below to add first event.'"
|
|
12
|
+
:weight="'normal'" data-testid="text-num-events"/>
|
|
13
|
+
</div>
|
|
14
|
+
<div>
|
|
15
|
+
<BaseButton color="neutral" label="Add Event" size="sm" type="secondary" @click="handleAddEvent()"/>
|
|
16
|
+
</div>
|
|
17
|
+
</section>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import EditTournamentMenu from "../../../Menus/EditTournamentMenu/EditTournamentMenu.vue";
|
|
23
|
+
import BaseText from "../../../../Atoms/Text/BaseText.vue";
|
|
24
|
+
import BaseButton from "../../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
components: {
|
|
28
|
+
EditTournamentMenu,
|
|
29
|
+
BaseText,
|
|
30
|
+
BaseButton,
|
|
31
|
+
},
|
|
32
|
+
props: {},
|
|
33
|
+
methods: {
|
|
34
|
+
handleAddEvent() {
|
|
35
|
+
console.log("open modal")
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import EditTournamentPageOne from './EditTournamentPageOne.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
5
|
-
component:
|
|
4
|
+
title: 'Templates/TournamentManagement/EditTournament/EditPageOne',
|
|
5
|
+
component: EditTournamentPageOne,
|
|
6
6
|
tags: ['autodocs'],
|
|
7
7
|
args: {},
|
|
8
8
|
argTypes: {}
|
|
@@ -12,6 +12,7 @@ export default {
|
|
|
12
12
|
export const Default = {
|
|
13
13
|
args: {
|
|
14
14
|
tournament: {
|
|
15
|
+
tournamentId: 1234,
|
|
15
16
|
name: 'Ultimate',
|
|
16
17
|
imageLink: '',
|
|
17
18
|
address: '123 Winchester St',
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EditTournamentMenu currentTab="Basic"></EditTournamentMenu>
|
|
3
|
+
<div class="w-full flex flex-row justify-center">
|
|
4
|
+
<section class="w-96">
|
|
5
|
+
<BaseText :color="'quaternary'" :size="'xs'" :text="'GENERAL INFORMATION'" class="border-b mb-5"/>
|
|
6
|
+
<div class="w-full flex flex-col mb-3">
|
|
7
|
+
<BaseText :color="'primaryHighlight'" :size="'sm'" :text="'Cover Image'"
|
|
8
|
+
:weight="'normal'" class="mb-1 ml-1" data-testid="text-cover-image"/>
|
|
9
|
+
<ImageCropper :personID="1"/>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="mb-3">
|
|
12
|
+
<TitledInput :inputValue="localTournament.name" :invalid="validation.name" :placeholder="localTournament.name"
|
|
13
|
+
:title="'Tournament Name'" @update:value="value => localTournament.name = value"/>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="mb-3">
|
|
16
|
+
<BaseText :color="'primaryHighlight'" :invalid="validation.address" :size="'sm'" :text="'Address'"
|
|
17
|
+
:weight="'normal'" class="mb-1 ml-1" data-testid="text-address"/>
|
|
18
|
+
<FindLocation :invalid="validation.address" :locations="locations" :placeholder="localTournament.address"
|
|
19
|
+
addBorder="true"
|
|
20
|
+
@update:address="handleAddressUpdate"/>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mb-3">
|
|
23
|
+
<BaseText :color="'primaryHighlight'" :invalid="validation.description" :size="'sm'" :text="'Description'"
|
|
24
|
+
:weight="'normal'" class="mb-1 ml-1" data-testid="text-description"/>
|
|
25
|
+
<TextBoxEditor :invalid="validation.description" @update:editorContent="handleEditorUpdate"/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="flex flex-row justify-center mb-3">
|
|
28
|
+
<div class="flex flex-col w-1/2 mr-1">
|
|
29
|
+
<BaseText :color="'primaryHighlight'" :invalid="validation.startDate" :size="'sm'" :text="'Start Date'"
|
|
30
|
+
:weight="'normal'"
|
|
31
|
+
class="mb-1 ml-1" data-testid="text-start-date"/>
|
|
32
|
+
<DatePicker :invalid="validation.startDate" :setDate="tournament.startDate"
|
|
33
|
+
@update:selectedDate="handleDateUpdate"/>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="flex flex-col w-1/2 ml-1">
|
|
36
|
+
<BaseText :color="'primaryHighlight'" class="mb-1 ml-1" text="Total Days"/>
|
|
37
|
+
<BaseInput :addBorder="true" :placeholder="localTournament.totalDays"/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="flex flex-row justify-center">
|
|
41
|
+
<BaseButton class="w-1/2 mr-1" color="neutral" label="Save" selected=selected size="sm" type="primary"
|
|
42
|
+
@click="handleSubmit"/>
|
|
43
|
+
<BaseButton class="w-1/2 ml-1" color="neutral" label="Cancel" size="sm" type="primary" @click="handleCancel"/>
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import ImageCropper from "../../../../Organisms/ComplexInputs/ImageCropper/ImageCropper.vue";
|
|
51
|
+
import BaseInput from "../../../../Atoms/Input/BaseInput.vue";
|
|
52
|
+
import BaseText from "../../../../Atoms/Text/BaseText.vue";
|
|
53
|
+
import AddressAutocomplete from "../../../../Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue";
|
|
54
|
+
import BaseButton from "../../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
55
|
+
import TitledInput from "../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue";
|
|
56
|
+
import TextBoxEditor from "../../../../Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.vue";
|
|
57
|
+
import FindLocation from "../../../../Organisms/ComplexInputs/FindLocation/FindLocation.vue";
|
|
58
|
+
import DatePicker from "../../../../Organisms/ComplexInputs/DatePicker/DatePicker.vue";
|
|
59
|
+
import EditTournamentMenu from "../../../Menus/EditTournamentMenu/EditTournamentMenu.vue";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
components: {
|
|
63
|
+
EditTournamentMenu,
|
|
64
|
+
DatePicker,
|
|
65
|
+
FindLocation,
|
|
66
|
+
TextBoxEditor,
|
|
67
|
+
TitledInput,
|
|
68
|
+
AddressAutocomplete,
|
|
69
|
+
ImageCropper,
|
|
70
|
+
BaseInput,
|
|
71
|
+
BaseText,
|
|
72
|
+
BaseButton
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
tournament: Object,
|
|
76
|
+
locations: []
|
|
77
|
+
},
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
localTournament: JSON.parse(JSON.stringify(this.tournament)),
|
|
81
|
+
validation: {
|
|
82
|
+
name: false,
|
|
83
|
+
imageLink: false,
|
|
84
|
+
address: false,
|
|
85
|
+
coordinates: false,
|
|
86
|
+
startDate: false,
|
|
87
|
+
totalDays: false,
|
|
88
|
+
description: false,
|
|
89
|
+
visibility: false
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
handleAddressUpdate(updatedAddress) {
|
|
95
|
+
this.localTournament.address = updatedAddress.address;
|
|
96
|
+
this.localTournament.coordinates = updatedAddress.coordinates;
|
|
97
|
+
},
|
|
98
|
+
handleDateUpdate(newDate) {
|
|
99
|
+
this.tournament.startDate = newDate;
|
|
100
|
+
console.log("New Date")
|
|
101
|
+
console.log(newDate)
|
|
102
|
+
console.log(DatePicker.props.invalid)
|
|
103
|
+
},
|
|
104
|
+
handleEditorUpdate(newContent) {
|
|
105
|
+
this.tournament.description = newContent;
|
|
106
|
+
},
|
|
107
|
+
handleSubmit() {
|
|
108
|
+
console.log("submit edits")
|
|
109
|
+
},
|
|
110
|
+
handleCancel() {
|
|
111
|
+
console.log("save nothing and go back to previous page")
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import EditTournamentPageTwo from './EditTournamentPageTwo.vue';
|
|
2
|
+
import mockPersons from '../../../../../mocks/personsMock.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/TournamentManagement/EditTournament/EditPageTwo',
|
|
6
|
+
component: EditTournamentPageTwo,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
args: {
|
|
9
|
+
persons: mockPersons
|
|
10
|
+
},
|
|
11
|
+
argTypes: {}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {
|
|
17
|
+
tournament: {
|
|
18
|
+
tournamentId: 345,
|
|
19
|
+
name: 'Ultimate',
|
|
20
|
+
imageLink: '',
|
|
21
|
+
address: '123 Winchester St',
|
|
22
|
+
coordinates: '',
|
|
23
|
+
startDate: '',
|
|
24
|
+
totalDays: 1,
|
|
25
|
+
description: '',
|
|
26
|
+
visibility: '',
|
|
27
|
+
externalLinks: []
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EditTournamentMenu currentTab="Details"></EditTournamentMenu>
|
|
3
|
+
<div class="w-full flex flex-row justify-center">
|
|
4
|
+
<section class="w-96">
|
|
5
|
+
<BaseText :color="'quaternary'" :size="'xs'" :text="'DETAIL INFORMATION'" class="border-b mb-5"/>
|
|
6
|
+
<div class="flex flex-col pb-4 mb-10">
|
|
7
|
+
<BaseText :color="'primaryHighlight'" :invalid="validation.visibility" :size="'sm'"
|
|
8
|
+
:text="'Tournament Visibility'" :weight="'normal'" class="mb-2" data-testid="text-visibility"/>
|
|
9
|
+
<BaseRadioGroup :invalid="validation.visibility" :items="visibilityItems"
|
|
10
|
+
@update:value="value => tournament.visibility = value"/>
|
|
11
|
+
</div>
|
|
12
|
+
<BaseText :color="'quaternary'" :size="'xs'" :text="'REGISTRATION INFORMATION'" class="border-b mb-1"/>
|
|
13
|
+
<div class="w-full flex flex-col mb-3 ml-1">
|
|
14
|
+
<BaseText :color="'primaryHighlight'" :size="'sm'" :text="'If you\'re not utilizing Ferrotas for registration, ' +
|
|
15
|
+
'please proceed by completing the form below. We\'re here to assist you every step of the way.'"
|
|
16
|
+
:weight="'normal'" data-testid="text-registration"/>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="mb-10">
|
|
19
|
+
<TitledInput :inputValue="localTournament.registrationLink" :invalid="validation.registrationLink"
|
|
20
|
+
:placeholder="localTournament.registrationLink"
|
|
21
|
+
:title="'Registration Link'" @update:value="value => localTournament.registrationLink = value"/>
|
|
22
|
+
</div>
|
|
23
|
+
<BaseText :color="'quaternary'" :size="'xs'" :text="'EXTERNAL LINKS'" class="border-b mb-1"/>
|
|
24
|
+
<div class="w-full flex flex-col mb-3 ml-1">
|
|
25
|
+
<BaseText :color="'primaryHighlight'" :size="'sm'" :text="'Feel free to add as many links to external sites ' +
|
|
26
|
+
'as you desire to enhance the visibility of your site. We support your efforts in broadening your online presence'"
|
|
27
|
+
:weight="'normal'" data-testid="text-external-links"/>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="mb-10">
|
|
30
|
+
<TitledInput :inputValue="localTournament.externalLinks" :invalid="validation.name" :title="'External Link'"
|
|
31
|
+
@update:value="value => localTournament.externalLinks = value"/>
|
|
32
|
+
</div>
|
|
33
|
+
<BaseText :color="'quaternary'" :size="'xs'" :text="'CONTACT INFORMATION'" class="border-b mb-5"/>
|
|
34
|
+
<div class="mb-10">
|
|
35
|
+
<BaseText :color="'primaryHighlight'" :invalid="false" :size="'sm'" :text="'Primary Contact'"
|
|
36
|
+
:weight="'normal'" class="mb-1 ml-1" data-testid="text-address"/>
|
|
37
|
+
<FindPerson :addBorder="true" :persons="persons" addNewText="Add New Person"/>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="flex flex-row justify-center">
|
|
40
|
+
<BaseButton class="w-1/2 mr-1" color="neutral" label="Save" selected=selected size="sm" type="primary"
|
|
41
|
+
@click="handleSubmit"/>
|
|
42
|
+
<BaseButton class="w-1/2 ml-1" color="neutral" label="Cancel" size="sm" type="primary" @click="handleCancel"/>
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import ImageCropper from "../../../../Organisms/ComplexInputs/ImageCropper/ImageCropper.vue";
|
|
50
|
+
import BaseInput from "../../../../Atoms/Input/BaseInput.vue";
|
|
51
|
+
import BaseText from "../../../../Atoms/Text/BaseText.vue";
|
|
52
|
+
import AddressAutocomplete from "../../../../Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue";
|
|
53
|
+
import BaseButton from "../../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
54
|
+
import TitledInput from "../../../../Molecules/CombinationInputs/TitledInput/TitledInput.vue";
|
|
55
|
+
import TextBoxEditor from "../../../../Organisms/ComplexInputs/TextBoxEditor/TextBoxEditor.vue";
|
|
56
|
+
import FindLocation from "../../../../Organisms/ComplexInputs/FindLocation/FindLocation.vue";
|
|
57
|
+
import DatePicker from "../../../../Organisms/ComplexInputs/DatePicker/DatePicker.vue";
|
|
58
|
+
import BaseRadioGroup from "../../../../Atoms/RadioGroup/BaseRadioGroup.vue";
|
|
59
|
+
import FindPerson from "../../../../Organisms/ComplexInputs/FindPerson/FindPerson.vue";
|
|
60
|
+
import EditTournamentMenu from "../../../Menus/EditTournamentMenu/EditTournamentMenu.vue";
|
|
61
|
+
|
|
62
|
+
export default {
|
|
63
|
+
components: {
|
|
64
|
+
EditTournamentMenu,
|
|
65
|
+
FindPerson,
|
|
66
|
+
BaseRadioGroup,
|
|
67
|
+
DatePicker,
|
|
68
|
+
FindLocation,
|
|
69
|
+
TextBoxEditor,
|
|
70
|
+
TitledInput,
|
|
71
|
+
AddressAutocomplete,
|
|
72
|
+
ImageCropper,
|
|
73
|
+
BaseInput,
|
|
74
|
+
BaseText,
|
|
75
|
+
BaseButton
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
tournament: Object,
|
|
79
|
+
locations: [],
|
|
80
|
+
persons: []
|
|
81
|
+
},
|
|
82
|
+
data() {
|
|
83
|
+
return {
|
|
84
|
+
localTournament: JSON.parse(JSON.stringify(this.tournament)),
|
|
85
|
+
validation: {
|
|
86
|
+
name: false,
|
|
87
|
+
imageLink: false,
|
|
88
|
+
address: false,
|
|
89
|
+
coordinates: false,
|
|
90
|
+
startDate: false,
|
|
91
|
+
totalDays: false,
|
|
92
|
+
description: false,
|
|
93
|
+
visibility: false
|
|
94
|
+
},
|
|
95
|
+
visibilityItems: [
|
|
96
|
+
{label: 'Open', value: 'open', description: 'Viewable To Everyone'},
|
|
97
|
+
{label: 'Club', value: 'club', description: 'Viewable Only to Members of Your Club'},
|
|
98
|
+
{label: 'Private', value: 'private', description: 'Only Viewable by you'},
|
|
99
|
+
],
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
handleSubmit() {
|
|
104
|
+
console.log("submit edits")
|
|
105
|
+
},
|
|
106
|
+
handleCancel() {
|
|
107
|
+
console.log("save nothing and go back to previous page")
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
</script>
|