kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Show error message when posting spot/alert fails
rodzic
80bfa01d00
commit
705319b53b
|
@ -180,6 +180,15 @@ export default {
|
|||
.then(response => {
|
||||
this.$store.dispatch('reloadAlerts')
|
||||
})
|
||||
.catch(err => {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: 'Could not delete spot: ' + err.message,
|
||||
type: 'is-danger',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -248,6 +248,15 @@ export default {
|
|||
this.$store.dispatch('reloadAlerts')
|
||||
this.$parent.close()
|
||||
})
|
||||
.catch(err => {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: 'Could not post alert: ' + err.message,
|
||||
type: 'is-danger',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.posting = false
|
||||
})
|
||||
|
|
|
@ -218,6 +218,15 @@ export default {
|
|||
|
||||
this.$parent.close()
|
||||
})
|
||||
.catch(err => {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: 'Could not post spot: ' + err.message,
|
||||
type: 'is-danger',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.posting = false
|
||||
})
|
||||
|
|
|
@ -192,6 +192,15 @@ export default {
|
|||
.then(response => {
|
||||
this.$store.commit('deleteSpot', spot)
|
||||
})
|
||||
.catch(err => {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: 'Could not delete spot: ' + err.message,
|
||||
type: 'is-danger',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue