From 32d1bd430f85240d51c13639bce805e660d65a57 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 11 Apr 2024 14:14:01 -0500 Subject: [PATCH] Show actual error text if applicable, for receiving failure --- src/components/receiving/ByjoveReceiving.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/receiving/ByjoveReceiving.vue b/src/components/receiving/ByjoveReceiving.vue index 9b11867..1a96d3a 100644 --- a/src/components/receiving/ByjoveReceiving.vue +++ b/src/components/receiving/ByjoveReceiving.vue @@ -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', }) })