- Fare LISTA MOVIMENTI più comprensibile

- Grafica Circuiti
This commit is contained in:
Surya Paolo
2024-10-02 03:46:33 +02:00
parent ff1344c06f
commit 03e5d2ed81
17 changed files with 218 additions and 84 deletions

View File

@@ -66,7 +66,6 @@ const MyGroupSchema = new Schema({
type: String,
default: '',
},
//**ADDFIELD_MYGROUPS
visibility: [
{
type: Number,
@@ -125,11 +124,9 @@ const MyGroupSchema = new Schema({
lastdate_reqRisGroup: {
type: Date,
},
//**ADDFIELD_MYGROUPS
idMyGroup: {
type: String,
},
// **ADDFIELD_MYGROUPS
...tools.getFieldsForAnnunci(),
});
@@ -252,7 +249,6 @@ MyGroupSchema.statics.getWhatToShow = function (idapp, username) {
photos: 1,
idCity: 1,
website: 1,
//**ADDFIELD_MYGROUPS
link_telegram: 1,
note: 1,
admins: 1,
@@ -264,6 +260,7 @@ MyGroupSchema.statics.getWhatToShow = function (idapp, username) {
date_updated: 1,
mycircuits: 1,
lastdate_reqRisGroup: 1,
//**ADDFIELD_MYGROUPS
};
whatToShow = { ...whatToShow, ...shared_consts.ANNUNCI_FIELDS };
@@ -647,7 +644,7 @@ MyGroupSchema.statics.getReceiveRISGroups = async function (idapp) {
MyGroupSchema.statics.renameCircuitName = async function (idapp, oldcircuitname, newcircuitname) {
return await this.updateMany({ idapp, 'mycircuits.circuitname': oldcircuitname }, { $set: { 'profile.mycircuits.$.circuitname': newcircuitname } });
};
@@ -663,17 +660,6 @@ MyGroupSchema.statics.setReceiveRisGroup = async function (idapp, groupname) {
};
MyGroupSchema.statics.getFieldsForAnnunci = function () {
let annunciFields = {
idMyGroup: {
type: String,
},
// **ADDFIELD_MYGROUPS
};
return annunciFields;
};
const MyGroup = mongoose.model('MyGroup', MyGroupSchema);
MyGroup.createIndexes((err) => {