alsmanager_lib 3.0.125 → 3.0.126
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 +30 -0
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -7039,6 +7039,35 @@ function getDatiConsegneAttive() {
|
|
|
7039
7039
|
}
|
|
7040
7040
|
|
|
7041
7041
|
|
|
7042
|
+
function createPreparazioneMessageFromConsegna(consegna, listaBeni) {
|
|
7043
|
+
var dc = new Date(consegna.data_consegna);
|
|
7044
|
+
var dc_str = convertDateToStringDisplay(dc);
|
|
7045
|
+
//var email_subject = "Consegna n." + consegna.id + " del " + ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
|
|
7046
|
+
var email_subject = "Consegna n." + consegna.id + " del " + dc_str;
|
|
7047
|
+
return createPreparazioneMessage(consegna.richiedente_adulto, consegna.richiedente_alunno, consegna.is_home , consegna.email_adulto, email_subject, listaBeni);
|
|
7048
|
+
}
|
|
7049
|
+
|
|
7050
|
+
|
|
7051
|
+
function createPreparazioneMessage(nominativo, nome_alunno, is_home, email, rif_consegna, listaBeni) {
|
|
7052
|
+
var msgObj = {};
|
|
7053
|
+
msgObj.email_to = email;
|
|
7054
|
+
msgObj.subject = rif_consegna;
|
|
7055
|
+
msgObj.message = "Gentile/Egregio ins." + nominativo;
|
|
7056
|
+
if (nome_alunno && nome_alunno.trim() != '' && nome_alunno.length > 5) {
|
|
7057
|
+
msgObj.message += " (nome alunno/a : " + nome_alunno + ")";
|
|
7058
|
+
}
|
|
7059
|
+
msgObj.message += "\n\n";
|
|
7060
|
+
msgObj.message += "Si comunica la disponibilità dei seguenti beni : \n";
|
|
7061
|
+
listaBeni.forEach(element => {
|
|
7062
|
+
msgObj.message += "n. " + element.Numero + " - " + element.Tipo + " - " + element.Marca + " - " + element.Modello + " - Cod. " + element.Codice + "\n";
|
|
7063
|
+
});
|
|
7064
|
+
if (is_home && is_home == 1) {
|
|
7065
|
+
msgObj.message += "\nSi richiede il ritiro dei beni da parte di un genitore con firma del modulo di coonsegna";
|
|
7066
|
+
}
|
|
7067
|
+
msgObj.message += "\n\nCordiali saluti\n\nI tecnici dell'I.C. Trento 3";
|
|
7068
|
+
return msgObj;
|
|
7069
|
+
}
|
|
7070
|
+
|
|
7042
7071
|
function createConsegnaMessageFromConsegna(consegna, listaBeni, data_limite) {
|
|
7043
7072
|
var dc = new Date(consegna.data_consegna);
|
|
7044
7073
|
var email_subject = "Consegna n." + consegna.id + " del " + ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
|
|
@@ -15229,6 +15258,7 @@ module.exports = {
|
|
|
15229
15258
|
queryConsegne,
|
|
15230
15259
|
queryConsegnaById,
|
|
15231
15260
|
getDatiConsegneAttive,
|
|
15261
|
+
createPreparazioneMessageFromConsegna,
|
|
15232
15262
|
createConsegnaMessageFromConsegna,
|
|
15233
15263
|
createConsegnaMessage,
|
|
15234
15264
|
getInviiEmailConsegna,
|