Desplegando App
53
src/app.js
Normal file
@@ -0,0 +1,53 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const morgan = require('morgan');
|
||||
const mysql = require('mysql');
|
||||
const myConecction = require('express-myconnection');
|
||||
var puerto = 3001
|
||||
|
||||
const app = express();
|
||||
//importando rutas
|
||||
const clientesRutas = require('./rutas/rt_clientes');
|
||||
const productosRutas = require('./rutas/rt_items');
|
||||
const generalesRutas = require('./rutas/rt_Generales');
|
||||
|
||||
//configuraciones
|
||||
app.set('port',process.env.PORT||puerto);
|
||||
app.set('view engine','ejs');
|
||||
app.set('views',path.join(__dirname, 'views'));
|
||||
//app.set('vistas',path.join(__dirname, 'vistas'));
|
||||
|
||||
//middlewares
|
||||
app.use(morgan('dev'));
|
||||
app.use(myConecction(mysql,{
|
||||
//host:'192.168.10.50',
|
||||
host:'172.17.0.2',
|
||||
user:'admin',
|
||||
password:'Dx.1706%',
|
||||
port:3306,
|
||||
database:'TELCOTRONICS'
|
||||
},'single'));
|
||||
//cuando reciba dato desde req body
|
||||
app.use(express.json({limit: '25mb'}));
|
||||
app.use(express.urlencoded({limit:'25mb',extended:false}));
|
||||
|
||||
//rutas
|
||||
app.use('/', clientesRutas);
|
||||
app.use('/', productosRutas);
|
||||
app.use('/', generalesRutas);
|
||||
|
||||
//prueba de json directa
|
||||
app.get('/pruebaJson',function(req,res){
|
||||
res.json([
|
||||
{nombre:"Tarea1",detalle:"programacion"},
|
||||
{nombre:"Tarea2",detalle:"Android Json"}
|
||||
]);
|
||||
});
|
||||
|
||||
//archivos staticos
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
//inicia servidor
|
||||
app.listen(app.get('port'),() =>{
|
||||
console.log('Servidor activo App SIGMA Puerto: '+puerto);
|
||||
});
|
||||
155
src/controladores/controlador_Clientes.js
Normal file
@@ -0,0 +1,155 @@
|
||||
const controlador = {};
|
||||
|
||||
controlador.verClientesJsonApp = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT client_rucCed, client_nombre, client_direccion, client_celular, client_email FROM clientes order by client_nombre DESC LIMIT 100', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var client = {Clientes:rows};
|
||||
res.json(client);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.ver = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM clientes order by client_id DESC LIMIT 50', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
res.render('clientesV',{
|
||||
data:rows
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.verClientJson = (req,res) => {
|
||||
console.log(req.params);
|
||||
const idCl = req.params.client_rucCed;
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM clientes WHERE client_rucCed = ?',[idCl],(err,rows)=>{
|
||||
res.json(rows);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.verClientJsonPost = (req,res) => {
|
||||
console.log(req.body);//requerimiento
|
||||
const dato = req.body;
|
||||
res.send('working...');
|
||||
res.redirect("/");
|
||||
//const idCl = req.params.client_rucCed;
|
||||
/*req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM clientes WHERE client_rucCed = ?',[dato],(err,rows)=>{
|
||||
res.json(rows);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});*/
|
||||
};
|
||||
|
||||
controlador.verClientForm = (req,res) => {
|
||||
//console.log(req.params);
|
||||
//const idCl = req.params.client_rucCed;
|
||||
const {client_rucCed} = req.params;
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM clientes WHERE client_rucCed = ?',[client_rucCed],(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
console.log(rows);
|
||||
res.render('clientesV',{
|
||||
data:rows
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//***Nuevos Clientes***//
|
||||
controlador.verFormNclientes = (req,res)=>{
|
||||
console.log('form nuevo cliente');
|
||||
res.render('clienteNuevo');
|
||||
};
|
||||
controlador.guardaCliente = (req, res) => {
|
||||
console.log(req.body);
|
||||
const data = req.body;
|
||||
req.getConnection((err,conn)=>{
|
||||
conn.query('INSERT INTO clientes set ?',[data],(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
}
|
||||
console.log(rows);
|
||||
//res.send('working...');
|
||||
res.redirect('/');//redireciona a la ruta inical de la app
|
||||
});//set ? => data
|
||||
});
|
||||
};
|
||||
|
||||
controlador.VerClienteA_Modificar = (req,res) => {
|
||||
const {client_id} = req.params;
|
||||
req.getConnection((err,conn) => {
|
||||
conn.query('SELECT * FROM clientes WHERE client_id = ?',[client_id],(err,rows)=>{
|
||||
console.log(rows);
|
||||
res.render('clientesEdit',{
|
||||
data: rows[0]
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.modificaCliente = (req,res) => {
|
||||
const {client_id} = req.params;
|
||||
const nCliente = req.body;
|
||||
|
||||
req.getConnection((err,conn) => {
|
||||
conn.query('UPDATE clientes SET ? WHERE client_id = ?',[nCliente,client_id],(err,rows)=>{
|
||||
console.log(rows);
|
||||
res.redirect("/");
|
||||
//res.render('clientesEdit',{ data: rows[0] });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.eliminarCliente = (req,res) => {
|
||||
//console.log(req.params.client_id);
|
||||
//const id = req.params.client_id;
|
||||
const {client_id} = req.params;
|
||||
//res.send('Eliminar ');
|
||||
req.getConnection((err,conn)=>{
|
||||
conn.query('DELETE FROM clientes WHERE client_id=?',[client_id],(err,rows)=>{
|
||||
res.redirect('/');//redireciona a la ruta inical de la app
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//********* CONSULTA CLIENTES APP-SIGMA********//
|
||||
controlador.app_pedidos_clientes = (req,res) => {
|
||||
const consulta = "%"+req.query.consulta+"%";
|
||||
//let data = req.stringify;
|
||||
console.log(req.query);
|
||||
|
||||
//const codItem = req.params.consulta;
|
||||
req.getConnection((err, conn) => {
|
||||
//codigo_prdcto
|
||||
//conn.query('SELECT codigo_prdcto,detalle_prdcto,describe_prdcto FROM productos WHERE detalle_prdcto like ? or describe_prdcto like ?',[item,item],(err,rows)=>{
|
||||
conn.query(`SELECT client_rucCed,client_nombre,client_direccion,client_celular,client_email FROM clientes WHERE client_nombre like ? or client_rucCed like ?`,[consulta,consulta],(err,rows)=>{
|
||||
//res.json(rows);
|
||||
res.json(rows);
|
||||
console.log(err);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = controlador;
|
||||
83
src/controladores/controlador_General.js
Normal file
@@ -0,0 +1,83 @@
|
||||
const controlador = {};
|
||||
|
||||
controlador.verVentasJson = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT ContCC_idCaja, ContCC_NomCaja, ContCC_EntTotal, ContCC_SalTotal, ContCC_Descuadre, ContCC_TotalCaja, ContCC_finFecha FROM cont_cierreCaja',
|
||||
(err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var ventaCaja = {Ventas:rows};
|
||||
res.json(ventaCaja);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//********* APP-SIGMA ********//
|
||||
controlador.app_sigma = (req, res) => {
|
||||
res.render('app_pedidos');
|
||||
};
|
||||
|
||||
//********* APP-SIGMA - PEDIDOS ********//
|
||||
controlador.app_PEDIDOS = (req,res) => {
|
||||
const consulta = req.query.origen;
|
||||
console.log("Consulta: "+req.query);
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query(`SELECT * FROM ver_pedidos WHERE PedUsoPrdct_origen like ?`,[consulta],(err,rows)=>{
|
||||
//conn.query(`SELECT * FROM ver_pedidos `,(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}else{
|
||||
var Pedidos = {ConsultaPedidos:rows};
|
||||
res.json(Pedidos);
|
||||
//console.log(rows);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.app_GpPrecios = (req,res) => {
|
||||
console.log("Consulta: "+req.query);
|
||||
req.getConnection((err, conn) => {
|
||||
//conn.query(`SELECT * FROM utilidad_preciosX_cliente WHERE PedUsoPrdct_origen like ?`,[consulta],(err,rows)=>{
|
||||
conn.query(`SELECT InvPrec_nom,InvPrec_margenUtilidad FROM utilidad_preciosX_cliente `,(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
next(err);
|
||||
}else{
|
||||
res.json(rows);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.app_ORIGENES = (req,res) => {
|
||||
console.log("Consulta: "+req.query);
|
||||
req.getConnection((err, conn) => {
|
||||
//conn.query(`SELECT * FROM utilidad_preciosX_cliente WHERE PedUsoPrdct_origen like ?`,[consulta],(err,rows)=>{
|
||||
conn.query(`SELECT * FROM PedioUsoProduct_origen `,(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
next(err);
|
||||
}else{
|
||||
var Origen = {origen_pedidos:rows};
|
||||
res.json(Origen);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//********* APP-panel control ********//
|
||||
controlador.panel_control = (req, res) => {
|
||||
res.render('panel_control');
|
||||
};
|
||||
|
||||
|
||||
module.exports = controlador;
|
||||
202
src/controladores/controlador_Items.js
Normal file
@@ -0,0 +1,202 @@
|
||||
const controlador = {};
|
||||
|
||||
controlador.verItemsJson = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM productos order by codigo_prdcto DESC LIMIT 100', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
res.json(rows);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.verItemsJsonApp = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT codigo_prdcto, detalle_prdcto, describe_prdcto FROM productos order by codigo_prdcto DESC', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var itemsD = {Items:rows};
|
||||
res.json(itemsD);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.verItemPanel = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT codigo_prdcto, detalle_prdcto, describe_prdcto FROM productos order by codigo_prdcto DESC', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var itemsD = {Items:rows};
|
||||
res.json(itemsD);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
controlador.verInventarioJsonApp = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT codigo_prdcto, detalle_prdcto, describe_prdcto, idcostos_valores FROM ver_productosPrecios', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var itemsD = {Items:rows};
|
||||
res.json(itemsD);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//********* CONSULTA ITEMS modo like ********//
|
||||
controlador.autocompletado_itemsJson = (req,res) => {
|
||||
console.log(req.params);
|
||||
const datBuscar = req.params.dat_busq;
|
||||
req.getConnection((err, conn) => {
|
||||
//console.log(datBuscar);
|
||||
conn.query("SELECT detalle_prdcto,describe_prdcto FROM productos WHERE detalle_prdcto like '%"+datBuscar+"%'",(err,rows)=>{
|
||||
res.json(rows);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//********* CONSULTA ITEMS ********//
|
||||
controlador.verItemJson = (req,res) => {
|
||||
console.log(req.params);
|
||||
const codItem = req.params.codigo_item;
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM productos WHERE codigo_prdcto = ?',[codItem],(err,rows)=>{
|
||||
res.json(rows);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
controlador.verItemJsonPost = (req,res) => {
|
||||
const {codigo_prdcto} = req.params;
|
||||
const codigo_prdctoB = req.body;
|
||||
console.log(codigo_prdcto);
|
||||
res.send('working...');
|
||||
/*req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM productos WHERE codigo_prdcto = ?',[codItem],(err,rows)=>{
|
||||
//res.json(rows);
|
||||
res.send('working...');
|
||||
});
|
||||
});*/
|
||||
};
|
||||
//********* INGRESO ITEMS ********//
|
||||
controlador.guardaItem = (req, res) => {
|
||||
//console.log(req.body);
|
||||
const data = req.body;
|
||||
console.log(data.item);
|
||||
let json = JSON.parse(data.item);
|
||||
console.log(json.Items);
|
||||
req.getConnection((err,conn)=>{
|
||||
/*conn.query('INSERT INTO productos set ?',[data],(err,rows)=>{
|
||||
if(err){
|
||||
res.json(err);
|
||||
}else{
|
||||
res.json("ok");
|
||||
}
|
||||
console.log(rows);
|
||||
//res.send('working...');
|
||||
res.redirect('/');//redireciona a la ruta inical de la app
|
||||
});*/
|
||||
//set ? => data
|
||||
});
|
||||
res.json("'resp':'ok'");
|
||||
//res.send('working...');
|
||||
};
|
||||
|
||||
controlador.guardarItems = (req, res) => {
|
||||
const data = req.body;
|
||||
//console.log(req);
|
||||
//console.log(data);
|
||||
let json = JSON.parse(data.json_item);
|
||||
//let json = parse.Items;
|
||||
//console.log(json.length);
|
||||
for(var i=0;i<json.length;i++){
|
||||
var item = json[i];
|
||||
//console.log(item);
|
||||
|
||||
req.getConnection((err,conn)=>{
|
||||
conn.query('INSERT INTO productos_cloud set ?',[item],(err,rows)=>{
|
||||
console.log(item);
|
||||
});//set ? => data
|
||||
});
|
||||
}
|
||||
res.json("'resp':'ok'");
|
||||
};
|
||||
|
||||
controlador.json = (req, res) => {
|
||||
res.render('api_json',{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//********* CONSULTA ITEMS APP-SIGMA********//
|
||||
controlador.app_consultaItemsPrecios = (req,res) => {
|
||||
const data = req.query;
|
||||
const item = "%"+req.query.consulta+"%";
|
||||
const grupo = req.query.gp_precio;
|
||||
//let data = req.stringify;
|
||||
console.log(req.body);
|
||||
console.log(req.query);
|
||||
|
||||
//const codItem = req.params.consulta;
|
||||
req.getConnection((err, conn) => {
|
||||
//codigo_prdcto
|
||||
//conn.query('SELECT codigo_prdcto,detalle_prdcto,describe_prdcto FROM productos WHERE detalle_prdcto like ? or describe_prdcto like ?',[item,item],(err,rows)=>{
|
||||
conn.query(`SELECT
|
||||
codigo as codigo_prdcto,
|
||||
nombre as detalle_prdcto,
|
||||
descripcion as describe_prdcto,
|
||||
precio,
|
||||
img as imagen
|
||||
FROM ver_inventario_precios_app
|
||||
where grupo_precio = ? and (nombre like ? or descripcion like ?)`
|
||||
,[grupo,item,item],(err,rows)=>{
|
||||
//res.json(rows);
|
||||
res.json(rows);
|
||||
console.log(err);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//********* CONSULTA ADICIONALES X MODIFICAR ********//
|
||||
controlador.cierresCaja = (req, res) => {
|
||||
req.getConnection((err, conn) => {
|
||||
conn.query('SELECT * FROM cont_cierreCaja', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
//conn.query('SELECT * FROM clientes LIMIT 62668,15', (err, rows) => {//se obtiene error o consulta filas(rows)
|
||||
if(err){
|
||||
res.json(err);
|
||||
//next(err);
|
||||
}
|
||||
//console.log(rows);
|
||||
//var test = {"Items":[{"idt_prdcto":"1","codigo_prdcto":"CODIGOTEST","detalle_prdcto":"ITEM GENERADO","describe_prdcto":"DESCRIPCION DE ITEMS"}]};
|
||||
var itemsD = {CierreCaja:rows};
|
||||
res.json(itemsD);
|
||||
//res.render('clientesV',{ data:rows });
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = controlador;
|
||||
175
src/public/css/panel_control.css
Normal file
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
html, body {
|
||||
font-family: 'Roboto', 'Helvetica', sans-serif;
|
||||
}
|
||||
.demo-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
.demo-layout .mdl-layout__header .mdl-layout__drawer-button {
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
}
|
||||
.mdl-layout__drawer .avatar {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.demo-drawer {
|
||||
border: none;
|
||||
}
|
||||
/* iOS Safari specific workaround */
|
||||
.demo-drawer .mdl-menu__container {
|
||||
z-index: -1;
|
||||
}
|
||||
.demo-drawer .demo-navigation {
|
||||
z-index: -2;
|
||||
}
|
||||
/* END iOS Safari specific workaround */
|
||||
.demo-drawer .mdl-menu .mdl-menu__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.demo-drawer-header {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
padding: 16px;
|
||||
height: 151px;
|
||||
}
|
||||
.demo-avatar-dropdown {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.demo-navigation {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.demo-layout .demo-navigation .mdl-navigation__link {
|
||||
display: flex !important;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
color: rgba(255, 255, 255, 0.56);
|
||||
font-weight: 500;
|
||||
}
|
||||
.demo-layout .demo-navigation .mdl-navigation__link:hover {
|
||||
background-color: #00BCD4;
|
||||
color: #37474F;
|
||||
}
|
||||
.demo-navigation .mdl-navigation__link .material-icons {
|
||||
font-size: 24px;
|
||||
color: rgba(255, 255, 255, 0.56);
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.demo-content {
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.demo-charts {
|
||||
align-items: center;
|
||||
}
|
||||
.demo-chart:nth-child(1) {
|
||||
color: #ACEC00;
|
||||
}
|
||||
.demo-chart:nth-child(2) {
|
||||
color: #00BBD6;
|
||||
}
|
||||
.demo-chart:nth-child(3) {
|
||||
color: #BA65C9;
|
||||
}
|
||||
.demo-chart:nth-child(4) {
|
||||
color: #EF3C79;
|
||||
}
|
||||
.demo-graphs {
|
||||
padding: 16px 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
/* TODO: Find a proper solution to have the graphs
|
||||
* not float around outside their container in IE10/11.
|
||||
* Using a browserhacks.com solution for now.
|
||||
*/
|
||||
_:-ms-input-placeholder, :root .demo-graphs {
|
||||
min-height: 664px;
|
||||
}
|
||||
_:-ms-input-placeholder, :root .demo-graph {
|
||||
max-height: 300px;
|
||||
}
|
||||
/* TODO end */
|
||||
.demo-graph:nth-child(1) {
|
||||
color: #00b9d8;
|
||||
}
|
||||
.demo-graph:nth-child(2) {
|
||||
color: #d9006e;
|
||||
}
|
||||
|
||||
.demo-cards {
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.demo-cards .demo-separator {
|
||||
height: 32px;
|
||||
}
|
||||
.demo-cards .mdl-card__title.mdl-card__title {
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.demo-cards ul {
|
||||
padding: 0;
|
||||
}
|
||||
.demo-cards h3 {
|
||||
font-size: 1em;
|
||||
}
|
||||
.demo-updates .mdl-card__title {
|
||||
min-height: 200px;
|
||||
background-image: url('../img/panel_control/dog.png');
|
||||
background-position: 90% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.demo-cards .mdl-card__actions a {
|
||||
color: #00BCD4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.demo-options h3 {
|
||||
margin: 0;
|
||||
}
|
||||
.demo-options .mdl-checkbox__box-outline {
|
||||
border-color: rgba(255, 255, 255, 0.89);
|
||||
}
|
||||
.demo-options ul {
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
.demo-options li {
|
||||
margin: 4px 0;
|
||||
}
|
||||
.demo-options .material-icons {
|
||||
color: rgba(255, 255, 255, 0.89);
|
||||
}
|
||||
.demo-options .mdl-card__actions {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
}
|
||||
BIN
src/public/img/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/public/img/favicon_sigma/LOGO_sigma64.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
src/public/img/favicon_sigma/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/public/img/favicon_sigma/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
src/public/img/favicon_sigma/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/public/img/favicon_sigma/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 801 B |
BIN
src/public/img/favicon_sigma/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/public/img/favicon_sigma/favicon-32x320.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/public/img/favicon_sigma/favicon-32x321.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/public/img/favicon_sigma/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/public/img/favicon_sigma/fondoPara_App.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
1
src/public/img/favicon_sigma/site.webmanifest
Normal file
@@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
||||
BIN
src/public/img/panel_control/android-desktop.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/public/img/panel_control/dog.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/public/img/panel_control/favicon.png
Normal file
|
After Width: | Height: | Size: 905 B |
BIN
src/public/img/panel_control/ios-desktop.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/public/img/panel_control/user.jpg
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
src/public/tipografias/SigmaFont.otf
Normal file
BIN
src/public/tipografias/SigmaFont.ttf
Normal file
14
src/rutas/rt_Generales.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const express = require('express');
|
||||
const rutas = express.Router();
|
||||
|
||||
const controlador_init = require('../controladores/controlador_General');
|
||||
//ver listar items /formulario/:varNomCampoDb, controlador clase.funcion
|
||||
rutas.get('/ventasJson/', controlador_init.verVentasJson);//ver productos en modo json/get
|
||||
rutas.get('/', controlador_init.app_sigma);//Una app para PEDIDOS
|
||||
rutas.get('/consultaPedidos', controlador_init.app_PEDIDOS);//consulta PEDIDOS
|
||||
rutas.get('/gp_precios', controlador_init.app_GpPrecios);//consulta grupo precios
|
||||
rutas.get('/origen_pedidos', controlador_init.app_ORIGENES);//consulta grupo precios
|
||||
rutas.get('/panel_control', controlador_init.panel_control);//consulta grupo precios
|
||||
|
||||
|
||||
module.exports = rutas;
|
||||
26
src/rutas/rt_clientes.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const express = require('express');
|
||||
const rutas = express.Router();
|
||||
|
||||
const controladorClientes = require('../controladores/controlador_Clientes');
|
||||
//indice inical
|
||||
rutas.get('/clientes', controladorClientes.ver);//ver lista de clientes
|
||||
|
||||
//ver listar clientes /formulario/:varNomCampoDb, controlador clase.funcion
|
||||
rutas.get('/clientJson/:client_rucCed', controladorClientes.verClientJson);//ver cliente en modo json/get
|
||||
rutas.get('/verClientesJsonApp', controladorClientes.verClientesJsonApp);//ver cliente en modo json/get
|
||||
rutas.post('/verClientJsonPost/:client_rucCed', controladorClientes.verClientJsonPost);//ver cliente en mod json
|
||||
|
||||
rutas.get('/buscarClienteForm/:client_rucCed', controladorClientes.verClientForm);//ver cliente en tab form
|
||||
|
||||
//modificar clientes
|
||||
rutas.get('/actCliente/:client_id', controladorClientes.VerClienteA_Modificar);//carga el cliente
|
||||
rutas.post('/actCliente/:client_id', controladorClientes.modificaCliente);//actualiza el cliente
|
||||
//eliminar clientes
|
||||
rutas.get('/eliminarCliente/:client_id', controladorClientes.eliminarCliente);
|
||||
//almacena cliente
|
||||
rutas.post('/addCliente', controladorClientes.guardaCliente);//almacena en bd el nuevo cliente
|
||||
rutas.get('/addClienteForm', controladorClientes.verFormNclientes);//muesta form para crear cliente
|
||||
|
||||
//APP_SIGMA consultas
|
||||
rutas.get('/consultaClientesJson', controladorClientes.app_pedidos_clientes);//consulta clientes app-sigma
|
||||
module.exports = rutas;
|
||||
30
src/rutas/rt_items.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const express = require('express');
|
||||
const rutas = express.Router();
|
||||
|
||||
const controladorItems = require('../controladores/controlador_Items');
|
||||
//ver listar items /formulario/:varNomCampoDb, controlador clase.funcion
|
||||
rutas.get('/verItemsJson/', controladorItems.verItemsJson);//ver productos en modo json/get
|
||||
rutas.get('/verInventarioJsonApp/', controladorItems.verInventarioJsonApp);//ver productos en modo json/get
|
||||
rutas.get('/verItemsJsonApp/', controladorItems.verItemsJsonApp);//ver productos en modo json/get
|
||||
rutas.post('/verItemsJsonAppP/', controladorItems.verItemsJsonApp);//ver productos en modo json/post
|
||||
|
||||
|
||||
//consulta de items type_head
|
||||
rutas.get('/busq_itemJson/:dat_busq', controladorItems.autocompletado_itemsJson);//ver productos en modo json/get
|
||||
//consulta de items
|
||||
rutas.get('/itemJson/:codigo_item', controladorItems.verItemJson);//ver productos en modo json/get
|
||||
rutas.post('/itemJsonPost/:codigo_prdcto', controladorItems.verItemJsonPost);//ver productos en modo json/Post
|
||||
rutas.post('/ItemsPanel/', controladorItems.verItemPanel);//ver productos en modo json/Post
|
||||
//guardar de items
|
||||
rutas.post('/addItem/', controladorItems.guardaItem);//ver productos en modo json/Post
|
||||
rutas.post('/addItems/', controladorItems.guardarItems);//ver productos en modo json/Post
|
||||
|
||||
rutas.get('/cierresCaja/', controladorItems.cierresCaja);//ver productos en modo json/get
|
||||
|
||||
rutas.post('/json', controladorItems.json);//ver menu en modo json
|
||||
|
||||
//APP_SIGMA consultas
|
||||
rutas.get('/consultaItemsPrecios/', controladorItems.app_consultaItemsPrecios);//ver productos en modo json/post
|
||||
|
||||
|
||||
module.exports = rutas;
|
||||
47
src/views/api_json.ejs
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Api JSON</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
<script type="text/javascript">
|
||||
function fechaActual(){
|
||||
var fecha = new Date(); //Fecha actual
|
||||
var mes = fecha.getMonth()+1; //obteniendo mes
|
||||
var dia = fecha.getDate(); //obteniendo dia
|
||||
var ano = fecha.getFullYear(); //obteniendo año
|
||||
if(dia<10){
|
||||
dia='0'+dia; //agrega cero si el menor de 10
|
||||
}
|
||||
if(mes<10){
|
||||
mes='0'+mes //agrega cero si el menor de 10
|
||||
}
|
||||
document.getElementById('reg').value=ano+"-"+mes+"-"+dia;
|
||||
}
|
||||
window.onload = function(){
|
||||
var fecha = new Date(); //Fecha actual
|
||||
var mes = fecha.getMonth()+1; //obteniendo mes
|
||||
var dia = fecha.getDate(); //obteniendo dia
|
||||
var ano = fecha.getFullYear(); //obteniendo año
|
||||
if(dia<10)
|
||||
dia='0'+dia; //agrega cero si el menor de 10
|
||||
if(mes<10)
|
||||
mes='0'+mes //agrega cero si el menor de 10
|
||||
document.getElementById('reg').value=ano+"-"+mes+"-"+dia;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="fechaActual()">
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<a href="" class="navbar-brand mx-auto">Api Json</a>
|
||||
</nav>
|
||||
<div class="row">
|
||||
<input type="text" name="" value="">
|
||||
<input type="button" name="ClienteJson" value="Cliente Json">
|
||||
</div>
|
||||
<div class="row"></div>
|
||||
<div class="row"></div>
|
||||
</body>
|
||||
</html>
|
||||
250
src/views/app_pedidos.ejs
Normal file
@@ -0,0 +1,250 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="google" content="notranslate" />
|
||||
<title>SIGMA APP</title>
|
||||
|
||||
<!--Import Icono web-sigma-->
|
||||
<link rel="shortcut icon" href="./img/favicon_sigma/favicon.ico" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="./img/favicon_sigma/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./img/favicon_sigma/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./img/favicon_sigma/favicon-16x16.png">
|
||||
<link rel="manifest" href="./img/favicon_sigma/site.webmanifest">
|
||||
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.0.min.js" ></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"type="text/css">
|
||||
<link href="http://xsystem.ddns.net/app/css/app_sigma_stilos.css" rel="stylesheet" type="text/css">
|
||||
<link href="http://xsystem.ddns.net/app/css/app_sigmaDetallePedidos.css" rel="stylesheet" type="text/css">
|
||||
<link href="http://xsystem.ddns.net/app/css/animate.css" rel="stylesheet" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<!---***********MENU LATERAL*********--->
|
||||
<nav class="blue">
|
||||
<div class="nav-wrapper">
|
||||
<a href="#" class="brand-logo">SIGMA <span id="titulo">PRODUCTOS</span></a>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
|
||||
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('PRODUCTOS')">
|
||||
<i class="material-icons left">archive</i><span>Productos</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('PEDIDOS')">
|
||||
<i class="material-icons left">add_shopping_cart</i><span id="cart">Pedidos</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('CLIENTES')">
|
||||
<i class="material-icons left">account_circle</i><span id="cart">Clientes</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('ORDENES')">
|
||||
<i class="material-icons left">chat_bubble_outline</i><span id="cart">Ordenes</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('CONFIGURACION')">
|
||||
<i class="material-icons left">build</i><span id="cart">Configuracion</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!---************MENU BAR SIDE_NAV***********--->
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li>
|
||||
<div class="user-view">
|
||||
<div class="background">
|
||||
<img src="./img/favicon_sigma/fondoPara_App.png" />
|
||||
</div>
|
||||
<a href="#user"><img class="circle" src="./img/favicon_sigma/LOGO_sigma64.png" /></a>
|
||||
<a href="#name"><span class="black-text name">Pablinux</span></a>
|
||||
<a href="#email"><span class="white-text email sideBar_mail">pablinux.siax@gmail.com</span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('PRODUCTOS')">
|
||||
<i class="material-icons left">archive</i><span>Productos</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('PEDIDOS')">
|
||||
<i class="material-icons left">add_shopping_cart</i><span id="cart">Pedidos</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('CLIENTES')">
|
||||
<i class="material-icons left">account_circle</i><span id="cart">Clientes</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('ORDENES')">
|
||||
<i class="material-icons left">chat_bubble_outline</i><span id="cart">Ordenes</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" onclick="addTitulo('CONFIGURACION')">
|
||||
<i class="material-icons left">build</i><span id="cart">Configuracion</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!---************MAIN***********--->
|
||||
<main role="main" class="">
|
||||
<div class="row">
|
||||
<div class="col s12" id="caja_busqueda">
|
||||
<div class="input-field inline col s8 m9 l10">
|
||||
<input id="txt_busq" placeholder="Escribe aqui tu busqueda" type="text" class="validate" onkeyup="busqueda(event)">
|
||||
</div>
|
||||
<div class="col s4 m3 l2" id="bt_busq" onclick="consulta()">
|
||||
<a class="waves-effect waves-light btn right">
|
||||
<i class="material-icons left">youtube_searched_for</i>Buscar
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!---Contenido o Seccion--->
|
||||
</div>
|
||||
<div class="" id="contenido">
|
||||
<!---Contenido AUTOGENERAADO--->
|
||||
</div>
|
||||
|
||||
<div class="boxCreaCli">
|
||||
<h4>Crear Cliente</h4>
|
||||
<hr>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="txtNombres">Nombres</label>
|
||||
<input type="text" class="form-control" id="txtNombres">
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="txtCedula">Cedula</label>
|
||||
<input type="number" class="form-control" id="txtCedula">
|
||||
<label for="txtTelefono">Telefono</label>
|
||||
<input type="number" class="form-control" id="txtTelefono">
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="txtDireccion">Direccion</label>
|
||||
<input type="text" class="form-control" id="txtDireccion">
|
||||
<label for="txtEmail">Email</label>
|
||||
<input type="email" class="form-control" id="txtEmail">
|
||||
</div>
|
||||
<br>
|
||||
<button class="btn" id="bt_guardaCliente"> <i class="material-icons left">save</i>Guardar</button>
|
||||
<button class="btn" id="bt_cancelaCliente"> <i class="material-icons left">cancel</i>Cancelar</button>
|
||||
</div><div class="row" id="panel_origen_pedidos"></div><div id="detalles_pedidos"><ul class="collapsible" data-collapsible="accordion">
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">room</i><strong>Origen:</strong>
|
||||
<span id="head_pedidOrigen" class="detPed_subtitulos">Seleccione Origen</span>
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<div id="conten_pedidoOrigen" class="row">
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">person</i><strong>Cliente:</strong>
|
||||
<span id="head_pedidClient" class="detPed_subtitulos">Seleccione Cliente</span>
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<div id="conten_pedidoCliente">
|
||||
<strong>RUC/CI:</strong><span id="pedidClient_ruc"></span><br/>
|
||||
<strong>Telef:</strong><span id="pedidClient_tel"></span><br/>
|
||||
<strong>Email:</strong><span id="pedidClient_mail"></span><br/>
|
||||
<strong>Direccion:</strong><span id="pedidClient_dir"></span><br>
|
||||
<strong>Ciudad:</strong><br>
|
||||
<strong>Tipo Cliente:</strong>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">format_list_numbered</i>
|
||||
<strong>Detalle Pedido:</strong>
|
||||
<span id="carrito_detallePedido" class="detPed_subtitulos">10</span>
|
||||
</div>
|
||||
<div class="collapsible-body"> <div id="contenido_detellePedidClient"></div> </div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">attach_money</i
|
||||
><strong>Importe y Valores</strong>
|
||||
<span id="total_pedido" class="detPed_subtitulos">$100.00</span>
|
||||
</div>
|
||||
<div class="collapsible-body row">
|
||||
<div id="DetPed_ImporteSubtitulo" class="col s8 m8 l8">
|
||||
<strong>Sub Total Ventas 12%:</strong><br/>
|
||||
<strong>Sub Total Ventas 0%:</strong><br/>
|
||||
<strong>Sub Total:</strong><br/>
|
||||
<strong>Descuento:</strong><br/>
|
||||
<strong>Sub Total Neto:</strong><br/>
|
||||
<strong>Sub Total IVA 12%:</strong><br/>
|
||||
<strong>Sub Total IVA 0%:</strong><br/>
|
||||
<strong>Sub Total IVA:</strong><br/>
|
||||
<strong class="total">TOTAL:</strong>
|
||||
</div>
|
||||
<div id="DetPed_ImporteValores" class="col s4 m4 l4">
|
||||
$<span id="DetPed_vetasIva12">0.00</span><br />
|
||||
$<span id="DetPed_vetasIva0">0.00</span><br />
|
||||
$<span id="DetPed_subTotal">0.00</span><br />
|
||||
$<span id="DetPed_descueto">0.00</span><br />
|
||||
$<span id="DetPed_subTotalNeto">0.00</span><br />
|
||||
$<span id="DetPed_totalIva12">0.00</span><br/>
|
||||
$<span id="DetPed_totalIva0">0.00</span><br/>
|
||||
<span id="DetPed_totalIva">0.00</span><br/>
|
||||
<span id="DetPed_total" class="total"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header row">
|
||||
<button class="btn col s6" onClick="limpiaPanel()"><i class="material-icons">control_point</i>Nuevo Pedido</button>
|
||||
<button class="btn col s6" onClick="envioPedidos()"><i class="material-icons">cloud_upload</i>Enviar Pedido</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul> </div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div class="blue lighten-5" id="footerPrecios"> <div id="clinteBox">
|
||||
<div id="clinteTitulo"><strong>Selecione Cliente</strong></div>
|
||||
<div id="clinteNom"></div> </div>
|
||||
<div id="ValorTotal"><strong>Total</strong> $0.00</div>
|
||||
</div>
|
||||
<!--footer class="page-footer">
|
||||
<button data-target="modal1" class="btn modal-trigger">Modal</button>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
© 2014 Copyright Text
|
||||
<a class="grey-text text-lighten-4 right" href="#!">More Links</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer-->
|
||||
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
|
||||
<script src="https://xsystem.ddns.net/app/js/app_sigma_controlPC.js"></script>
|
||||
<script src="https://xsystem.ddns.net/app/js/app_sigma_modal.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
62
src/views/clienteNuevo.ejs
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Clientes</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
<script type="text/javascript">
|
||||
function fechaActual(){
|
||||
var fecha = new Date(); //Fecha actual
|
||||
var mes = fecha.getMonth()+1; //obteniendo mes
|
||||
var dia = fecha.getDate(); //obteniendo dia
|
||||
var ano = fecha.getFullYear(); //obteniendo año
|
||||
if(dia<10){
|
||||
dia='0'+dia; //agrega cero si el menor de 10
|
||||
}
|
||||
if(mes<10){
|
||||
mes='0'+mes //agrega cero si el menor de 10
|
||||
}
|
||||
document.getElementById('reg').value=ano+"-"+mes+"-"+dia;
|
||||
}
|
||||
window.onload = function(){
|
||||
var fecha = new Date(); //Fecha actual
|
||||
var mes = fecha.getMonth()+1; //obteniendo mes
|
||||
var dia = fecha.getDate(); //obteniendo dia
|
||||
var ano = fecha.getFullYear(); //obteniendo año
|
||||
if(dia<10)
|
||||
dia='0'+dia; //agrega cero si el menor de 10
|
||||
if(mes<10)
|
||||
mes='0'+mes //agrega cero si el menor de 10
|
||||
document.getElementById('reg').value=ano+"-"+mes+"-"+dia;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="fechaActual()">
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<a href="" class="navbar-brand mx-auto">Clientes</a>
|
||||
</nav>
|
||||
<div class="row">
|
||||
<div class="col-xl mt-4 card">
|
||||
<form class="card-body" action="/addCliente" method="post">
|
||||
<h3 class="card-title">Nuevo Cliente</h3>
|
||||
<div class="form-group">
|
||||
<input name="client_nombre" type="text" class="form-control" placeholder="Nombre Cliente">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="client_rucCed" type="text" class="form-control" placeholder="Cedula/RUC">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="client_direccion" type="text" class="form-control" placeholder="Direccion">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="client_fechaReg" type="datetime" class="form-control" id="reg">
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary" value="Guardar">
|
||||
<a href="/" class="btn btn-primary">Cancelar</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
src/views/clientesEdit.ejs
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Clientes</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<a href="" class="navbar-brand mx-auto">Clientes</a>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl mt-4 card">
|
||||
<form class="card-body" action="/actCliente/<%= data.client_id %>" method="post">
|
||||
<h3 class="card-title">Modificar Cliente</h3>
|
||||
<div class="form-group">
|
||||
<input name="client_nombre" type="text" class="form-control" value="<%= data.client_nombre %>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="client_rucCed" type="text" class="form-control" value="<%= data.client_rucCed %>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="client_direccion" type="text" class="form-control" value="<%= data.client_direccion %>">
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary" value="Guardar">
|
||||
<a href="/" class="btn btn-primary">Cancelar</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
80
src/views/clientesV.ejs
Normal file
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Clientes</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//var busq = document.getElementById('txtBuscar');
|
||||
|
||||
function verCliente(){
|
||||
var busq = document.getElementById('txtBuscar');
|
||||
//alert("Cliente: "+busq.value);
|
||||
window.location.href = "/buscarClienteForm/"+busq.value;
|
||||
}
|
||||
function verClienteJson(){
|
||||
var busq = document.getElementById('txtBuscar');
|
||||
window.location.href = "/clientJson/"+busq.value;
|
||||
}
|
||||
|
||||
var leeTecld = function () {
|
||||
var txt = document.getElementById('txtBuscar');
|
||||
txt.addEventListener('keypress',eventHandler,false);
|
||||
|
||||
function eventHandler(event){
|
||||
console.log(event.keyCode);
|
||||
console.log(txt.value);
|
||||
//verCliente(txt.value);
|
||||
}
|
||||
};
|
||||
window.addEventListener('load',leeTecld,false);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="row ">
|
||||
<form class="form-inline" action="/buscarClienteForm">
|
||||
<div class="input-group ">
|
||||
<span class="input-group-addon fa-search">Buscar Cliente</span>
|
||||
<input type="text" name="cl_busqueda" value="" class="form-control" id="txtBuscar">
|
||||
<input type="button" class="btn btn-primary" onclick="verCliente()" value="Ver Cliente">
|
||||
<input type="button" class="btn btn-primary" onclick="verClienteJson()" value="Ver Cliente JSON">
|
||||
</div>
|
||||
<!--a href="/clientJson/1703151421001" class="btn btn-primary">Ver Json</a-->
|
||||
<a href="/addClienteForm" class="btn btn-primary">Nuevo Cliente</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl mt-4 text-center">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nombre</th>
|
||||
<th>C.I</th>
|
||||
<th>Direccion</th>
|
||||
<th>Accion</th>
|
||||
</tr>
|
||||
<% for (var i = 0; i < data.length; i ++) { %>
|
||||
<tr>
|
||||
<td><%= data[i].client_id %></td>
|
||||
<td><%= data[i].client_nombre %></td>
|
||||
<td><%= data[i].client_rucCed %></td>
|
||||
<td><%= data[i].client_direccion %></td>
|
||||
<td>
|
||||
<a href="/eliminarCliente/<%= data[i].client_id %>">Eliminar</a><br>
|
||||
<a href="/actCliente/<%= data[i].client_id %>">Modificar</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
73
src/views/menu.ejs
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Clientes</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var busq = document.getElementById('txtBuscar');
|
||||
|
||||
function verCliente(){
|
||||
window.location.href = "/buscarClienteForm/"+busq.value;
|
||||
}
|
||||
|
||||
var leeTecld = function () {
|
||||
var txt = document.getElementById('txtBuscar');
|
||||
txt.addEventListener('keypress',eventHandler,false);
|
||||
|
||||
function eventHandler(event){
|
||||
console.log(event.keyCode);
|
||||
console.log(txt.value);
|
||||
//verCliente(txt.value);
|
||||
}
|
||||
};
|
||||
window.addEventListener('load',leeTecld,false);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="row ">
|
||||
<form class="form-inline" action="/buscarClienteForm">
|
||||
<div class="input-group ">
|
||||
<span class="input-group-addon fa-search">Buscar Cliente</span>
|
||||
<input type="text" name="cl_busqueda" value="" class="form-control" id="txtBuscar">
|
||||
<input type="button" class="btn btn-primary" onclick="pulsaTecla()" value="Ver Cliente">
|
||||
</div>
|
||||
<a href="/clientJson/1703151421001" class="btn btn-primary">Ver Json</a>
|
||||
<a href="/addClienteForm" class="btn btn-primary">Nuevo Cliente</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl mt-4 text-center">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nombre</th>
|
||||
<th>C.I</th>
|
||||
<th>Direccion</th>
|
||||
<th>Accion</th>
|
||||
</tr>
|
||||
<% for (var i = 0; i < data.length; i ++) { %>
|
||||
<tr>
|
||||
<td><%= data[i].client_id %></td>
|
||||
<td><%= data[i].client_nombre %></td>
|
||||
<td><%= data[i].client_rucCed %></td>
|
||||
<td><%= data[i].client_direccion %></td>
|
||||
<td>
|
||||
<a href="/eliminarCliente/<%= data[i].client_id %>">Eliminar</a><br>
|
||||
<a href="/actCliente/<%= data[i].client_id %>">Modificar</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
247
src/views/panel_control.ejs
Normal file
@@ -0,0 +1,247 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Material Design Lite
|
||||
Copyright 2015 Google Inc. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<title>Material Design Lite</title>
|
||||
|
||||
<!-- Add to homescreen for Chrome on Android -->
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="icon" sizes="192x192" href="./img/panel_control/android-desktop.png">
|
||||
|
||||
<!-- Add to homescreen for Safari on iOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
|
||||
<link rel="apple-touch-icon-precomposed" href="./img/panel_control/ios-desktop.png">
|
||||
|
||||
<!-- Tile icon for Win8 (144x144 + tile color) -->
|
||||
<meta name="msapplication-TileImage" content="./img/panel_control/ms-touch-icon-144x144-precomposed.png">
|
||||
<meta name="msapplication-TileColor" content="#3372DF">
|
||||
|
||||
<link rel="shortcut icon" href="./img/panel_control/favicon.png">
|
||||
|
||||
<!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
|
||||
<!--
|
||||
<link rel="canonical" href="http://www.example.com/">
|
||||
-->
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.cyan-light_blue.min.css">
|
||||
<link rel="stylesheet" href="./css/panel_control.css">
|
||||
<style>
|
||||
#view-source {
|
||||
position: fixed;
|
||||
display: block;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 40px;
|
||||
z-index: 900;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
|
||||
<header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
|
||||
<div class="mdl-layout__header-row">
|
||||
<span class="mdl-layout-title">Home</span>
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
|
||||
<label class="mdl-button mdl-js-button mdl-button--icon" for="search">
|
||||
<i class="material-icons">search</i>
|
||||
</label>
|
||||
<div class="mdl-textfield__expandable-holder">
|
||||
<input class="mdl-textfield__input" type="text" id="search">
|
||||
<label class="mdl-textfield__label" for="search">Enter your query...</label>
|
||||
</div>
|
||||
</div>
|
||||
<button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
|
||||
<li class="mdl-menu__item">About</li>
|
||||
<li class="mdl-menu__item">Contact</li>
|
||||
<li class="mdl-menu__item">Legal information</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
<div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
|
||||
<header class="demo-drawer-header">
|
||||
<img src="./img/panel_control/user.jpg" class="demo-avatar">
|
||||
<div class="demo-avatar-dropdown">
|
||||
<span>hello@example.com</span>
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
<button id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
|
||||
<i class="material-icons" role="presentation">arrow_drop_down</i>
|
||||
<span class="visuallyhidden">Accounts</span>
|
||||
</button>
|
||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="accbtn">
|
||||
<li class="mdl-menu__item">hello@example.com</li>
|
||||
<li class="mdl-menu__item">info@example.com</li>
|
||||
<li class="mdl-menu__item"><i class="material-icons">add</i>Add another account...</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
<nav class="demo-navigation mdl-navigation mdl-color--blue-grey-800">
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">home</i>Home</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">inbox</i>Inbox</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">delete</i>Trash</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">report</i>Spam</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">forum</i>Forums</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">flag</i>Updates</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">local_offer</i>Promos</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">shopping_cart</i>Purchases</a>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">people</i>Social</a>
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
<a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">help_outline</i><span class="visuallyhidden">Help</span></a>
|
||||
</nav>
|
||||
</div>
|
||||
<main class="mdl-layout__content mdl-color--grey-100">
|
||||
<div class="mdl-grid demo-content">
|
||||
<div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid">
|
||||
<svg fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop">
|
||||
<use xlink:href="#piechart" mask="url(#piemask)" />
|
||||
<text x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1">82<tspan font-size="0.2" dy="-0.07">%</tspan></text>
|
||||
</svg>
|
||||
<svg fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop">
|
||||
<use xlink:href="#piechart" mask="url(#piemask)" />
|
||||
<text x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1">82<tspan dy="-0.07" font-size="0.2">%</tspan></text>
|
||||
</svg>
|
||||
<svg fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop">
|
||||
<use xlink:href="#piechart" mask="url(#piemask)" />
|
||||
<text x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1">82<tspan dy="-0.07" font-size="0.2">%</tspan></text>
|
||||
</svg>
|
||||
<svg fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop">
|
||||
<use xlink:href="#piechart" mask="url(#piemask)" />
|
||||
<text x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1">82<tspan dy="-0.07" font-size="0.2">%</tspan></text>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="demo-graphs mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col">
|
||||
<svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
|
||||
<use xlink:href="#chart" />
|
||||
</svg>
|
||||
<svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
|
||||
<use xlink:href="#chart" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="demo-cards mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet mdl-grid mdl-grid--no-spacing">
|
||||
<div class="demo-updates mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop">
|
||||
<div class="mdl-card__title mdl-card--expand mdl-color--teal-300">
|
||||
<h2 class="mdl-card__title-text">Updates</h2>
|
||||
</div>
|
||||
<div class="mdl-card__supporting-text mdl-color-text--grey-600">
|
||||
Non dolore elit adipisicing ea reprehenderit consectetur culpa.
|
||||
</div>
|
||||
<div class="mdl-card__actions mdl-card--border">
|
||||
<a href="#" class="mdl-button mdl-js-button mdl-js-ripple-effect">Read More</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-separator mdl-cell--1-col"></div>
|
||||
<div class="demo-options mdl-card mdl-color--deep-purple-500 mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--3-col-tablet mdl-cell--12-col-desktop">
|
||||
<div class="mdl-card__supporting-text mdl-color-text--blue-grey-50">
|
||||
<h3>View options</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="chkbox1" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
|
||||
<input type="checkbox" id="chkbox1" class="mdl-checkbox__input">
|
||||
<span class="mdl-checkbox__label">Click per object</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="chkbox2" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
|
||||
<input type="checkbox" id="chkbox2" class="mdl-checkbox__input">
|
||||
<span class="mdl-checkbox__label">Views per object</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="chkbox3" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
|
||||
<input type="checkbox" id="chkbox3" class="mdl-checkbox__input">
|
||||
<span class="mdl-checkbox__label">Objects selected</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="chkbox4" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
|
||||
<input type="checkbox" id="chkbox4" class="mdl-checkbox__input">
|
||||
<span class="mdl-checkbox__label">Objects viewed</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mdl-card__actions mdl-card--border">
|
||||
<a href="#" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-color-text--blue-grey-50">Change location</a>
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
<i class="material-icons">location_on</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="position: fixed; left: -1000px; height: -1000px;">
|
||||
<defs>
|
||||
<mask id="piemask" maskContentUnits="objectBoundingBox">
|
||||
<circle cx=0.5 cy=0.5 r=0.49 fill="white" />
|
||||
<circle cx=0.5 cy=0.5 r=0.40 fill="black" />
|
||||
</mask>
|
||||
<g id="piechart">
|
||||
<circle cx=0.5 cy=0.5 r=0.5 />
|
||||
<path d="M 0.5 0.5 0.5 0 A 0.5 0.5 0 0 1 0.95 0.28 z" stroke="none" fill="rgba(255, 255, 255, 0.75)" />
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 250" style="position: fixed; left: -1000px; height: -1000px;">
|
||||
<defs>
|
||||
<g id="chart">
|
||||
<g id="Gridlines">
|
||||
<line fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="27.3" x2="468.3" y2="27.3" />
|
||||
<line fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="66.7" x2="468.3" y2="66.7" />
|
||||
<line fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="105.3" x2="468.3" y2="105.3" />
|
||||
<line fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="144.7" x2="468.3" y2="144.7" />
|
||||
<line fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="184.3" x2="468.3" y2="184.3" />
|
||||
</g>
|
||||
<g id="Numbers">
|
||||
<text transform="matrix(1 0 0 1 485 29.3333)" fill="#888888" font-family="'Roboto'" font-size="9">500</text>
|
||||
<text transform="matrix(1 0 0 1 485 69)" fill="#888888" font-family="'Roboto'" font-size="9">400</text>
|
||||
<text transform="matrix(1 0 0 1 485 109.3333)" fill="#888888" font-family="'Roboto'" font-size="9">300</text>
|
||||
<text transform="matrix(1 0 0 1 485 149)" fill="#888888" font-family="'Roboto'" font-size="9">200</text>
|
||||
<text transform="matrix(1 0 0 1 485 188.3333)" fill="#888888" font-family="'Roboto'" font-size="9">100</text>
|
||||
<text transform="matrix(1 0 0 1 0 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">1</text>
|
||||
<text transform="matrix(1 0 0 1 78 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">2</text>
|
||||
<text transform="matrix(1 0 0 1 154.6667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">3</text>
|
||||
<text transform="matrix(1 0 0 1 232.1667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">4</text>
|
||||
<text transform="matrix(1 0 0 1 309 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">5</text>
|
||||
<text transform="matrix(1 0 0 1 386.6667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">6</text>
|
||||
<text transform="matrix(1 0 0 1 464.3333 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9">7</text>
|
||||
</g>
|
||||
<g id="Layer_5">
|
||||
<polygon opacity="0.36" stroke-miterlimit="10" points="0,223.3 48,138.5 154.7,169 211,88.5
|
||||
294.5,80.5 380,165.2 437,75.5 469.5,223.3 "/>
|
||||
</g>
|
||||
<g id="Layer_4">
|
||||
<polygon stroke-miterlimit="10" points="469.3,222.7 1,222.7 48.7,166.7 155.7,188.3 212,132.7
|
||||
296.7,128 380.7,184.3 436.7,125 "/>
|
||||
</g>
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
<a href="https://github.com/google/material-design-lite/blob/mdl-1.x/templates/dashboard/" target="_blank" id="view-source" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored mdl-color-text--white">View Source</a>
|
||||
<script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||