Show actual error text if applicable, for receiving failure
This commit is contained in:
parent
b6e8b74eef
commit
32d1bd430f
|
@ -359,17 +359,17 @@ export default {
|
|||
}
|
||||
|
||||
this.$http.post(url, params).then(response => {
|
||||
if (response.data.data) {
|
||||
if (!response.data.error) {
|
||||
this.$router.push(`/receiving/${this.row.batch_uuid}`)
|
||||
} else {
|
||||
this.$buefy.toast.open({
|
||||
message: response.data.error || "Failed to post receiving!",
|
||||
message: response.data.error,
|
||||
type: 'is-danger',
|
||||
})
|
||||
}
|
||||
}, response => {
|
||||
this.$buefy.toast.open({
|
||||
message: "Failed to post receiving!",
|
||||
message: "Save failed: unknown error",
|
||||
type: 'is-danger',
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue