This commit is contained in:
Paolo Arena
2021-02-18 12:19:35 +01:00
parent 88ae9af12c
commit 14a3292da2
22 changed files with 233 additions and 122 deletions

View File

@@ -2,6 +2,9 @@ const os = require("os");
const fs = require('fs');
const path = require('path');
require('../config/config');
require('../models/subscribers');
@@ -52,7 +55,9 @@ textlang = {
"L'Email è già stata Verificata": "L'Email è già stata Verificata",
"Nuova Registrazione": "Nuova Registrazione",
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
"partecipanti": "partecipanti",
"partecipanti": "partecipanti all'Evento",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "<strong><a href=\"%s\">👉 Per entrare nel Sito AYNI</a></strong>\n\n" +
"👉 <strong><a href=\"https://ayni.gifteconomy.app/requestresetpwd\">Hai dimenticato la password?</a></strong>\n\n" +
"👉 Entra nel Canale d'Informazione per Importanti Avvisi!\n<strong><a href=\"%s\">Canale AYNI-BIBLIO</a></strong>\n\n" +
@@ -124,6 +129,8 @@ textlang = {
"Nuova Registrazione": "Nova Registracija",
"Effettuata una Nuova Registrazione": "Izpelji novo Registracijo",
"partecipanti": "Udeleženci",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "Za vstop na spletno stran:\n%s\n\n" +
"Si pozabil geslo za vstop na stran?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Klepet AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\n" +
@@ -193,6 +200,8 @@ textlang = {
"Nuova Registrazione": "Nuevo Registro",
"Effettuata una Nuova Registrazione": "Se ha realizado un nuevo registro",
"partecipanti": "participantes",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "Para entrar en el sitio de AYNI:\n%s\n\n" +
"¿Olvidó su contraseña para acceder al sitio?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Chat AYNI BOT (este):\nhttps://t.me/notevoleaynibot\n\n" +
@@ -257,6 +266,8 @@ textlang = {
},
enUs: {
"partecipanti": "participants",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "To enter the AYNI Site:\n%s\n\nForgot your password to access the site?\n" +
"https://ayni.gifteconomy.app/requestresetpwd\nChat AYNI BOT (this one):\nhttps://t.me/notevoleaynibot\n\n" +
"Chat AYNI - EMPOWER: Enter ⛩ into our chat community:\n%s\n\n" +
@@ -324,6 +335,8 @@ textlang = {
"Nuova Registrazione": "Nouvelle inscription",
"Effettuata una Nuova Registrazione": "Un nouvel enregistrement a été effectué",
"partecipanti": "participants",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "Pour entrer sur le site AYNI:\n%s\n\n" +
"Vous avez oublié votre mot de passe pour accéder au site ?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Chat AYNI BOT (ce):\nhttps://t.me/notevoleaynibot\n\n" +
@@ -392,6 +405,8 @@ textlang = {
"Nuova Registrazione": "Novo Registo",
"Effettuata una Nuova Registrazione": "Foi efectuado um novo registo",
"partecipanti": "participantes",
"partecipanti a Pranzo": "partecipanti a Pranzo",
"partecipanti a Cena": "partecipanti a Cena",
'TESTO_ASSISTENZA': "Para entrar no site do AYNI:\n%s\n\n" +
"Esqueceu sua senha para acessar o site?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Chat AYNI BOT (isto):\nhttps://t.me/notevoleaynibot\n\n" +
@@ -522,6 +537,12 @@ module.exports = {
password: 512,
listimages: 1024,
exact: 2048,
image: 3000,
nationality: 4096,
intcode: 5000,
multioption: 6000,
onlydate: 7000,
hours: 8000
},
MAX_PHASES: 5,
@@ -616,11 +637,11 @@ module.exports = {
},
allfieldBooking: function () {
return ['idapp', 'userId', 'id_bookedevent', 'numpeople', 'msgbooking', 'modified', 'infoevent', 'datebooked', 'booked']
return ['idapp', 'userId', 'id_bookedevent', 'numpeople', 'numpeopleLunch', 'numpeopleDinner', 'msgbooking', 'modified', 'infoevent', 'datebooked', 'booked']
},
allfieldBookingChange: function () {
return ['numpeople', 'msgbooking', 'modified', 'infoevent', 'datebooked', 'booked']
return ['numpeople', 'numpeopleLunch', 'numpeopleDinner', 'msgbooking', 'modified', 'infoevent', 'datebooked', 'booked']
},
allfieldProjectWithId: function () {
@@ -978,8 +999,8 @@ module.exports = {
data[rec.field] = params.filter.trim();
} else if (rec.type === this.FieldType.string) {
data[rec.field] = myregexp;
} else if (rec.type === this.FieldType.number) {
data[rec.field] = parseInt(params.filter.trim());
} else if ((rec.type === this.FieldType.number) || (rec.type === this.FieldType.hours)) {
data[rec.field] = parseFloat(params.filter.trim());
}
myfilters.push(data);
});
@@ -1610,8 +1631,11 @@ module.exports = {
try {
fs.mkdirSync(dirPath, { recursive: true });
} catch (e) {
mkdirpath(path.dirname(dirPath));
mkdirpath(dirPath);
if (dirPath !== path.dirname(dirPath)) {
const myname = path.dirname(dirPath);
this.mkdirpath(myname);
// this.mkdirpath(dirPath);
}
}
}
},
@@ -1671,6 +1695,9 @@ module.exports = {
if (table === 'sharewithus') {
return true;
}
if (table === 'hours') {
return true;
}
if (table === 'users') {
if ('aportador_solidario' in fieldsvalue) {
return true;