Error messages in boxes instead of console.log

pull/144/head
Henrique Dias 2017-07-08 14:45:56 +01:00
parent bb116fe5b0
commit 66093fe117
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
5 changed files with 6 additions and 7 deletions

View File

@ -115,7 +115,7 @@ export default {
})
.catch(error => {
buttons.done('save')
console.log(error)
this.$store.commit('showError', error)
})
}
}

View File

@ -99,7 +99,9 @@ export default {
.then(() => {
this.$store.commit('setReload', true)
})
.catch(error => console.log(error))
.catch(error => {
this.$store.commit('showError', error)
})
},
click: function (event) {
if (this.selectedCount !== 0) event.preventDefault()

View File

@ -37,8 +37,7 @@ export default {
.then(() => {
this.$router.push({ path: redirect })
})
.catch(e => {
console.log(e)
.catch(() => {
this.wrong = true
})
}

View File

@ -124,7 +124,6 @@ export default {
this.rules = this.rules.trim()
}).catch(error => {
console.log(error)
this.$router.push({ path: '/users/new' })
})
},

View File

@ -34,9 +34,8 @@ export default {
created () {
api.getUsers().then(users => {
this.users = users
console.log(users)
}).catch(error => {
console.log(error)
this.$store.commit('showError', error)
})
}
}