From 8c6fe828ad709a698628da8cbc32eb11cced9726 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Mon, 18 Sep 2023 18:45:55 -0500
Subject: [PATCH 01/16] Auto-trim username field in login form
to avoid confusion
---
src/components/login/ByjoveLogin.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/login/ByjoveLogin.vue b/src/components/login/ByjoveLogin.vue
index 218c17e..398ee05 100644
--- a/src/components/login/ByjoveLogin.vue
+++ b/src/components/login/ByjoveLogin.vue
@@ -6,7 +6,7 @@
-
+
From a1bf81aa565b26e1de3a1fbc96ebc2b5eef5d39e Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Thu, 5 Oct 2023 13:44:08 -0500
Subject: [PATCH 02/16] Auto-focus case/unit field when showing inventory count
page
---
src/components/inventory/ByjoveInventory.vue | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/components/inventory/ByjoveInventory.vue b/src/components/inventory/ByjoveInventory.vue
index dd5aa22..31e84e7 100644
--- a/src/components/inventory/ByjoveInventory.vue
+++ b/src/components/inventory/ByjoveInventory.vue
@@ -44,13 +44,15 @@
+ step="any"
+ ref="units">
@@ -100,6 +102,16 @@ export default {
this.fetch(this.$route.params.uuid)
},
+ updated() {
+ this.$nextTick(() => {
+ if (this.shouldAllowCases()) {
+ this.$refs.cases.focus()
+ } else {
+ this.$refs.units.focus()
+ }
+ })
+ },
+
methods: {
getIndexUrl() {
From daac09d1e4390b8360cc862607723bde23504caa Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Fri, 6 Oct 2023 10:02:37 -0500
Subject: [PATCH 03/16] Update changelog
---
CHANGELOG.md | 5 +++++
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7281886..ebb06b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ All notable changes to 'byjove' will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [0.1.21] - 2023-10-06
+### Changed
+- Auto-trim username field in login form.
+- Auto-focus case/unit field when showing inventory count page.
+
## [0.1.20] - 2023-09-17
### Changed
- Validate amount when adding receiving quantity.
diff --git a/package-lock.json b/package-lock.json
index 7d39356..042b4d8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "byjove",
- "version": "0.1.20",
+ "version": "0.1.21",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "byjove",
- "version": "0.1.20",
+ "version": "0.1.21",
"license": "GPL-3.0-or-later",
"dependencies": {
"vue": "^2.7.14"
diff --git a/package.json b/package.json
index 36853f5..8b9ccd1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "byjove",
- "version": "0.1.20",
+ "version": "0.1.21",
"description": "Generic-ish app components for Vue.js frontend to Tailbone API backend",
"keywords": [
"rattail",
From 95d6e41c813347a5cd89674980f2535a959dca4c Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Thu, 19 Oct 2023 14:39:01 -0500
Subject: [PATCH 04/16] Use columns instead of table, for row receiving
quantities
---
src/components/receiving/ByjoveReceiving.vue | 106 +++++++++----------
1 file changed, 50 insertions(+), 56 deletions(-)
diff --git a/src/components/receiving/ByjoveReceiving.vue b/src/components/receiving/ByjoveReceiving.vue
index c77fea4..1a9d040 100644
--- a/src/components/receiving/ByjoveReceiving.vue
+++ b/src/components/receiving/ByjoveReceiving.vue
@@ -30,62 +30,6 @@
1 CS = {{ row.case_quantity || 1 }} {{ row.unit_uom }}
-
-
- ordered |
-
-
- {{ row.cases_ordered || 0}} /
-
- {{ row.units_ordered || 0}}
- |
-
-
- shipped |
-
-
- {{ row.cases_shipped || 0}} /
-
- {{ row.units_shipped || 0}}
- |
-
-
- received |
-
-
- {{ row.cases_received || 0}} /
-
- {{ row.units_received || 0}}
- |
-
-
- damaged |
-
-
- {{ row.cases_damaged || 0}} /
-
- {{ row.units_damaged || 0}}
- |
-
-
- expired |
-
-
- {{ row.cases_expired || 0}} /
-
- {{ row.units_expired || 0}}
- |
-
-
- missing |
-
-
- {{ row.cases_missing || 0}} /
-
- {{ row.units_missing || 0}}
- |
-
-
@@ -93,6 +37,56 @@
+
+
+
+
+
+ ordered
+ {{ row.cases_ordered || 0 }} /
+ {{ row.units_ordered || 0}}
+
+
+
+ shipped
+ {{ row.cases_shipped || 0 }} /
+ {{ row.units_shipped || 0}}
+
+
+
+ received
+ {{ row.cases_received || 0 }} /
+ {{ row.units_received || 0}}
+
+
+
+
+
+
+ damaged
+ {{ row.cases_damaged || 0 }} /
+ {{ row.units_damaged || 0}}
+
+
+
+ expired
+ {{ row.cases_expired || 0 }} /
+ {{ row.units_expired || 0}}
+
+
+
+ missing
+ {{ row.cases_missing || 0 }} /
+ {{ row.units_missing || 0}}
+
+
+
+
+
+
From 4f355fc58f3f59defd2429c3de9412d486d34493 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Thu, 19 Oct 2023 14:56:03 -0500
Subject: [PATCH 05/16] Show invoice number when receiving row
also fix spacing for quantities display
---
src/components/receiving/ByjoveReceiving.vue | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/components/receiving/ByjoveReceiving.vue b/src/components/receiving/ByjoveReceiving.vue
index 1a9d040..35f6d6f 100644
--- a/src/components/receiving/ByjoveReceiving.vue
+++ b/src/components/receiving/ByjoveReceiving.vue
@@ -25,6 +25,11 @@
{{ row.description }} {{ row.size }}
+
+ Invoice # {{ row.invoice_number }}
+
+
1 CS = {{ row.case_quantity || 1 }} {{ row.unit_uom }}
@@ -42,20 +47,20 @@
+ style="display: flex; gap: 0.3rem;">
ordered
{{ row.cases_ordered || 0 }} /
{{ row.units_ordered || 0}}
+ style="display: flex; gap: 0.3rem;">
shipped
{{ row.cases_shipped || 0 }} /
{{ row.units_shipped || 0}}
-
+
received
{{ row.cases_received || 0 }} /
{{ row.units_received || 0}}
@@ -64,20 +69,20 @@
-
+
damaged
{{ row.cases_damaged || 0 }} /
{{ row.units_damaged || 0}}
+ style="display: flex; gap: 0.3rem;">
expired
{{ row.cases_expired || 0 }} /
{{ row.units_expired || 0}}
-
+
missing
{{ row.cases_missing || 0 }} /
{{ row.units_missing || 0}}
From e6012bddb86f8155c3c78d5ba8d77f0d7734d14f Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Thu, 19 Oct 2023 15:16:31 -0500
Subject: [PATCH 06/16] Center receiving buttons; add "12 EA" quick receive
button
---
src/components/receiving/ByjoveReceiving.vue | 50 ++++++++++++--------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/src/components/receiving/ByjoveReceiving.vue b/src/components/receiving/ByjoveReceiving.vue
index 35f6d6f..9b11867 100644
--- a/src/components/receiving/ByjoveReceiving.vue
+++ b/src/components/receiving/ByjoveReceiving.vue
@@ -118,28 +118,36 @@
expanded>
{{ row.quick_receive_text }}
-
-
-
- Receive 1 CS
-
-
-
+
+
+ Receive 1 CS
+
+
1 {{ row.unit_uom }}
3 {{ row.unit_uom }}
6 {{ row.unit_uom }}
+
+ 12 {{ row.unit_uom }}
+
@@ -203,15 +211,17 @@
OR
@@ -383,6 +393,6 @@ export default {
padding: 0px 10px 0px 0px;
}
.input.receiving-quantity-input {
- width: 10rem;
+ width: 6rem;
}
From 0f56b478fc8ca022c7820de1154dd93a058ec67b Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Mon, 23 Oct 2023 13:13:08 -0500
Subject: [PATCH 07/16] Update changelog
---
CHANGELOG.md | 6 ++++++
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebb06b4..6f4a7c6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to 'byjove' will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [0.1.22] - 2023-10-23
+### Changed
+- Use columns instead of table, for row receiving quantities.
+- Show invoice number when receiving row.
+- Center receiving buttons; add "12 EA" quick receive button.
+
## [0.1.21] - 2023-10-06
### Changed
- Auto-trim username field in login form.
diff --git a/package-lock.json b/package-lock.json
index 042b4d8..dbc67a5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "byjove",
- "version": "0.1.21",
+ "version": "0.1.22",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "byjove",
- "version": "0.1.21",
+ "version": "0.1.22",
"license": "GPL-3.0-or-later",
"dependencies": {
"vue": "^2.7.14"
diff --git a/package.json b/package.json
index 8b9ccd1..0145795 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "byjove",
- "version": "0.1.21",
+ "version": "0.1.22",
"description": "Generic-ish app components for Vue.js frontend to Tailbone API backend",
"keywords": [
"rattail",
From 0609fdebf7cae3c4d8642edfa940c602ab384e18 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Mon, 11 Dec 2023 13:16:59 -0600
Subject: [PATCH 08/16] Improve focus behavior for inventory count view
---
src/components/inventory/ByjoveInventory.vue | 23 +++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/components/inventory/ByjoveInventory.vue b/src/components/inventory/ByjoveInventory.vue
index 31e84e7..b6201c7 100644
--- a/src/components/inventory/ByjoveInventory.vue
+++ b/src/components/inventory/ByjoveInventory.vue
@@ -83,6 +83,10 @@ export default {
type: Boolean,
default: true,
},
+ focusCases: {
+ type: Boolean,
+ default: false,
+ },
allowEdit: {
type: Boolean,
default: false,
@@ -92,6 +96,7 @@ export default {
default: false,
},
},
+
data() {
return {
row: {},
@@ -102,16 +107,6 @@ export default {
this.fetch(this.$route.params.uuid)
},
- updated() {
- this.$nextTick(() => {
- if (this.shouldAllowCases()) {
- this.$refs.cases.focus()
- } else {
- this.$refs.units.focus()
- }
- })
- },
-
methods: {
getIndexUrl() {
@@ -165,6 +160,14 @@ export default {
if (this.row.batch_executed || this.row.batch_complete) {
// cannot edit this row, so view it instead
this.$router.push(this.getViewUrl())
+ } else {
+ this.$nextTick(() => {
+ if (this.shouldAllowCases() && this.focusCases) {
+ this.$refs.cases.focus()
+ } else {
+ this.$refs.units.focus()
+ }
+ })
}
}, response => {
if (response.status == 403) { // forbidden; redirect to model index
From 7bc9991be0893b59fb516dd75b89b8b8b146c722 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Wed, 20 Dec 2023 11:48:09 -0600
Subject: [PATCH 09/16] Keep row filters "raw" until encoding for actual
request
so there is no need to use `JSON.stringify()` everywhere, keep that
part in just one place
---
src/components/model-crud/ByjoveModelCrud.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/model-crud/ByjoveModelCrud.vue b/src/components/model-crud/ByjoveModelCrud.vue
index 20f223f..6b3af32 100644
--- a/src/components/model-crud/ByjoveModelCrud.vue
+++ b/src/components/model-crud/ByjoveModelCrud.vue
@@ -189,10 +189,10 @@ export default {
rowFilters: {
type: Function,
default: (uuid) => {
- return JSON.stringify([
+ return [
{field: 'batch_uuid', op: 'eq', value: uuid},
{field: 'removed', op: 'eq', value: false},
- ])
+ ]
},
},
rowOrderBy: {
@@ -538,7 +538,7 @@ export default {
fetchRows(uuid) {
let params = {
- filters: this.rowFilters(uuid),
+ filters: JSON.stringify(this.rowFilters(uuid)),
orderBy: this.rowOrderBy,
ascending: this.rowOrderAscending ? 1 : 0,
}
From 86fbf8f16426e285c4ee4f0f3565eb51e5049841 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Tue, 26 Dec 2023 20:22:43 -0600
Subject: [PATCH 10/16] Update changelog
---
CHANGELOG.md | 5 +++++
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f4a7c6..ef68469 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ All notable changes to 'byjove' will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [0.1.23] - 2023-12-26
+### Changed
+- Improve focus behavior for inventory count view.
+- Keep row filters "raw" until encoding for actual request.
+
## [0.1.22] - 2023-10-23
### Changed
- Use columns instead of table, for row receiving quantities.
diff --git a/package-lock.json b/package-lock.json
index dbc67a5..ec60d20 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "byjove",
- "version": "0.1.22",
+ "version": "0.1.23",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "byjove",
- "version": "0.1.22",
+ "version": "0.1.23",
"license": "GPL-3.0-or-later",
"dependencies": {
"vue": "^2.7.14"
diff --git a/package.json b/package.json
index 0145795..fcf9055 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "byjove",
- "version": "0.1.22",
+ "version": "0.1.23",
"description": "Generic-ish app components for Vue.js frontend to Tailbone API backend",
"keywords": [
"rattail",
From 18936d9efd082539fcee4f8179a90f152857aa07 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Fri, 29 Dec 2023 19:38:41 -0600
Subject: [PATCH 11/16] Add delay when fetching rows data for model CRUD
component
hoping this actually works, but can't reproduce the problem locally so
will just have to wait and see
---
src/components/model-crud/ByjoveModelCrud.vue | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/components/model-crud/ByjoveModelCrud.vue b/src/components/model-crud/ByjoveModelCrud.vue
index 6b3af32..25068f0 100644
--- a/src/components/model-crud/ByjoveModelCrud.vue
+++ b/src/components/model-crud/ByjoveModelCrud.vue
@@ -511,7 +511,14 @@ export default {
this.record = response.data.data
this.$emit('refresh', this.record)
if (this.hasRows) {
- this.fetchRows(uuid)
+ // TODO: was seeing occasional errors when a batch
+ // view was loaded, and it tried to fetch rows but
+ // somehow the uuid was not passed along and
+ // server failed to build a query filter. so
+ // hoping the nextTick() delay fixes it..?
+ this.$nextTick(() => {
+ this.fetchRows(uuid)
+ })
}
}, response => {
if (response.status == 403) { // forbidden
From b6e8b74eefbea6c0eb3cafd1dbe025592029424e Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Tue, 26 Mar 2024 12:57:49 -0500
Subject: [PATCH 12/16] Update changelog
---
CHANGELOG.md | 6 ++++++
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef68469..07a00a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to 'byjove' will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## Unreleased
+
+## [0.1.24] - 2024-03-26
+### Changed
+- Add delay when fetching rows data for model CRUD component.
+
## [0.1.23] - 2023-12-26
### Changed
- Improve focus behavior for inventory count view.
diff --git a/package-lock.json b/package-lock.json
index ec60d20..5524b23 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "byjove",
- "version": "0.1.23",
+ "version": "0.1.24",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "byjove",
- "version": "0.1.23",
+ "version": "0.1.24",
"license": "GPL-3.0-or-later",
"dependencies": {
"vue": "^2.7.14"
diff --git a/package.json b/package.json
index fcf9055..d0dbfc9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "byjove",
- "version": "0.1.23",
+ "version": "0.1.24",
"description": "Generic-ish app components for Vue.js frontend to Tailbone API backend",
"keywords": [
"rattail",
From 32d1bd430f85240d51c13639bce805e660d65a57 Mon Sep 17 00:00:00 2001
From: Lance Edgar
Date: Thu, 11 Apr 2024 14:14:01 -0500
Subject: [PATCH 13/16] 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 14/16] 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 15/16] 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