alsmanager_lib 3.0.61 → 3.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules.js +17 -4
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -6900,16 +6900,28 @@ function getDatiConsegneAttive() {
|
|
|
6900
6900
|
}
|
|
6901
6901
|
|
|
6902
6902
|
|
|
6903
|
-
function
|
|
6903
|
+
function createConsegnaMessageFromConsegna(consegna, listaBeni, data_limite) {
|
|
6904
|
+
var dc = new Date(consegna.data_consegna);
|
|
6905
|
+
var email_subject = "Consegna n." + consegna.id + " del " + ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
|
|
6906
|
+
return createConsegnaMessage(consegna.richiedente_adulto, consegna.richiedente_alunno, consegna.email_adulto, email_subject, listaBeni, data_limite);
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6909
|
+
|
|
6910
|
+
|
|
6911
|
+
function createConsegnaMessage(nominativo, nome_alunno, email, rif_consegna, listaBeni, data_limite) {
|
|
6904
6912
|
var msgObj = {};
|
|
6905
6913
|
msgObj.email_to = email;
|
|
6906
6914
|
msgObj.subject = rif_consegna;
|
|
6907
|
-
msgObj.message = "Gentile/Egregio ins." + nominativo
|
|
6908
|
-
|
|
6915
|
+
msgObj.message = "Gentile/Egregio ins." + nominativo;
|
|
6916
|
+
if (nome_alunno && nome_alunno.trim() != '' && nome_alunno.length > 5) {
|
|
6917
|
+
msgObj.message = " (nome alunno/a : " + nome_alunno + ")";
|
|
6918
|
+
}
|
|
6919
|
+
msgObj.message += "\n\n";
|
|
6920
|
+
msgObj.message += "Si ricorda di effettuare entro la data " + data_limite + " la consegna dei seguenti beni : \n";
|
|
6909
6921
|
listaBeni.forEach(element => {
|
|
6910
6922
|
msgObj.message += "n. " + element.Numero + " - " + element.Tipo + " - " + element.Marca + " - " + element.Modello + " - Cod. " + element.Codice + "\n";
|
|
6911
6923
|
});
|
|
6912
|
-
msgObj.message += "\
|
|
6924
|
+
msgObj.message += "\nSi richiede che la consegna venga effettuata ad un tecnico dell'Istituto per le verifiche del caso.\n";
|
|
6913
6925
|
msgObj.message += "Se per eventuali esigenze fosse necessario prolungare l'utilizzo del bene, si prega di contattare l'Ufficio Tecnico.\n ";
|
|
6914
6926
|
msgObj.message += "\n\nCordiali saluti\n\nI tecnici dell'I.C. Trento 3";
|
|
6915
6927
|
return msgObj;
|
|
@@ -14373,6 +14385,7 @@ module.exports = {
|
|
|
14373
14385
|
queryConsegne,
|
|
14374
14386
|
queryConsegnaById,
|
|
14375
14387
|
getDatiConsegneAttive,
|
|
14388
|
+
createConsegnaMessageFromConsegna,
|
|
14376
14389
|
createConsegnaMessage,
|
|
14377
14390
|
getInviiEmailConsegna,
|
|
14378
14391
|
insertInvioEmailConsegnaByBene,
|