Commit 61121f4f authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

Merge branch 'feature/alert' into 'feature/deploy-to-aws'

update error alert message

See merge request !29
parents 43bf84cb 61a8187e
......@@ -542,7 +542,7 @@ export default {
.catch((errors) => {
console.log(errors.response.data.message)
this.message = errors.response.data.message
self.$toast.error('something went wrong while trying create!', {
self.$toast.error(this.message, {
duration: 3000
})
})
......@@ -602,7 +602,6 @@ export default {
if (typeof this.eImage !== 'string' && this.eImage != null) {
fd.append('image', this.eImage)
}
try {
this.$axios
.post(`categories/update/${this?.eID}`, fd, {
headers: {
......@@ -618,10 +617,12 @@ export default {
this.editedItem = response.data.data
Object.assign(this.categories[this.editedIndex], this.editedItem)
this.clearFile()
}).catch((errors) => {
this.message = errors.response.data.message
self.$toast.error(this.message, {
duration: 3000
})
})
} catch (error) {
console.log(error)
}
},
clearData () {
this.parent_id = ''
......
......@@ -553,7 +553,7 @@ export default {
this.clearFile()
})
.catch((errors) => {
self.$toast.error('something went wrong while trying create!', {
self.$toast.error(errors.response.data.message, {
duration: 3000
})
})
......@@ -626,7 +626,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying update!', {
self.$toast.error(error.response.data.message, {
duration: 3000
})
})
......
......@@ -721,7 +721,7 @@ export default {
.catch((errors) => {
console.log(errors.response.data.message)
this.message = errors.response.data.message
self.$toast.error('something went wrong while trying create!', {
self.$toast.error(errors.response.data.message, {
duration: 3000
})
})
......@@ -803,7 +803,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying update!', {
self.$toast.error(error.response.data.message, {
duration: 3000
})
})
......
......@@ -403,7 +403,7 @@ export default {
this.validate()
console.log(errors.response.data.message)
this.message = errors.response.data.message
self.$toast.error('something went wrong while trying create!', {
self.$toast.error(this.message, {
duration: 3000
})
})
......@@ -467,7 +467,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying update!', {
self.$toast.error(this.message, {
duration: 3000
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment