- i filtri non venivano correttamente salvati sui cookies (compariva null e -100)

- aggiunte tabelle accounts e circuits e movements
This commit is contained in:
Paolo Arena
2022-05-08 00:09:59 +02:00
parent b276a6185f
commit 7b61734aef
5 changed files with 27 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ const AccountSchema = new Schema({
userId: { userId: {
type: String, type: String,
}, },
nome_conto: { name: {
type: String, type: String,
}, },
deperibile: { deperibile: {
@@ -66,7 +66,7 @@ AccountSchema.pre('save', async function(next) {
AccountSchema.statics.getFieldsForSearch = function() { AccountSchema.statics.getFieldsForSearch = function() {
return [ return [
{field: 'nome_conto', type: tools.FieldType.string}, {field: 'name', type: tools.FieldType.string},
]; ];
}; };

View File

@@ -26,6 +26,12 @@ const MovementSchema = new Schema({
accountToId: { accountToId: {
type: Number, type: Number,
}, },
causal_table: {
type: String,
},
causal_IdRec: {
type: String,
},
amount: { amount: {
type: Number, type: Number,
}, },

View File

@@ -147,6 +147,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,
@@ -229,6 +230,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,
@@ -276,6 +278,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,
@@ -323,6 +326,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,
@@ -370,6 +374,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,
@@ -417,6 +422,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
numMaxPeopleHosp: 1, numMaxPeopleHosp: 1,
accomodation: 1, accomodation: 1,
preferences: 1, preferences: 1,
photos: 1,
idContribType: 1, idContribType: 1,
idCity: 1, idCity: 1,
note: 1, note: 1,

View File

@@ -35,6 +35,9 @@ const {CatGrp} = require('../models/catgrp');
const {Level} = require('../models/level'); const {Level} = require('../models/level');
const {AdType} = require('../models/adtype'); const {AdType} = require('../models/adtype');
const {AdTypeGood} = require('../models/adtypegood'); const {AdTypeGood} = require('../models/adtypegood');
const {Circuit} = require('../models/circuit');
const {Account} = require('../models/account');
const {Movement} = require('../models/movement');
const Pickup = require('../models/pickup'); const Pickup = require('../models/pickup');
const {Newstosent} = require('../models/newstosent'); const {Newstosent} = require('../models/newstosent');
const {MyPage} = require('../models/mypage'); const {MyPage} = require('../models/mypage');
@@ -190,6 +193,12 @@ module.exports = {
mytable = AdType; mytable = AdType;
else if (tablename === 'adtypegoods') else if (tablename === 'adtypegoods')
mytable = AdTypeGood; mytable = AdTypeGood;
else if (tablename === 'circuits')
mytable = Circuit;
else if (tablename === 'accounts')
mytable = Account;
else if (tablename === 'movements')
mytable = Movement;
else if (shared_consts.TablePickup.includes(tablename)) else if (shared_consts.TablePickup.includes(tablename))
mytable = Pickup; mytable = Pickup;
//else if (shared_consts.TableCities.includes(tablename)) //else if (shared_consts.TableCities.includes(tablename))

View File

@@ -97,7 +97,7 @@ module.exports = {
TABLES_USER_INCLUDE_MY: ['mygroups'], TABLES_USER_INCLUDE_MY: ['mygroups'],
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'myhosps', 'mygoods'], TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
TABLES_PERM_NEWREC: ['skills', 'goods', 'subskills', 'mygroups'], TABLES_PERM_NEWREC: ['skills', 'goods', 'subskills', 'mygroups', 'myhosps'],
TABLES_REC_ID: ['skills', 'goods', 'subskills'], TABLES_REC_ID: ['skills', 'goods', 'subskills'],
TABLES_VISU_STAT_IN_HOME: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'], TABLES_VISU_STAT_IN_HOME: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
@@ -119,7 +119,9 @@ module.exports = {
'mybachecas', 'mybachecas',
'myhosps', 'myhosps',
'mygoods', 'mygoods',
'mygroups'], 'mygroups',
'circuits',
'movements'],
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'], TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mybots'], TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mybots'],