- Iscrizione Conacreis

- Ordini
- Carrello
This commit is contained in:
Paolo Arena
2021-04-30 01:31:12 +02:00
parent 0b4203067a
commit e05bbb39ee
41 changed files with 1495 additions and 337 deletions

View File

@@ -370,6 +370,7 @@ const txt = {
MSG_ERR_UNKNOWN_VERIFY_CODE: 'Errore durante il salvataggio sul Server. Riprovare piú tardi',
MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.',
MSG_APORTADOR_USER_REGISTERED: emo.FIRE + ' Si è appena Registrato "%s (n. %s)"\n(Invitato da %s)',
MSG_ISCRITTO_CONACREIS: emo.FIRE + ' Si è appena Iscritto al Conacreis "%s"',
MSG_MSG_SENT: emoji.get('envelope') + ' Messaggi Inviati !',
MSG_MSG_TOSENT: emoji.get('envelope') + ' Messaggi da Inviare',
MSG_MSG_INCORSO: emoji.get('envelope') + ' messaggi in corso... Inviati attualmente',
@@ -485,7 +486,8 @@ module.exports = {
ADMIN_USER_NAME_SERVER: 'Paolo',
phase: {
REGISTRATION: 1
REGISTRATION: 1,
ISCRIZIONE_CONACREIS: 2
},
getFormDaMostrare: function (idapp, myfunc, myuser) {
@@ -550,7 +552,19 @@ module.exports = {
},
sendMsgTelegramToTheManagers: async function (idapp, text, onlyintofile, MyForm = null) {
notifyIscrizioneToTelegram: async function (phase, mylocalsconf) {
let langdest = mylocalsconf.iscritto.lang;
let NameFrom = `${mylocalsconf.iscritto.name} ${mylocalsconf.iscritto.surname}`;
let text = printf(getstr(langdest, 'MSG_ISCRITTO_CONACREIS'), NameFrom);
let addtext = "";
await this.sendMsgTelegramToTheManagers(mylocalsconf.idapp, addtext + text);
},
sendMsgTelegramToTheManagers: async function (idapp, text, onlyintofile = false, MyForm = null) {
tools.writeManagersLog(text);
@@ -875,6 +889,8 @@ module.exports = {
},
sendMsgTelegram: async function (idapp, username, text, alsotomanagers, username_mitt) {
const { User } = require('../models/user');
const teleg_id = await User.TelegIdByUsername(idapp, username);
const cl = getclTelegByidapp(idapp);
let ris = null;
@@ -2634,6 +2650,7 @@ function getclTelegByidapp(idapp) {
}
if (!tools.testing()) {
// if (true) {
console.log('TELEGRAM STARTING.... ');
for (const idapp of appTelegram) {