diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js index b1f189cde..0ae520888 100644 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js @@ -35,6 +35,7 @@ Ext.define('PartKeepr.PartFilterPanel', { stockFilter: null, partsWithoutPrice: null, distributorOrderNumberFilter: null, + manufacturerPartNumberFilter: null, createDateField: null, createDateFilterSelect: null, createDateFilter: null, @@ -91,6 +92,7 @@ Ext.define('PartKeepr.PartFilterPanel', { this.distributorOrderNumberFilter, this.distributorFilter, this.manufacturerFilter, + this.manufacturerPartNumberFilter, this.footprintFilter, this.statusFilter, this.conditionFilter, @@ -161,6 +163,7 @@ Ext.define('PartKeepr.PartFilterPanel', { this.categoryFilter.setValue({category: 'all'}); this.stockFilter.setValue({stock: 'any'}); this.distributorOrderNumberFilter.setValue(""); + this.manufacturerPartNumberFilter.setValue(""); this.createDateFilterSelect.setValue(""); this.createDateField.setValue(""); @@ -280,6 +283,11 @@ Ext.define('PartKeepr.PartFilterPanel', { anchor: '100%' }); + this.manufacturerPartNumberFilter = Ext.create("Ext.form.field.Text", { + fieldLabel: i18n("Manufacturer Part Number"), + anchor: '100%' + }); + this.createDateField = Ext.create("Ext.form.field.Date", { flex: 1 }); @@ -534,6 +542,14 @@ Ext.define('PartKeepr.PartFilterPanel', { })); } + if (this.manufacturerPartNumberFilter.getValue() !== "") { + filters.push(Ext.create("Ext.util.Filter", { + property: 'manufacturers.partNumber', + operator: "LIKE", + value: "%" + this.manufacturerPartNumberFilter.getValue() + "%" + })); + } + if (this.distributorFilterCheckbox.getValue() === true) { filters.push(Ext.create("Ext.util.Filter", { property: 'distributors.distributor',