From 78b0227dc3367a64c08a91401cae94fb36727a82 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 18 Mar 2021 19:07:30 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 30 +++++++++++---- ayanova/src/components/data-table.vue | 38 ++++++++++++------- ayanova/src/views/acc-service-banks.vue | 20 +--------- ayanova/src/views/cust-customer-notes.vue | 2 +- ayanova/src/views/home-reviews.vue | 21 +--------- .../views/inv-part-inventory-transactions.vue | 1 + ayanova/src/views/inv-part-inventory.vue | 13 +++++++ ayanova/src/views/inv-part-warehouse.vue | 10 ++++- ayanova/src/views/inv-part.vue | 10 ++++- 9 files changed, 81 insertions(+), 64 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 3ea49e2b..4c0bf378 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -57,20 +57,33 @@ todo: v8 migrate additions ## CLIENT MISC ITEMS + +todo: Reviews are showing for all users for all users + sb superuser can see all and biz admin can see all but anyone else just sees their own??? + but supervisor shoudl be able to see any reviews related to their areas?? + hmm... what was it in v7?? + .......................................................................................................... * todo JC misc list: +Ability to remove (optional) data table filter set internally when viewing from objects own menu for partinventory, inventorytransactions, reviews, servicebank + Not from customernotes which uses same system + prefilterMode:{icon:null,viz:null,ayatype:null,id:null,clearable:false} + emits event when turning off prefilter so parent form can remove -Can part inventory list also show on order and on order committed? - -select vpartinventorynow.*,vpartsonordercommitted.quantityonordercommitted,vpartsonorderuncommitted.quantityonorder from vpartinventorynow -left outer join vpartsonordercommitted on (vpartinventorynow.partid = vpartsonordercommitted.partid and vpartinventorynow.partwarehouseid = vpartsonordercommitted.partwarehouseid) -left outer join vpartsonorderuncommitted on (vpartinventorynow.partid = vpartsonorderuncommitted.partid and vpartinventorynow.partwarehouseid = vpartsonorderuncommitted.partwarehouseid) -left outer join apart on (vpartinventorynow.partid=apart.id) -left outer join apartwarehouse on (vpartinventorynow.partwarehouseid=apartwarehouse.id) + - show icon at top like review or service bank but inside datatable instead, make it part of datatable and remove from outer form + set with property for icon + - show object name at top with link like in review but inside table instead set with property for link + - show text indicating filtered or a filter icon and a button to remove that filter with property to indicate this is an option + - when grid has client critiera set then the above all kicks in, but it's opt in, not out + - when optional client crit filter ui is showing then the normal filter select list and stuff is hidden, you can't save this filter or select another or rename or ... + it must be removed first to do normal filtering header stuff (column filters still work) **Part inventory list view will NOT show all parts if previously selected to view the actual part inventory for a single part. I have listed how to recreate: -- from Parts listview, select a specific part - i.e. 0513678 -> which opens its part form -> select menu option Part Inventory -> which shows list view Part Inventory for ONLY this part and warehouses where has inventory -> click on hamburger menu selecting the main Part Inventory list - nothing happens, the list stays showing ONLY for that specific part. There's no filter to remove, refreshing makes no difference. IF select a completely different list view (i.e. Parts or Customers) to view that list AND THEN go back and select Part INventory list, now will see Part Inventory for all parts. +- from Parts listview, select a specific part - i.e. 0513678 -> which opens its part form -> select menu option Part Inventory -> which shows list view Part Inventory for ONLY +this part and warehouses where has inventory -> click on hamburger menu selecting the main Part Inventory list - nothing happens, + the list stays showing ONLY for that specific part. There's no filter to remove, refreshing makes no difference. + IF select a completely different list view (i.e. Parts or Customers) to view that list AND THEN go back and select Part INventory list, now will see Part Inventory for all parts. 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 @@ -968,6 +981,7 @@ build 105 PO item Receive button confusing as it receives all, change text to receive all PO item table to optionally show part Name field and show hide via customize form PO item not showing taxaviz and taxbviz + Part inventory list also show on order and on order committed - 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/components/data-table.vue b/ayanova/src/components/data-table.vue index ba61247b..8efc6170 100644 --- a/ayanova/src/components/data-table.vue +++ b/ayanova/src/components/data-table.vue @@ -21,20 +21,26 @@ - - + +
@@ -453,6 +459,10 @@ export default { type: String, default: undefined }, + preFilterMode: {//{icon:null,viz:null,ayatype:null,id:null,clearable:false} + type: Object, + default: null + }, showSelect: { type: Boolean, default: false diff --git a/ayanova/src/views/acc-service-banks.vue b/ayanova/src/views/acc-service-banks.vue index 0457140e..e3f99cde 100644 --- a/ayanova/src/views/acc-service-banks.vue +++ b/ayanova/src/views/acc-service-banks.vue @@ -41,26 +41,8 @@ export default { vm.$route.params.objectType ); + //OPTIONAL FILTER if (vm.objectId && vm.objectId != 0 && vm.objectType) { - // //DYNAMIC FILTER - // vm.mxetaView = JSON.stringify([ - // { - // fld: "metaservicebankobjectid", - // filter: { - // items: [{ op: "=", value: vm.objectId }] - // } - // }, - // { - // fld: "AyaType", - // filter: { - // items: [{ op: "=", value: vm.objectType }] - // } - // } - // ]); - // vm.name = await window.$gz.api.fetchBizObjectName( - // vm.objectType, - // vm.objectId - // ); //OBJECTID,AYATYPE vm.clientCriteria = `${vm.objectId},${vm.objectType}`; } diff --git a/ayanova/src/views/cust-customer-notes.vue b/ayanova/src/views/cust-customer-notes.vue index 803d4ef2..a008bebc 100644 --- a/ayanova/src/views/cust-customer-notes.vue +++ b/ayanova/src/views/cust-customer-notes.vue @@ -43,7 +43,7 @@ const FORM_KEY = "cust-customer-notes"; export default { created() { this.customerId = parseInt(this.$route.params.customerid); - //MIXED STATIC But with provided criteria FILTER + //REQUIRED NON-OPTIONAL FILTER this.clientCriteria = this.customerId.toString(); this.rights = window.$gz.role.getRights(window.$gz.type.CustomerNote); window.$gz.eventBus.$on("menu-click", clickHandler); diff --git a/ayanova/src/views/home-reviews.vue b/ayanova/src/views/home-reviews.vue index 969ac005..08297554 100644 --- a/ayanova/src/views/home-reviews.vue +++ b/ayanova/src/views/home-reviews.vue @@ -40,27 +40,8 @@ export default { vm.$route.params.objectType ); + //OPTIONAL FILTER if (vm.objectId && vm.objectId != 0 && vm.objectType) { - //REMOVE COMMENT BLOCK AFTER TESTING - // //pre-filter - // vm.mxetaView = JSON.stringify([ - // { - // fld: "metareviewobjectid", - // filter: { - // items: [{ op: "=", value: vm.objectId }] - // } - // }, - // { - // fld: "AyaType", - // filter: { - // items: [{ op: "=", value: vm.objectType }] - // } - // } - // ]); - // vm.name = await window.$gz.api.fetchBizObjectName( - // vm.objectType, - // vm.objectId - // ); //OBJECTID,AYATYPE vm.clientCriteria = `${vm.objectId},${vm.objectType}`; } diff --git a/ayanova/src/views/inv-part-inventory-transactions.vue b/ayanova/src/views/inv-part-inventory-transactions.vue index 508ecfc6..1636a2d1 100644 --- a/ayanova/src/views/inv-part-inventory-transactions.vue +++ b/ayanova/src/views/inv-part-inventory-transactions.vue @@ -31,6 +31,7 @@ export default { //Generate client criteria to send if filtered by part, whs or both //ClientCriteria is optional for this list, Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter + //OPTIONAL FILTER if (vm.$route.params.filter) { vm.clientCriteria = `${ vm.$route.params.filter.PartPartNumber diff --git a/ayanova/src/views/inv-part-inventory.vue b/ayanova/src/views/inv-part-inventory.vue index 945abb8c..f9ee31c6 100644 --- a/ayanova/src/views/inv-part-inventory.vue +++ b/ayanova/src/views/inv-part-inventory.vue @@ -14,6 +14,7 @@ :show-select="rights.read" :reload="reload" :client-criteria="clientCriteria" + :pre-filter-mode="preFilterMode" @selection-change="handleSelected" data-cy="partInventoryTable" > @@ -31,7 +32,18 @@ export default { //Generate client criteria to send if filtered by part, whs or both //ClientCriteria is optional for this list, Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter + //OPTIONAL FILTER if (vm.$route.params.filter) { + vm.preFilterMode = { + icon: vm.$route.params.filter.icon, + id: window.$gz.util.stringToIntOrNull(vm.$route.params.filter.objectId), + ayatype: window.$gz.util.stringToIntOrNull( + vm.$route.params.filter.ayatype + ), + viz: vm.$route.params.filter.viz, + clearable: true + }; + vm.clientCriteria = `${ vm.$route.params.filter.PartPartNumber ? vm.$route.params.filter.PartPartNumber @@ -54,6 +66,7 @@ export default { ayType: window.$gz.type.PartInventory, selectedItems: [], clientCriteria: undefined, + preFilterMode: null, reload: false }; }, diff --git a/ayanova/src/views/inv-part-warehouse.vue b/ayanova/src/views/inv-part-warehouse.vue index 42365d6a..9e0e01b2 100644 --- a/ayanova/src/views/inv-part-warehouse.vue +++ b/ayanova/src/views/inv-part-warehouse.vue @@ -494,7 +494,15 @@ async function clickHandler(menuItem) { case "PartByWarehouseInventoryList": m.vm.$router.push({ name: "inv-part-inventory", - params: { filter: { PartWarehouseName: m.vm.obj.name } } + params: { + filter: { + PartWarehouseName: m.vm.obj.name, + objectId: m.vm.obj.id, + ayatype: window.$gz.type.PartWarehouse, + viz: m.vm.obj.name, + icon: "$ayiWarehouse" + } + } }); break; case "PartInventoryTransactionList": diff --git a/ayanova/src/views/inv-part.vue b/ayanova/src/views/inv-part.vue index 79ca3259..3a92b686 100644 --- a/ayanova/src/views/inv-part.vue +++ b/ayanova/src/views/inv-part.vue @@ -721,7 +721,15 @@ async function clickHandler(menuItem) { case "PartByWarehouseInventoryList": m.vm.$router.push({ name: "inv-part-inventory", - params: { filter: { PartPartNumber: m.vm.obj.partNumber } } + params: { + filter: { + PartPartNumber: m.vm.obj.partNumber, + objectId: m.vm.obj.id, + ayatype: window.$gz.type.Part, + viz: m.vm.obj.partNumber + " " + m.vm.obj.name, + icon: "$ayiBoxes" + } + } }); break; case "PartInventoryTransactionList":