Zoom Calendar

This commit is contained in:
Paolo Arena
2020-01-21 01:37:15 +01:00
parent 905c4a4a62
commit f5355c3a54
6 changed files with 245 additions and 56 deletions

View File

@@ -35,6 +35,7 @@ const { PaymentType } = require('../models/paymenttype');
const { Discipline } = require('../models/discipline');
const { Newstosent } = require('../models/newstosent');
const { MyPage } = require('../models/mypage');
const { CalZoom } = require('../models/calzoom');
const { Gallery } = require('../models/gallery');
const { TemplEmail } = require('../models/templemail');
const { OpzEmail } = require('../models/opzemail');
@@ -179,6 +180,8 @@ function getTableByTableName(tablename) {
mytable = Gallery;
else if (tablename === 'mypage')
mytable = MyPage;
else if (tablename === 'calzoom')
mytable = CalZoom;
else if (tablename === 'templemail')
mytable = TemplEmail;
else if (tablename === 'opzemail')
@@ -425,6 +428,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
let newstosent = Promise.resolve([]);
let mailinglist = Promise.resolve([]);
let mypage = MyPage.findAllIdApp(idapp);
let calzoom = CalZoom.findAllIdApp(idapp);
let gallery = Gallery.findAllIdApp(idapp);
if (sall) {
newstosent = Newstosent.findAllIdApp(idapp);
@@ -435,7 +439,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
calcstat = User.calculateStat(idapp, req.user.username);
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery, paymenttype, calcstat])
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery, paymenttype, calcstat, calzoom])
.then((arrdata) => {
// console.table(arrdata);
const myuser = req.user;
@@ -458,6 +462,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
mypage: arrdata[10],
gallery: arrdata[11],
paymenttypes: arrdata[12],
calzoom: arrdata[14],
myuser,
});
})