alsmanager_lib 2.0.19 → 2.0.21

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 +46 -8
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -8996,7 +8996,8 @@ function createConsegnaDoc(consegna_obj, scuola_obj, listaDispositivi) {
8996
8996
  curr_year++;
8997
8997
  }
8998
8998
  data_consegna_str = "10/06/" + curr_year;
8999
- var data_corr_str = ("0" + d.getDate()).slice(-2) + '/' + ("0"+(d.getMonth()+1)).slice(-2) + '/' + d.getFullYear();
8999
+ var dc = new Date(consegna_obj.data_consegna);
9000
+ var dc_str = ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
9000
9001
  var consegnatoA_str = "";
9001
9002
  if (consegna_obj.ric_adulto && consegna_obj.ric_adulto != '') {
9002
9003
  consegnatoA_str = 'Docente: ' + consegna_obj.ric_adulto;
@@ -9070,7 +9071,7 @@ function createConsegnaDoc(consegna_obj, scuola_obj, listaDispositivi) {
9070
9071
  },
9071
9072
  {
9072
9073
  text: [
9073
- 'Trento, ' + data_corr_str + '\n\n',
9074
+ 'Trento, ' + dc_str + '\n\n',
9074
9075
  'CONSEGNATO A:\n' + consegnatoA_str + '\n\n',
9075
9076
  'Scuola:\n' + scuola_str + '\n\n'
9076
9077
  ],
@@ -9108,7 +9109,7 @@ function createConsegnaDoc(consegna_obj, scuola_obj, listaDispositivi) {
9108
9109
  {
9109
9110
  text: [
9110
9111
  {text: '\n\nPer ricezione: \n\n', bold: true},
9111
- {text: 'Data: ' + data_corr_str + '\n\n', bold: false},
9112
+ {text: 'Data: ' + dc_str + '\n\n', bold: false},
9112
9113
  {text: 'Firma:__________________', bold: false}
9113
9114
  ]
9114
9115
  }
@@ -9140,8 +9141,9 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
9140
9141
  if (d.getMonth() > 5) {
9141
9142
  curr_year++;
9142
9143
  }
9143
- data_consegna_str = "10/06/" + curr_year;
9144
- var data_corr_str = ("0" + d.getDate()).slice(-2) + '/' + ("0"+(d.getMonth()+1)).slice(-2) + '/' + d.getFullYear();
9144
+ data_consegna_str = "01/06/" + curr_year;
9145
+ var dc = new Date(consegna_obj.data_consegna);
9146
+ var dc_str = ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
9145
9147
  var consegnatoA_str = "";
9146
9148
  if (consegna_obj.ric_adulto && consegna_obj.ric_adulto != '') {
9147
9149
  consegnatoA_str = 'Docente: ' + consegna_obj.ric_adulto;
@@ -9203,7 +9205,7 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
9203
9205
  },
9204
9206
  {
9205
9207
  text: [
9206
- 'Trento, ' + data_corr_str + '\n\n',
9208
+ 'Trento, ' + dc_str + '\n\n',
9207
9209
  'CONSEGNATO A:\n' + consegnatoA_str + '\n\n',
9208
9210
  'Scuola:\n' + scuola_str + '\n\n'
9209
9211
  ],
@@ -9233,7 +9235,7 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
9233
9235
  '\n\n',
9234
9236
  {
9235
9237
  ul: [
9236
- 'Il materiale deve essere riconsegnato entro il ' + data_consegna_str + ',salvo diversa indicazione, e mantenuto con cura e rispetto',
9238
+ 'Il materiale deve essere riconsegnato entro il ' + data_consegna_str + ', salvo diversa indicazione, e mantenuto con cura e rispetto',
9237
9239
  'Tutti i dati sul dispositivo, alla riconsegna, saranno cancellati.',
9238
9240
  'Scatola/borsa, cavi, alimentatore e tutto quanto consegnato, devono essere restituiti integri e funzionanti.'
9239
9241
  ]
@@ -9241,7 +9243,7 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
9241
9243
  {
9242
9244
  text: [
9243
9245
  {text: '\n\nPer ricezione: \n\n', bold: true},
9244
- {text: 'Data: ' + data_corr_str + '\n\n', bold: false},
9246
+ {text: 'Data: ' + dc_str + '\n\n', bold: false},
9245
9247
  {text: 'Firma:__________________', bold: false}
9246
9248
  ]
9247
9249
  }
@@ -9265,6 +9267,41 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
9265
9267
  return dd;
9266
9268
  }
9267
9269
 
9270
+ function createIstruzioniStandard(user,pwd,email) {
9271
+ var dd = {
9272
+ content: [
9273
+ {
9274
+ text: 'Istruzioni di accesso\n ',
9275
+ style: 'header',
9276
+ bold: true
9277
+ },
9278
+ {
9279
+ text: 'Selezionare ' + user + '. Password : ' + pwd + '\n',
9280
+ style: 'header',
9281
+ bold: false
9282
+ },
9283
+ {
9284
+ text: '\n\nPer qualsiasi problema o richiesta di chiarimenti sull\' utilizzo del dispositivo, scrivere a : ',
9285
+ style: 'header',
9286
+ bold: false
9287
+ },
9288
+ {
9289
+ text: email,
9290
+ style: 'header',
9291
+ bold: true
9292
+ },
9293
+ ],
9294
+ styles: {
9295
+ header: {
9296
+ fontSize: 16,
9297
+ bold: true,
9298
+ alignment: 'justify'
9299
+ }
9300
+ },
9301
+ }
9302
+ return dd;
9303
+ }
9304
+
9268
9305
  // Export DB
9269
9306
 
9270
9307
  function exportDBSQLSQLite(db_path, dump_path, dump_filename) {
@@ -9587,6 +9624,7 @@ module.exports = {
9587
9624
  getPackageJsVersion,
9588
9625
  createConsegnaDoc,
9589
9626
  createConsegnaBckDoc,
9627
+ createIstruzioniStandard,
9590
9628
  exportDBSQL
9591
9629
  };
9592
9630
  // end of source
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",