diff --git a/front/core/components/searchbar/searchbar.js b/front/core/components/searchbar/searchbar.js index dff4836dbd..10ec1f6085 100644 --- a/front/core/components/searchbar/searchbar.js +++ b/front/core/components/searchbar/searchbar.js @@ -290,7 +290,7 @@ export default class Searchbar extends Component { } let where = null; - let params = null; + let params = {}; if (this.exprBuilder) { where = buildFilter(filter, diff --git a/front/core/components/smart-table/index.js b/front/core/components/smart-table/index.js index 31541143cc..8d2c3c1531 100644 --- a/front/core/components/smart-table/index.js +++ b/front/core/components/smart-table/index.js @@ -19,9 +19,11 @@ export default class SmartTable extends Component { this.transclude(); } - $onInit() { - if (this.model) + $onChanges() { + if (this.model) { this.defaultFilter(); + this.defaultOrder(); + } } $onDestroy() { @@ -53,11 +55,8 @@ export default class SmartTable extends Component { set model(value) { this._model = value; - if (value) { + if (value) this.$.model = value; - this.defaultFilter(); - this.defaultOrder(); - } } getDefaultViewConfig() { @@ -168,7 +167,8 @@ export default class SmartTable extends Component { } defaultFilter() { - if (!this.$params.q) return; + if (this.disabledTableFilter || !this.$params.q) return; + const stateFilter = JSON.parse(this.$params.q).tableQ; if (!stateFilter || !this.exprBuilder) return; @@ -188,6 +188,8 @@ export default class SmartTable extends Component { } defaultOrder() { + if (this.disabledTableOrder) return; + let stateOrder; if (this.$params.q) stateOrder = JSON.parse(this.$params.q).tableOrder; @@ -607,6 +609,8 @@ ngModule.vnComponent('smartTable', { autoSave: '
- @@ -34,18 +34,18 @@ - - -
Item ID + Description Warehouse P.P.U. P.P.P. @@ -170,7 +170,7 @@ - + - \ No newline at end of file + diff --git a/modules/item/front/fixed-price/index.js b/modules/item/front/fixed-price/index.js index b84c2cc2da..89ce0b1728 100644 --- a/modules/item/front/fixed-price/index.js +++ b/modules/item/front/fixed-price/index.js @@ -12,14 +12,6 @@ export default class Controller extends Section { }, defaultSearch: true, columns: [ - { - field: 'itemName', - autocomplete: { - url: 'Items', - showField: 'name', - valueField: 'id' - } - }, { field: 'warehouseFk', autocomplete: { @@ -105,8 +97,8 @@ export default class Controller extends Section { exprBuilder(param, value) { switch (param) { - case 'itemName': - return {'i.id': value}; + case 'name': + return {'i.name': {like: `%${value}%`}}; case 'itemFk': case 'warehouseFk': case 'rate2': diff --git a/modules/monitor/front/index/clients/index.html b/modules/monitor/front/index/clients/index.html index eafc2256ee..381c0e1ae5 100644 --- a/modules/monitor/front/index/clients/index.html +++ b/modules/monitor/front/index/clients/index.html @@ -19,22 +19,24 @@ - @@ -100,9 +102,9 @@ - - \ No newline at end of file + diff --git a/modules/route/front/routes.json b/modules/route/front/routes.json index f5e7d9ae85..75e1fdc576 100644 --- a/modules/route/front/routes.json +++ b/modules/route/front/routes.json @@ -39,7 +39,7 @@ "abstract": true, "component": "vn-route-card" }, { - "url": "/agency-term", + "url": "/agency-term?q", "abstract": true, "state": "route.agencyTerm", "component": "ui-view" @@ -49,12 +49,12 @@ "component": "vn-agency-term-index", "description": "Autonomous", "acl": ["administrative"] - },{ + },{ "url": "/createInvoiceIn?q", "state": "route.agencyTerm.createInvoiceIn", "component": "vn-agency-term-create-invoice-in", "description": "File management", - "params": { + "params": { "route": "$ctrl.route" }, "acl": ["administrative"] @@ -92,4 +92,4 @@ "acl": ["delivery"] } ] -} \ No newline at end of file +}