InfiniteScroll: Le liste (Beni / Servizi / Eventi) devono essere caricate in automatico, scorrendo la lista...
fix category
This commit is contained in:
@@ -330,7 +330,7 @@ MyBachecaSchema.statics.getMyRecById = function(idapp, id) {
|
|||||||
{
|
{
|
||||||
'$lookup': {
|
'$lookup': {
|
||||||
'from': 'sectors',
|
'from': 'sectors',
|
||||||
'localField': 'recSkill.idSector',
|
'localField': 'idSector',
|
||||||
'foreignField': '_id',
|
'foreignField': '_id',
|
||||||
'as': 'sector',
|
'as': 'sector',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$project': {
|
'$project': {
|
||||||
'recGood': 1,
|
'recGood': 1,
|
||||||
'sectorgood': 1,
|
'sectorGood': 1,
|
||||||
'idSectorGood': 1,
|
'idSectorGood': 1,
|
||||||
'idGood': 1,
|
'idGood': 1,
|
||||||
'idShipping': 1,
|
'idShipping': 1,
|
||||||
@@ -293,7 +293,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$project': {
|
'$project': {
|
||||||
'recGood': 1,
|
'recGood': 1,
|
||||||
'sectorgood': 1,
|
'sectorGood': 1,
|
||||||
'idSectorGood': 1,
|
'idSectorGood': 1,
|
||||||
'idGood': 1,
|
'idGood': 1,
|
||||||
'idShipping': 1,
|
'idShipping': 1,
|
||||||
@@ -326,9 +326,10 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$lookup': {
|
'$lookup': {
|
||||||
'from': 'sectorgoods',
|
'from': 'sectorgoods',
|
||||||
'localField': 'recGood.idSectorGood',
|
'localField': 'idSectorGood',
|
||||||
|
// 'localField': 'recGood.idSectorGood',
|
||||||
'foreignField': '_id',
|
'foreignField': '_id',
|
||||||
'as': 'sectorgood',
|
'as': 'sectorGood',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -349,7 +350,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$project': {
|
'$project': {
|
||||||
'recGood': 1,
|
'recGood': 1,
|
||||||
'sectorgood': 1,
|
'sectorGood': 1,
|
||||||
'idSectorGood': 1,
|
'idSectorGood': 1,
|
||||||
'idGood': 1,
|
'idGood': 1,
|
||||||
'idShipping': 1,
|
'idShipping': 1,
|
||||||
@@ -405,7 +406,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$project': {
|
'$project': {
|
||||||
'recGood': 1,
|
'recGood': 1,
|
||||||
'sectorgood': 1,
|
'sectorGood': 1,
|
||||||
'idSectorGood': 1,
|
'idSectorGood': 1,
|
||||||
'idGood': 1,
|
'idGood': 1,
|
||||||
'idShipping': 1,
|
'idShipping': 1,
|
||||||
@@ -461,7 +462,7 @@ MyGoodSchema.statics.getMyRecById = function(idapp, idGood) {
|
|||||||
{
|
{
|
||||||
'$project': {
|
'$project': {
|
||||||
'recGood': 1,
|
'recGood': 1,
|
||||||
'sectorgood': 1,
|
'sectorGood': 1,
|
||||||
'idSectorGood': 1,
|
'idSectorGood': 1,
|
||||||
'idGood': 1,
|
'idGood': 1,
|
||||||
'idShipping': 1,
|
'idShipping': 1,
|
||||||
|
|||||||
@@ -87,7 +87,9 @@ const MyGroupSchema = new Schema({
|
|||||||
},
|
},
|
||||||
date_created: {
|
date_created: {
|
||||||
type: Date,
|
type: Date,
|
||||||
default: Date.now,
|
},
|
||||||
|
date_updated: {
|
||||||
|
type: Date,
|
||||||
},
|
},
|
||||||
date_blocked: {
|
date_blocked: {
|
||||||
type: Date,
|
type: Date,
|
||||||
@@ -234,6 +236,7 @@ MyGroupSchema.statics.getWhatToShow = function(idapp, username) {
|
|||||||
refused_users: 1,
|
refused_users: 1,
|
||||||
createdBy: 1,
|
createdBy: 1,
|
||||||
date_created: 1,
|
date_created: 1,
|
||||||
|
date_updated: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -248,6 +251,8 @@ MyGroupSchema.statics.getWhatToShow_Unknown = function(idapp, username) {
|
|||||||
idCatGrp: 1,
|
idCatGrp: 1,
|
||||||
idCity: 1,
|
idCity: 1,
|
||||||
note: 1,
|
note: 1,
|
||||||
|
date_created: 1,
|
||||||
|
date_updated: 1,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
|||||||
{
|
{
|
||||||
'$lookup': {
|
'$lookup': {
|
||||||
'from': 'sectors',
|
'from': 'sectors',
|
||||||
'localField': 'recSkill.idSector',
|
'localField': 'idSector',
|
||||||
'foreignField': '_id',
|
'foreignField': '_id',
|
||||||
'as': 'sector',
|
'as': 'sector',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ MySkillSchema.statics.getMyRecById = function(idapp, idSkill) {
|
|||||||
{
|
{
|
||||||
'$lookup': {
|
'$lookup': {
|
||||||
'from': 'sectors',
|
'from': 'sectors',
|
||||||
'localField': 'recSkill.idSector',
|
'localField': 'idSector',
|
||||||
'foreignField': '_id',
|
'foreignField': '_id',
|
||||||
'as': 'sector',
|
'as': 'sector',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -253,6 +253,10 @@ router.post('/settable', authenticate, async (req, res) => {
|
|||||||
mydata.createdBy = req.user.username;
|
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 (shared_consts.TABLES_PERM_NEWREC.includes(params.table)) {
|
||||||
if (!consentito) {
|
if (!consentito) {
|
||||||
mydata.verifyrec = false;
|
mydata.verifyrec = false;
|
||||||
|
|||||||
@@ -2480,7 +2480,7 @@ class Telegram {
|
|||||||
async askUsernameInvitante(msg) {
|
async askUsernameInvitante(msg) {
|
||||||
try {
|
try {
|
||||||
let rec = this.getRecInMem(msg);
|
let rec = this.getRecInMem(msg);
|
||||||
if (msg.text === undefined)
|
if (msg.text === undefined || msg.text === 'undefined')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (rec) {
|
if (rec) {
|
||||||
@@ -2545,8 +2545,8 @@ class Telegram {
|
|||||||
async checkIfUsernameTelegramSet(msg) {
|
async checkIfUsernameTelegramSet(msg) {
|
||||||
try {
|
try {
|
||||||
if (!msg.from.username) {
|
if (!msg.from.username) {
|
||||||
//await this.sendMsgByTemplateByMsgStrutt('MSG_SET_USERNAME', msg);
|
await this.sendMsgByTemplateByMsgStrutt('MSG_SET_USERNAME', msg);
|
||||||
await this.sendMsgByTextByMsgStrutt('MSG_SET_USERNAME_TELEGRAM', msg);
|
// await this.sendMsgByTextByMsgStrutt('MSG_SET_USERNAME_TELEGRAM', msg);
|
||||||
return false;
|
return false;
|
||||||
//await this.sendMsgByTemplate('MSG_SET_USERNAME', myuser);
|
//await this.sendMsgByTemplate('MSG_SET_USERNAME', myuser);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ module.exports = {
|
|||||||
'movements'],
|
'movements'],
|
||||||
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||||
TABLES_CREATEDBY: ['mygroups'],
|
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'],
|
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user