Lista Navi
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
p Dobrodošli #{name} nel portale di #{nomeapp}!
|
p Benvenuto #{name} nel portale di #{nomeapp}!
|
||||||
p I tuoi dati di accesso da ricordare sono:
|
p I tuoi dati di accesso da ricordare sono:
|
||||||
span Username:
|
span Username:
|
||||||
strong #{username}<br>
|
strong #{username}<br>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
p Bem-vindo #{nome} ao portal de #{nomeapp}!
|
p Bem-vindo #{name} ao portal de #{nomeapp}!
|
||||||
p Os seus dados de login a lembrar são:
|
p Os seus dados de login a lembrar são:
|
||||||
span Username:
|
span Username:
|
||||||
strong #{username}<br>
|
strong #{username}<br>
|
||||||
span você esqueceu sua senha? :
|
span você esqueceu sua senha? :
|
||||||
strong <a href=##{forgetpwd} target="_blank">Encontre-o aqui</a>>br>
|
strong <a href=##{forgetpwd} target="_blank">Encontre-o aqui</a>>br>
|
||||||
span Email:
|
span Email:
|
||||||
strong #{{emailto}<br>
|
strong #{emailto}<br>
|
||||||
p Clique no botão para confirmar o seu registo ou clique aqui #{strlinkreg}:
|
p Clique no botão para confirmar o seu registo ou clique aqui #{strlinkreg}:
|
||||||
div.divbtn <a href=#{strlinkreg} target="_blank">
|
div.divbtn <a href=#{strlinkreg} target="_blank">
|
||||||
button.btn.btn-lg Verificação de registro</a>
|
button.btn.btn-lg Verificação de registro</a>
|
||||||
@@ -14,8 +14,8 @@ p Você pode então acessar sua área pessoal digitando seu nome de usuário e s
|
|||||||
strong ENTRAR <br>
|
strong ENTRAR <br>
|
||||||
|
|
||||||
p Então, uma vez verificada a sua inscrição, inicie a sessão no site e
|
p Então, uma vez verificada a sua inscrição, inicie a sessão no site e
|
||||||
COMPLETA TODOS OS PASSOS
|
strong COMPLETA TODOS OS PASSOS
|
||||||
do "Guia Passo a Passo" através deste link:<br>
|
span do "Guia Passo a Passo" através deste link:<br>
|
||||||
span <a href=#{strlinksito} target="_blank">#{strlinksito}</a>
|
span <a href=#{strlinksito} target="_blank">#{strlinksito}</a>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
p Dobrodoli #{name} na portalu #{nomeapp}!
|
p Dobrodošli #{name} na portalu #{nomeapp}!
|
||||||
p Vaši podatki za dostop so:
|
p Vaši podatki za dostop so:
|
||||||
span Username:
|
span Username:
|
||||||
strong #{username}<br>
|
strong #{username}<br>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ ListaIngressoSchema.statics.addUserInListaIngresso = async function (idapp, ind_
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function getQueryProj(myfilter) {
|
function getQueryProj(myfilter, myobjField, myfilter2) {
|
||||||
const query = [
|
const query = [
|
||||||
{ $match: myfilter },
|
{ $match: myfilter },
|
||||||
{
|
{
|
||||||
@@ -201,6 +201,8 @@ function getQueryProj(myfilter) {
|
|||||||
{
|
{
|
||||||
$replaceRoot: { newRoot: { $mergeObjects: [{ $arrayElemAt: ["$user", 0] }, "$$ROOT"] } }
|
$replaceRoot: { newRoot: { $mergeObjects: [{ $arrayElemAt: ["$user", 0] }, "$$ROOT"] } }
|
||||||
},
|
},
|
||||||
|
{ $match: myfilter2 },
|
||||||
|
{ $project: myobjField }
|
||||||
];
|
];
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
@@ -210,24 +212,13 @@ function getQueryProj(myfilter) {
|
|||||||
ListaIngressoSchema.statics.showListaOrd = async function (idapp, solonuovi) {
|
ListaIngressoSchema.statics.showListaOrd = async function (idapp, solonuovi) {
|
||||||
const ListaIngresso = this;
|
const ListaIngresso = this;
|
||||||
|
|
||||||
const { User } = require('./user');
|
arrrec = await ListaIngresso.getProssimiInLista(idapp, solonuovi);
|
||||||
|
|
||||||
let myquery = '';
|
|
||||||
|
|
||||||
if (solonuovi)
|
|
||||||
myquery = getQueryProj({ idapp, added: false });
|
|
||||||
else
|
|
||||||
myquery = getQueryProj({ idapp });
|
|
||||||
|
|
||||||
arrrec = await ListaIngresso.aggregate(myquery).sort({ indprimario: 1 });
|
|
||||||
|
|
||||||
let mystr = '';
|
let mystr = '';
|
||||||
let conta = 1;
|
let conta = 1;
|
||||||
for (const rec of arrrec) {
|
for (const rec of arrrec) {
|
||||||
rec.numinvitati = await User.getnumInvitati(idapp, rec.username);
|
|
||||||
rec.numinvitatiattivi = await User.getnumInvitatiAttivi(idapp, rec.username);
|
|
||||||
|
|
||||||
mystr += '[' + conta + '] ' + rec.ind_order + ' [' + rec.numinvitatiattivi + '] - [' + rec.numinvitati + '] (' + rec.ind_order + ') ' + rec.name + ' ' + rec.surname;
|
mystr += '[' + conta + '] ' + rec.ind_order + ' [' + rec.numinvitatiattivi + '] - [' + rec.numinvitati + '] (' + rec.ind_order + ') ' + rec.name + ' ' + rec.surname;
|
||||||
|
mystr += ' num_tess = ' + rec.num_tess;
|
||||||
if (rec.added)
|
if (rec.added)
|
||||||
mystr += ' (ADDED ++)';
|
mystr += ' (ADDED ++)';
|
||||||
|
|
||||||
@@ -260,19 +251,46 @@ ListaIngressoSchema.statics.findAllIdApp = function (idapp) {
|
|||||||
|
|
||||||
function sortRec(rec) {
|
function sortRec(rec) {
|
||||||
return rec.sort(function (reca, recb) {
|
return rec.sort(function (reca, recb) {
|
||||||
return recb.numinvitatiattivi - reca.numinvitatiattivi
|
return Math.round((recb.numinvitatiattivi + recb.numinvitati) / recb.num_tess) - Math.round((reca.numinvitatiattivi + reca.numinvitati) / reca.num_tess);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ListaIngressoSchema.statics.getProssimiInLista = async function (idapp, tutti) {
|
ListaIngressoSchema.statics.getProssimiInLista = async function (idapp, solonuovi) {
|
||||||
const ListaIngresso = this;
|
const ListaIngresso = this;
|
||||||
|
|
||||||
const myquery = getQueryProj({
|
let myquery = '';
|
||||||
|
|
||||||
|
let myobjField = {
|
||||||
|
idapp: 1,
|
||||||
|
ind_order: 1,
|
||||||
|
name: 1,
|
||||||
|
surname: 1,
|
||||||
|
username: 1,
|
||||||
|
email: 1,
|
||||||
|
lang: 1,
|
||||||
|
num_tess: 1,
|
||||||
|
added: 1,
|
||||||
|
deleted: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
let myfilter2 = {
|
||||||
|
username: { $exists: true },
|
||||||
|
};
|
||||||
|
|
||||||
|
if (solonuovi) {
|
||||||
|
myquery = getQueryProj({
|
||||||
'idapp': idapp,
|
'idapp': idapp,
|
||||||
ind_order: { $gt: 0 },
|
ind_order: { $gte: 0 },
|
||||||
added: false,
|
added: false,
|
||||||
deleted: false,
|
deleted: false,
|
||||||
});
|
}, myobjField, myfilter2);
|
||||||
|
} else {
|
||||||
|
myquery = getQueryProj({
|
||||||
|
'idapp': idapp,
|
||||||
|
ind_order: { $gte: 0 },
|
||||||
|
deleted: false,
|
||||||
|
}, myobjField, myfilter2);
|
||||||
|
}
|
||||||
|
|
||||||
arrrec = await ListaIngresso.aggregate(myquery).sort({ indprimario: 1 })
|
arrrec = await ListaIngresso.aggregate(myquery).sort({ indprimario: 1 })
|
||||||
.then(async (arrlista) => {
|
.then(async (arrlista) => {
|
||||||
@@ -280,6 +298,7 @@ ListaIngressoSchema.statics.getProssimiInLista = async function (idapp, tutti) {
|
|||||||
const { User } = require('../models/user');
|
const { User } = require('../models/user');
|
||||||
|
|
||||||
for (const rec of arrlista) {
|
for (const rec of arrlista) {
|
||||||
|
rec.numinvitati = await User.getnumInvitati(idapp, rec.username);
|
||||||
rec.numinvitatiattivi = await User.getnumInvitatiAttivi(idapp, rec.username);
|
rec.numinvitatiattivi = await User.getnumInvitatiAttivi(idapp, rec.username);
|
||||||
if (rec.numinvitatiattivi > 2)
|
if (rec.numinvitatiattivi > 2)
|
||||||
rec.numinvitatiattivi = 2;
|
rec.numinvitatiattivi = 2;
|
||||||
|
|||||||
@@ -43,15 +43,6 @@ const NaveSchema = new mongoose.Schema({
|
|||||||
parent_id: {
|
parent_id: {
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
},
|
},
|
||||||
/*date_start: {
|
|
||||||
type: Date
|
|
||||||
},
|
|
||||||
date_gift_chat_open: {
|
|
||||||
type: Date
|
|
||||||
},
|
|
||||||
link_chat: {
|
|
||||||
type: String,
|
|
||||||
},*/
|
|
||||||
sent_msg_howto_make_gift: {
|
sent_msg_howto_make_gift: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -80,18 +71,6 @@ const NaveSchema = new mongoose.Schema({
|
|||||||
note: {
|
note: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
/* provvisoria: {
|
|
||||||
type: Boolean
|
|
||||||
},
|
|
||||||
note_bot: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
note_interne: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
tutor: {
|
|
||||||
type: String
|
|
||||||
}*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
NaveSchema.statics.getTotInLista = async function (idapp) {
|
NaveSchema.statics.getTotInLista = async function (idapp) {
|
||||||
@@ -115,6 +94,20 @@ NaveSchema.statics.findByIndOrder = function (idapp, ind_order) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NaveSchema.statics.findByIndOrderAndNumTess = function (idapp, ind_order, num_tess) {
|
||||||
|
const Nave = this;
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Nave.findOne({
|
||||||
|
idapp,
|
||||||
|
ind_order,
|
||||||
|
num_tess,
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
NaveSchema.statics.findById = function (idapp, id) {
|
NaveSchema.statics.findById = function (idapp, id) {
|
||||||
const Nave = this;
|
const Nave = this;
|
||||||
|
|
||||||
@@ -140,7 +133,9 @@ NaveSchema.statics.findByIndPrimario = function (idapp, indprimario) {
|
|||||||
|
|
||||||
NaveSchema.statics.getFieldsForSearch = function () {
|
NaveSchema.statics.getFieldsForSearch = function () {
|
||||||
return [{ field: 'ind_order', type: tools.FieldType.number },
|
return [{ field: 'ind_order', type: tools.FieldType.number },
|
||||||
{ field: 'col', type: tools.FieldType.number }]
|
{ field: 'riga', type: tools.FieldType.number },
|
||||||
|
{ field: 'col', type: tools.FieldType.number },
|
||||||
|
{ field: '_id', type: tools.FieldType.exact }]
|
||||||
};
|
};
|
||||||
|
|
||||||
NaveSchema.statics.executeQueryTable = function (idapp, params) {
|
NaveSchema.statics.executeQueryTable = function (idapp, params) {
|
||||||
@@ -365,7 +360,7 @@ NaveSchema.statics.findGeneric = function (myrigacol) {
|
|||||||
myarr = { ...newrec._doc, ...rec[0]._doc };
|
myarr = { ...newrec._doc, ...rec[0]._doc };
|
||||||
return myarr;
|
return myarr;
|
||||||
} else {
|
} else {
|
||||||
let myarr = null;
|
let myarr = rec[0];
|
||||||
if (!!newrec) {
|
if (!!newrec) {
|
||||||
if (rec[0]._doc === undefined)
|
if (rec[0]._doc === undefined)
|
||||||
myarr = { ...newrec._doc, ...rec[0] };
|
myarr = { ...newrec._doc, ...rec[0] };
|
||||||
@@ -426,6 +421,7 @@ function getQueryProj(myfilter) {
|
|||||||
username: 1,
|
username: 1,
|
||||||
'profile.paymenttypes': 1,
|
'profile.paymenttypes': 1,
|
||||||
'profile.email_paypal': 1,
|
'profile.email_paypal': 1,
|
||||||
|
'profile.cell': 1,
|
||||||
made_gift: 1,
|
made_gift: 1,
|
||||||
sent_msg_howto_make_gift: 1,
|
sent_msg_howto_make_gift: 1,
|
||||||
date_made_gift: 1,
|
date_made_gift: 1,
|
||||||
@@ -741,6 +737,7 @@ NaveSchema.statics.getNavePos = async function (idapp, riga, col, solorecord, in
|
|||||||
if (indfuoco === 1)
|
if (indfuoco === 1)
|
||||||
primofuoco = recfuoco;
|
primofuoco = recfuoco;
|
||||||
|
|
||||||
|
if (!!recfuoco) {
|
||||||
let symbol = '';
|
let symbol = '';
|
||||||
if (recfuoco.made_gift) {
|
if (recfuoco.made_gift) {
|
||||||
symbol = '🎁';
|
symbol = '🎁';
|
||||||
@@ -755,6 +752,7 @@ NaveSchema.statics.getNavePos = async function (idapp, riga, col, solorecord, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (donitotali > 0 && donifatti >= donitotali) {
|
if (donitotali > 0 && donifatti >= donitotali) {
|
||||||
mystr += tools.ACAPO + '💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫' + tools.ACAPO +
|
mystr += tools.ACAPO + '💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫💫' + tools.ACAPO +
|
||||||
@@ -852,7 +850,9 @@ NaveSchema.statics.showListaOrd = async function (idapp) {
|
|||||||
for (const rec of arrrec) {
|
for (const rec of arrrec) {
|
||||||
let recnavepersistente = await NavePersistente.findByRigaColByDonatore(idapp, rec.riga, rec.col, 0);
|
let recnavepersistente = await NavePersistente.findByRigaColByDonatore(idapp, rec.riga, rec.col, 0);
|
||||||
if (!!recnavepersistente) {
|
if (!!recnavepersistente) {
|
||||||
mystr += '[' + conta + '] [' + rec.riga + '.' + rec.col + '] ' + rec.ind_order + ' ' + rec.name + ' ' + rec.surname + ' (' + tools.getstrDateShort(recnavepersistente.date_start) + ')\n';
|
mystr += '[' + conta + '] [' + rec.riga + '.' + rec.col + '] ' + rec.ind_order + ' ' + rec.name + ' ' + rec.surname + ' (' + tools.getstrDateShort(recnavepersistente.date_start) + ')';
|
||||||
|
mystr += ' num_tess = ' + rec.num_tess;
|
||||||
|
mystr += '\n';
|
||||||
}
|
}
|
||||||
conta++;
|
conta++;
|
||||||
}
|
}
|
||||||
@@ -911,9 +911,13 @@ async function addRecordNaveByParams(params, siRitesse) {
|
|||||||
});
|
});
|
||||||
myNave.created = new Date();
|
myNave.created = new Date();
|
||||||
|
|
||||||
console.log('[' + params.riga + ',' + params.col + ']');
|
// console.log('[' + params.riga + ',' + params.col + ']');
|
||||||
|
// console.log('parent = [' + params.rigaparent + ',' + params.colparent + ']');
|
||||||
|
|
||||||
const recfindparent = await Nave.findByRigaCol(idapp, params.rigaparent, params.colparent, false);
|
const recfindparent = await Nave.findByRigaCol(idapp, params.rigaparent, params.colparent, false);
|
||||||
|
|
||||||
|
// console.log('recfindparent = [' + recfindparent + ']');
|
||||||
|
// console.table(recfindparent);
|
||||||
if (!!recfindparent) {
|
if (!!recfindparent) {
|
||||||
myNave.parent_id = recfindparent._id;
|
myNave.parent_id = recfindparent._id;
|
||||||
} else {
|
} else {
|
||||||
@@ -978,7 +982,7 @@ NaveSchema.statics.checkifDeveRitessersi = async function (recuser) {
|
|||||||
arrrec = await Nave.find({ idapp: recuser.idapp, ind_order: recuser.ind_order });
|
arrrec = await Nave.find({ idapp: recuser.idapp, ind_order: recuser.ind_order });
|
||||||
|
|
||||||
if (!!arrrec) {
|
if (!!arrrec) {
|
||||||
if (arrrec.length > 2) {
|
if ((arrrec.length % 2) === 0) {
|
||||||
// deveritessersi = await User.deveRitessersi(recuser.idapp, recuser.ind_order)
|
// deveritessersi = await User.deveRitessersi(recuser.idapp, recuser.ind_order)
|
||||||
deveritessersi = false;
|
deveritessersi = false;
|
||||||
}
|
}
|
||||||
@@ -1006,6 +1010,9 @@ NaveSchema.statics.addUserFromListaIngresso_IntoNave = async function (init, ida
|
|||||||
params.colparent = Math.ceil(params.col / 2);
|
params.colparent = Math.ceil(params.col / 2);
|
||||||
params.rigaparent = params.riga - 1;
|
params.rigaparent = params.riga - 1;
|
||||||
|
|
||||||
|
if (params.rigaparent === 0)
|
||||||
|
params.colparent = 0;
|
||||||
|
|
||||||
myriga = params.riga;
|
myriga = params.riga;
|
||||||
mycol = params.col;
|
mycol = params.col;
|
||||||
|
|
||||||
@@ -1013,25 +1020,16 @@ NaveSchema.statics.addUserFromListaIngresso_IntoNave = async function (init, ida
|
|||||||
if (inserito) {
|
if (inserito) {
|
||||||
if (idapp === tools.AYNI) {
|
if (idapp === tools.AYNI) {
|
||||||
if (((params.col) % 8) === 0) {
|
if (((params.col) % 8) === 0) {
|
||||||
// Trova se la persona di 3 livelli sopra, si deve ritessere
|
|
||||||
let recmediatore = await Nave.findMediatoreByFuoco(idapp, myriga, mycol, 0);
|
let recmediatore = await Nave.findMediatoreByFuoco(idapp, myriga, mycol, 0);
|
||||||
if (!!recmediatore) {
|
if (!!recmediatore) {
|
||||||
const ris = await Nave.checkifDeveRitessersi(recmediatore);
|
const ris = await Nave.checkifDeveRitessersi(recmediatore);
|
||||||
if (ris.num_tess >= 2) {
|
if (ris.deveritessersi) {
|
||||||
console.log('E\' arrivato alla TERZA RITESSITURA, PERTANTO LO METTIAMO IN CODA... [riga=', params.riga, 'col', params.col, '] indorder=' + recmediatore.ind_order);
|
console.log('Si deve ritesere: [riga=', params.riga, 'col', params.col, ']');
|
||||||
// E' arrivato alla TERZA RITESSITURA, PERTANTO LO METTIAMO IN CODA...
|
|
||||||
|
|
||||||
//++Todo: TESSITURA????
|
|
||||||
|
|
||||||
//const risultato = await ListaIngresso.addUserInListaIngresso(idapp, recmediatore.ind_order, rec.lang, false, ris.num_tess);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log('Si deve ritessere: [riga=', params.riga, 'col', params.col, ']');
|
|
||||||
if (ris.deveritessersi) {
|
if (ris.deveritessersi) {
|
||||||
params.indprimario = recmediatore.indprimario;
|
params.indprimario = recmediatore.indprimario;
|
||||||
params.ind_order = recmediatore.ind_order;
|
params.ind_order = recmediatore.ind_order;
|
||||||
params.id = recmediatore._id;
|
params.id = recmediatore._id;
|
||||||
params.num_tess = ris.num_tess;
|
params.num_tess = ris.num_tess + 1;
|
||||||
|
|
||||||
await addRecordNaveByParams(params, true);
|
await addRecordNaveByParams(params, true);
|
||||||
}
|
}
|
||||||
@@ -1130,13 +1128,11 @@ NaveSchema.statics.checkIfDevoAggiungereInNave = async function (idapp) {
|
|||||||
const { ListaIngresso } = require('./listaingresso');
|
const { ListaIngresso } = require('./listaingresso');
|
||||||
|
|
||||||
// Ottieni la lista Ordinata in base al numero d'invitati
|
// Ottieni la lista Ordinata in base al numero d'invitati
|
||||||
arrlista = await ListaIngresso.getProssimiInLista(idapp, false);
|
arrlista = await ListaIngresso.getProssimiInLista(idapp, true);
|
||||||
|
|
||||||
for (const rec of arrlista) {
|
for (const rec of arrlista) {
|
||||||
if (rec.numinvitatiattivi >= 2) {
|
|
||||||
await addUserToNave(idapp, rec);
|
await addUserToNave(idapp, rec);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1157,7 +1153,7 @@ NaveSchema.statics.pulisciNonPresenzeInNave = async function (idapp) {
|
|||||||
arrrec = await ListaIngresso.aggregate(myquery)
|
arrrec = await ListaIngresso.aggregate(myquery)
|
||||||
.then(async (arrlista) => {
|
.then(async (arrlista) => {
|
||||||
for (const rec of arrlista) {
|
for (const rec of arrlista) {
|
||||||
const trovato = await Nave.findByIndOrder(idapp, rec.ind_order);
|
const trovato = await Nave.findByIndOrderAndNumTess(idapp, rec.ind_order, rec.num_tess);
|
||||||
if (!trovato) {
|
if (!trovato) {
|
||||||
let fields_to_update = { added: false };
|
let fields_to_update = { added: false };
|
||||||
await ListaIngresso.findOneAndUpdate({ _id: rec._id }, { $set: fields_to_update }, { new: false });
|
await ListaIngresso.findOneAndUpdate({ _id: rec._id }, { $set: fields_to_update }, { new: false });
|
||||||
@@ -1171,6 +1167,31 @@ NaveSchema.statics.pulisciNonPresenzeInNave = async function (idapp) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NaveSchema.statics.visuNaviUtentiEliminati = async function (idapp) {
|
||||||
|
const Nave = this;
|
||||||
|
|
||||||
|
let numrec = 0;
|
||||||
|
|
||||||
|
const myquery = getQueryProj({ idapp });
|
||||||
|
|
||||||
|
arrrec = await Nave.aggregate(myquery).sort({ riga: 1, col: 1 });
|
||||||
|
|
||||||
|
let mystr = 'ELIMINATI: \n';
|
||||||
|
let conta = 0;
|
||||||
|
for (const rec of arrrec) {
|
||||||
|
if (!rec.username) {
|
||||||
|
let navepersistente = await NavePersistente.findByRigaColByDonatore(idapp, rec.riga, rec.col, 0);
|
||||||
|
mystr += '[' + conta + '] [NAVI ' + navepersistente.riga + '.' + navepersistente.col + '] [' + rec.riga + '.' + rec.col + '] ' + rec.ind_order;
|
||||||
|
mystr += ' num_tess = ' + rec.num_tess;
|
||||||
|
mystr += '\n';
|
||||||
|
conta++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { mystr, num: conta };
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
NaveSchema.statics.getNaveByUser = async function (idapp, ind_order, lang, fuoco) {
|
NaveSchema.statics.getNaveByUser = async function (idapp, ind_order, lang, fuoco) {
|
||||||
const Nave = this;
|
const Nave = this;
|
||||||
|
|
||||||
@@ -1195,19 +1216,17 @@ NaveSchema.statics.getNaveByUser = async function (idapp, ind_order, lang, fuoco
|
|||||||
return mystr;
|
return mystr;
|
||||||
};
|
};
|
||||||
|
|
||||||
NaveSchema.statics.getNaveByRigaCol = async function (idapp, riganave, colnave) {
|
NaveSchema.statics.getNaveByRigaCol = async function (idapp, rigapos, colpos) {
|
||||||
const Nave = this;
|
const Nave = this;
|
||||||
|
|
||||||
const rigaprec = riganave;
|
|
||||||
|
|
||||||
rec = {};
|
rec = {};
|
||||||
rec = await Nave.getPlaccaPerMediatore(idapp, riganave, colnave, true, rec);
|
rec = await Nave.getPlaccaPerMediatore(idapp, rigapos, colpos, true, rec);
|
||||||
|
|
||||||
if (riganave < 4) {
|
if (rigapos < 4) {
|
||||||
riganave = 4;
|
rigapos = 4;
|
||||||
colnave = 1;
|
colpos = 1;
|
||||||
}
|
}
|
||||||
rec = await Nave.getPlaccaPerDonatore(idapp, riganave, colnave, true, rec);
|
rec = await Nave.getPlaccaPerDonatore(idapp, rigapos, colpos, true, rec);
|
||||||
|
|
||||||
return rec;
|
return rec;
|
||||||
};
|
};
|
||||||
@@ -1215,8 +1234,8 @@ NaveSchema.statics.getNaveByRigaCol = async function (idapp, riganave, colnave)
|
|||||||
NaveSchema.statics.getDonatoridelSognatore = async function (idapp, riganave, colnave) {
|
NaveSchema.statics.getDonatoridelSognatore = async function (idapp, riganave, colnave) {
|
||||||
const Nave = this;
|
const Nave = this;
|
||||||
|
|
||||||
coldonatoreIni = calcval(riganave, colnave, 8) + (1);
|
coldonatoreIni = ((colnave - 1) * 64) + (1);
|
||||||
coldonatoreFine = calcval(riganave, colnave, 8) + (64);
|
coldonatoreFine = coldonatoreIni + (64);
|
||||||
|
|
||||||
const myquery = getQueryProj({
|
const myquery = getQueryProj({
|
||||||
idapp,
|
idapp,
|
||||||
|
|||||||
@@ -77,6 +77,62 @@ const NavePersistenteSchema = new mongoose.Schema({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getQueryProj(myfilter) {
|
||||||
|
|
||||||
|
myobjField = {
|
||||||
|
_id: 1,
|
||||||
|
idapp: 1,
|
||||||
|
lang: 1,
|
||||||
|
ind_order: 1,
|
||||||
|
name: 1,
|
||||||
|
surname: 1,
|
||||||
|
username: 1,
|
||||||
|
'profile.paymenttypes': 1,
|
||||||
|
'profile.email_paypal': 1,
|
||||||
|
'profile.cell': 1,
|
||||||
|
made_gift: 1,
|
||||||
|
sent_msg_howto_make_gift: 1,
|
||||||
|
date_made_gift: 1,
|
||||||
|
note: 1,
|
||||||
|
received_gift: 1,
|
||||||
|
date_received_gift: 1,
|
||||||
|
num_tess: 1,
|
||||||
|
indprimario: 1,
|
||||||
|
parent_id: 1,
|
||||||
|
riga: 1,
|
||||||
|
col: 1,
|
||||||
|
created: 1,
|
||||||
|
// date_start: 1,
|
||||||
|
// date_gift_chat_open: 1,
|
||||||
|
// link_chat: 1,
|
||||||
|
// provvisoria: 1,
|
||||||
|
// note_bot: 1,
|
||||||
|
// note_interne: 1,
|
||||||
|
// tutor: 1,
|
||||||
|
// tutor_namesurname: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
const query = [
|
||||||
|
{ $match: myfilter },
|
||||||
|
{
|
||||||
|
$lookup: {
|
||||||
|
from: "users",
|
||||||
|
localField: "ind_order",
|
||||||
|
foreignField: "ind_order", // field in the user collection
|
||||||
|
as: "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$replaceRoot: { newRoot: { $mergeObjects: [{ $arrayElemAt: ["$user", 0] }, "$$ROOT"] } }
|
||||||
|
// $replaceRoot: { newRoot: { $mergeObjects: [{ $arrayElemAt: ["$user", 0] },] } }
|
||||||
|
},
|
||||||
|
{ $project: myobjField }
|
||||||
|
];
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
NavePersistenteSchema.statics.findById = function (idapp, id) {
|
NavePersistenteSchema.statics.findById = function (idapp, id) {
|
||||||
const NavePersistente = this;
|
const NavePersistente = this;
|
||||||
|
|
||||||
|
|||||||
@@ -267,6 +267,14 @@ UserSchema.statics.isManager = function (perm) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UserSchema.statics.isTutor = function (perm) {
|
||||||
|
try {
|
||||||
|
return ((perm & shared_consts.Permissions.Tutor) === shared_consts.Permissions.Tutor);
|
||||||
|
} catch (e) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
UserSchema.statics.findByToken = function (token, typeaccess) {
|
UserSchema.statics.findByToken = function (token, typeaccess) {
|
||||||
const User = this;
|
const User = this;
|
||||||
let decoded;
|
let decoded;
|
||||||
@@ -962,8 +970,8 @@ UserSchema.statics.getUsersListByParams = function (params) {
|
|||||||
|
|
||||||
UserSchema.statics.getFieldsForSearch = function () {
|
UserSchema.statics.getFieldsForSearch = function () {
|
||||||
return [{field: 'username', type: tools.FieldType.string},
|
return [{field: 'username', type: tools.FieldType.string},
|
||||||
{filed: 'name', type: tools.FieldType.string },
|
{field: 'name', type: tools.FieldType.string },
|
||||||
{filed: 'ind_order', type: tools.FieldType.number },
|
{field: 'ind_order', type: tools.FieldType.number },
|
||||||
{field: 'surname', type: tools.FieldType.string },
|
{field: 'surname', type: tools.FieldType.string },
|
||||||
{field: 'email', type: tools.FieldType.string },
|
{field: 'email', type: tools.FieldType.string },
|
||||||
{field: 'profile.cell', type: tools.FieldType.string},
|
{field: 'profile.cell', type: tools.FieldType.string},
|
||||||
@@ -1029,7 +1037,7 @@ UserSchema.statics.getDashboard = async function (idapp, aportador_solidario, us
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dashboard.arrnavi = await Nave.getArrPosizioniByIndOrder(idapp, dashboard.myself.ind_order);
|
dashboard.arrposizioni = await Nave.getArrPosizioniByIndOrder(idapp, dashboard.myself.ind_order);
|
||||||
|
|
||||||
dashboard.navi_partenza = await NavePersistente.getListaNavi(idapp);
|
dashboard.navi_partenza = await NavePersistente.getListaNavi(idapp);
|
||||||
|
|
||||||
@@ -1037,9 +1045,8 @@ UserSchema.statics.getDashboard = async function (idapp, aportador_solidario, us
|
|||||||
// dashboard.navi_partenza.push(await Nave.getPrimaNaveByRiga(idapp, indriga));
|
// dashboard.navi_partenza.push(await Nave.getPrimaNaveByRiga(idapp, indriga));
|
||||||
//}
|
//}
|
||||||
|
|
||||||
for (let mynave of dashboard.arrnavi) {
|
for (let mypos of dashboard.arrposizioni) {
|
||||||
mynave._doc.rec = await Nave.getNaveByRigaCol(idapp, mynave.riga, mynave.col);
|
mypos._doc.rec = await Nave.getNaveByRigaCol(idapp, mypos.riga, mypos.col);
|
||||||
mynave._doc.listadonatoridelsognatore = await Nave.getDonatoridelSognatore(idapp, mynave.riga, mynave.col);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.table(dashboard.arrnavi);
|
// console.table(dashboard.arrnavi);
|
||||||
|
|||||||
@@ -62,9 +62,14 @@ router.post('/msgnave', authenticate, async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
let ris = null;
|
let ris = null;
|
||||||
if (mydata.tipomsg === tools.TipoMsg.SEND_MSG_SINGOLO)
|
if (mydata.tipomsg === tools.TipoMsg.SEND_MSG_SINGOLO) {
|
||||||
ris = await telegrambot.sendMsgTelegram(idapp, mydata.username, mydata.msgpar1, true); // Anche a STAFF
|
let mymsg = '';
|
||||||
else
|
if (!!mydata.username_mitt) {
|
||||||
|
mymsg = '[' + tools.getres__('MSG_SEND_FROM', res) + ' ' + mydata.username_mitt + ']:' + tools.ACAPO;
|
||||||
|
}
|
||||||
|
mymsg += mydata.msgpar1;
|
||||||
|
ris = await telegrambot.sendMsgTelegram(idapp, mydata.username, mymsg, true, mydata.username_mitt); // Anche a STAFF
|
||||||
|
} else
|
||||||
ris = await telegrambot.sendMsgTelegramToNave(idapp, mydata);
|
ris = await telegrambot.sendMsgTelegramToNave(idapp, mydata);
|
||||||
|
|
||||||
if (ris)
|
if (ris)
|
||||||
@@ -79,32 +84,54 @@ router.post('/msgnave', authenticate, async (req, res) => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.post('/getnave', authenticate, async (req, res) => {
|
||||||
|
const idapp = req.body.idapp;
|
||||||
|
const riga = req.body.riga;
|
||||||
|
const col = req.body.col;
|
||||||
|
const riga1don = req.body.riga1don;
|
||||||
|
const col1don = req.body.col1don;
|
||||||
|
const ind_order = req.body.ind_order;
|
||||||
|
|
||||||
|
const nave = await NavePersistente.findByRigaCol(idapp, riga, col);
|
||||||
|
if (!!nave) {
|
||||||
|
nave._doc.rec = await Nave.getNaveByRigaCol(idapp, riga1don, col1don);
|
||||||
|
if (ind_order >= 0)
|
||||||
|
nave._doc.ind_order = ind_order;
|
||||||
|
|
||||||
|
nave._doc.listadonatoridelsognatore = await Nave.getDonatoridelSognatore(idapp, riga1don, col1don);
|
||||||
|
}
|
||||||
|
|
||||||
|
const navi_partenza = await NavePersistente.findAllIdApp(idapp);
|
||||||
|
|
||||||
|
ris = { nave, navi_partenza };
|
||||||
|
|
||||||
|
if (ris)
|
||||||
|
res.send({ code: server_constants.RIS_CODE_OK, ris });
|
||||||
|
else
|
||||||
|
res.status(400).send(e);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
router.post('/getnavi', authenticate, async (req, res) => {
|
router.post('/getnavi', authenticate, async (req, res) => {
|
||||||
const idapp = req.body.idapp;
|
const idapp = req.body.idapp;
|
||||||
|
|
||||||
let arrnavi = [];
|
let arrnavi = await NavePersistente.findAllIdApp(idapp);
|
||||||
let test = false;
|
|
||||||
if (test) {
|
|
||||||
let indriga = 7;
|
|
||||||
let indcol = 49;
|
|
||||||
arrnavi.push({ riga: indriga, col: indcol });
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
for (let indriga = 4; indriga <= 9; indriga++) {
|
|
||||||
let numcol = Math.pow(2, indriga - 1);
|
|
||||||
|
|
||||||
let quanti = Math.ceil(numcol / 8);
|
|
||||||
|
|
||||||
for (let indquanti = 1; indquanti <= quanti; indquanti++) {
|
|
||||||
arrnavi.push({ riga: indriga, col: (indquanti * 8) - 7 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for (nave of arrnavi) {
|
for (nave of arrnavi) {
|
||||||
nave.rec = await Nave.getNaveByRigaCol(idapp, nave.riga, nave.col);
|
//nave.rec = await Nave.getNaveByRigaCol(idapp, nave.riga, nave.col);
|
||||||
|
nave._doc.rec = {
|
||||||
|
donatore: {},
|
||||||
|
mediatore: null
|
||||||
|
};
|
||||||
|
|
||||||
|
let riganave = nave.riga;
|
||||||
|
let colnave = nave.col;
|
||||||
|
// if (riganave < 4) {
|
||||||
|
// riganave = 4;
|
||||||
|
// colnave = 1;
|
||||||
|
// }
|
||||||
|
// nave._doc.rec.donatore.navepersistente = await NavePersistente.findByRigaColByDonatore(idapp, riganave, colnave, 0);
|
||||||
|
nave._doc.rec.donatore.navepersistente = await NavePersistente.findOne({ idapp, riga: riganave, col: colnave });
|
||||||
}
|
}
|
||||||
|
|
||||||
const navi_partenza = await NavePersistente.findAllIdApp(idapp);
|
const navi_partenza = await NavePersistente.findAllIdApp(idapp);
|
||||||
|
|||||||
@@ -395,9 +395,9 @@ router.patch('/chval', authenticate, async (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
if (mydata.notifBot) {
|
if (mydata.notifBot) {
|
||||||
// Send Notification to the BOT
|
// Send Notification to the BOT
|
||||||
telegrambot.sendMsgTelegram(idapp, mydata.notifBot.un, mydata.notifBot.txt);
|
await telegrambot.sendMsgTelegram(idapp, mydata.notifBot.un, mydata.notifBot.txt);
|
||||||
addtext = '[Msg Inviato a ' + mydata.notifBot.un + ']:' + '\n' + mydata.notifBot.txt;
|
addtext = '[Msg Inviato a ' + mydata.notifBot.un + ']:' + '\n' + mydata.notifBot.txt;
|
||||||
telegrambot.sendMsgTelegramToTheManagers(idapp, addtext);
|
await telegrambot.sendMsgTelegramToTheManagers(idapp, addtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mydata.table === 'users') {
|
if (mydata.table === 'users') {
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ router.post('/', async (req, res) => {
|
|||||||
|
|
||||||
recuser = await User.findByCellAndNameSurname(user.idapp, user.profile.cell, user.name, user.surname);
|
recuser = await User.findByCellAndNameSurname(user.idapp, user.profile.cell, user.name, user.surname);
|
||||||
if (recuser) {
|
if (recuser) {
|
||||||
|
console.log('UTENTE GIA ESISTENTE:\n');
|
||||||
|
console.log(user);
|
||||||
// User already registered!
|
// User already registered!
|
||||||
res.status(400).send({ code: server_constants.RIS_CODE_USER_ALREADY_EXIST, msg: '' });
|
res.status(400).send({ code: server_constants.RIS_CODE_USER_ALREADY_EXIST, msg: '' });
|
||||||
return 1;
|
return 1;
|
||||||
@@ -451,6 +453,9 @@ router.post('/dbop', authenticate, async (req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pulisci gli added se era stato cancellato dalla nave
|
||||||
|
await Nave.pulisciNonPresenzeInNave(idapp);
|
||||||
|
|
||||||
const data = await Nave.getLastRigaCol(idapp);
|
const data = await Nave.getLastRigaCol(idapp);
|
||||||
await Nave.setRiga(idapp, data.riga);
|
await Nave.setRiga(idapp, data.riga);
|
||||||
await Nave.setCol(idapp, data.col + 1);
|
await Nave.setCol(idapp, data.col + 1);
|
||||||
@@ -471,6 +476,8 @@ router.post('/dbop', authenticate, async (req, res) => {
|
|||||||
} else if (mydata.dbop === 'visuListaIngressoNuovi') {
|
} else if (mydata.dbop === 'visuListaIngressoNuovi') {
|
||||||
const mystr = await ListaIngresso.showListaOrd(idapp, true);
|
const mystr = await ListaIngresso.showListaOrd(idapp, true);
|
||||||
ris = { mystr };
|
ris = { mystr };
|
||||||
|
} else if (mydata.dbop === 'visuNaviUtentiEliminati') {
|
||||||
|
ris = await Nave.visuNaviUtentiEliminati(idapp);
|
||||||
} else if (mydata.dbop === 'initListaIngresso') {
|
} else if (mydata.dbop === 'initListaIngresso') {
|
||||||
// const aaa = await User.updateMany({ idapp }, { $set: { 'profile.nationality': 'IT' } });
|
// const aaa = await User.updateMany({ idapp }, { $set: { 'profile.nationality': 'IT' } });
|
||||||
|
|
||||||
@@ -515,7 +522,7 @@ router.post('/dbop', authenticate, async (req, res) => {
|
|||||||
const myarrrec = await Nave.find({ idapp, ind_order: rec.ind_order }).sort({ riga: 1, col: 1 });
|
const myarrrec = await Nave.find({ idapp, ind_order: rec.ind_order }).sort({ riga: 1, col: 1 });
|
||||||
let indextess = 1;
|
let indextess = 1;
|
||||||
for (let ind = 0; ind < myarrrec.length; ind++) {
|
for (let ind = 0; ind < myarrrec.length; ind++) {
|
||||||
if (myarrrec[ind].num_tess !== indextess) {
|
if (myarrrec[ind].num_tess !== indextess && myarrrec[ind].num_tess === 1) {
|
||||||
myarrrec[ind].num_tess = indextess;
|
myarrrec[ind].num_tess = indextess;
|
||||||
const risu = await Nave.findOneAndUpdate({ _id: myarrrec[ind]._id }, { $set: { num_tess: myarrrec[ind].num_tess } }, { new: false });
|
const risu = await Nave.findOneAndUpdate({ _id: myarrrec[ind]._id }, { $set: { num_tess: myarrrec[ind].num_tess } }, { new: false });
|
||||||
num++;
|
num++;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ if ((process.env.NODE_ENV === 'production') || (process.env.NODE_ENV === 'test')
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
if (process.env.PROD !== 1) {
|
if (process.env.PROD !== 1) {
|
||||||
// testmsgwebpush();
|
testmsgwebpush();
|
||||||
// sendemail.testemail('2', 'it');
|
// sendemail.testemail('2', 'it');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -192,8 +192,8 @@ const Menu = {
|
|||||||
},
|
},
|
||||||
si: {
|
si: {
|
||||||
ACCEDI: emo.PERSON + ' Prijava',
|
ACCEDI: emo.PERSON + ' Prijava',
|
||||||
LAVAGNA: emoji.get('om_symbol') + ' Predstavitev',
|
LAVAGNA: emoji.get('om_symbol') + ' Tabla',
|
||||||
LINK_CONDIVIDERE: emoji.get('link') + ' Povezava za skupno rabo',
|
LINK_CONDIVIDERE: emoji.get('link') + ' Link za vpis oseb',
|
||||||
ZOOM: emoji.get('information_source') + ' Zoom (Konference)',
|
ZOOM: emoji.get('information_source') + ' Zoom (Konference)',
|
||||||
INFO: emoji.get('information_source') + ' Informacije',
|
INFO: emoji.get('information_source') + ' Informacije',
|
||||||
ASSISTENZA: emoji.get('open_hands') + ' AYNI-jev klepet',
|
ASSISTENZA: emoji.get('open_hands') + ' AYNI-jev klepet',
|
||||||
@@ -382,7 +382,7 @@ const txt_fr = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const txt_si = {
|
const txt_si = {
|
||||||
MSG_SCEGLI_MENU: emoji.get('dizzy') + 'Meni za prikaz glasov:' + emoji.get('omotično'),
|
MSG_SCEGLI_MENU: emoji.get('dizzy') + 'Izbirni meni:' + emoji.get('dizzy'),
|
||||||
MSG_ASK_USERNAME_BO: 'Vpiši svoje uporabniško ime in e-naslov s katerimi si se registriral na spletni strani % s: ',
|
MSG_ASK_USERNAME_BO: 'Vpiši svoje uporabniško ime in e-naslov s katerimi si se registriral na spletni strani % s: ',
|
||||||
MSG_ERRORE_USERNAME: 'Pozor! Vpiši samo uporabniško ime (40 znakov) maksimalno',
|
MSG_ERRORE_USERNAME: 'Pozor! Vpiši samo uporabniško ime (40 znakov) maksimalno',
|
||||||
MSG_ERRORE_USERNAME_NOT_FOUND: 'Ponovno preverite telegram BOT Uporabniško ime ali e-poštno sporočilo, s katerim ste registrirali na spletni strani AYNI: ',
|
MSG_ERRORE_USERNAME_NOT_FOUND: 'Ponovno preverite telegram BOT Uporabniško ime ali e-poštno sporočilo, s katerim ste registrirali na spletni strani AYNI: ',
|
||||||
@@ -478,7 +478,7 @@ module.exports = {
|
|||||||
NameFrom = await User.getNameSurnameByUsername(mylocalsconf.idapp, userdest) + aportador;
|
NameFrom = await User.getNameSurnameByUsername(mylocalsconf.idapp, userdest) + aportador;
|
||||||
aportador = NameFrom;
|
aportador = NameFrom;
|
||||||
}
|
}
|
||||||
text = printf(getstr(langdest, txt.MSG_APORTADOR_USER_REGISTERED), `${mylocalsconf.user.name} ${mylocalsconf.user.surname} (${mylocalsconf.user.username})`, ind_order, aportador);
|
text = printf(getstr(langdest, 'MSG_APORTADOR_USER_REGISTERED'), `${mylocalsconf.user.name} ${mylocalsconf.user.surname} (${mylocalsconf.user.username})`, ind_order, aportador);
|
||||||
}
|
}
|
||||||
|
|
||||||
let addtext = "";
|
let addtext = "";
|
||||||
@@ -516,7 +516,12 @@ module.exports = {
|
|||||||
if (mydata.tipomsg === tools.TipoMsg.SEND_LINK_CHAT_DONATORI) {
|
if (mydata.tipomsg === tools.TipoMsg.SEND_LINK_CHAT_DONATORI) {
|
||||||
return printf(tools.gettranslate('SEND_LINK_CHAT_DONATORI', lang), user.name, mydata.msgpar1);
|
return printf(tools.gettranslate('SEND_LINK_CHAT_DONATORI', lang), user.name, mydata.msgpar1);
|
||||||
} else if (mydata.tipomsg === tools.TipoMsg.SEND_MSG || mydata.tipomsg === tools.TipoMsg.SEND_MSG_SINGOLO) {
|
} else if (mydata.tipomsg === tools.TipoMsg.SEND_MSG || mydata.tipomsg === tools.TipoMsg.SEND_MSG_SINGOLO) {
|
||||||
return mydata.msgpar1;
|
let mymsg = '';
|
||||||
|
if (!!mydata.username_mitt) {
|
||||||
|
mymsg = '[' + tools.gettranslate('MSG_SEND_FROM', lang) + ' ' + mydata.username_mitt + ']:' + tools.ACAPO;
|
||||||
|
}
|
||||||
|
mymsg += mydata.msgpar1;
|
||||||
|
return mymsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -555,12 +560,11 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
if ((nummsgsent === 1) && (mydata.inviareale)) {
|
if ((nummsgsent === 1) && (mydata.inviareale)) {
|
||||||
try {
|
try {
|
||||||
this.sendMsgTelegramToTheManagers(idapp, 'Inviato messaggio a tutti i Donatori della Nave ' + mydata.navemediatore.riga + '.' + mydata.navemediatore.col + '\n' + mymsg)
|
await this.sendMsgTelegramToTheManagers(idapp, 'Inviato messaggio a tutti i Donatori della Nave ' + mydata.navemediatore.riga + '.' + mydata.navemediatore.col + '\n' + mymsg)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,7 +616,7 @@ module.exports = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
sendMsgTelegram: async function (idapp, username, text, alsotomanagers) {
|
sendMsgTelegram: async function (idapp, username, text, alsotomanagers, username_mitt) {
|
||||||
const teleg_id = await User.TelegIdByUsername(idapp, username);
|
const teleg_id = await User.TelegIdByUsername(idapp, username);
|
||||||
const cl = getclTelegByidapp(idapp);
|
const cl = getclTelegByidapp(idapp);
|
||||||
let ris = null;
|
let ris = null;
|
||||||
@@ -624,6 +628,12 @@ module.exports = {
|
|||||||
if (alsotomanagers) {
|
if (alsotomanagers) {
|
||||||
await this.sendMsgTelegramToTheManagers(idapp, text)
|
await this.sendMsgTelegramToTheManagers(idapp, text)
|
||||||
}
|
}
|
||||||
|
if (!!username_mitt) {
|
||||||
|
const rec = cl.getRecByUsername(username);
|
||||||
|
if (rec) {
|
||||||
|
rec.msgall_username_specifico = username_mitt;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ris;
|
return ris;
|
||||||
@@ -717,7 +727,7 @@ function getstr(lang, key) {
|
|||||||
|
|
||||||
let mystr = '';
|
let mystr = '';
|
||||||
|
|
||||||
if (lang === 'si') {
|
if ((lang === 'si') || (lang === 'sl-si')) {
|
||||||
try {
|
try {
|
||||||
mystr = txt_si[key]
|
mystr = txt_si[key]
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -1336,6 +1346,8 @@ class Telegram {
|
|||||||
|
|
||||||
mystr += emo.STARS + tools.get__('ZOOM_CONFERENCE', this.getlang(msg)) + emo.STARS + '\n\n';
|
mystr += emo.STARS + tools.get__('ZOOM_CONFERENCE', this.getlang(msg)) + emo.STARS + '\n\n';
|
||||||
|
|
||||||
|
let pwd = 'Password: 123123';
|
||||||
|
|
||||||
let index = 1;
|
let index = 1;
|
||||||
listazoom.forEach((evento) => {
|
listazoom.forEach((evento) => {
|
||||||
let iniziata = false;
|
let iniziata = false;
|
||||||
@@ -1352,7 +1364,8 @@ class Telegram {
|
|||||||
if (nextzoom) {
|
if (nextzoom) {
|
||||||
if (iniziata) {
|
if (iniziata) {
|
||||||
mystr += emo.FIRE + tools.get__('CLICCA_ENTRA', this.getlang(msg)) + ' ' + emo.FIRE + '\n';
|
mystr += emo.FIRE + tools.get__('CLICCA_ENTRA', this.getlang(msg)) + ' ' + emo.FIRE + '\n';
|
||||||
mystr += tools.getlinkzoom(evento.id_conf_zoom) + '\n\n';
|
mystr += tools.getlinkzoom(evento.id_conf_zoom) + '\n';
|
||||||
|
mystr += pwd + '\n\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1362,7 +1375,7 @@ class Telegram {
|
|||||||
|
|
||||||
if (!nextzoom && index > 1) {
|
if (!nextzoom && index > 1) {
|
||||||
mystr += "✨✨✨✨✨✨✨✨✨✨✨✨\n" +
|
mystr += "✨✨✨✨✨✨✨✨✨✨✨✨\n" +
|
||||||
tools.get__('CLICCA_PER_ZOOM', this.getlang(msg)) + ':\n' + tools.getlinkzoom(listazoom[0].id_conf_zoom) + '\n' + "✨✨✨✨✨✨✨✨✨✨✨✨\n" + '\n';
|
tools.get__('CLICCA_PER_ZOOM', this.getlang(msg)) + ':\n' + tools.getlinkzoom(listazoom[0].id_conf_zoom) + '\n' + "✨✨✨✨✨✨✨✨✨✨✨✨\n" + pwd + '\n\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
return mystr
|
return mystr
|
||||||
@@ -1742,7 +1755,6 @@ class Telegram {
|
|||||||
tools.writeEventsLog(msgris);
|
tools.writeEventsLog(msgris);
|
||||||
await this.sendMsg(msg.chat.id, msgris);
|
await this.sendMsg(msg.chat.id, msgris);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
rec.start_write_msgall = false;
|
rec.start_write_msgall = false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -1978,17 +1990,23 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mylang = 'it';
|
||||||
|
|
||||||
|
if (!!recmem) {
|
||||||
|
mylang = recmem.lang;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!form) {
|
if (!form) {
|
||||||
form = {
|
form = {
|
||||||
"message_id": msg_id,
|
"message_id": msg_id,
|
||||||
"reply_markup": {
|
"reply_markup": {
|
||||||
"resize_keyboard": true,
|
"resize_keyboard": true,
|
||||||
"keyboard": await this.getKeyboard(id, menu, recmem.lang)
|
"keyboard": await this.getKeyboard(id, menu, mylang)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const res = this.bot.sendMessage(id, text, form)
|
const res = await this.bot.sendMessage(id, text, form)
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
let blocked = false;
|
let blocked = false;
|
||||||
if ((e.message.indexOf('Forbidden') > 0) || (e.message.indexOf('chat not found') > 0)) {
|
if ((e.message.indexOf('Forbidden') > 0) || (e.message.indexOf('chat not found') > 0)) {
|
||||||
@@ -2029,7 +2047,7 @@ class Telegram {
|
|||||||
|
|
||||||
async sendMsg(id, text, menu, form, msg_id, chat_id, ripr_menuPrec) {
|
async sendMsg(id, text, menu, form, msg_id, chat_id, ripr_menuPrec) {
|
||||||
|
|
||||||
return this._inviaMsg(id, text, form, menu, msg_id, chat_id, ripr_menuPrec);
|
return await this._inviaMsg(id, text, form, menu, msg_id, chat_id, ripr_menuPrec);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ textlang = {
|
|||||||
"Nuova Registrazione": "Nuova Registrazione",
|
"Nuova Registrazione": "Nuova Registrazione",
|
||||||
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
|
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
|
||||||
"partecipanti": "partecipanti",
|
"partecipanti": "partecipanti",
|
||||||
'TESTO_ASSISTENZA': "Per entrare nel Sito AYNI:\nhttps://ayni.gifteconomy.app\n\nHai dimenticato la Password per accedere al sito?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra ⛩ nella nostra Community chat:\n https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat di Aiuto e Supporto: 'AYNI - HELP'\nDa Lunedì al Sabato (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Fai la tua domanda e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto esci dalla chat.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
|
'TESTO_ASSISTENZA': "Per entrare nel Sito AYNI:\nhttps://ayni.gifteconomy.app\n\nHai dimenticato la Password per accedere al sito?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra ⛩ nella nostra Community chat:\n ITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat di Aiuto e Supporto: 'AYNI - HELP'\nDa Lunedì al Sabato (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Fai la tua domanda e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto esci dalla chat.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
|
||||||
'BENVENUTO': "Benvenuto",
|
'BENVENUTO': "Benvenuto",
|
||||||
'TUE_NAVI': "Ecco le tue Navi programmate",
|
'TUE_NAVI': "Ecco le tue Navi programmate",
|
||||||
'HAI_I_7_REQUISITI': 'PRIMI PASSI OK!\nHai i Primi 7 Requisiti per Entrare nella Lista d\'Imbarco!',
|
'HAI_I_7_REQUISITI': 'PRIMI PASSI OK!\nHai i Primi 7 Requisiti per Entrare nella Lista d\'Imbarco!',
|
||||||
@@ -67,7 +67,7 @@ textlang = {
|
|||||||
"VERIF": "Verificata",
|
"VERIF": "Verificata",
|
||||||
'EMAIL': "Email",
|
'EMAIL': "Email",
|
||||||
'BOT': "AYNI BOT",
|
'BOT': "AYNI BOT",
|
||||||
'EMAIL_NON_VERIF': "Email Non Verificata\nleggi la tua casella email e trova **\"Confermare la Registrazione a Ayni\"**<br>e clicca sul bottone **\"Verifica Registrazione\"**",
|
'EMAIL_NON_VERIF': "Email Non Verificata\nleggi la tua casella email e trova **\"Confermare la Registrazione a Ayni\"**\ne clicca sul bottone **\"Verifica Registrazione\"**",
|
||||||
'TELEGRAM_NOT_CONNECTED': "Telegram non associato al tuo account!",
|
'TELEGRAM_NOT_CONNECTED': "Telegram non associato al tuo account!",
|
||||||
'NESSUN_INVITATO': 'Non hai invitato nessuno',
|
'NESSUN_INVITATO': 'Non hai invitato nessuno',
|
||||||
'ZOOM_PARTECIPATO': 'Partecipazione ad almeno 1 Conferenza (Zoom)',
|
'ZOOM_PARTECIPATO': 'Partecipazione ad almeno 1 Conferenza (Zoom)',
|
||||||
@@ -99,13 +99,14 @@ textlang = {
|
|||||||
'Note': 'Note',
|
'Note': 'Note',
|
||||||
'TEMPORANEA': 'TEMPORANEA',
|
'TEMPORANEA': 'TEMPORANEA',
|
||||||
'NAVE': 'NAVE',
|
'NAVE': 'NAVE',
|
||||||
|
'MSG_SEND_FROM': 'Msg Inviato da',
|
||||||
},
|
},
|
||||||
si: {
|
si: {
|
||||||
"Email je že bila preverjena": "Email je že bila preverjenaL'Email è già stata Verificata",
|
"Email je že bila preverjena": "Email je že bila preverjenaL'Email è già stata Verificata",
|
||||||
"Nuova Registrazione": "Nova Registracija",
|
"Nuova Registrazione": "Nova Registracija",
|
||||||
"Effettuata una Nuova Registrazione": "Izpelji novo Registracijo",
|
"Effettuata una Nuova Registrazione": "Izpelji novo Registracijo",
|
||||||
"partecipanti": "Udeleženci",
|
"partecipanti": "Udeleženci",
|
||||||
'TESTO_ASSISTENZA': "Za vstop na spletno stran:\nhttps://ayni.gifteconomy.app\n\nSi pozabil geslo za vstop na stran?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nKlepet AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nKlepet AYNI - EMPOWER: Vstopi ⛩ v našo Skupnost klepet:\n https://t.me/aynislovenija\n\nKlepet AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nKlepet za Pomoč in Suport: 'AYNI - HELP'\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Postavi svoje vprašanje in prosi za asistenco.\n2 - KO si sprejel pomoč, izstopi iz klepeta.\n Vstopil boš lahko vedno, ko boš potreboval pomoč.",
|
'TESTO_ASSISTENZA': "Za vstop na spletno stran:\nhttps://ayni.gifteconomy.app\n\nSi pozabil geslo za vstop na stran?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nKlepet AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nKlepet AYNI - EMPOWER: Vstopi ⛩ v našo Skupnost klepet:\n ITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nKlepet AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nKlepet za Pomoč in Suport: 'AYNI - HELP'\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Postavi svoje vprašanje in prosi za asistenco.\n2 - KO si sprejel pomoč, izstopi iz klepeta.\n Vstopil boš lahko vedno, ko boš potreboval pomoč.",
|
||||||
'BENVENUTO': "Dobrodošel",
|
'BENVENUTO': "Dobrodošel",
|
||||||
'TUE_NAVI': "Tvoje programirane Ladje",
|
'TUE_NAVI': "Tvoje programirane Ladje",
|
||||||
'HAI_I_7_REQUISITI': 'PRVI KORAKI OK!\nIzpolnjuješ Prvih 7 Zahtev za vstop na Listo d\'Vkrcanje!',
|
'HAI_I_7_REQUISITI': 'PRVI KORAKI OK!\nIzpolnjuješ Prvih 7 Zahtev za vstop na Listo d\'Vkrcanje!',
|
||||||
@@ -135,7 +136,7 @@ textlang = {
|
|||||||
'CLICCA_PER_ZOOM': 'NA DOLOČENO URO IN DATUM, ZA VSTOP V VIDEO KONFERENCO,KLIKNI TU',
|
'CLICCA_PER_ZOOM': 'NA DOLOČENO URO IN DATUM, ZA VSTOP V VIDEO KONFERENCO,KLIKNI TU',
|
||||||
'CLICCA_ENTRA': 'KLIKNI TU ZA VSTOP !',
|
'CLICCA_ENTRA': 'KLIKNI TU ZA VSTOP !',
|
||||||
'ZOOM_INIZIATO': 'TA KONFERENCA JE\' PRIČELA!',
|
'ZOOM_INIZIATO': 'TA KONFERENCA JE\' PRIČELA!',
|
||||||
'SCEGLI_VOCE': 'izberi en glas:',
|
'SCEGLI_VOCE': 'Izberi eno možnost:',
|
||||||
'INVITATI_LISTA': 'Tvoji povabljenci (v zelenem, s izpolnjenimi vsaj 7-imi zahtevami)',
|
'INVITATI_LISTA': 'Tvoji povabljenci (v zelenem, s izpolnjenimi vsaj 7-imi zahtevami)',
|
||||||
'CIAO': 'Zdravo',
|
'CIAO': 'Zdravo',
|
||||||
'ADDED_TOLISTAINGRESSO': 'Si bil dodan na Seznam oseb, ki bodo vstopile v Listo D\'Vkrcanje !',
|
'ADDED_TOLISTAINGRESSO': 'Si bil dodan na Seznam oseb, ki bodo vstopile v Listo D\'Vkrcanje !',
|
||||||
@@ -144,7 +145,7 @@ textlang = {
|
|||||||
'SOGNATORE': 'Sanjača',
|
'SOGNATORE': 'Sanjača',
|
||||||
'MEDIATORE': 'MEDIATOR',
|
'MEDIATORE': 'MEDIATOR',
|
||||||
'DONATORI': 'DONATOR',
|
'DONATORI': 'DONATOR',
|
||||||
'RITESSITURA': 'PONOVNI VPIS',
|
'RITESSITURA': 'Avtomatičen Vpis',
|
||||||
'NAVE COMPLETATA': 'LADJE DOSTAVLJEN',
|
'NAVE COMPLETATA': 'LADJE DOSTAVLJEN',
|
||||||
'Doni Effettuati': 'Darila narejena',
|
'Doni Effettuati': 'Darila narejena',
|
||||||
'Tutor che affianchèra il Mediatore': 'Tutor, ki bo podpiral Mediatorja',
|
'Tutor che affianchèra il Mediatore': 'Tutor, ki bo podpiral Mediatorja',
|
||||||
@@ -153,13 +154,14 @@ textlang = {
|
|||||||
'Note': 'Opombe',
|
'Note': 'Opombe',
|
||||||
'TEMPORANEA': 'ZAČASNA',
|
'TEMPORANEA': 'ZAČASNA',
|
||||||
'NAVE': 'LADJE',
|
'NAVE': 'LADJE',
|
||||||
|
'MSG_SEND_FROM': 'sporočilo, ki ga je poslal',
|
||||||
},
|
},
|
||||||
es: {
|
es: {
|
||||||
"L'Email è già stata Verificata": "El correo electrónico ya ha sido verificado",
|
"L'Email è già stata Verificata": "El correo electrónico ya ha sido verificado",
|
||||||
"Nuova Registrazione": "Nuevo Registro",
|
"Nuova Registrazione": "Nuevo Registro",
|
||||||
"Effettuata una Nuova Registrazione": "Se ha realizado un nuevo registro",
|
"Effettuata una Nuova Registrazione": "Se ha realizado un nuevo registro",
|
||||||
"partecipanti": "participantes",
|
"partecipanti": "participantes",
|
||||||
'TESTO_ASSISTENZA': "Para entrar en el sitio de AYNI:\nhttps://ayni.gifteconomy.app\n\n¿Olvidó su contraseña para acceder al sitio?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (este):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra en ⛩ en nuestra comunidad de chat:\n https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n\nChat de la AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat de ayuda y soporte: 'AYNI - HELP'\nDe lunes a sábado (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Haga su pregunta y pida ayuda.\n2 - Después de que consigas ayuda, sal de la sala de chat.\nPuedes volver cuando necesites ayuda..",
|
'TESTO_ASSISTENZA': "Para entrar en el sitio de AYNI:\nhttps://ayni.gifteconomy.app\n\n¿Olvidó su contraseña para acceder al sitio?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (este):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra en ⛩ en nuestra comunidad de chat:\n ITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nChat de la AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat de ayuda y soporte: 'AYNI - HELP'\nDe lunes a sábado (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Haga su pregunta y pida ayuda.\n2 - Después de que consigas ayuda, sal de la sala de chat.\nPuedes volver cuando necesites ayuda..",
|
||||||
'BENVENUTO': "Bienvenido",
|
'BENVENUTO': "Bienvenido",
|
||||||
'TUE_NAVI': "Aquí están sus naves programadas",
|
'TUE_NAVI': "Aquí están sus naves programadas",
|
||||||
'HAI_I_7_REQUISITI': '¡LOS PRIMEROS PASOS ESTÁN BIEN!\nTiene los primeros 7 requisitos para entrar en la lista de embarque!',
|
'HAI_I_7_REQUISITI': '¡LOS PRIMEROS PASOS ESTÁN BIEN!\nTiene los primeros 7 requisitos para entrar en la lista de embarque!',
|
||||||
@@ -207,10 +209,11 @@ textlang = {
|
|||||||
'Note': 'Notas',
|
'Note': 'Notas',
|
||||||
'TEMPORANEA': 'TEMPORAL',
|
'TEMPORANEA': 'TEMPORAL',
|
||||||
'NAVE': 'NAVE',
|
'NAVE': 'NAVE',
|
||||||
|
'MSG_SEND_FROM': 'Mensaje enviado por',
|
||||||
},
|
},
|
||||||
enUs: {
|
enUs: {
|
||||||
"partecipanti": "participants",
|
"partecipanti": "participants",
|
||||||
'TESTO_ASSISTENZA': "To enter the AYNI Site:\nhttps://ayni.gifteconomy.app\n\nForgot your password to access the site?\nhttps://ayni.gifteconomy.app/requestresetpwd\nChat AYNI BOT (this one):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Enter ⛩ into our chat community:\nhttps://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nHelp and Support Chat: 'AYNI - HELP'.\nMonday to Saturday (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Ask your question and ask for assistance.\n2 - After receiving help, exit the chat.\nYou can come back whenever you need help.",
|
'TESTO_ASSISTENZA': "To enter the AYNI Site:\nhttps://ayni.gifteconomy.app\n\nForgot your password to access the site?\nhttps://ayni.gifteconomy.app/requestresetpwd\nChat AYNI BOT (this one):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Enter ⛩ into our chat community:\nITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nHelp and Support Chat: 'AYNI - HELP'.\nMonday to Saturday (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Ask your question and ask for assistance.\n2 - After receiving help, exit the chat.\nYou can come back whenever you need help.",
|
||||||
'BENVENUTO': "Welcome",
|
'BENVENUTO': "Welcome",
|
||||||
'TUE_NAVI': "Here are your programmed ships",
|
'TUE_NAVI': "Here are your programmed ships",
|
||||||
'HAI_I_7_REQUISITI': 'FIRST STEPS OK!\nYou have the First 7 Requirements to Enter the Boarding List!',
|
'HAI_I_7_REQUISITI': 'FIRST STEPS OK!\nYou have the First 7 Requirements to Enter the Boarding List!',
|
||||||
@@ -258,13 +261,14 @@ textlang = {
|
|||||||
'Note': 'Note',
|
'Note': 'Note',
|
||||||
'TEMPORANEA': 'TEMPORARY',
|
'TEMPORANEA': 'TEMPORARY',
|
||||||
'NAVE': 'SHIP',
|
'NAVE': 'SHIP',
|
||||||
|
'MSG_SEND_FROM': 'Msg sent by',
|
||||||
},
|
},
|
||||||
fr: {
|
fr: {
|
||||||
"L'Email è già stata Verificata": "Le courrier électronique a déjà été vérifié",
|
"L'Email è già stata Verificata": "Le courrier électronique a déjà été vérifié",
|
||||||
"Nuova Registrazione": "Nouvelle inscription",
|
"Nuova Registrazione": "Nouvelle inscription",
|
||||||
"Effettuata una Nuova Registrazione": "Un nouvel enregistrement a été effectué",
|
"Effettuata una Nuova Registrazione": "Un nouvel enregistrement a été effectué",
|
||||||
"partecipanti": "participants",
|
"partecipanti": "participants",
|
||||||
'TESTO_ASSISTENZA': "Pour entrer sur le site AYNI:\nhttps://ayni.gifteconomy.app\n\nVous avez oublié votre mot de passe pour accéder au site ?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (ce):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER : Entrez ⛩ dans notre Community chat:\nhttps://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw\n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat d’Aide et de Support: 'AYNI - HELP'\nDu lundi au samedi (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Posez votre question et demandez d’être assisté.\n2 - Après avoir reçu l’aide, quittez le groupe .\\n Vous pourrez y entrer chaque fois qu’il vous sera nécessaire.",
|
'TESTO_ASSISTENZA': "Pour entrer sur le site AYNI:\nhttps://ayni.gifteconomy.app\n\nVous avez oublié votre mot de passe pour accéder au site ?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (ce):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER : Entrez ⛩ dans notre Community chat:\nITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat d’Aide et de Support: 'AYNI - HELP'\nDu lundi au samedi (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Posez votre question et demandez d’être assisté.\n2 - Après avoir reçu l’aide, quittez le groupe .\\n Vous pourrez y entrer chaque fois qu’il vous sera nécessaire.",
|
||||||
'BENVENUTO': "Bienvenue",
|
'BENVENUTO': "Bienvenue",
|
||||||
'TUE_NAVI': "Voici vos navires programmés",
|
'TUE_NAVI': "Voici vos navires programmés",
|
||||||
'HAI_I_7_REQUISITI': 'PREMIÈRES ÉTAPES OK!\nvous avez les 7 premiers Requis pour Entrer dans la liste d\'embarquement!',
|
'HAI_I_7_REQUISITI': 'PREMIÈRES ÉTAPES OK!\nvous avez les 7 premiers Requis pour Entrer dans la liste d\'embarquement!',
|
||||||
@@ -312,13 +316,14 @@ textlang = {
|
|||||||
'Note': 'Notes',
|
'Note': 'Notes',
|
||||||
'TEMPORANEA': 'TEMPORAIRE',
|
'TEMPORANEA': 'TEMPORAIRE',
|
||||||
'NAVE': 'NAVIRE',
|
'NAVE': 'NAVIRE',
|
||||||
|
'MSG_SEND_FROM': 'Message envoyé par',
|
||||||
},
|
},
|
||||||
pt: {
|
pt: {
|
||||||
"L'Email è già stata Verificata": "",
|
"L'Email è già stata Verificata": "",
|
||||||
"Nuova Registrazione": "Nuova Registrazione",
|
"Nuova Registrazione": "Nuova Registrazione",
|
||||||
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
|
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
|
||||||
"partecipanti": "partecipanti",
|
"partecipanti": "partecipanti",
|
||||||
'TESTO_ASSISTENZA': "Per entrare nel Sito AYNI:\nhttps://ayni.gifteconomy.app\n\nHai dimenticato la Password per accedere al sito?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra ⛩ nella nostra Community chat:\n https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat di Aiuto e Supporto: 'AYNI - HELP'\nDa Lunedì al Sabato (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Fai la tua domanda e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto esci dalla chat.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
|
'TESTO_ASSISTENZA': "Per entrare nel Sito AYNI:\nhttps://ayni.gifteconomy.app\n\nHai dimenticato la Password per accedere al sito?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\nChat AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\nChat AYNI - EMPOWER: Entra ⛩ nella nostra Community chat:ITA 🇮🇹: https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g\n SLO 🇸🇮: https://t.me/aynislovenija\n ESP 🇪🇸: https://t.me/joinchat/AL2qKBqJRuIEuc2FivgAzg\n ENG 🇬🇧: https://t.me/joinchat/AL2qKBYX0yVvOJ6Ssf9hKg\n FRA 🇫🇷: https://t.me/joinchat/Kz0wtxieJjzoC3L_DsrdZw \n\nChat AYNI-BIBLIO: https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ \n\nChat di Aiuto e Supporto: 'AYNI - HELP'\nDa Lunedì al Sabato (8:00 - 21:00)\nhttps://t.me/joinchat/C741mlVmB_RMcOUpNqWC8w\n1 - Fai la tua domanda e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto esci dalla chat.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
|
||||||
'BENVENUTO': "Benvenuto",
|
'BENVENUTO': "Benvenuto",
|
||||||
'TUE_NAVI': "Ecco le tue Navi programmate",
|
'TUE_NAVI': "Ecco le tue Navi programmate",
|
||||||
'HAI_I_7_REQUISITI': 'PRIMI PASSI OK!\nHai i Primi 7 Requisiti per Entrare nella Lista d\'Imbarco!',
|
'HAI_I_7_REQUISITI': 'PRIMI PASSI OK!\nHai i Primi 7 Requisiti per Entrare nella Lista d\'Imbarco!',
|
||||||
@@ -366,6 +371,7 @@ textlang = {
|
|||||||
'Note': 'Notas',
|
'Note': 'Notas',
|
||||||
'TEMPORANEA': 'TEMPORÁRIO',
|
'TEMPORANEA': 'TEMPORÁRIO',
|
||||||
'NAVE': 'NAVE',
|
'NAVE': 'NAVE',
|
||||||
|
'MSG_SEND_FROM': 'Mensagem enviada por',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -417,6 +423,7 @@ module.exports = {
|
|||||||
multiselect: 256,
|
multiselect: 256,
|
||||||
password: 512,
|
password: 512,
|
||||||
listimages: 1024,
|
listimages: 1024,
|
||||||
|
exact: 2048,
|
||||||
},
|
},
|
||||||
|
|
||||||
MAX_PHASES: 5,
|
MAX_PHASES: 5,
|
||||||
@@ -454,7 +461,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getres__(text, res) {
|
getres__(text, res) {
|
||||||
let lang = getlangbyres(res);
|
let lang = this.getlangbyres(res);
|
||||||
try {
|
try {
|
||||||
return textlang[lang][text]
|
return textlang[lang][text]
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -857,7 +864,9 @@ module.exports = {
|
|||||||
const myfilters = [];
|
const myfilters = [];
|
||||||
params.fieldsearch.forEach((rec) => {
|
params.fieldsearch.forEach((rec) => {
|
||||||
const data = {};
|
const data = {};
|
||||||
if (rec.type === this.FieldType.string) {
|
if (rec.type === this.FieldType.exact) {
|
||||||
|
data[rec.field] = params.filter.trim();
|
||||||
|
}else if (rec.type === this.FieldType.string) {
|
||||||
data[rec.field] = myregexp;
|
data[rec.field] = myregexp;
|
||||||
} else if (rec.type === this.FieldType.number) {
|
} else if (rec.type === this.FieldType.number) {
|
||||||
data[rec.field] = parseInt(params.filter.trim());
|
data[rec.field] = parseInt(params.filter.trim());
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ module.exports = {
|
|||||||
Admin: 1,
|
Admin: 1,
|
||||||
Manager: 2,
|
Manager: 2,
|
||||||
Teacher: 4,
|
Teacher: 4,
|
||||||
|
Tutor: 8,
|
||||||
},
|
},
|
||||||
|
|
||||||
MessageOptions: {
|
MessageOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user