- Iscrizione Conacreis

This commit is contained in:
Paolo Arena
2021-06-04 10:07:57 +02:00
parent cf97870cc7
commit 9d5eda50ae
20 changed files with 3048 additions and 1525 deletions

View File

@@ -70,6 +70,12 @@ const MyEventSchema = new Schema({
teacher2: {
type: String,
},
teacher3: {
type: String,
},
teacher4: {
type: String,
},
infoextra: {
type: String,
},
@@ -115,12 +121,18 @@ const MyEventSchema = new Schema({
note: {
type: String,
},
pagefooter: [{
type: String,
}],
deleted: {
type: Boolean,
},
dupId: {
type: mongoose.Schema.Types.ObjectId,
},
facebook: {
type: String,
},
modified: {
type: Boolean,
},
@@ -185,6 +197,22 @@ MyEventSchema.statics.getLastEvents = async function (idapp) {
as: 'op2'
}
},
{
$lookup: {
from: 'operators',
localField: 'teacher3',
foreignField: 'username',
as: 'op3'
}
},
{
$lookup: {
from: 'operators',
localField: 'teacher4',
foreignField: 'username',
as: 'op4'
}
},
{ "$addFields": { "contribtype": { "$toObjectId": "$contribtype" } } },
{
$lookup: {