fix WhereInput

This commit is contained in:
les
2020-11-04 10:55:30 +01:00
parent ee194e16a5
commit 0ac2edf69d
6 changed files with 34 additions and 29 deletions

View File

@@ -25,7 +25,6 @@
v-btn(@click='importGeneric' :loading='loading' :disabled='loading'
color='primary') {{$t('common.import')}}
</template>
<script>
import ical from 'ical.js'
@@ -51,18 +50,18 @@ export default {
this.importURL()
}
},
async importICS() {
importICS () {
const reader = new FileReader()
reader.readAsText(this.file)
reader.onload = () => {
const data = reader.result
const event = ical.parse(data)
this.event = {
title: event.name
title: event.name
}
}
}
},
async importURL() {
async importURL () {
if (!this.URL) {
this.errorMessage = this.$validators.required('common.URL')('')
this.error = true
@@ -73,7 +72,7 @@ export default {
this.loading = true
try {
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL }})
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
this.event = ret
// check if contain an h-event
this.$emit('imported', ret)
@@ -87,4 +86,4 @@ export default {
}
}
}
</script>
</script>