alsmanager_lib 3.0.62 → 3.0.64

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.
Files changed (2) hide show
  1. package/lib/modules.js +10 -1
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -6900,13 +6900,21 @@ function getDatiConsegneAttive() {
6900
6900
  }
6901
6901
 
6902
6902
 
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
+
6903
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
6915
  msgObj.message = "Gentile/Egregio ins." + nominativo;
6908
6916
  if (nome_alunno && nome_alunno.trim() != '' && nome_alunno.length > 5) {
6909
- msgObj.message = " (nome alunno/a : " + nome_alunno + ")";
6917
+ msgObj.message += " (nome alunno/a : " + nome_alunno + ")";
6910
6918
  }
6911
6919
  msgObj.message += "\n\n";
6912
6920
  msgObj.message += "Si ricorda di effettuare entro la data " + data_limite + " la consegna dei seguenti beni : \n";
@@ -14377,6 +14385,7 @@ module.exports = {
14377
14385
  queryConsegne,
14378
14386
  queryConsegnaById,
14379
14387
  getDatiConsegneAttive,
14388
+ createConsegnaMessageFromConsegna,
14380
14389
  createConsegnaMessage,
14381
14390
  getInviiEmailConsegna,
14382
14391
  insertInvioEmailConsegnaByBene,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.62",
7
+ "version": "3.0.64",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",