diff --git a/src/components/LocationInputRow.vue b/src/components/LocationInputRow.vue index c2c60682dc..d1527d49b9 100644 --- a/src/components/LocationInputRow.vue +++ b/src/components/LocationInputRow.vue @@ -55,11 +55,9 @@ export default { default: 3 } }, - emits: ['location'], data() { return { locationSelectorDialog: false, - locationObject: null, loading: false, } }, @@ -73,11 +71,6 @@ export default { return Object.keys(this.locationForm).filter(k => keys.includes(k)).every(k => !!this.locationForm[k]) }, }, - watch: { - locationObject(newLocationObject, oldLocationObject) { // eslint-disable-line no-unused-vars - this.$emit('location', newLocationObject) - } - }, mounted() { this.initLocationForm() }, @@ -101,8 +94,6 @@ export default { // update locationForm this.locationForm.location_osm_id = utils.getLocationID(location) this.locationForm.location_osm_type = utils.getLocationType(location) - // set locationObject - this.locationObject = location }, isSelectedLocation(location) { return utils.buildLocationUniqueId(this.locationForm.location_osm_id, this.locationForm.location_osm_type) === utils.getLocationUniqueID(location) diff --git a/src/components/ProofInputRow.vue b/src/components/ProofInputRow.vue index 847964b51b..f38db5b526 100644 --- a/src/components/ProofInputRow.vue +++ b/src/components/ProofInputRow.vue @@ -4,7 +4,7 @@ - + @@ -93,7 +93,6 @@ export default { proofSelectedSuccessMessage: false, proofSuccessMessage: false, proofImage: null, - locationObject: null, proofObject: null, loading: false, } @@ -173,7 +172,8 @@ export default { this.loading = false if (data.id) { this.proofForm.proof_id = data.id - this.proofObject = {...data, ...{location: this.locationObject}} + this.proofForm.location_id = data.location_id + this.proofObject = data this.proofSuccessMessage = true } else { alert('Error: server error when creating proof')