Mostrare il Bene, Servizio, solo ai Propri Gruppi.

Nella pagina profilo, i "Gruppi" personali non si vedevano !
This commit is contained in:
Paolo Arena
2022-06-16 20:34:42 +02:00
parent d8aa8e546e
commit c3b0a1f417
17 changed files with 170 additions and 52 deletions

View File

@@ -67,6 +67,9 @@ const MyHospSchema = new Schema({
{
type: Number,
}],
pub_to_share: {
type: Number, // PUB_TO_SHARE_ALL, PUB_TO_SHARE_ONLY_GROUPS_FOLLOW
},
descr: {
type: String,
},
@@ -134,7 +137,7 @@ MyHospSchema.statics.getFieldsLastForSearch = function() {
];
};
MyHospSchema.statics.executeQueryTable = function(idapp, params) {
MyHospSchema.statics.executeQueryTable = function(idapp, params, user) {
params.fieldsearch = this.getFieldsForSearch();
params.fieldsearch_last = this.getFieldsLastForSearch();
@@ -154,6 +157,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -165,6 +169,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params) {
name: 1,
surname: 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},
@@ -172,7 +177,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params) {
params = {...params, ...otherparams};
return tools.executeQueryTable(this, idapp, params);
return tools.executeQueryTable(this, idapp, params, user);
};
MyHospSchema.statics.getMyRecById = function(idapp, id) {
@@ -238,6 +243,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -251,6 +257,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
'comune': 1,
'mycities': 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},
@@ -287,6 +294,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -300,6 +308,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
'comune': 1,
'mycities': 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},
@@ -336,6 +345,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -349,6 +359,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
'comune': 1,
'mycities': 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},
@@ -385,6 +396,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -398,6 +410,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
'comune': 1,
'mycities': 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},
@@ -434,6 +447,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
photos: 1,
idContribType: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
@@ -447,6 +461,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
'comune': 1,
'mycities': 1,
'profile.img': 1,
"profile.mygroups": 1,
'profile.qualifica': 1,
},
},