Show actual error text if applicable, for receiving failure

This commit is contained in:
Lance Edgar 2024-04-11 14:14:01 -05:00
parent b6e8b74eef
commit 32d1bd430f

View file

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