From c00626ebca9227479842d459ad7074321d23df88 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 19 Mar 2021 00:07:22 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 ++- ayanova/src/views/inv-part-adjustment.vue | 7 +++++++ .../views/inv-part-inventory-transactions.vue | 16 ++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 25f995ad..2c362725 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -66,7 +66,7 @@ todo: Reviews are showing for all users for all users .......................................................................................................... * todo JC misc list: -Part inventory adjustment adding from list that is already restricted to one part only (coming from part form menu) should pre-select the part in the new adjustment form if it came from a restricted list to one part already. + Inventory limited role is presented delete button in part assembly list, should only be able to view Accounting role: @@ -966,6 +966,7 @@ build 105 Ability to remove (optional) data table filter set internally when viewing from objects own menu for partinventory, inventorytransactions, reviews, servicebank (was: **Part inventory list view will NOT show all parts if previously selected to view the actual part inventory for a single part.) FIX: Added UI elements at top of grid to remove single object filter (where applicable) and display which object(s) data is displaying consistently + Part inventory adjustment adding from list that is already restricted to one part [OR WAREHOUSE] only (coming from part [OR WAREHOUSE] form menu) should pre-select the part [OR WAREHOUSE] in the new adjustment form - not changed Tag extension should have tag picker instead of empty field in cases where you are picking from existing tags diff --git a/ayanova/src/views/inv-part-adjustment.vue b/ayanova/src/views/inv-part-adjustment.vue index 491437a4..a6ca30d3 100644 --- a/ayanova/src/views/inv-part-adjustment.vue +++ b/ayanova/src/views/inv-part-adjustment.vue @@ -92,6 +92,13 @@ export default { try { await initForm(vm); + vm.obj.partId = window.$gz.util.stringToIntOrNull( + vm.$route.params.partId + ); + vm.obj.partWarehouseId = window.$gz.util.stringToIntOrNull( + vm.$route.params.partWarehouseId + ); + vm.rights = window.$gz.role.getRights(window.$gz.type.PartInventory); vm.formState.readOnly = !vm.rights.change; window.$gz.eventBus.$on("menu-click", clickHandler); diff --git a/ayanova/src/views/inv-part-inventory-transactions.vue b/ayanova/src/views/inv-part-inventory-transactions.vue index 910b7675..0925bb66 100644 --- a/ayanova/src/views/inv-part-inventory-transactions.vue +++ b/ayanova/src/views/inv-part-inventory-transactions.vue @@ -65,6 +65,8 @@ export default { return { rights: window.$gz.role.defaultRightsObject(), ayType: window.$gz.type.PartInventory, + objectId: null, + objectType: null, selectedItems: [], clientCriteria: undefined, preFilterMode: null, @@ -94,9 +96,19 @@ async function clickHandler(menuItem) { if (m.owner == FORM_KEY && !m.disabled) { switch (m.key) { case "new": + let partId = null; + let partWarehouseId = null; + + if (m.vm.preFilterMode) { + if (m.vm.preFilterMode.ayatype == window.$gz.type.Part) { + partId = m.vm.preFilterMode.id; + } else { + partWarehouseId = m.vm.preFilterMode.id; + } + } m.vm.$router.push({ - name: "inv-part-adjustment" - //, params: { recordid: 0 } + name: "inv-part-adjustment", + params: { partId: partId, partWarehouseId: partWarehouseId } }); break; case "extensions":