validators as a plugin

This commit is contained in:
les
2020-09-05 01:21:47 +02:00
parent a0c462a3f7
commit f28347a227
17 changed files with 88 additions and 160 deletions

View File

@@ -29,9 +29,7 @@ export default {
methods: {
...mapActions(['delEvent']),
async remove (parent = false) {
const ret = await this.$root.$confirm(this.$t(`event.remove_${parent ? 'recurrent_' : ''}confirmation`), this.$t('common.confirm'), {
type: 'error'
})
const ret = await this.$root.$confirm(this.$t('common.confirm'), this.$t(`event.remove_${parent ? 'recurrent_' : ''}confirmation`))
if (!ret) { return }
const id = parent ? this.event.parentId : this.event.id
await this.$axios.delete(`/event/${id}`)