diff --git a/documentation/passi.txt b/documentation/passi.txt
index 366976e..fab290c 100755
--- a/documentation/passi.txt
+++ b/documentation/passi.txt
@@ -1,40 +1,32 @@
------------
-- L'ultimo Utente della Creazione della Nave, compare ancora il Sognatore !!!
- Sistemato: TESTARE SE ORA È' OK...
-
-// ************************************************
-
// ++Todo: PRIORITA' ALTA:
- Togliere gli imbarchi: far pagare subito la persona.
- Errore durante la sostituzione...
+- Se sostuisci una persona, al nuovo utente gli arriva il messaggio sbagliato!
+ (🌟Caro Tiziana - TiziCaso 🌟 Il tuo imbarco è stato cancellato,
+ questo succede quando non riceviamo risposta ad un nostro messaggio per giorni.)
-- far pagare direttamente al Sognatore.
- Il dono al Fondo, fallo fare a prescindere (non al 57¨ dono).
-- Se sostituisco mi da sempre la stessa persona.
+- Controllare che ci sono registrazioni doppie !! (stesso username e stessa email!)
-- Togliere i Video e il Sogno. (5 requisiti)
-- Cestino di ELIMINA non funziona !!
-
- (Linuccia) - Natalina Malerbi
DA CONTROLLARE CHE LEI NON HA PAGATO 8.44.
QUINDI QUALCUNO HA PRESO IL SUO POSTO.
-
- 7.64 : NATALINA NON HA LA RITESSITURA !!
-- Controllare che ci sono registrazioni doppie !! (stesso username e stessa email!)
- SubAccount:
filtro.
- Aggiornare le Traduzioni di Darja (ritessitura).
-- Sistemare la email che arriva ai Donatori (HTML) !
+- Sistemare la email che arriva ai Donatori (HTML) non si legge !!!
- Flotte: Poter scegliere quale messaggio inviare !
@@ -78,9 +70,7 @@
- Rimettere "made_gift" a false se si ha sbagliato...
-- Mettere 3 giorni.
-
-- Fondo Ayni 9.152 : aggiungere registrazione Paolo2 Arena. e mettere paypal.me
+- Fondo Ayni 9.152 : aggiungere registrazione Paolo2 Arena. e mettere paypal.me ??
- Mandare msg ai Non Invitati, o inferiori di 2.
@@ -106,12 +96,8 @@
// ++Todo: PRIORITA' NORMALE:
-- AGGIUNGERCI L'USERNAME REALE ! ALTRIMENTI PRENDE IL PRINCIPALE !!
-
- Fare funzione che passa un Utente secondario in un utente Primario! (c'è gia)
-- L'orario degli Zoom sul BOT è diverso che dal sito, deve dare quello locale...
-
// ++Todo: DA FARE PIU AVANTI:
@@ -129,92 +115,21 @@ TESTARE -> inviare il msg anche al Sognatore della Gift Chat
// ++Todo: SISTEMARE:
-x- AGGIONARE AMBIENTE DI TEST
-- ESEGUIRE LA CONVERSIONE 1 E 2 !
-
-
-x - Sistemare le navi con num_tess === 4 : indorder=0 e 46 :
- Prendere quelli del num_tess === 3 e SOSTITUISCI ind_order del num_Tess = 4 con ind_order di num_tess = 3
-
--------------
-- AGGIONARE AMBIENTE DI PRODUZIONE
-- ESEGUIRE LA CONVERSIONE 1 E 2 e !
-
- - Sistemare le navi con num_tess === 4 : indorder=0 e 46 :
- Prendere quelli del num_tess === 3 e SOSTITUISCI ind_order del num_Tess = 4 con ind_order di num_tess = 3
-
--------------
-
SOSTITUISCI:
-
-- Sistemare che in Edit Pagina, se è troppo grande, va oltre l'altezza della finestra.
-- Attivare le Traduttrici alle Pagine
-
- Inviare messaggi solo per ITALIANI (o di lingua cmq).
-- Aggiornare le FAQ in lingua
-
-
- CONTROLLARE CON ARGENTINA E PORTOGALLO e Brasile:
Il sito deve comparire in Spagnolo e in Portoghese
TRADURRE:
-- Mettere le bandierine nella lista Zoom (su AYNI BOT).
-
-
-1- mi appaiono prima le navi del secondo account
-2- forse metterei ogni nave seguita dal relativo viaggio di "ritorno" (a me piace chiamarlo così!)
-X 3- sotto le navi, alla voce donatore, c'è ancora scritto "Effettuerai il tuo dono ESATTAMENTE il giorno indicato"
-X 4- nei miei invitati non compaiono le mie ritessiture, fatte con il magico bottone, da chi sono invitata?
-
-
-- Controllare Tragitto (Elisabetta)
-- Monica Sozzi -> Davide Moirano (0) è giusto.
- - Andrea Decouter (2)
- - Enrica Pescio (OK)
- - 852 (Gerico2) Elio2 Garelli -> (Gerico)
-
-Andrea 346
-
-ind_order: 231 Gerico Elio Garelli
-ind_order: 852 Gerico2 Elio2 Garelli
-
-
-Morgana Roveta (Maelabo)
- --- Gerico Elio Garelli
-
-ANDREA
- |-----GERICO2 852
-
-
.update({}, {$unset: {$ind_order: 1}, {multi: true});
-//++TODO: *** FATTI ***
-
-
-
// ++Todo: FATTO: DA CONTROLLARE
-X - Se sei imbarcata i tuoi due invitati usati per quella posizione sono bloccati. Se ne hai in più li puoi regalare
-X - Numero d'invitati sbagliato -> Nogalska
-X - 50 persone non hanno un'imbarco -> Chiamare funzione che gliela rimette.
-
-X - Poter Inviare un msg preconfezionato a chi non la la nave !
-X Poter cliccare SI per aggiungersi ad un Nuovo Imbarco.
-X - Se entro con la seconda utenza, gli mando messaggio che dice che deve collegarsi con la prima utenza....
-
-X - Sistemare poter modificare le Pagine.
-
-X - SISTEMARE QUANDO L'ULTIMA NAVE DELLA FLOTTA C'E' UN SOGNATORE CHE HA LA NAVE DI RITORNO!
-X - IL MEDIATORE DEVE AVERE LA SUA RITESSUTURA !!! ( TOGLIERE L'IF NEL CASO NON SIA SOGNATORE)
-
-X - Mettere anche la email del sognatore, per chi è abituato ad inviarla in quel modo...
-X - Controllare che sul sito compaiano le informazioni del Sognatore...
-
diff --git a/src/server/models/user.js b/src/server/models/user.js
index 3954c8f..429efbc 100755
--- a/src/server/models/user.js
+++ b/src/server/models/user.js
@@ -502,7 +502,7 @@ UserSchema.statics.getUserShortDataByUsername = async function (idapp, username)
sospeso: 1,
verified_email: 1,
'profile.teleg_id': 1,
- 'profile.saw_zoom_presentation': 1,
+ // 'profile.saw_zoom_presentation': 1,
'profile.ask_zoom_partecipato': 1,
'profile.qualified': 1,
'profile.qualified_2invitati': 1,
@@ -513,7 +513,7 @@ UserSchema.statics.getUserShortDataByUsername = async function (idapp, username)
'profile.revolut': 1,
'profile.link_payment': 1,
'profile.note_payment': 1,
- 'profile.my_dream': 1,
+ // 'profile.my_dream': 1,
'profile.paymenttypes': 1,
'profile.cell': 1,
made_gift: 1,
@@ -556,7 +556,7 @@ UserSchema.statics.getDownlineByUsername = async function (idapp, username, incl
surname: 1,
verified_email: 1,
'profile.teleg_id': 1,
- 'profile.saw_zoom_presentation': 1,
+ // 'profile.saw_zoom_presentation': 1,
'profile.ask_zoom_partecipato': 1,
'profile.qualified': 1,
'profile.qualified_2invitati': 1,
@@ -567,7 +567,7 @@ UserSchema.statics.getDownlineByUsername = async function (idapp, username, incl
'profile.revolut': 1,
'profile.link_payment': 1,
'profile.note_payment': 1,
- 'profile.my_dream': 1,
+ // 'profile.my_dream': 1,
'profile.paymenttypes': 1,
'profile.cell': 1,
made_gift: 1,
@@ -641,7 +641,7 @@ UserSchema.statics.getQueryQualified = function () {
verified_email: true,
'profile.teleg_id': { $gt: 1 },
'profile.saw_and_accepted': shared_consts.ALL_SAW_AND_ACCEPTED,
- 'profile.saw_zoom_presentation': true,
+ // 'profile.saw_zoom_presentation': true,
$or: [
{ 'profile.link_payment': { $exists: true } },
{ 'profile.email_paypal': { $exists: true } },
diff --git a/src/server/router/index_router.js b/src/server/router/index_router.js
index 9b5dfc2..f3f343a 100755
--- a/src/server/router/index_router.js
+++ b/src/server/router/index_router.js
@@ -63,7 +63,6 @@ const shared_consts = require('../tools/shared_nodejs');
UserCost = {
FIELDS_REQUISITI: ['verified_email',
'profile.teleg_id',
- 'profile.saw_zoom_presentation',
'profile.saw_and_accepted',
'profile.revolut',
'profile.payeer_id',
@@ -463,13 +462,13 @@ router.patch('/chval', authenticate, async (req, res) => {
}
if (mydata.table === 'users') {
- if ('saw_zoom_presentation' in fieldsvalue) {
+ /*if ('saw_zoom_presentation' in fieldsvalue) {
if (fieldsvalue['saw_zoom_presentation']) {
const messaggio = tools.get__('ZOOM_CONFERMATO');
await telegrambot.sendMsgTelegram(idapp, myuser.username, messaggio);
await telegrambot.sendMsgTelegramToTheManagersAndZoomeri(idapp, `L\'utente ${rec.name} ${rec.surname} (${rec.username}) è stato confermato per aver visto lo Zoom di Benvenuto`);
}
- }
+ }*/
if ('aportador_solidario' in fieldsvalue) {
ind_order_ingr = mydata.ind_order_ingr;
diff --git a/src/server/router/newsletter_router.js b/src/server/router/newsletter_router.js
index 3927f82..e4e0a31 100755
--- a/src/server/router/newsletter_router.js
+++ b/src/server/router/newsletter_router.js
@@ -347,7 +347,16 @@ router.post('/testemail', authenticate, async (req, res) => {
lang = req.body.locale;
previewonly = req.body.previewonly;
- const ris = await sendemail.testemail(idapp, lang, previewonly);
+ const test = true;
+
+ if (test) {
+ const email = 'pao.loarena77@gmail.com';
+ const myuser = await User.findOne({ idapp, email });
+
+ const ris = await sendemail.testemailHtml(idapp, lang, email, myuser);
+ } else {
+ const ris = await sendemail.testemail(idapp, lang, previewonly);
+ }
if (ris)
return res.send({ code: server_constants.RIS_CODE_OK, msg: '' });
diff --git a/src/server/router/users_router.js b/src/server/router/users_router.js
index 48c2072..c90d31d 100755
--- a/src/server/router/users_router.js
+++ b/src/server/router/users_router.js
@@ -163,9 +163,9 @@ router.post('/', async (req, res) => {
recorig = await User.findByCellAndNameSurname(user.idapp, user.profile.cell, user.name.slice(0, -1), user.surname);
if (!!recorig) {
user.profile.teleg_id = recorig.profile.teleg_id;
- user.profile.saw_zoom_presentation = recorig.profile.saw_zoom_presentation;
+ // user.profile.saw_zoom_presentation = recorig.profile.saw_zoom_presentation;
user.profile.saw_and_accepted = recorig.profile.saw_and_accepted;
- user.profile.my_dream = recorig.profile.my_dream;
+ // user.profile.my_dream = recorig.profile.my_dream;
user.profile.email_paypal = recorig.profile.email_paypal;
user.profile.payeer_id = recorig.profile.payeer_id;
user.profile.advcash_id = recorig.profile.advcash_id;
diff --git a/src/server/sendemail.js b/src/server/sendemail.js
index 230223f..a38e0ef 100755
--- a/src/server/sendemail.js
+++ b/src/server/sendemail.js
@@ -105,23 +105,27 @@ module.exports = {
});
},
- sendEmail_Normale: function (to, subject, html, replyTo) {
+ sendEmail_Normale: async function (to, subject, html, replyTo) {
// setup e-mail data with unicode symbols
var mailOptions = {
from: tools.getEmailByIdApp(mylocalsconf.idapp), // sender address
+ dataemail: await this.getdataemail(idapp),
to: to,
generateTextFromHTML: true,
subject: subject,
html: html,
};
+
if (replyTo)
mailOptions['reply-to'] = replyTo;
- if (process.env.SEND_EMAIL === 1) {
+ const smtpTransport = this.getTransport(mylocalsconf);
+
+ if (process.env.SEND_EMAIL === "1") {
// console.log("SEND EMAIL...");
-// send mail with defined transport object
+ // send mail with defined transport object
smtpTransport.sendMail(mailOptions, function (error, response) {
if (error) {
console.log("Email Inviata ERRORE RISPOSTA: " + error);
@@ -328,7 +332,8 @@ module.exports = {
if (!!mylocalsconf.dataemail.emailtitle && !!mylocalsconf.dataemail.emailbody) {
const replyto = tools.getreplyToEmailByIdApp(idapp);
- return this.sendEmail_base('standard', emailto, mylocalsconf, replyto);
+ //return this.sendEmail_base('standard', emailto, mylocalsconf, replyto);
+ return await this.sendEmail_Normale(emailto, mylocalsconf.dataemail.emailtitle, mylocalsconf.dataemail.emailbody, replyto);
}
// Send Email also to the Admin
@@ -490,7 +495,7 @@ module.exports = {
// Create Transport
let smtpTransport = null;
- if (mylocalsconf.dataemail.email_service !== 'gmail' && mylocalsconf.dataemail.email_service !== undefined) {
+ if (mylocalsconf.dataemail.email_service !== 'gmail' && mylocalsconf.dataemail.email_service !== undefined && mylocalsconf.dataemail.email_service !== "") {
smtpTransport = nodemailer.createTransport({
host: mylocalsconf.dataemail.email_service,
port: mylocalsconf.dataemail.email_port,
@@ -500,21 +505,24 @@ module.exports = {
}
});
} else if (mylocalsconf.dataemail.email_service === 'gmail' && mylocalsconf.dataemail.email_service !== undefined) {
- smtpTransport = {
+
+ //smtpTransport = {
+ smtpTransport = nodemailer.createTransport({
service: 'gmail', //'Gmail',
auth: {
user: mylocalsconf.dataemail.from,
pass: mylocalsconf.dataemail.pwd_from
}
- };
+ });
} else {
- smtpTransport = {
+ // smtpTransport = {
+ smtpTransport = nodemailer.createTransport({
service: 'gmail',
auth: {
user: tools.getEmailByIdApp(mylocalsconf.idapp),
pass: tools.getPwdByIdApp(mylocalsconf.idapp)
}
- };
+ });
}
return smtpTransport;
@@ -719,6 +727,28 @@ module.exports = {
console.log('-> Invio Email TEST a', mylocalsconf.emailto, 'previewonly', previewonly);
return this.sendEmail_base('newsletter/' + lang, mylocalsconf.emailto, mylocalsconf, '', smtpTransport, previewonly);
+ },
+
+ testemailHtml: async function (idapp, lang, email, myuser) {
+
+
+ mytitle = 'Prova msg'
+ messaggio = '
Ciao!