- Invia e Ricevi RIS (grafica aggiornata)
- Visualizzazione Movimenti (ultimi e successivi), per singolo e di tutti
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
DATABASE=test_PiuCheBuono
|
||||
DATABASE=test_FreePlanet
|
||||
UDB=paofreeplanet
|
||||
PDB=mypassword@1A
|
||||
SEND_EMAIL=0
|
||||
SEND_EMAIL_ORDERS=1
|
||||
PORT=3000
|
||||
appTelegram_TEST=["1","17"]
|
||||
appTelegram=["1","17"]
|
||||
appTelegram_DEVELOP=["17"]
|
||||
appTelegram_TEST=["1","13"]
|
||||
appTelegram=["1","13"]
|
||||
appTelegram_DEVELOP=["13"]
|
||||
DOMAIN=mongodb://localhost:27017/
|
||||
AUTH_MONGODB=1
|
||||
MONGODB_USER=admin
|
||||
@@ -41,7 +41,4 @@ FTPSERVER_USER=ftpusrsrv_
|
||||
FTPSERVER_PWD=ftpmypwd@1A_
|
||||
AUTH_NEW_SITES=123123123
|
||||
SCRIPTS_DIR=admin_scripts
|
||||
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
|
||||
MIAB_HOST=box.lamiaposta.org
|
||||
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
|
||||
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
|
||||
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
|
||||
37
.env.prod.riso
Normal file
37
.env.prod.riso
Normal file
@@ -0,0 +1,37 @@
|
||||
DATABASE=test_FreePlanet
|
||||
UDB=paofreeplanet
|
||||
PDB=suerteFreePlanet@1A
|
||||
SEND_EMAIL=1
|
||||
PORT=3001
|
||||
ENABLE_PUSHNOTIFICATION=1
|
||||
DIRECTORY_SERVER=/var/www/nodejs_test.riso_server
|
||||
SERVERDIR_WEBSITE=/var/www/test.riso.app
|
||||
PORT_APP1="0"
|
||||
DOMAIN=mongodb://localhost:32015/
|
||||
AUTH_MONGODB=1
|
||||
MONGODB_USER=admin
|
||||
MONGODB_PWD=mypwadmin@1A
|
||||
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
|
||||
DEBUG=0
|
||||
LOCALE=0
|
||||
DELAY_SENDEMAIL=1000
|
||||
VAPI_KEY_SUBJECT="mailto:surya@riso.app"
|
||||
PUBLIC_VAPI_KEY="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs"
|
||||
PRIVATE_VAPI_KEY="St9UMzcS76Q9yKG6RInAuYydYjFRliqwHTJY3A5wjO0"
|
||||
GCM_API_KEY="AIzaSyD7w1jztfVV05mX1iyxoI-r1pZWxuxdUK8"
|
||||
PATH_CERT_KEY=key.pem
|
||||
PATH_SERVER_CRT=cert.pem
|
||||
PATH_SSL_ROOT_PEM=root.pem
|
||||
PATH_SSL_CHAIN_PEM=chain.pem
|
||||
PROD=0
|
||||
PROJECT_DESCR_MAIN='__PROJECTS'
|
||||
SECRK=iUUb38v23jjDFaosWj92axkBOXCQ
|
||||
TOKEN_LIFE=2h
|
||||
REFRESH_TOKEN_LIFE=14d
|
||||
AUTH_NEW_SITES=B234HDSAOJ734ndcsdKWNV
|
||||
DOMAINS=[{"hostname":"abitaregliiblei.it","port":"3021"},{"hostname":"riso.app","port":"3005"}]
|
||||
SCRIPTS_DIR=admin_scripts
|
||||
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
|
||||
MIAB_HOST=box.lamiaposta.org
|
||||
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
|
||||
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
|
||||
@@ -6,9 +6,12 @@ p Hai ricevuto
|
||||
strong #{groupDestoContoCom}
|
||||
span da parte di #{mittente} in data #{transactionDate} sul
|
||||
strong #{nomecircuito} !
|
||||
if causalDest
|
||||
p <br>
|
||||
p Descrizione: #{causalDest}
|
||||
if causale
|
||||
p <br>
|
||||
p Commento: #{causale}
|
||||
p Commento di #{mittente}: #{causale}
|
||||
p <br>
|
||||
p Apri #{nomeapp} per vedere il tuo nuovo saldo.
|
||||
p <br>
|
||||
|
||||
22
logtrans.txt
22
logtrans.txt
@@ -373,4 +373,24 @@ ElenaEspx: 33.41 RIS]
|
||||
Gio 03/10 ORE 15:13: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a TestTransazPao 2 RIS [causale: ]
|
||||
Saldi:
|
||||
paoloar77: 14.99 RIS]
|
||||
TestTransazPao: 2.00 RIS]
|
||||
TestTransazPao: 2.00 RIS]
|
||||
Ven 04/10 ORE 01:33: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a ElenaEspx 2 RIS [causale: Grazie Mille :D Un abbraccione tanto forte]
|
||||
Causale Destinatario: ProvaCommento
|
||||
Saldi:
|
||||
paoloar77: 12.99 RIS]
|
||||
ElenaEspx: 35.41 RIS]
|
||||
Ven 04/10 ORE 01:35: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a ElenaEspx 2 RIS [causale: Grazie di tutto]
|
||||
Causale Destinatario: ProvaCommento
|
||||
Saldi:
|
||||
paoloar77: 10.99 RIS]
|
||||
ElenaEspx: 37.41 RIS]
|
||||
Ven 04/10 ORE 01:36: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a ElenaEspx 2 RIS [causale: Ecco il mio commento]
|
||||
Causale Destinatario: ProvaCommento
|
||||
Saldi:
|
||||
paoloar77: 8.99 RIS]
|
||||
ElenaEspx: 39.41 RIS]
|
||||
Ven 04/10 ORE 01:50: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a ElenaEspx 2 RIS [causale: Altra prova aaaa]
|
||||
Causale Destinatario: ProvaCommento
|
||||
Saldi:
|
||||
paoloar77: 6.99 RIS]
|
||||
ElenaEspx: 41.41 RIS]
|
||||
@@ -733,7 +733,7 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
if (!onlycheck) {
|
||||
// Add a Transaction !
|
||||
if (ris.cansend) {
|
||||
ris.rec = await Movement.addMov(idapp, accountorigTable, accountdestTable, myqty, extrarec.causal, extrarec.notifId, extrarec.idOrdersCart);
|
||||
ris.rec = await Movement.addMov(idapp, accountorigTable, accountdestTable, myqty, extrarec.causal, extrarec.causalDest, extrarec.notifId, extrarec.idOrdersCart);
|
||||
}
|
||||
|
||||
if (ris.cansend && ris.rec) {
|
||||
@@ -764,8 +764,9 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
let dest = (extrarec.dest ? extrarec.dest : '') + (extrarec.groupdest ? extrarec.groupdest : '') + (extrarec.contoComDest ? extrarec.contoComDest : '');
|
||||
|
||||
ris.result = true;
|
||||
let causalDest = extrarec.causalDest ? 'Causale Destinatario: ' + extrarec.causalDest : ''
|
||||
let msg = '[<b>' + circuittable.name + '</b>]: Inviate Monete da ' + orig + ' a ' + dest + ' ' + myqty + ' ' + circuittable.symbol + ' [causale: ' + extrarec.causal +
|
||||
`]\nSaldi:\n${orig}: ` + extrarec.saldoOrig + ' ' + circuittable.symbol + '] ' + `\n${dest}: ` + extrarec.saldoDest + ' ' + circuittable.symbol + ']';
|
||||
`]\n` + causalDest+ `\nSaldi:\n${orig}: ` + extrarec.saldoOrig + ' ' + circuittable.symbol + '] ' + `\n${dest}: ` + extrarec.saldoDest + ' ' + circuittable.symbol + ']';
|
||||
console.log(msg);
|
||||
|
||||
ris.useraccounts = await Account.getUserAccounts(idapp, usernameOrig);
|
||||
@@ -782,6 +783,7 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
symbol: circuittable.symbol, qty: myqty,
|
||||
transactionDate: ris.rec.transactionDate,
|
||||
causale: extrarec.causal,
|
||||
causalDest: extrarec.causalDest,
|
||||
};
|
||||
if (extrarec.dest) {
|
||||
let myuserDest = await User.getUserByUsername(idapp, extrarec.dest);
|
||||
@@ -1723,6 +1725,7 @@ CircuitSchema.statics.addMovementByOrdersCart = async function (ordersCart, user
|
||||
dest: usernameDest,
|
||||
groupdest: groupDest,
|
||||
contoComDest: '',
|
||||
causalDest: '',
|
||||
};
|
||||
|
||||
const usernameOrig = await User.getUsernameById(idapp, ordersCart.userId);
|
||||
|
||||
@@ -50,6 +50,10 @@ const MovementSchema = new Schema({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
causalDest: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
residual: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
@@ -95,7 +99,7 @@ MovementSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
return tools.executeQueryTable(this, 0, params);
|
||||
};
|
||||
|
||||
MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accountToIdTable, amount, causal, notifId, idOrdersCart) {
|
||||
MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accountToIdTable, amount, causal, causalDest, notifId, idOrdersCart) {
|
||||
|
||||
try {
|
||||
// Only positive values
|
||||
@@ -110,6 +114,7 @@ MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accou
|
||||
idOrdersCart,
|
||||
amount,
|
||||
causal,
|
||||
causalDest,
|
||||
residual: 0,
|
||||
notifId,
|
||||
// expiringDate:
|
||||
@@ -365,6 +370,7 @@ MovementSchema.statics.getQueryMovsByCircuitId = async function (idapp, username
|
||||
transactionDate: 1,
|
||||
amount: 1,
|
||||
causal: 1,
|
||||
causalDest: 1,
|
||||
notifId: 1,
|
||||
'circuitfrom.symbol': 1,
|
||||
'circuitto.symbol': 1,
|
||||
@@ -642,6 +648,7 @@ MovementSchema.statics.getQueryAllUsersMovsByCircuitId = async function (idapp,
|
||||
transactionDate: 1,
|
||||
amount: 1,
|
||||
causal: 1,
|
||||
causalDest: 1,
|
||||
notifId: 1,
|
||||
'circuitfrom.symbol': 1,
|
||||
'circuitto.symbol': 1,
|
||||
@@ -1008,6 +1015,7 @@ MovementSchema.statics.getLastN_Transactions = async function (idapp, numtransaz
|
||||
transactionDate: 1,
|
||||
amount: 1,
|
||||
causal: 1,
|
||||
causalDest: 1,
|
||||
notifId: 1,
|
||||
'circuitfrom.symbol': 1,
|
||||
'circuitfrom.name': 1,
|
||||
|
||||
@@ -1213,32 +1213,33 @@ router.patch('/callfunz', authenticate, async (req, res) => {
|
||||
});
|
||||
|
||||
router.get('/copyfromapptoapp/:idapporig/:idappdest', async (req, res) => {
|
||||
// const idapporig = req.params.idapporig;
|
||||
// const idappdest = req.params.idappdest;
|
||||
// if (!idapporig || !idappdest)
|
||||
// res.status(400).send();
|
||||
//
|
||||
// const mytablesstr = ['settings', 'users', 'templemail'];
|
||||
//
|
||||
// try {
|
||||
// let numrectot = 0;
|
||||
// for (const table of mytablesstr) {
|
||||
// const mytable = globalTables.getTableByTableName(table);
|
||||
//
|
||||
// tools.mylogshow('copyfromapptoapp: ', table, mytable);
|
||||
//
|
||||
// await mytable.DuplicateAllRecords(idapporig, idappdest).then((numrec) => {
|
||||
// // tools.mylogshow(' REC TO MODIFY: ', rec);
|
||||
// numrectot += numrec
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// res.send({ code: server_constants.RIS_CODE_OK, msg: '', numrectot });
|
||||
//
|
||||
// } catch (e) {
|
||||
// tools.mylogserr('Error copyfromapptoapp: ', e);
|
||||
// res.status(400).send();
|
||||
// }
|
||||
const idapporig = req.params.idapporig;
|
||||
const idappdest = req.params.idappdest;
|
||||
const idcode = req.params.code;
|
||||
if (!idapporig || !idappdest || (idcode !== 'ASD3429Kjgà#@cvX'))
|
||||
res.status(400).send();
|
||||
|
||||
const mytablesstr = ['settings', 'users', 'templemail'];
|
||||
|
||||
try {
|
||||
let numrectot = 0;
|
||||
for (const table of mytablesstr) {
|
||||
const mytable = globalTables.getTableByTableName(table);
|
||||
|
||||
tools.mylogshow('copyfromapptoapp: ', table, mytable);
|
||||
|
||||
await mytable.DuplicateAllRecords(idapporig, idappdest).then((numrec) => {
|
||||
// tools.mylogshow(' REC TO MODIFY: ', rec);
|
||||
numrectot += numrec
|
||||
});
|
||||
}
|
||||
|
||||
res.send({ code: server_constants.RIS_CODE_OK, msg: '', numrectot });
|
||||
|
||||
} catch (e) {
|
||||
tools.mylogserr('Error copyfromapptoapp: ', e);
|
||||
res.status(400).send();
|
||||
}
|
||||
});
|
||||
|
||||
router.delete('/delrec/:table/:id', authenticate, async (req, res) => {
|
||||
@@ -1919,15 +1920,15 @@ function uploadFile(req, res, version) {
|
||||
let mydircurrent = process.cwd() + '/src/server/router/upload/' + dir;
|
||||
fromfile = mydircurrent + '/' + oldpath;
|
||||
tofile = mydir + '/' + file.originalFilename;
|
||||
|
||||
|
||||
// ------------
|
||||
// ++TODO: Questo non funziona perché dovrei passargli il nomefile aggiornato a Vue.js
|
||||
// tofile = tools.cleanFileName(tofile)
|
||||
// ------------
|
||||
|
||||
|
||||
let newname = tofile;
|
||||
file.path = newname;
|
||||
|
||||
|
||||
console.log('fromfile', fromfile, 'tofile', tofile)
|
||||
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ router.post('/', async (req, res) => {
|
||||
|
||||
user.aportador_solidario = user.aportador_solidario.trim();
|
||||
|
||||
|
||||
|
||||
user.aportador_solidario = user.aportador_solidario.replace('@', '');
|
||||
|
||||
let id_aportador = await User.getIdByUsername(user.idapp, user.aportador_solidario);
|
||||
@@ -438,6 +438,27 @@ router.patch('/:id', authenticate, (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
router.post('/lastmovs', authenticate, async (req, res) => {
|
||||
const username = req.user ? req.user.username : '';
|
||||
const nummov = req.body.nummov;
|
||||
const idapp = req.body.idapp;
|
||||
|
||||
try {
|
||||
const { Movement } = require('../models/movement');
|
||||
|
||||
if (nummov) {
|
||||
last_transactions = await Movement.getLastN_Transactions(idapp, nummov);
|
||||
}
|
||||
|
||||
res.send({ code: server_constants.RIS_CODE_OK, last_transactions });
|
||||
} catch (e) {
|
||||
tools.mylogserr('Error lastmovs: ', e);
|
||||
res.status(400).send();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
router.post('/receiveris', authenticate, (req, res) => {
|
||||
const username = req.user ? req.user.username : '';
|
||||
const groupname = req.body.groupname;
|
||||
|
||||
@@ -319,6 +319,7 @@ module.exports = {
|
||||
transactionDate: tools.getstrDate_DD_MM_YYYY(myrec.transactionDate),
|
||||
symbol: myrec.symbol,
|
||||
causale: myrec.causale,
|
||||
causalDest: myrec.causalDest,
|
||||
groupDestoContoCom: myrec.groupDestoContoCom,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user