alsmanager_lib 3.0.193 → 3.0.194
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 +21 -1
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -8176,8 +8176,22 @@ CREATE TABLE "piano_interventi" (
|
|
|
8176
8176
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
8177
8177
|
)
|
|
8178
8178
|
*/
|
|
8179
|
-
function selectPianificazioni() {
|
|
8179
|
+
function selectPianificazioni(filter_date_start, filter_date_end) {
|
|
8180
|
+
var dt_start = convertDateToStringDB(filter_date_start);
|
|
8181
|
+
var dt_end = convertDateToStringDB(filter_date_end);
|
|
8182
|
+
|
|
8180
8183
|
var query = "select id, frequenza, date_start, date_max_end, descrizione, id_assegnazione from piano_interventi ";
|
|
8184
|
+
var where_clause = "";
|
|
8185
|
+
if (dt_start != "") {
|
|
8186
|
+
where_clause += "date_start >= '" + dt_start + "' ";
|
|
8187
|
+
}
|
|
8188
|
+
if (dt_end != "") {
|
|
8189
|
+
if (where_clause != "") {
|
|
8190
|
+
where_clause += " and ";
|
|
8191
|
+
}
|
|
8192
|
+
where_clause += "date_max_end <= '" + dt_end + "' ";
|
|
8193
|
+
}
|
|
8194
|
+
query += where_clause;
|
|
8181
8195
|
query += "order by date_start, date_max_end desc";
|
|
8182
8196
|
return query;
|
|
8183
8197
|
}
|
|
@@ -8216,6 +8230,10 @@ function removePianificazione(id_pianificazione) {
|
|
|
8216
8230
|
return query;
|
|
8217
8231
|
}
|
|
8218
8232
|
|
|
8233
|
+
function getFrequenzaTypes() {
|
|
8234
|
+
var query = "select id, name from frequenza_type order by id"
|
|
8235
|
+
return query;
|
|
8236
|
+
}
|
|
8219
8237
|
|
|
8220
8238
|
//End manage pianificazioni
|
|
8221
8239
|
|
|
@@ -16602,6 +16620,8 @@ module.exports = {
|
|
|
16602
16620
|
updatePianificazione,
|
|
16603
16621
|
removePianificazione,
|
|
16604
16622
|
//
|
|
16623
|
+
getFrequenzaTypes,
|
|
16624
|
+
//
|
|
16605
16625
|
selectInterventi,
|
|
16606
16626
|
queryInterventoById,
|
|
16607
16627
|
insertIntervento,
|