@dcrackel/hematournamentui 1.0.271 → 1.0.274

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/hematournamentui",
3
3
  "private": false,
4
- "version": "1.0.271",
4
+ "version": "1.0.274",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTournamentUI-lib.umd.js",
7
7
  "module": "dist/HemaTournamentUI-lib.es.js",
@@ -51,7 +51,7 @@ const mockTournaments = [
51
51
  "Images": [
52
52
  {
53
53
  "ImageId": 28,
54
- "URL": "http://localhost/uploads/swordquench.png",
54
+ "URL": "http://localhost:3000/uploads/swordquench.png",
55
55
  "AltText": "Sword Quench image"
56
56
  }
57
57
  ],
@@ -87,7 +87,7 @@ const mockTournaments = [
87
87
  "Images": [
88
88
  {
89
89
  "ImageId": 2,
90
- "URL": "http://localhost/uploads/t-4.png",
90
+ "URL": "http://localhost:3000/uploads/t-4.png",
91
91
  "AltText": "alt text"
92
92
  }
93
93
  ],
@@ -6,6 +6,7 @@
6
6
  ref="address"
7
7
  v-model="address"
8
8
  placeholder="Venue Address"
9
+ @update:AddNewAddress="addNewAddress"
9
10
  @placechanged="getAddressData"
10
11
  />
11
12
  </template>
@@ -28,6 +29,11 @@ export default {
28
29
  };
29
30
  },
30
31
  methods: {
32
+ addNewAddress(addressData) {
33
+ console.log("-------------------");
34
+ console.log(addressData);
35
+ this.$emit("add-new-address",addressData);
36
+ },
31
37
  getAddressData(addressData) {
32
38
  const street = `${addressData.street_number} ${addressData.route}`;
33
39
  const city = addressData.locality;
@@ -31,7 +31,7 @@
31
31
  <BaseInput :addBorder="true" :invalid="false" :value="locationName" class="pb-2"
32
32
  placeholder="Enter Location Name" type="formInput" @update:value="handleLocationName"/>
33
33
  <AddressAutocomplete v-model="formData.address" :invalid="validAddress" class="text-lg"
34
- @update:address="handleAddressUpdate"/>
34
+ @update:address="handleNewAddress"/>
35
35
  </template>
36
36
  </BaseModal>
37
37
  </div>
@@ -120,12 +120,12 @@ export default {
120
120
  handleLocationName(newName) {
121
121
  this.formData.locationName = newName
122
122
  },
123
- handleAddressUpdate(newAddress) {
123
+ handleNewAddress(newAddress) {
124
124
  this.formData.address = newAddress.address
125
125
  this.formData.coordinates = newAddress.coordinates
126
126
  },
127
127
  handleSubmit() {
128
- this.$emit('update-location', this.formData);
128
+ this.$emit('submit:location', this.formData);
129
129
  this.showNewLocation = false;
130
130
  }
131
131
  }
@@ -45,11 +45,11 @@ export default {
45
45
  },
46
46
  uploadServer: {
47
47
  type: String,
48
- default: 'http://localhost/api/upload/'
48
+ default: 'http://localhost:3000/api/upload/'
49
49
  },
50
50
  imageServer: {
51
51
  type: String,
52
- default: 'http://localhost/uploads/'
52
+ default: 'http://localhost:3000/uploads/'
53
53
  }
54
54
  },
55
55
  components: {
@@ -12,8 +12,8 @@ export default {
12
12
  persons: mockPersons,
13
13
  urlToImage: null,
14
14
  uploadImageName: 'Storybook-test',
15
- uploadServer: 'http://localhost/uploads/',
16
- imageServer: 'http://localhost/uploads/',
15
+ uploadServer: 'http://localhost:3000/uploads/',
16
+ imageServer: 'http://localhost:3000/uploads/',
17
17
  },
18
18
  argTypes: {
19
19
  locations: {
@@ -43,8 +43,8 @@ export const Default = {
43
43
  urlToImage: null,
44
44
  addNewText: "Add New Location",
45
45
  uploadImageName: 'Storybook-test',
46
- uploadServer: 'http://localhost/uploads/',
47
- imageServer: 'http://localhost/uploads/'
46
+ uploadServer: 'http://localhost:3000/uploads/',
47
+ imageServer: 'http://localhost:3000/uploads/'
48
48
  }
49
49
  };
50
50
 
@@ -55,7 +55,7 @@ export const ExistingTournament = {
55
55
 
56
56
  addNewText: "Add New Location",
57
57
  uploadImageName: 'Storybook-test',
58
- uploadServer: 'http://localhost/uploads/',
59
- imageServer: 'http://localhost/uploads/'
58
+ uploadServer: 'http://localhost:3000/uploads/',
59
+ imageServer: 'http://localhost:3000/uploads/'
60
60
  }
61
61
  };
@@ -24,7 +24,9 @@
24
24
  <BaseText :color="'primaryHighlight'" :invalid="validation.address" :size="'sm'" :text="'Location'"
25
25
  :weight="'normal'" class="mb-1" data-testid="text-address"/>
26
26
  <FindLocation :addBorder="true" :locations="locations" addNewText="Add New"
27
- @update-location="handleAddressUpdate"/>
27
+ @update:addNewAddress="handleAddNewAddress"
28
+ @update:location="handleAddressUpdate"
29
+ />
28
30
  </div>
29
31
  <div class="flex flex-row mb-3">
30
32
  <div class="w-3/4 mr-1">
@@ -112,11 +114,11 @@ export default {
112
114
  },
113
115
  uploadServer: {
114
116
  type: String,
115
- default: 'http://localhost/uploads/'
117
+ default: 'http://localhost:3000/uploads/'
116
118
  },
117
119
  imageServer: {
118
120
  type: String,
119
- default: 'http://localhost/uploads/'
121
+ default: 'http://localhost:3000/uploads/'
120
122
  }
121
123
  },
122
124
  data() {
@@ -173,6 +175,10 @@ export default {
173
175
  this.validation[key] = state;
174
176
  });
175
177
  },
178
+ handleAddNewAddress(newAddress){
179
+ this.tournament.AddressId = 0;
180
+ this.tournament.Address = newAddress;
181
+ },
176
182
  handleAddressUpdate(updatedAddress) {
177
183
  this.tournament.addressId = updatedAddress.AddressId
178
184
  },
@@ -23,7 +23,9 @@
23
23
  :weight="'normal'" class="mb-1 ml-1" data-testid="text-address"/>
24
24
  <FindLocation :invalid="validation.address" :locations="locations" :placeholder="tournamentAddress"
25
25
  :addBorder=true
26
- @update-location="handleAddressUpdate"/>
26
+ @update:addNewAddress="handleNewAddress"
27
+ @submit:location="handleAddressUpdate"
28
+ />
27
29
  </div>
28
30
  <div class="mb-3">
29
31
  <BaseText :color="'quinary'" :invalid="validation.description" :size="'sm'" :text="'Description'"
@@ -124,11 +126,11 @@ export default {
124
126
  },
125
127
  uploadServer: {
126
128
  type: String,
127
- default: 'http://localhost/uploads/'
129
+ default: 'http://localhost:3000/uploads/'
128
130
  },
129
131
  imageServer: {
130
132
  type: String,
131
- default: 'http://localhost/uploads/'
133
+ default: 'http://localhost:3000/uploads/'
132
134
  }
133
135
  },
134
136
  emits: ['tab:menu-click', 'manageEvent', 'editEvent', 'addEvent', 'image:upload'],
@@ -174,6 +176,11 @@ export default {
174
176
 
175
177
  },
176
178
  methods: {
179
+ handleNewAddress(addressData) {
180
+ console.log("-------------------");
181
+ console.log(addressData);
182
+ this.$emit("add-new-address",addressData);
183
+ },
177
184
  handleTotalDays(days) {
178
185
  if (!isNaN(days)) {
179
186
  const startDate = new Date(this.localTournament.StartDate);
@@ -186,7 +193,7 @@ export default {
186
193
  this.$emit('tab:menu-click', value);
187
194
  },
188
195
  handleAddressUpdate(updatedAddress) {
189
- this.localTournament.AddressId = updatedAddress.AddressId;
196
+ this.localTournament.AddressId = 0;
190
197
  this.localTournament.Address = updatedAddress;
191
198
  },
192
199
  handleDateUpdate(newDate) {