diff --git a/pos/static/js/brand-catalog.js b/pos/static/js/brand-catalog.js index 7e3f959..b02c667 100644 --- a/pos/static/js/brand-catalog.js +++ b/pos/static/js/brand-catalog.js @@ -9,6 +9,8 @@ _limit: 50, _total: 0, + el: function(id) { return document.getElementById(id); }, + _getToken: function() { return localStorage.getItem('pos_token'); }, @@ -30,8 +32,6 @@ return true; }, - el: function(id) { return document.getElementById(id); }, - show: function() { if (!this._getToken()) { window.location.href = '/pos/login'; @@ -56,6 +56,7 @@ this._allBrands = []; this._offset = 0; this._total = 0; + this.el('brandCatalogSearch').innerHTML = ''; }, loading: function(on) { @@ -66,6 +67,10 @@ this.el('brandCatalogContent').innerHTML = html; }, + setSearch: function(html) { + this.el('brandCatalogSearch').innerHTML = html; + }, + setBreadcrumb: function(html) { this.el('brandCatalogBreadcrumb').innerHTML = html; }, @@ -75,6 +80,12 @@ this.loading(true); this.state = 'brands'; this.setBreadcrumb('Marcas de vehiculo'); + this.setSearch( + '' + ); var self = this; fetch('/pos/api/catalog/vehicle-brands', { headers: this._headers() }) .then(function(r) { @@ -98,12 +109,7 @@ }, renderBrandList: function(brands) { - var html = '
No se encontraron refacciones.
' + diff --git a/pos/templates/catalog.html b/pos/templates/catalog.html index 61769ff..a470b88 100644 --- a/pos/templates/catalog.html +++ b/pos/templates/catalog.html @@ -277,6 +277,7 @@