diff --git a/migrations/20190724115041_v0.13.0.js b/migrations/20190724115041_v0.13.0.js new file mode 100644 index 0000000..57e7844 --- /dev/null +++ b/migrations/20190724115041_v0.13.0.js @@ -0,0 +1,20 @@ + +exports.up = function(knex) { + return knex.schema + .table('articulos', function (table) { + table.string('nombreImagen'); + }) + .table('atarjetas', function (table) { + table.string('nombreImagen'); + }); +}; + +exports.down = function(knex) { + return knex.schema + .table('articulos', function (table) { + table.dropColumn('nombreImagen'); + }) + .table('atarjetas', function (table) { + table.dropColumn('nombreImagen'); + }); +}; diff --git a/seeds/boton.js b/seeds/boton.js new file mode 100644 index 0000000..44a87cc --- /dev/null +++ b/seeds/boton.js @@ -0,0 +1,134 @@ +exports.seed = function (knex) { + return knex('boton').truncate() + .then(function () { + // TODO: Categorizar botones por id de aplicación. + return knex('boton').insert([ + { + texto: 'Nota Pedido', + clase: 'botonera-principal-nota-pedido', + accion: '/venta-nota-pedido/crear', + app: 'distribuidor' + }, + { + texto: 'Autorizar nota de pedido', + clase: 'botonera-principal-autorizar-nota', + accion: '/autorizar-nota-pedido', + app: '' + }, + { + texto: 'Remito', + clase: 'botonera-principal-remito', + accion: '/venta-remito/crear', + app: '' + }, + { + texto: 'Control de stock de vehículos', + clase: 'botonera-principal-estado-cisterna', + accion: '/estado-cisterna', + app: '' + }, + { + texto: 'Logistica pedidos', + clase: 'botonera-principal-logistica', + accion: '/logistica-pedido-ruta', + app: '' + }, + { + texto: 'Crear Hoja de Ruta', + clase: 'botonera-principal-hoja-ruta', + accion: '/venta-hoja-ruta/crear', + app: '' + }, + { + texto: 'Activar Hoja de Ruta', + clase: 'botonera-principal-activar-hoja-ruta', + accion: '/hoja-ruta/activar', + app: '' + }, + { + texto: 'Cobranzas', + clase: 'botonera-principal-cobranzas', + accion: '/cobranza/crear', + app: 'cobranza' + }, + { + texto: 'Agendar Visita', + clase: 'botonera-principal-agendar-visita', + accion: '/visita/agendar', + app: '' + }, + { + texto: 'Informes', + clase: 'botonera-principal-informes', + accion: '/informes', + app: '' + }, + { + texto: 'Seguimiento Nota Pedido', + clase: 'botonera-principal-seguimiento', + accion: '/admin-seguimiento/nota-pedido', + app: '' + }, + { + texto: 'Seguimiento Hoja de Ruta', + clase: 'botonera-principal-seguimiento-hoja-ruta', + accion: '/admin-seguimiento/hoja-ruta', + app: '' + }, + { + texto: 'Seguimiento Cobranzas', + clase: 'botonera-principal-seguimiento-cobranzas', + accion: '/admin-seguimiento/cobranza', + app: '' + }, + { + texto: 'Vendedores / Cobradores', + clase: 'botonera-principal-vendedor-cobrador', + accion: '/vendedor-cobrador', + app: '' + }, + { + texto: 'Hoja de Ruta', + clase: 'botonera-principal-hoja-ruta', + accion: '/venta-hoja-ruta/lista', + app: 'transportista' + }, + { + accion: '/chofer', + clase: 'botonera-principal-chofer', + texto: 'Choferes', + app: '', + }, + { + accion: '/precio-condicion', + clase: 'botonera-principal-precio-condicion', + texto: 'Precio y Condiciones', + app: '', + }, + { + accion: '/vehiculo', + clase: 'botonera-principal-vehiculo', + texto: 'Vehiculos', + app: '', + }, + { + accion: '/cliente', + clase: 'botonera-principal-cliente', + texto: 'Cliente', + app: '', + }, + { + accion: '/parametros', + clase: 'botonera-principal-parametros', + texto: 'Parametros', + app: '', + }, + { + texto: 'Factura', + clase: 'botonera-principal-factura', + accion: '/venta-factura/crear', + app: 'facturador' + }, + ]); + }); +}; diff --git a/seeds/tipo_documento.js b/seeds/tipo_documento.js new file mode 100644 index 0000000..27872c8 --- /dev/null +++ b/seeds/tipo_documento.js @@ -0,0 +1,48 @@ + +exports.seed = function(knex) { + // Deletes ALL existing entries + return knex('tipo_documento').del() + .then(function () { + // Inserts seed entries + return knex('tipo_documento').insert([ + {id:0 , descripcion:'CI Policía Federal', orden:5, activo: 0}, + {id:1 , descripcion:'CI Buenos Aires', orden:5, activo: 0}, + {id:2 , descripcion:'CI Catamarca', orden:5, activo: 0}, + {id:3 , descripcion:'CI Córdoba', orden:5, activo: 0}, + {id:4 , descripcion:'CI Corrientes', orden:5, activo: 0}, + {id:5 , descripcion:'CI Entre Ríos', orden:5, activo: 0}, + {id:6 , descripcion:'CI Jujuy', orden:5, activo: 0}, + {id:7 , descripcion:'CI Mendoza', orden:5, activo: 0}, + {id:8 , descripcion:'CI La Rioja', orden:5, activo: 0}, + {id:9 , descripcion:'CI Salta', orden:5, activo: 0}, + {id:10, descripcion:'CI San Juan', orden:5, activo: 0}, + {id:11, descripcion:'CI San Luis', orden:5, activo: 0}, + {id:12, descripcion:'CI Santa Fe', orden:5, activo: 0}, + {id:13, descripcion:'CI Santiago del Estero', orden:5, activo: 0}, + {id:14, descripcion:'CI Tucumán', orden:5, activo: 0}, + {id:16, descripcion:'CI Chaco', orden:5, activo: 0}, + {id:17, descripcion:'CI Chubut', orden:5, activo: 0}, + {id:18, descripcion:'CI Formosa', orden:5, activo: 0}, + {id:19, descripcion:'CI Misiones', orden:5, activo: 0}, + {id:20, descripcion:'CI Neuquén', orden:5, activo: 0}, + {id:21, descripcion:'CI La Pampa', orden:5, activo: 0}, + {id:22, descripcion:'CI Río Negro', orden:5, activo: 0}, + {id:23, descripcion:'CI Santa Cruz', orden:5, activo: 0}, + {id:24, descripcion:'CI Tierra del Fuego', orden:5, activo: 0}, + {id:30, descripcion:'Certificado de Migración', orden:0, activo: 0}, + {id:80, descripcion:'CUIT', orden:2, activo: 1}, + {id:86, descripcion:'CUIL', orden:2, activo: 1}, + {id:87, descripcion:'CDI', orden:4, activo: 0}, + {id:88, descripcion:'Usado por Anses para Padrón', orden:0, activo: 0}, + {id:89, descripcion:'LE', orden:3, activo: 0}, + {id:90, descripcion:'LC', orden:3, activo: 0}, + {id:91, descripcion:'CI extranjera', orden:4, activo: 0}, + {id:92, descripcion:'en trámite', orden:6, activo: 0}, + {id:93, descripcion:'Acta nacimiento', orden:6, activo: 0}, + {id:94, descripcion:'Pasaporte', orden:3, activo: 0}, + {id:95, descripcion:'CI Bs. As. RNP', orden:6, activo: 0}, + {id:96, descripcion:'DNI', orden:1, activo: 1}, + {id:99, descripcion:'Sin identificar/venta global diaria', orden:9, activo: 0} + ]); + }); +};