Fixed error messages
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
7f9e132cf4
commit
ae80d91f34
|
@ -61,7 +61,7 @@
|
|||
this.loading = false
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,9 @@ export default {
|
|||
this.allStatus = response.data
|
||||
})
|
||||
.catch(e => {
|
||||
if (!e.response.data.Message) {
|
||||
e.response.data = { Message: 'Could not get Status.' }
|
||||
}
|
||||
this.errorNotification(e)
|
||||
})
|
||||
},
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
this.loading = false
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
|
@ -108,20 +108,6 @@ export default {
|
|||
'$route': 'loadPublishers'
|
||||
},
|
||||
computed: {
|
||||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'error',
|
||||
title: this.langGeneral.error,
|
||||
text: err
|
||||
})
|
||||
},
|
||||
filteredData: function () {
|
||||
var filterKey = this.searchQuery && this.searchQuery.toLowerCase()
|
||||
var data = this.publishers
|
||||
|
@ -143,6 +129,20 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'error',
|
||||
title: this.langGeneral.error,
|
||||
text: err
|
||||
})
|
||||
},
|
||||
loadPublishers () {
|
||||
this.loading = true
|
||||
this.publishers = []
|
||||
|
@ -177,10 +177,8 @@ export default {
|
|||
DeletePublisher (obj) {
|
||||
this.showModal = true
|
||||
this.$on('delete-submit', function () {
|
||||
console.log(obj)
|
||||
HTTP.delete('publishers/' + obj.ID.content)
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
if (response.status === 200 && response.data.Message === 'success') {
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data) {
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue