@dcrackel/hematournamentui 1.0.144 → 1.0.145
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/HemaTournamentUI-lib.es.js +19 -10
- package/dist/HemaTournamentUI-lib.umd.js +19 -19
- package/package.json +1 -1
- package/src/stories/Atoms/Input/BaseInput.vue +1 -1
- package/src/stories/Templates/EventManagement/ListEvents/ListEvents.vue +2 -2
- package/src/stories/Templates/EventManagement/PoolLive/PoolLive.stories.js +1 -0
- package/src/stories/Templates/TournamentManagement/EditTournament/EditBasic/EditTournamentBasicInfo.stories.js +16 -14
- package/src/stories/Templates/TournamentManagement/EditTournament/EditBasic/EditTournamentBasicInfo.vue +18 -6
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<div class="w-full flex flex-col justify-center items-center mb-6" style="text-align: center">
|
|
7
7
|
<div v-if="events.length === 0">
|
|
8
8
|
<img alt="Small desert scene with wind blowing." class="w-96" :src="emptyDesertIcon" />
|
|
9
|
-
<BaseText :color="'primaryHighlight'" :size="'
|
|
9
|
+
<BaseText :color="'primaryHighlight'" :size="'lg'" :text="'0 events added yet.'"
|
|
10
10
|
:weight="'normal'" data-testid="text-num-events"/>
|
|
11
|
-
<BaseText :color="'primaryHighlight'" :size="'
|
|
11
|
+
<BaseText :color="'primaryHighlight'" :size="'md'" :text="'Click below to add first event.'"
|
|
12
12
|
:weight="'normal'" data-testid="text-num-events"/>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import EditTournamentBasicInfo from './EditTournamentBasicInfo.vue';
|
|
2
|
+
import mockLocation from '../../../../../mocks/locationMock.js';
|
|
3
|
+
import mockTournaments from '../../../../../mocks/tournamentMock.js';
|
|
2
4
|
|
|
3
5
|
export default {
|
|
4
6
|
title: 'Templates/TournamentManagement/EditTournament/EditBasicInfo',
|
|
5
7
|
component: EditTournamentBasicInfo,
|
|
6
8
|
tags: ['autodocs'],
|
|
7
|
-
args: {
|
|
8
|
-
|
|
9
|
+
args: {
|
|
10
|
+
tournament: mockTournaments[0],
|
|
11
|
+
locations: mockLocation
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
tournament: {
|
|
15
|
+
control: Object
|
|
16
|
+
},
|
|
17
|
+
locations: {
|
|
18
|
+
control: Object
|
|
19
|
+
}
|
|
20
|
+
}
|
|
9
21
|
};
|
|
10
22
|
|
|
11
23
|
|
|
12
24
|
export const Default = {
|
|
13
25
|
args: {
|
|
14
|
-
tournament:
|
|
15
|
-
|
|
16
|
-
name: 'Ultimate',
|
|
17
|
-
imageLink: '',
|
|
18
|
-
address: '123 Winchester St',
|
|
19
|
-
coordinates: '',
|
|
20
|
-
startDate: '',
|
|
21
|
-
totalDays: 1,
|
|
22
|
-
description: '',
|
|
23
|
-
visibility: '',
|
|
24
|
-
externalLinks: []
|
|
25
|
-
},
|
|
26
|
+
tournament: mockTournaments[0],
|
|
27
|
+
locations: mockLocation
|
|
26
28
|
}
|
|
27
29
|
};
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
<div class="border-b border-dropdownSelect my-10"></div>
|
|
16
16
|
<div class="mb-3">
|
|
17
|
-
<TitledInput :inputValue="localTournament.
|
|
18
|
-
:title="'Tournament Name'" @update:value="value => localTournament.
|
|
17
|
+
<TitledInput :inputValue="localTournament.Name" :invalid="validation.name" :placeholder="localTournament.Name"
|
|
18
|
+
:title="'Tournament Name'" @update:value="value => localTournament.Name = value"/>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="mb-3">
|
|
21
21
|
<BaseText :color="'primaryHighlight'" :invalid="validation.address" :size="'sm'" :text="'Address'"
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
<BaseText :color="'primaryHighlight'" :invalid="validation.startDate" :size="'sm'" :text="'Start Date'"
|
|
35
35
|
:weight="'normal'"
|
|
36
36
|
class="mb-1 ml-1" data-testid="text-start-date"/>
|
|
37
|
-
<DatePicker :invalid="validation.startDate" :setDate="tournament.
|
|
37
|
+
<DatePicker :invalid="validation.startDate" :setDate="tournament.StartDate"
|
|
38
38
|
@update:selectedDate="handleDateUpdate"/>
|
|
39
39
|
</div>
|
|
40
40
|
<div class="flex flex-col w-1/2 ml-1">
|
|
41
41
|
<BaseText :color="'primaryHighlight'" class="mb-1 ml-1" text="Total Days"/>
|
|
42
|
-
<BaseInput :addBorder="true" :placeholder="
|
|
42
|
+
<BaseInput :addBorder="true" :placeholder="totalDays"/>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
<div class="flex flex-row justify-center my-10">
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
tournament: {
|
|
81
|
-
type:
|
|
81
|
+
type: Object,
|
|
82
82
|
required: true
|
|
83
83
|
},
|
|
84
84
|
locations: {
|
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
},
|
|
89
89
|
data() {
|
|
90
90
|
return {
|
|
91
|
-
localTournament:
|
|
91
|
+
localTournament: this.tournament,
|
|
92
92
|
validation: {
|
|
93
93
|
name: false,
|
|
94
94
|
imageLink: false,
|
|
@@ -107,6 +107,18 @@ export default {
|
|
|
107
107
|
]
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
+
created() {
|
|
111
|
+
console.log(this.localTournament)
|
|
112
|
+
},
|
|
113
|
+
computed: {
|
|
114
|
+
totalDays() {
|
|
115
|
+
const startDate = new Date(this.localTournament.StartDate);
|
|
116
|
+
const endDate = new Date(this.localTournament.EndDate);
|
|
117
|
+
const timeDifference = endDate - startDate;
|
|
118
|
+
const dayDifference = timeDifference / (1000 * 60 * 60 * 24);
|
|
119
|
+
return dayDifference >= 0 ? Math.ceil(dayDifference) + 1 : 0;
|
|
120
|
+
}
|
|
121
|
+
},
|
|
110
122
|
methods: {
|
|
111
123
|
handleTabMenuClick(value) {
|
|
112
124
|
this.$emit('tab:menu-click', value);
|