diff --git a/src/server/models/account.js b/src/server/models/account.js index d27e46b..8c07a78 100755 --- a/src/server/models/account.js +++ b/src/server/models/account.js @@ -23,7 +23,7 @@ const AccountSchema = new Schema({ userId: { type: String, }, - nome_conto: { + name: { type: String, }, deperibile: { @@ -66,7 +66,7 @@ AccountSchema.pre('save', async function(next) { AccountSchema.statics.getFieldsForSearch = function() { return [ - {field: 'nome_conto', type: tools.FieldType.string}, + {field: 'name', type: tools.FieldType.string}, ]; }; diff --git a/src/server/models/movement.js b/src/server/models/movement.js index 10f32fa..110c572 100755 --- a/src/server/models/movement.js +++ b/src/server/models/movement.js @@ -26,6 +26,12 @@ const MovementSchema = new Schema({ accountToId: { type: Number, }, + causal_table: { + type: String, + }, + causal_IdRec: { + type: String, + }, amount: { type: Number, }, diff --git a/src/server/models/myhosp.js b/src/server/models/myhosp.js index 9a0093e..3e6bae1 100755 --- a/src/server/models/myhosp.js +++ b/src/server/models/myhosp.js @@ -147,6 +147,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, @@ -229,6 +230,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, @@ -276,6 +278,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, @@ -323,6 +326,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, @@ -370,6 +374,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, @@ -417,6 +422,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) { numMaxPeopleHosp: 1, accomodation: 1, preferences: 1, + photos: 1, idContribType: 1, idCity: 1, note: 1, diff --git a/src/server/tools/globalTables.js b/src/server/tools/globalTables.js index 0d33e42..42bfe6b 100755 --- a/src/server/tools/globalTables.js +++ b/src/server/tools/globalTables.js @@ -35,6 +35,9 @@ const {CatGrp} = require('../models/catgrp'); const {Level} = require('../models/level'); const {AdType} = require('../models/adtype'); 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 {Newstosent} = require('../models/newstosent'); const {MyPage} = require('../models/mypage'); @@ -190,6 +193,12 @@ module.exports = { mytable = AdType; else if (tablename === 'adtypegoods') 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)) mytable = Pickup; //else if (shared_consts.TableCities.includes(tablename)) diff --git a/src/server/tools/shared_nodejs.js b/src/server/tools/shared_nodejs.js index eede103..b4a0142 100755 --- a/src/server/tools/shared_nodejs.js +++ b/src/server/tools/shared_nodejs.js @@ -97,7 +97,7 @@ module.exports = { TABLES_USER_INCLUDE_MY: ['mygroups'], 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_VISU_STAT_IN_HOME: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'], @@ -119,7 +119,9 @@ module.exports = { 'mybachecas', 'myhosps', 'mygoods', - 'mygroups'], + 'mygroups', + 'circuits', + 'movements'], TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'], TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mybots'],