- Profile
- Bot Telegram - fixed Chip multiselect
This commit is contained in:
@@ -27,6 +27,7 @@ const { Operator } = require('../models/operator');
|
||||
const { Where } = require('../models/where');
|
||||
const { MyEvent } = require('../models/myevent');
|
||||
const { Contribtype } = require('../models/contribtype');
|
||||
const { PaymentType } = require('../models/paymenttype');
|
||||
const { Discipline } = require('../models/discipline');
|
||||
const { Newstosent } = require('../models/newstosent');
|
||||
const { MyPage } = require('../models/mypage');
|
||||
@@ -161,6 +162,8 @@ function getTableByTableName(tablename) {
|
||||
mytable = MyEvent;
|
||||
else if (tablename === 'contribtype')
|
||||
mytable = Contribtype;
|
||||
else if (tablename === 'paymenttypes')
|
||||
mytable = PaymentType;
|
||||
else if (tablename === 'disciplines')
|
||||
mytable = Discipline;
|
||||
else if (tablename === 'newstosent')
|
||||
@@ -244,7 +247,7 @@ router.patch('/chval', authenticate, (req, res) => {
|
||||
const mytable = getTableByTableName(mydata.table);
|
||||
const fieldsvalue = mydata.fieldsvalue;
|
||||
|
||||
// tools.mylogshow('PATCH CHVAL: ', id, fieldsvalue);
|
||||
tools.mylogshow('PATCH CHVAL: ', id, fieldsvalue);
|
||||
|
||||
// If I change my record...
|
||||
if ((!User.isAdmin(req.user) && !User.isManager(req.user)) && !(req.user._id.toString() === id)) {
|
||||
@@ -373,6 +376,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
const operators = Operator.findAllIdApp(idapp);
|
||||
const wheres = Where.findAllIdApp(idapp);
|
||||
const contribtype = Contribtype.findAllIdApp(idapp);
|
||||
const paymenttype = PaymentType.findAllIdApp(idapp);
|
||||
const disciplines = Discipline.findAllIdApp(idapp);
|
||||
const settings = Settings.findAllIdApp(idapp, false);
|
||||
|
||||
@@ -386,7 +390,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
newstosent = Newstosent.findAllIdApp(idapp);
|
||||
}
|
||||
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery])
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery, paymenttype])
|
||||
.then((arrdata) => {
|
||||
// console.table(arrdata);
|
||||
const myuser = req.user;
|
||||
@@ -407,6 +411,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
mailinglist: arrdata[9],
|
||||
mypage: arrdata[10],
|
||||
gallery: arrdata[11],
|
||||
paymenttypes: arrdata[12],
|
||||
myuser,
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user