@dcrackel/hematournamentui 1.0.147 → 1.0.149
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 +2533 -2529
- package/dist/HemaTournamentUI-lib.umd.js +1 -1
- package/package.json +1 -1
- package/src/stories/Templates/TournamentManagement/EditTournament/EditBasic/EditTournamentBasicInfo.vue +24 -17
- package/src/stories/Templates/TournamentManagement/EditTournament/EditDetails/EditTournamentDetails.vue +2 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<EditTournamentMenu currentTab="Basic" :tabs="tabs" @tabMenuClick="handleTabMenuClick"
|
|
2
|
+
<EditTournamentMenu currentTab="Basic" :tabs="tabs" @tabMenuClick="handleTabMenuClick"/>
|
|
3
3
|
<div class="w-full flex flex-row justify-center">
|
|
4
4
|
<section class="w-full">
|
|
5
5
|
<BaseText :color="'quaternary'" :size="'xs'" :text="'IMAGE'" class="border-b mb-5"/>
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
:weight="'normal'" class="mb-1 ml-1" data-testid="text-cover-image"/>
|
|
9
9
|
<div class="w-full flex justify-center">
|
|
10
10
|
<div class="w-3/4">
|
|
11
|
-
<ImageCropper :url="tournamentImage" :imageName="`t-${localTournament.TournamentId}`"
|
|
11
|
+
<ImageCropper :url="tournamentImage" :imageName="`t-${localTournament.TournamentId}`"
|
|
12
|
+
@update:url="handleUpdateUrl"/>
|
|
12
13
|
</div>
|
|
13
14
|
</div>
|
|
14
15
|
</div>
|
|
@@ -23,12 +24,13 @@
|
|
|
23
24
|
:weight="'normal'" class="mb-1 ml-1" data-testid="text-address"/>
|
|
24
25
|
<FindLocation :invalid="validation.address" :locations="locations" :placeholder="tournamentAddress"
|
|
25
26
|
:addBorder=true
|
|
26
|
-
@update
|
|
27
|
+
@update-location="handleAddressUpdate"/>
|
|
27
28
|
</div>
|
|
28
29
|
<div class="mb-3">
|
|
29
30
|
<BaseText :color="'primaryHighlight'" :invalid="validation.description" :size="'sm'" :text="'Description'"
|
|
30
31
|
:weight="'normal'" class="mb-1 ml-1" data-testid="text-description"/>
|
|
31
|
-
<TextBoxEditor :initialContent="localTournament.Description" :invalid="validation.description"
|
|
32
|
+
<TextBoxEditor :initialContent="localTournament.Description" :invalid="validation.description"
|
|
33
|
+
@update:editorContent="handleEditorUpdate"/>
|
|
32
34
|
</div>
|
|
33
35
|
<div class="flex flex-row justify-center mb-3">
|
|
34
36
|
<div class="flex flex-col w-1/2 mr-1">
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
</div>
|
|
41
43
|
<div class="flex flex-col w-1/2 ml-1">
|
|
42
44
|
<BaseText :color="'primaryHighlight'" class="mb-1 ml-1" text="Total Days"/>
|
|
43
|
-
<BaseInput :addBorder="true" :placeholder="totalDays"/>
|
|
45
|
+
<BaseInput :addBorder="true" :placeholder="totalDays" @update:value="handleTotalDays"/>
|
|
44
46
|
</div>
|
|
45
47
|
</div>
|
|
46
48
|
<div class="flex flex-row justify-center my-10">
|
|
@@ -101,16 +103,13 @@ export default {
|
|
|
101
103
|
visibility: false
|
|
102
104
|
},
|
|
103
105
|
tabs: [
|
|
104
|
-
{
|
|
105
|
-
{
|
|
106
|
-
{
|
|
107
|
-
{
|
|
106
|
+
{id: 'Basic', label: 'Basic', color: 'primaryHighlight'},
|
|
107
|
+
{id: 'Details', label: 'Details', color: 'primaryHighlight'},
|
|
108
|
+
{id: 'Events', label: 'Events', color: 'primaryHighlight'},
|
|
109
|
+
{id: 'Staff', label: 'Staff', color: 'primaryHighlight'}
|
|
108
110
|
]
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
|
-
created() {
|
|
112
|
-
console.log(this.localTournament)
|
|
113
|
-
},
|
|
114
113
|
computed: {
|
|
115
114
|
totalDays() {
|
|
116
115
|
const startDate = new Date(this.localTournament.StartDate);
|
|
@@ -122,18 +121,26 @@ export default {
|
|
|
122
121
|
tournamentImage() {
|
|
123
122
|
return this.localTournament.Images[0].URL;
|
|
124
123
|
},
|
|
125
|
-
tournamentAddress(){
|
|
124
|
+
tournamentAddress() {
|
|
126
125
|
return this.localTournament.Address.Name;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
},
|
|
130
129
|
methods: {
|
|
130
|
+
handleTotalDays(days) {
|
|
131
|
+
if (!isNaN(days)) {
|
|
132
|
+
const startDate = new Date(this.localTournament.StartDate);
|
|
133
|
+
const newEndDate = new Date(startDate);
|
|
134
|
+
newEndDate.setDate(startDate.getDate() + parseInt(days) - 1);
|
|
135
|
+
this.localTournament.EndDate = newEndDate.toISOString().split('T')[0];
|
|
136
|
+
}
|
|
137
|
+
},
|
|
131
138
|
handleTabMenuClick(value) {
|
|
132
139
|
this.$emit('tab:menu-click', value);
|
|
133
140
|
},
|
|
134
141
|
handleAddressUpdate(updatedAddress) {
|
|
135
|
-
this.localTournament.
|
|
136
|
-
this.localTournament.
|
|
142
|
+
this.localTournament.AddressId = updatedAddress.AddressId;
|
|
143
|
+
this.localTournament.Address = updatedAddress;
|
|
137
144
|
},
|
|
138
145
|
handleDateUpdate(newDate) {
|
|
139
146
|
this.tournament.startDate = newDate;
|
|
@@ -142,10 +149,10 @@ export default {
|
|
|
142
149
|
this.tournament.description = newContent;
|
|
143
150
|
},
|
|
144
151
|
handleSubmit() {
|
|
145
|
-
|
|
152
|
+
this.$emit('update:submit', this.localTournament)
|
|
146
153
|
},
|
|
147
154
|
handleCancel() {
|
|
148
|
-
|
|
155
|
+
this.$emit('update:cancel')
|
|
149
156
|
},
|
|
150
157
|
handleUpdateUrl() {
|
|
151
158
|
console.log('handleUpdateUrl')
|
|
@@ -147,10 +147,10 @@ export default {
|
|
|
147
147
|
this.$emit('tab:menu-click', value);
|
|
148
148
|
},
|
|
149
149
|
handleSubmit() {
|
|
150
|
-
this.$emit('
|
|
150
|
+
this.$emit('update:submit', this.localTournament)
|
|
151
151
|
},
|
|
152
152
|
handleCancel() {
|
|
153
|
-
|
|
153
|
+
this.$emit('update:cancel')
|
|
154
154
|
},
|
|
155
155
|
handleUpdateM2(value) {
|
|
156
156
|
this.usingM2 = value;
|