- check updates

- risolto problema della generazione dei PDF, avevo modificato in CMyPageElem , se si cambia qualcosa occorre stare attenti a mettere !hideHeader
This commit is contained in:
Surya Paolo
2025-11-01 12:00:57 +01:00
parent 38c13eef28
commit 8d1dd45648
26 changed files with 660 additions and 556 deletions

View File

@@ -1409,7 +1409,7 @@ module.exports.removeProductInfoWithoutDateUpdatedFromGM = async function (idapp
return mylog;
};
module.exports.HideProductInfoWithoutDateUpdatedFromGM = async function (idapp) {
module.exports.unSetDate_Updated_fromGM_OnProduct = async function (idapp) {
const Product = this;
let mylog;

View File

@@ -874,6 +874,8 @@ sendNotifSchema.statics.compileOtherFields = async function (arrnotif) {
).lean();
if (myimgprofile && myimgprofile.profile.img)
notif.myimgsender = 'upload/profile/' + notif.sender + '/' + myimgprofile.profile.img;
else
notif.myimgsender = '/images/noimg-user.svg'
}
return arrnotif;

View File

@@ -8,6 +8,8 @@ mongoose.set('debug', false);
const { ObjectId } = require('mongodb');
const shared_consts = require('../tools/shared_nodejs');
const _ = require('lodash');
// Resolving error Unknown modifier: $pushAll
@@ -408,6 +410,7 @@ module.exports.createFirstUserAdmin = async function () {
const numusers = await User.countDocuments({ idapp: mysite.idapp });
if (numusers === 0) {
// Non esistono utenti, quindi creo quello di Admin
console.error('❌❌❌❌ ***** Non esistono utenti, quindi creo quello di Admin ! app=', mysite.idapp);
const utenteadmin = { idapp: '13', username: shared_consts.ADMIN_USER_SERVER };

View File

@@ -796,7 +796,7 @@ async function findUserByTokenAndAccess(User, decoded, token, typeaccess, withus
return await User.findOne(query, project).lean();
} catch (err) {
console.warn('Errore con decoded._id, provo con decoded.smart:', err.message);
// console.warn('Errore con decoded._id, provo con decoded.smart:', err.message);
// Fallback: usa decoded.smart
const query = {
@@ -917,6 +917,8 @@ UserSchema.statics.findByRefreshTokenAnyAccess = async function (refreshToken) {
}
}
return ris;
};