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 => {
|
.then(response => {
|
||||||
this.$store.dispatch('reloadAlerts')
|
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.$store.dispatch('reloadAlerts')
|
||||||
this.$parent.close()
|
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(() => {
|
.finally(() => {
|
||||||
this.posting = false
|
this.posting = false
|
||||||
})
|
})
|
||||||
|
|
|
@ -218,6 +218,15 @@ export default {
|
||||||
|
|
||||||
this.$parent.close()
|
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(() => {
|
.finally(() => {
|
||||||
this.posting = false
|
this.posting = false
|
||||||
})
|
})
|
||||||
|
|
|
@ -192,6 +192,15 @@ export default {
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.$store.commit('deleteSpot', spot)
|
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