Show error message when posting spot/alert fails

pull/12/head^2
Manuel Kasper 2022-07-23 20:32:08 +02:00
rodzic 80bfa01d00
commit 705319b53b
4 zmienionych plików z 36 dodań i 0 usunięć

Wyświetl plik

@ -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
})
})
}
})
}

Wyświetl plik

@ -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
})

Wyświetl plik

@ -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
})

Wyświetl plik

@ -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
})
})
}
})
}