Creazione tabella Product

This commit is contained in:
Paolo Arena
2020-12-21 02:16:42 +01:00
parent 9ee59c0fc1
commit 67d2872e61
21 changed files with 767 additions and 42 deletions

View File

@@ -54,12 +54,12 @@ textlang = {
"Effettuata una Nuova Registrazione": "Effettuata una Nuova Registrazione",
"partecipanti": "partecipanti",
'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" +
"👉 <strong>Chat AYNI - EMPOWER</strong>: Entra ⛩ nella nostra Community chat\n%s\n\n" +
"👉 <strong>PER AIUTO</strong>: Leggi le Domande più Frequenti:\n%s\n<b>Oppure chiedi prima al tuo Invitante!</b>\n\n" +
"SOLO se non trovi la risposta che ti serve puoi accedere alla Chat di Supporto <strong>'AYNI - HELP'</strong>\n<strong>Da Lunedì al Venerdí (9:00 - 19:00)</strong>\n%s\n" +
"1 - Fai la tua <strong>domanda</strong> e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto <strong>Esci dalla chat</strong>.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
"👉 <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" +
"👉 <strong>Chat AYNI - EMPOWER</strong>: Entra ⛩ nella nostra Community chat\n%s\n\n" +
"👉 <strong>PER AIUTO</strong>: Leggi le Domande più Frequenti:\n%s\n<b>Oppure chiedi prima al tuo Invitante!</b>\n\n" +
"SOLO se non trovi la risposta che ti serve puoi accedere alla Chat di Supporto <strong>'AYNI - HELP'</strong>\n<strong>Da Lunedì al Venerdí (9:00 - 19:00)</strong>\n%s\n" +
"1 - Fai la tua <strong>domanda</strong> e chiedi assistenza.\n2 - Dopo aver ricevuto aiuto <strong>Esci dalla chat</strong>.\nPotrai rientrare ogni qualvolta ne avrai la necessità.",
'BENVENUTO': "Benvenuto",
'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!',
@@ -125,13 +125,13 @@ textlang = {
"Effettuata una Nuova Registrazione": "Izpelji novo Registracijo",
"partecipanti": "Udeleženci",
'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" +
"Klepet AYNI - EMPOWER: Vstopi ⛩ v našo Skupnost klepet:\n%s\n\n" +
"Canal News AYNI-BIBLIO:\n%s\n\n" +
"Klepet za Pomoč in Suport: 'AYNI - HELP'\n%s\n" +
"1 - 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č.",
"Si pozabil geslo za vstop na stran?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Klepet AYNI BOT (questa):\nhttps://t.me/notevoleaynibot\n\n" +
"Klepet AYNI - EMPOWER: Vstopi ⛩ v našo Skupnost klepet:\n%s\n\n" +
"Canal News AYNI-BIBLIO:\n%s\n\n" +
"Klepet za Pomoč in Suport: 'AYNI - HELP'\n%s\n" +
"1 - 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",
'TUE_NAVI': "Tvoje programirane Ladje",
'HAI_I_7_REQUISITI': 'PRVI KORAKI OK!\nIzpolnjuješ Prvih 7 Zahtev za vstop na Listo d\'Vkrcanje!',
@@ -194,11 +194,11 @@ textlang = {
"Effettuata una Nuova Registrazione": "Se ha realizado un nuevo registro",
"partecipanti": "participantes",
'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" +
"Chat AYNI - EMPOWER: Entra en ⛩ en nuestra comunidad de chat:\n%s\n\n" +
"Chat de ayuda y soporte: 'AYNI - HELP'\nDe lunes a viernes (9:00 - 19:00)\n%s\n" +
"1 - Haga su pregunta y pida ayuda.\n2 - Después de que consigas ayuda, sal de la sala de chat.\nPuedes volver cuando necesites ayuda..",
"¿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" +
"Chat AYNI - EMPOWER: Entra en ⛩ en nuestra comunidad de chat:\n%s\n\n" +
"Chat de ayuda y soporte: 'AYNI - HELP'\nDe lunes a viernes (9:00 - 19:00)\n%s\n" +
"1 - 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",
'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!',
@@ -258,11 +258,11 @@ textlang = {
enUs: {
"partecipanti": "participants",
'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" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Help and Support Chat: 'AYNI - HELP'.\nMonday to Friday (9:00 - 19:00)\n%s\n" +
"1 - Ask your question and ask for assistance.\n2 - After receiving help, exit the chat.\nYou can come back whenever you need help.",
"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" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Help and Support Chat: 'AYNI - HELP'.\nMonday to Friday (9:00 - 19:00)\n%s\n" +
"1 - Ask your question and ask for assistance.\n2 - After receiving help, exit the chat.\nYou can come back whenever you need help.",
'BENVENUTO': "Welcome",
'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!',
@@ -325,12 +325,12 @@ textlang = {
"Effettuata una Nuova Registrazione": "Un nouvel enregistrement a été effectué",
"partecipanti": "participants",
'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" +
"Chat AYNI - EMPOWER : Entrez ⛩ dans notre Community chat:\n%s\n\n" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Chat dAide et de Support: 'AYNI - HELP'\nDu lundi au Vendredi (9:00 - 19:00)\n%s\n" +
"1 - Posez votre question et demandez dêtre assisté.\n2 - Après avoir reçu laide, quittez le groupe.\nVous pourrez y entrer chaque fois quil vous sera nécessaire.",
"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" +
"Chat AYNI - EMPOWER : Entrez ⛩ dans notre Community chat:\n%s\n\n" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Chat dAide et de Support: 'AYNI - HELP'\nDu lundi au Vendredi (9:00 - 19:00)\n%s\n" +
"1 - Posez votre question et demandez dêtre assisté.\n2 - Après avoir reçu laide, quittez le groupe.\nVous pourrez y entrer chaque fois quil vous sera nécessaire.",
'BENVENUTO': "Bienvenue",
'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!',
@@ -393,12 +393,12 @@ textlang = {
"Effettuata una Nuova Registrazione": "Foi efectuado um novo registo",
"partecipanti": "participantes",
'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" +
"Chat AYNI - EMPOWER: Entrar em ⛩ na nossa comunidade de chat:%s\n\n" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Chat de Ajuda e Suporte: 'AYNI - HELP'.\nDe segunda a Sexta (9:00 - 19:00 ITALY)\n%s\n" +
"1 - Faça a sua pergunta e peça ajuda.\n2 - Depois de receber ajuda, saia do chat.\nPode voltar sempre que precisar de o fazer..",
"Esqueceu sua senha para acessar o site?\nhttps://ayni.gifteconomy.app/requestresetpwd\n\n" +
"Chat AYNI BOT (isto):\nhttps://t.me/notevoleaynibot\n\n" +
"Chat AYNI - EMPOWER: Entrar em ⛩ na nossa comunidade de chat:%s\n\n" +
"Canale News AYNI-BIBLIO:\n%s\n\n" +
"Chat de Ajuda e Suporte: 'AYNI - HELP'.\nDe segunda a Sexta (9:00 - 19:00 ITALY)\n%s\n" +
"1 - Faça a sua pergunta e peça ajuda.\n2 - Depois de receber ajuda, saia do chat.\nPode voltar sempre que precisar de o fazer..",
'BENVENUTO': "Bem-vindo",
'TUE_NAVI': "Aqui estão os seus navios programados",
'HAI_I_7_REQUISITI': 'PRIMEIROS PASSOS OK!\nVocê tem os 7 primeiros requisitos para entrar na lista de embarque!',
@@ -1569,8 +1569,7 @@ module.exports = {
if (!fs.existsSync(dirPath)) {
try {
fs.mkdirSync(dirPath, { recursive: true });
}
catch (e) {
} catch (e) {
mkdirpath(path.dirname(dirPath));
mkdirpath(dirPath);
}
@@ -1775,5 +1774,46 @@ module.exports = {
}
}
return true;
}
},
categorizeQueryString(queryObj) {
let query = {}
let order = {}
//extract query, order, filter value
for (const i in queryObj) {
if (queryObj[i]) {
// extract order
if (i === 'order') {
order['sort'] = queryObj[i]
continue
}
// extract range
if (i === 'range') {
let range_arr = []
let query_arr = []
// multi ranges
if (queryObj[i].constructor === Array) {
for (const r of queryObj[i]) {
range_arr = r.split('-')
query_arr.push({
price: { $gt: range_arr[0], $lt: range_arr[1] }
})
}
}
// one range
if (queryObj[i].constructor === String) {
range_arr = queryObj[i].split('-')
query_arr.push({
price: { $gt: range_arr[0], $lt: range_arr[1] }
})
}
Object.assign(query, { $or: query_arr })
delete query[i]
continue
}
query[i] = queryObj[i]
}
}
return { query, order }
},
};