alsmanager_lib 3.0.194 → 3.0.195
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 +68 -0
- 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
|
+
)
|
|
8239
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
|
+
)
|
|
8240
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
|
+
}
|
|
8241
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
|
+
}
|
|
8299
|
+
|
|
8300
|
+
|
|
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 ";
|
|
@@ -16622,6 +16683,13 @@ module.exports = {
|
|
|
16622
16683
|
//
|
|
16623
16684
|
getFrequenzaTypes,
|
|
16624
16685
|
//
|
|
16686
|
+
selectTipsTricks,
|
|
16687
|
+
selectTipsTricksById,
|
|
16688
|
+
selectTipsTricksSteps,
|
|
16689
|
+
selectInterventiByIdTipsTricks,
|
|
16690
|
+
writeTipsTricksOfIntervento,
|
|
16691
|
+
deleteTipsTricksOfIntervento,
|
|
16692
|
+
//
|
|
16625
16693
|
selectInterventi,
|
|
16626
16694
|
queryInterventoById,
|
|
16627
16695
|
insertIntervento,
|