diff --git a/source/static/js/ui/admin.js b/source/static/js/ui/admin.js index 89a8b10..a2833e2 100644 --- a/source/static/js/ui/admin.js +++ b/source/static/js/ui/admin.js @@ -762,6 +762,31 @@ var options_admin_partners = [ ] +var grid_warehouse_cols = [ + {id: 'id', header: 'ID', hidden: true}, + {id: 'delete', header: '', width: 30, css: 'delete'}, + {id: 'name', header: 'Nombre', fillspace: 1}, +] + + +var grid_warehouse = { + view: 'datatable', + id: 'grid_warehouse', + select: 'row', + adjust: true, + headermenu: true, + footer: true, + columns: grid_warehouse_cols, + on:{ + 'data->onStoreUpdated':function(){ + this.data.each(function(obj, i){ + obj.delete = '-' + }) + } + }, +} + + var options_admin_products = [ {maxHeight: 20}, {cols: [{view: 'checkbox', id: 'chk_config_cuenta_predial', labelWidth: 15, @@ -774,6 +799,19 @@ var options_admin_products = [ labelRight: 'Mostrar inventario'}]}, {cols: [{maxWidth: 30}, {view: 'checkbox', id: 'chk_multi_stock', labelWidth: 15, labelRight: 'Multialmacen', disabled: true}]}, + {cols: [{maxWidth: 30}, {rows: [ + {template: 'Agregar Almacen', type: 'section'}, + {cols: [ + {view: 'text', id: 'txt_add_wharehouse', label: 'Nombre: ', + labelPosition: 'left', required: true}, + {view: 'button', id: 'cmd_add_wharehouse', label: 'Agregar', + autowidth: true, type: 'iconButton', icon: 'plus'}, + ]}, + {template: 'Almacenes', type: 'section'}, + grid_warehouse, + ]}, {}, + ]} + //~ {cols: [{view: 'checkbox', id: 'chk_use_packing', labelWidth: 15, //~ labelRight: 'Usar empaques', hidden: true}]}, ]