InfiniteScroll: Le liste (Beni / Servizi / Eventi) devono essere caricate in automatico, scorrendo la lista...

fix category
This commit is contained in:
paoloar77
2022-08-15 15:10:27 +02:00
parent a2022f96cb
commit da3d6451d5
8 changed files with 25 additions and 15 deletions

View File

@@ -330,7 +330,7 @@ MyBachecaSchema.statics.getMyRecById = function(idapp, id) {
{
'$lookup': {
'from': 'sectors',
'localField': 'recSkill.idSector',
'localField': 'idSector',
'foreignField': '_id',
'as': 'sector',
},

View File

@@ -237,7 +237,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$project': {
'recGood': 1,
'sectorgood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
@@ -293,7 +293,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$project': {
'recGood': 1,
'sectorgood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
@@ -326,9 +326,10 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$lookup': {
'from': 'sectorgoods',
'localField': 'recGood.idSectorGood',
'localField': 'idSectorGood',
// 'localField': 'recGood.idSectorGood',
'foreignField': '_id',
'as': 'sectorgood',
'as': 'sectorGood',
},
},
{
@@ -349,7 +350,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$project': {
'recGood': 1,
'sectorgood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
@@ -405,7 +406,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$project': {
'recGood': 1,
'sectorgood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
@@ -461,7 +462,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
{
'$project': {
'recGood': 1,
'sectorgood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,

View File

@@ -87,7 +87,9 @@ const MyGroupSchema = new Schema({
},
date_created: {
type: Date,
default: Date.now,
},
date_updated: {
type: Date,
},
date_blocked: {
type: Date,
@@ -234,6 +236,7 @@ MyGroupSchema.statics.getWhatToShow = function(idapp, username) {
refused_users: 1,
createdBy: 1,
date_created: 1,
date_updated: 1,
};
};
@@ -248,6 +251,8 @@ MyGroupSchema.statics.getWhatToShow_Unknown = function(idapp, username) {
idCatGrp: 1,
idCity: 1,
note: 1,
date_created: 1,
date_updated: 1,
};
};

View File

@@ -318,7 +318,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
{
'$lookup': {
'from': 'sectors',
'localField': 'recSkill.idSector',
'localField': 'idSector',
'foreignField': '_id',
'as': 'sector',
},

View File

@@ -325,7 +325,7 @@ MySkillSchema.statics.getMyRecById = function(idapp, idSkill) {
{
'$lookup': {
'from': 'sectors',
'localField': 'recSkill.idSector',
'localField': 'idSector',
'foreignField': '_id',
'as': 'sector',
},

View File

@@ -253,6 +253,10 @@ router.post('/settable', authenticate, async (req, res) => {
mydata.createdBy = req.user.username;
}
if (shared_consts.TABLES_UPDATE_LASTMODIFIED.includes(params.table)) {
mydata.date_updated = new Date();
}
if (shared_consts.TABLES_PERM_NEWREC.includes(params.table)) {
if (!consentito) {
mydata.verifyrec = false;

View File

@@ -2480,7 +2480,7 @@ class Telegram {
async askUsernameInvitante(msg) {
try {
let rec = this.getRecInMem(msg);
if (msg.text === undefined)
if (msg.text === undefined || msg.text === 'undefined')
return false;
if (rec) {
@@ -2545,8 +2545,8 @@ class Telegram {
async checkIfUsernameTelegramSet(msg) {
try {
if (!msg.from.username) {
//await this.sendMsgByTemplateByMsgStrutt('MSG_SET_USERNAME', msg);
await this.sendMsgByTextByMsgStrutt('MSG_SET_USERNAME_TELEGRAM', msg);
await this.sendMsgByTemplateByMsgStrutt('MSG_SET_USERNAME', msg);
// await this.sendMsgByTextByMsgStrutt('MSG_SET_USERNAME_TELEGRAM', msg);
return false;
//await this.sendMsgByTemplate('MSG_SET_USERNAME', myuser);
}

View File

@@ -140,7 +140,7 @@ module.exports = {
'movements'],
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
TABLES_CREATEDBY: ['mygroups'],
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots'],
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots', 'mygroups'],
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],