- aggiunto componenti per Home Template... ma ancora da provare

- sistemato catprods
- Sistemato menu
This commit is contained in:
Surya Paolo
2025-09-22 19:09:02 +02:00
parent 4a05ddee50
commit 08cf4b6d9f
31 changed files with 475 additions and 31 deletions

View File

@@ -977,14 +977,6 @@ module.exports.getArrCatProds = async function (idapp, cosa) {
let myquery = [
...addquery,
{
$lookup: {
from: 'productinfos',
localField: 'idProductInfo',
foreignField: '_id',
as: 'productInfo',
},
},
{
$lookup: {
from: 'catprods',
@@ -1015,6 +1007,10 @@ module.exports.getArrCatProds = async function (idapp, cosa) {
let arr = [];
arr = await Product.aggregate(myquery);
if (cosa !== shared_consts.PROD.GAS) {
// console.log(JSON.stringify(myquery, null, 2))
}
// arr = result.map(category => category.name);
return arr;
} catch (e) {