From 32d1bd430f85240d51c13639bce805e660d65a57 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 11 Apr 2024 14:14:01 -0500 Subject: [PATCH 1/4] 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', }) }) From b04fa3eb72bc16cb89135fc0a9137f1a970695a8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 29 May 2024 09:43:53 -0500 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a00a5..a9e8cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +## [0.1.25] - 2024-05-29 +### Changed +- Show actual error text if applicable, for receiving failure. + ## [0.1.24] - 2024-03-26 ### Changed - Add delay when fetching rows data for model CRUD component. diff --git a/package-lock.json b/package-lock.json index 5524b23..3791936 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "byjove", - "version": "0.1.24", + "version": "0.1.25", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "byjove", - "version": "0.1.24", + "version": "0.1.25", "license": "GPL-3.0-or-later", "dependencies": { "vue": "^2.7.14" diff --git a/package.json b/package.json index d0dbfc9..55201b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "byjove", - "version": "0.1.24", + "version": "0.1.25", "description": "Generic-ish app components for Vue.js frontend to Tailbone API backend", "keywords": [ "rattail", From f21a7298feb98e0eb00347da5b580371cb968b22 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 31 May 2024 10:58:44 -0500 Subject: [PATCH 3/4] Optionally allow decimal quantities for receiving --- src/components/numeric-input/NumericInput.vue | 152 ++++++++++++++++++ src/components/numeric-input/index.js | 28 ++++ src/components/receiving/ByjoveReceiving.vue | 19 ++- 3 files changed, 195 insertions(+), 4 deletions(-) create mode 100644 src/components/numeric-input/NumericInput.vue create mode 100644 src/components/numeric-input/index.js diff --git a/src/components/numeric-input/NumericInput.vue b/src/components/numeric-input/NumericInput.vue new file mode 100644 index 0000000..7bdef1b --- /dev/null +++ b/src/components/numeric-input/NumericInput.vue @@ -0,0 +1,152 @@ + + + diff --git a/src/components/numeric-input/index.js b/src/components/numeric-input/index.js new file mode 100644 index 0000000..fa116e7 --- /dev/null +++ b/src/components/numeric-input/index.js @@ -0,0 +1,28 @@ +// Import vue component +import NumericInput from './NumericInput.vue' + +// Declare install function executed by Vue.use() +export function install(Vue) { + if (install.installed) return; + install.installed = true; + Vue.component('NumericInput', NumericInput); +} + +// Create module definition for Vue.use() +const plugin = { + install, +}; + +// Auto-install when vue is found (eg. in browser via