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