diff --git a/ayanova/src/views/inv-part-inventory-transactions.vue b/ayanova/src/views/inv-part-inventory-transactions.vue index 1636a2d1..910b7675 100644 --- a/ayanova/src/views/inv-part-inventory-transactions.vue +++ b/ayanova/src/views/inv-part-inventory-transactions.vue @@ -16,6 +16,8 @@ :client-criteria="clientCriteria" @selection-change="handleSelected" data-cy="partInventoryTransactionsTable" + :pre-filter-mode="preFilterMode" + @clear-pre-filter="clearPreFilter" > @@ -33,6 +35,16 @@ export default { //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 @@ -55,12 +67,18 @@ export default { ayType: window.$gz.type.PartInventory, selectedItems: [], clientCriteria: undefined, + preFilterMode: null, reload: false }; }, methods: { handleSelected(selected) { this.selectedItems = selected; + }, + clearPreFilter() { + this.clientCriteria = null; + this.preFilterMode = null; + this.reload = !this.reload; } } }; diff --git a/ayanova/src/views/inv-part-inventory.vue b/ayanova/src/views/inv-part-inventory.vue index 527eddb1..c5a0e27d 100644 --- a/ayanova/src/views/inv-part-inventory.vue +++ b/ayanova/src/views/inv-part-inventory.vue @@ -14,10 +14,10 @@ :show-select="rights.read" :reload="reload" :client-criteria="clientCriteria" - :pre-filter-mode="preFilterMode" @selection-change="handleSelected" - @clear-pre-filter="clearPreFilter" data-cy="partInventoryTable" + :pre-filter-mode="preFilterMode" + @clear-pre-filter="clearPreFilter" > diff --git a/ayanova/src/views/inv-part-warehouse.vue b/ayanova/src/views/inv-part-warehouse.vue index 9e0e01b2..9d8c3455 100644 --- a/ayanova/src/views/inv-part-warehouse.vue +++ b/ayanova/src/views/inv-part-warehouse.vue @@ -508,7 +508,15 @@ async function clickHandler(menuItem) { case "PartInventoryTransactionList": m.vm.$router.push({ name: "inv-part-inventory-transactions", - 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; default: diff --git a/ayanova/src/views/inv-part.vue b/ayanova/src/views/inv-part.vue index 3a92b686..31c3a138 100644 --- a/ayanova/src/views/inv-part.vue +++ b/ayanova/src/views/inv-part.vue @@ -735,7 +735,15 @@ async function clickHandler(menuItem) { case "PartInventoryTransactionList": m.vm.$router.push({ name: "inv-part-inventory-transactions", - 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;