- fix: La partecipazione agli eventi, non viene salvata correttamente e non visualizzava.
This commit is contained in:
@@ -1300,14 +1300,22 @@ sendNotifSchema.statics.RemoveOldNotif = async function (idapp, numgg) {
|
||||
{
|
||||
idapp,
|
||||
date_created: { $lt: limitDate },
|
||||
typedir: { $ne: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS },
|
||||
// typedir: { $ne: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS },
|
||||
$or: [
|
||||
{ typeid: { $ne: shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ } },
|
||||
{ status: { $ne: 0 } }
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
sendNotifSchema.statics.RemoveOldNotif90 = async function (idapp) {
|
||||
return this.RemoveOldNotif90(idapp, 90);
|
||||
return this.RemoveOldNotif(idapp, 90);
|
||||
}
|
||||
|
||||
sendNotifSchema.statics.RemoveOldNotif30 = async function (idapp) {
|
||||
return this.RemoveOldNotif(idapp, 30);
|
||||
}
|
||||
|
||||
sendNotifSchema.statics.updatePendingTransactions = async function (recnotif) {
|
||||
|
||||
@@ -45,7 +45,7 @@ router.post('/', authenticate, (req, res) => {
|
||||
// console.log('trovato', trovato);
|
||||
if (trovato) {
|
||||
return Booking.findOneAndUpdate({ id_bookedevent: id }, { $set: fieldtochange }, {
|
||||
new: false,
|
||||
new: true,
|
||||
upsert: true
|
||||
}).then((recbooking) => {
|
||||
// tools.mylog('booking:', booking);
|
||||
@@ -79,7 +79,7 @@ router.delete('/:id/:notify/:idapp', authenticate, (req, res) => {
|
||||
const notify = req.params.notify;
|
||||
const idapp = req.params.idapp;
|
||||
|
||||
Booking.deleteOne({_id: id}).then((recbooking) => {
|
||||
Booking.findOneAndDelete({_id: id}).then((recbooking) => {
|
||||
if (!recbooking) {
|
||||
return res.status(404).send();
|
||||
}
|
||||
|
||||
@@ -1409,7 +1409,13 @@ router.get('/loadsite/:userId/:idapp/:vers', authenticate_noerror,
|
||||
|
||||
function load(req, res, version) {
|
||||
|
||||
const userId = req.params.userId;
|
||||
let userId = '0';
|
||||
try {
|
||||
userId = req.user ? req.user._id.toString() : req.params.userId;
|
||||
} catch (e) {
|
||||
console.error('Err userId LOAD', e);
|
||||
userId = '0';
|
||||
}
|
||||
const idapp = req.params.idapp;
|
||||
|
||||
let status = 200
|
||||
|
||||
@@ -1432,6 +1432,8 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
await SendNotif.RemovePendentTransactions(true);
|
||||
} else if (mydata.dbop === 'RemoveOldNotif90') {
|
||||
await SendNotif.RemoveOldNotif90(idapp);
|
||||
} else if (mydata.dbop === 'RemoveOldNotif30') {
|
||||
await SendNotif.RemoveOldNotif30(idapp);
|
||||
} else if (mydata.dbop === 'UpdateCoordProv') {
|
||||
await Province.setCoordinatesOnDB();
|
||||
} else if (mydata.dbop === 'insertGeojsonToMongoDB') {
|
||||
|
||||
@@ -136,6 +136,7 @@ const textlang = {
|
||||
'ACCETTATO_NOTIFICA_ADMINS': '✅ l\'utente %s è stato accettato a far parte del Gruppo %s (da parte di %s)',
|
||||
'GROUP_REQUEST': 'Richiesta di entrare nel Gruppo %s da parte di %s',
|
||||
"CLICCA_QUI": "CLICCA QUI",
|
||||
"TELEFONO": "Tel",
|
||||
},
|
||||
si: {},
|
||||
es: {
|
||||
@@ -1724,7 +1725,12 @@ module.exports = {
|
||||
|
||||
removeSpecialCharForEmail(myhtml) {
|
||||
let msg = myhtml;
|
||||
try {
|
||||
if (msg)
|
||||
msg = msg.replace(/"/g, '\'');
|
||||
} catch (e) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
return msg;
|
||||
},
|
||||
@@ -2380,6 +2386,13 @@ module.exports = {
|
||||
query = [...query, ...queryadd];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const numtabbacheca = this.getNumTabByTable(shared_consts.TABLES_MYBACHECAS);
|
||||
if (numtab === numtabbacheca) {
|
||||
const queryadd = this.getQueryMyBacheca(idapp);
|
||||
query = [...query, ...queryadd];
|
||||
}
|
||||
*/
|
||||
|
||||
proj = {
|
||||
@@ -2422,11 +2435,13 @@ module.exports = {
|
||||
numpeople: 1,
|
||||
numpeopleLunch: 1,
|
||||
numpeopleDinner: 1,
|
||||
numpeopleDinnerShared: 1,
|
||||
infoevent: 1,
|
||||
msgbooking: 1,
|
||||
booked: 1,
|
||||
datebooked: 1,
|
||||
userId: 1,
|
||||
idapp: 1,
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -3114,6 +3129,11 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
if (params.table === shared_consts.TABLES_MYBACHECAS) {
|
||||
const myq = this.getQueryMyBacheca(idapp);
|
||||
query.push(myq[0]);
|
||||
}
|
||||
|
||||
if (params.filtersearch3or) {
|
||||
if (params.filtersearch3or.length > 0) {
|
||||
query.push({ $match: { $or: params.filtersearch3or } });
|
||||
@@ -5120,6 +5140,8 @@ module.exports = {
|
||||
let tiposcambio = ''
|
||||
let iconascambio = '🟢';
|
||||
|
||||
let lang = 'it';
|
||||
|
||||
let datastr = '';
|
||||
let dovestr = '';
|
||||
let organizedby = '';
|
||||
@@ -5159,11 +5181,14 @@ module.exports = {
|
||||
}
|
||||
|
||||
let contatto = userorig;
|
||||
let contatto_telegram = '';
|
||||
try {
|
||||
let username_telegram = myrec.profile.username_telegram;
|
||||
|
||||
if (username_telegram)
|
||||
contatto = `@${username_telegram}`;
|
||||
if (username_telegram) {
|
||||
contatto_telegram = `@${username_telegram}`;
|
||||
contatto = contatto_telegram;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
@@ -5189,11 +5214,11 @@ module.exports = {
|
||||
organizedBy = myrec.organisedBy;
|
||||
contatto = '';
|
||||
}
|
||||
if (myrec.contact_phone) {
|
||||
contatto += '/n' + myrec.contact_phone;
|
||||
if ((myrec.contact_telegram.toLowerCase() !== contatto_telegram.toLowerCase()) || !contatto) {
|
||||
contatto += '\n' + myrec.contact_telegram;
|
||||
}
|
||||
if (myrec.contact_telegram) {
|
||||
contatto += '/n' + myrec.contact_telegram;
|
||||
if (myrec.contact_phone) {
|
||||
contatto += ' - ' + this.get__('TELEFONO', lang) + ': ' + myrec.contact_phone;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5642,7 +5667,10 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.sulServer()) {
|
||||
// Finta Immagine
|
||||
img = 'https://riso.app/upload/profile/SoniaVioletFlame/myskills/1000133092.jpg';
|
||||
}
|
||||
|
||||
return img;
|
||||
} catch (e) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.61
|
||||
1.1.0
|
||||
Reference in New Issue
Block a user