alsmanager_lib 3.0.194 → 3.0.196

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 +172 -1
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -8236,9 +8236,70 @@ function getFrequenzaTypes() {
8236
8236
  }
8237
8237
 
8238
8238
  //End manage pianificazioni
8239
+ //Manage Tips & Tricks
8240
+ /*
8241
+ CREATE TABLE "tips_tricks" (
8242
+ "id" INTEGER NOT NULL UNIQUE,
8243
+ "date_discovery" TEXT,
8244
+ "tags" TEXT,
8245
+ "problem" TEXT,
8246
+ "solution" TEXT,
8247
+ PRIMARY KEY("id" AUTOINCREMENT)
8248
+ )
8249
+
8250
+ CREATE TABLE "tipstricks_steps" (
8251
+ "id" INTEGER NOT NULL UNIQUE,
8252
+ "id_tip" INTEGER,
8253
+ "description" TEXT,
8254
+ "resource" TEXT,
8255
+ PRIMARY KEY("id" AUTOINCREMENT)
8256
+ )
8257
+
8258
+ CREATE TABLE "tipstricks_interventi" (
8259
+ "id_tipstricks" INTEGER,
8260
+ "id_intervento" INTEGER
8261
+ )
8262
+ */
8263
+ function selectTipsTricks() {
8264
+ var query = "select id, date_discovery, tags, problem from tips_tricks ";
8265
+ query += "order by date_discovery"
8266
+ return query;
8267
+ }
8268
+
8269
+ function selectTipsTricksById(id_tipstricks) {
8270
+ var query = "select id, date_discovery, tags, problem from tips_tricks ";
8271
+ query += "where id_tip = " + id_tipstricks;
8272
+ return query;
8273
+ }
8274
+
8275
+ function selectTipsTricksSteps(id_tipstricks) {
8276
+ var query = "select id, description, resource from tipstricks_steps ";
8277
+ query += "where id_tip = " + id_tipstricks;
8278
+ return query;
8279
+ }
8280
+
8281
+ function selectInterventiByIdTipsTricks(id_tipstricks) {
8282
+ var query = "select int.id, int.data_inizio as Inizio, int.data_fine as Fine, int.description as Descrizione from interventi int ";
8283
+ query += "join tipstricks_interventi tpi on tpi.id_intervento = int.id ";
8284
+ query += "where tpi.id_tip = " + id_tipstricks;
8285
+ return query;
8286
+ }
8287
+
8288
+ function writeTipsTricksOfIntervento(id_intervento, id_tipstricks) {
8289
+ var query = "insert into tipstricks_interventi (id_tip, id_intervento) values ";
8290
+ query += "(" + id_tipstricks + ", " + id_intervento +")";
8291
+ return query;
8292
+ }
8293
+
8294
+ function deleteTipsTricksOfIntervento(id_intervento, id_tipstricks) {
8295
+ var query = "delete from tipstricks_interventi ";
8296
+ query += "where id_tip = " + id_tipstricks + " and id_intervento = " + id_intervento;
8297
+ return query;
8298
+ }
8239
8299
 
8240
8300
 
8241
8301
 
8302
+ //End Manage Tips & Tricks
8242
8303
  //
