actualizacion de cupo

This commit is contained in:
DanielRamirezGe
2019-10-15 19:50:46 -05:00
parent 7561619359
commit 089d5055d8
4 changed files with 40 additions and 13 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ app.get('/cupo', async(req, res) => {
return;
}
arr.push([element.nombre, 150, 150 - element.capacidad, r[0].asis]);
if (element.idConferencia == 13) {
if (element.idConferencia == results.length) {
res.status(200).json(arr);
return;
}
+36 -9
View File
@@ -1,11 +1,38 @@
var wb = XLSX.utils.book_new();
wb.Props = {
Title: "SheetJS Tutorial",
Subject: "Test",
Author: "Red Stapler",
CreatedDate: new Date(2017, 12, 19)
};
// Require library
var excel = require('excel4node');
// Create a new instance of a Workbook class
app.get('/get_excel', async(req, res) => {
var workbook = new excel.Workbook();
/ * Agregar la hoja de trabajo al libro de trabajo * /
XLSX.utils.book_append_sheet(wb, ws, ws_name);
// Add Worksheets to the workbook
var worksheet = workbook.addWorksheet('Sheet 1');
var worksheet2 = workbook.addWorksheet('Sheet 2');
// Create a reusable style
var style = workbook.createStyle({
font: {
color: '#FF0800',
size: 12
},
numberFormat: '$#,##0.00; ($#,##0.00); -'
});
// Set value of cell A1 to 100 as a number type styled with paramaters of style
worksheet.cell(1, 1).number(100).style(style);
// Set value of cell B1 to 300 as a number type styled with paramaters of style
worksheet.cell(1, 2).number(200).style(style);
// Set value of cell C1 to a formula styled with paramaters of style
worksheet.cell(1, 3).formula('A1 + B1').style(style);
// Set value of cell A2 to 'string' styled with paramaters of style
worksheet.cell(2, 1).string('string').style(style);
// Set value of cell A3 to true as a boolean type styled with paramaters of style but with an adjustment to the font size.
worksheet.cell(3, 1).bool(true).style(style).style({ font: { size: 14 } });
workbook.write('Excel.xlsx');
})
module.exports = app;
+1 -2
View File
@@ -12,6 +12,5 @@ app.use(require('./verificarConferencia'));
app.use(require('./cupo'));
app.use(require('./loginAdmin'));
app.use(require('./paseLista'));
//app.use(require('./get_excel'));
module.exports = app;
+2 -1
View File
@@ -3,6 +3,7 @@ const express = require('express')
var app = express();
app.get('/paseLista', async(req, res) => {
var datetime = await new Date();
var mayor = new Date();
var menor = new Date();
await mayor.setMinutes(datetime.getMinutes() + 30);
@@ -51,7 +52,7 @@ app.get('/paseLista', async(req, res) => {
return;
});
} else {
res.status(400).json({ error: false, msj: 'No se encontro la persona' });
res.status(400).json({ msj: 'No se encontro la persona' });
return;
}
})