- Nella Lavagna, cliccando sul nome dell'invitato, compaiono le sue informazioni sugli step rimasti, in dettaglio.
- Ogni utente puo' cosi scegliere di regalare un proprio invitato, cliccando sull'invitato, scrivendo l'username del destinatario e premendo il bottone 'Regala Invitato'. Al destinatario gli arriverà un messaggio sul Bot Telegram che indica che gli è stato regalato un'invitato.
This commit is contained in:
@@ -78,6 +78,9 @@ var ExtraListSchema = new mongoose.Schema({
|
||||
note: {
|
||||
type: String,
|
||||
},
|
||||
contacted: {
|
||||
type: Boolean,
|
||||
},
|
||||
col_b: {
|
||||
type: Number,
|
||||
},
|
||||
@@ -87,17 +90,17 @@ var ExtraListSchema = new mongoose.Schema({
|
||||
registered: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
ExtraListSchema.methods.toJSON = function () {
|
||||
const extralist = this;
|
||||
const userObject = extralist.toObject();
|
||||
|
||||
return _.pick(userObject, ['_id', ...shared_consts.fieldsUserToChange()]);
|
||||
};
|
||||
|
||||
// ExtraListSchema.methods.toJSON = function () {
|
||||
// const extralist = this;
|
||||
// const userObject = extralist.toObject();
|
||||
//
|
||||
// return _.pick(userObject, ['_id', ...shared_consts.fieldsUserToChange()]);
|
||||
// };
|
||||
//
|
||||
ExtraListSchema.statics.findByUsername = function (idapp, username) {
|
||||
const ExtraList = this;
|
||||
|
||||
@@ -174,16 +177,30 @@ ExtraListSchema.statics.getDownlineNotRegisteredByNameSurname = function (idapp,
|
||||
'aportador_solidario_name_surname': nameandsurname,
|
||||
registered: false,
|
||||
}, {
|
||||
username: 1,
|
||||
ind_order: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
verified_email: 1,
|
||||
'profile.teleg_id': 1,
|
||||
'profile.saw_zoom_presentation': 1,
|
||||
made_gift: 1,
|
||||
email: 1,
|
||||
date_reg: 1,
|
||||
img: 1
|
||||
cell_complete: 1,
|
||||
num_invitati: 1,
|
||||
nationality: 1,
|
||||
}, (err, arrrec) => {
|
||||
return arrrec
|
||||
});
|
||||
};
|
||||
|
||||
ExtraListSchema.statics.getUserNotRegisteredByNameSurname = function (idapp, nameandsurname) {
|
||||
const ExtraList = this;
|
||||
|
||||
return ExtraList.findOne({
|
||||
name_complete: nameandsurname,
|
||||
registered: false,
|
||||
}, {
|
||||
ind_order: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
cell_complete: 1,
|
||||
num_invitati: 1,
|
||||
nationality: 1,
|
||||
}, (err, arrrec) => {
|
||||
return arrrec
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user