8243
8304
  function selectInterventiSQLite(data_da, data_a) {
8244
8305
  var query = "select id, data_inizio as Inizio, data_fine as Fine, description as Descrizione from interventi ";
@@ -16310,7 +16371,100 @@ function getMapPointsById(id_point) {
16310
16371
  query += "where id = " + id_point;
16311
16372
  return query;
16312
16373
  }
16374
+ // Printer management
16375
+ /*
16376
+ CREATE TABLE "printer_cost_per_copy" (
16377
+ "id" INTEGER,
16378
+ "id_device" INTEGER,
16379
+ "id_gestore" INTEGER,
16380
+ "date_valid_start" TEXT,
16381
+ "date_valid_end" TEXT,
16382
+ "operation" TEXT,
16383
+ "print_color_bw" TEXT,
16384
+ "cost" REAL,
16385
+ PRIMARY KEY("id" AUTOINCREMENT)
16386
+ )
16313
16387
 
16388
+ CREATE TABLE "printer_counters" (
16389
+ "id" INTEGER,
16390
+ "id_device" INTEGER,
16391
+ "date_read" TEXT,
16392
+ "operation" TEXT,
16393
+ "num_bw" INTEGER,
16394
+ "num_colors" INTEGER
16395
+ )
16396
+
16397
+ CREATE TABLE "printer_recharge_user" (
16398
+ "id" INTEGER,
16399
+ "id_user" INTEGER,
16400
+ "id_device" INTEGER,
16401
+ "operation" TEXT,
16402
+ "date_recharge" TEXT,
16403
+ "num_bw" INTEGER,
16404
+ "num_colors" INTEGER,
16405
+ PRIMARY KEY("id")
16406
+ )
16407
+
16408
+ CREATE TABLE "printer_stampe_user" (
16409
+ "id" INTEGER,
16410
+ "id_device" INTEGER,
16411
+ "id_user" INTEGER,
16412
+ "operation" TEXT,
16413
+ "date_read" TEXT,
16414
+ "num_bw" INTEGER,
16415
+ "num_colors" INTEGER,
16416
+ PRIMARY KEY("id" AUTOINCREMENT)
16417
+ )
16418
+ */
16419
+
16420
+
16421
+ function selectCountersPrinters(id_gestore) {
16422
+ var query = "";
16423
+ return query;
16424
+ }
16425
+
16426
+ function readCountersPrinter(id_device) {
16427
+ var query = "";
16428
+ return query;
16429
+ }
16430
+
16431
+ function writeCountersPrinter(id_device, num_bw, num_colors, date_read) {
16432
+ var query = "";
16433
+ return query;
16434
+ }
16435
+
16436
+ function updateCountersPrinter(id_prnread, id_device, num_bw, num_colors, date_read) {
16437
+ var query = "";
16438
+ return query;
16439
+ }
16440
+
16441
+ function deleteCountersPrinter(id_prnread, id_device, num_bw, num_colors, date_read) {
16442
+ var query = "";
16443
+ return query;
16444
+ }
16445
+
16446
+ function readCountersPrinterUser(id_prnread, id_device, num_bw, num_colors, date_read) {
16447
+ var query = "";
16448
+ return query;
16449
+ }
16450
+
16451
+ function writeCountersPrinterUser(id_prnread, id_device, num_bw, num_colors, date_read) {
16452
+ var query = "";
16453
+ return query;
16454
+ }
16455
+
16456
+ function updateCountersPrinterUser(id_prnread, id_device, num_bw, num_colors, date_read) {
16457
+ var query = "";
16458
+ return query;
16459
+ }
16460
+
16461
+ function deleteCountersPrinterUser(id_prnread, id_device, num_bw, num_colors, date_read) {
16462
+ var query = "";
16463
+ return query;
16464
+ }
16465
+
16466
+
16467
+ // End Printer management
16314
16468
  // Exports
16315
16469
 
16316
16470
  module.exports = {
@@ -16622,6 +16776,13 @@ module.exports = {
16622
16776
  //
16623
16777
  getFrequenzaTypes,
16624
16778
  //
16779
+ selectTipsTricks,
16780
+ selectTipsTricksById,
16781
+ selectTipsTricksSteps,
16782
+ selectInterventiByIdTipsTricks,
16783
+ writeTipsTricksOfIntervento,
16784
+ deleteTipsTricksOfIntervento,
16785
+ //
16625
16786
  selectInterventi,
16626
16787
  queryInterventoById,
16627
16788
  insertIntervento,
@@ -16775,6 +16936,16 @@ module.exports = {
16775
16936
  removeMapPoint,
16776
16937
  removeMapPointByPlace,
16777
16938
  queryMapPointsByPlaceAndFloor,
16778
- getMapPointsById
16939
+ getMapPointsById,
16940
+ //
16941
+ selectCountersPrinters,
16942
+ readCountersPrinter,
16943
+ writeCountersPrinter,
16944
+ updateCountersPrinter,
16945
+ deleteCountersPrinter,
16946
+ readCountersPrinterUser,
16947
+ writeCountersPrinterUser,
16948
+ updateCountersPrinterUser,
16949
+ deleteCountersPrinterUser
16779
16950
  };
16780
16951
  // end of source
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.194",
7
+ "version": "3.0.196",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",