Project e Todos sistemati...
aggiunti Gruppi
This commit is contained in:
@@ -56,7 +56,9 @@ const Producer = require('../models/producer');
|
||||
const Cart = require('../models/cart');
|
||||
const OrdersCart = require('../models/orderscart');
|
||||
const Storehouse = require('../models/storehouse');
|
||||
const Department = require('../models/department');
|
||||
const ShareWithUs = require('../models/sharewithus');
|
||||
const Group = require('../models/group');
|
||||
const Order = require('../models/order');
|
||||
|
||||
const tools = require('../tools/general');
|
||||
@@ -202,14 +204,20 @@ function getTableByTableName(tablename) {
|
||||
mytable = Product;
|
||||
else if (tablename === 'storehouses')
|
||||
mytable = Storehouse;
|
||||
else if (tablename === 'departments')
|
||||
mytable = Department;
|
||||
else if (tablename === 'sharewithus')
|
||||
mytable = ShareWithUs;
|
||||
else if (tablename === 'groups')
|
||||
mytable = Group;
|
||||
else if (tablename === 'orders')
|
||||
mytable = Order;
|
||||
else if (tablename === 'producers')
|
||||
mytable = Producer;
|
||||
else if (tablename === 'carts')
|
||||
mytable = Cart;
|
||||
else if (tablename === 'orderscart')
|
||||
mytable = OrdersCart;
|
||||
else if (tablename === 'sendmsgs')
|
||||
mytable = SendMsg;
|
||||
else if (tablename === 'wheres')
|
||||
@@ -1111,7 +1119,9 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
let calzoom = CalZoom.findAllIdApp(idapp);
|
||||
let gallery = Gallery.findAllIdApp(idapp);
|
||||
let producers = Producer.findAllIdApp(idapp);
|
||||
let groups = Group.findAllIdApp(idapp);
|
||||
let storehouses = Storehouse.findAllIdApp(idapp);
|
||||
let departments = Department.findAllIdApp(idapp);
|
||||
let cart = null;
|
||||
let orderscart = null;
|
||||
if (sall) {
|
||||
@@ -1126,7 +1136,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
}
|
||||
|
||||
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery, paymenttype, calcstat, calzoom, producers, cart, storehouses, orderscart])
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, settings, permissions, disciplines, newstosent, mailinglist, mypage, gallery, paymenttype, calcstat, calzoom, producers, cart, storehouses, departments, orderscart, groups])
|
||||
.then((arrdata) => {
|
||||
// console.table(arrdata);
|
||||
const myuser = req.user;
|
||||
@@ -1153,7 +1163,9 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
producers: arrdata[15],
|
||||
cart: arrdata[16],
|
||||
storehouses: arrdata[17],
|
||||
orders: arrdata[18],
|
||||
departments: arrdata[18],
|
||||
orders: arrdata[19],
|
||||
groups: arrdata[20],
|
||||
myuser,
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user