- Fixed pagination not refreshing the data...

- Start creating single page of an Event
This commit is contained in:
Paolo Arena
2019-11-06 22:29:29 +01:00
parent a54839e128
commit 0d776589f0
6 changed files with 50 additions and 8 deletions

View File

@@ -31,6 +31,9 @@ const OperatorSchema = new Schema({
type: String,
trim: true,
},
usertelegram: {
type: String,
},
cell: {
type: String,
trim: true,
@@ -74,6 +77,18 @@ OperatorSchema.statics.getFieldsForSearch = function () {
return ['name', 'surname', 'email', 'cell']
};
OperatorSchema.statics.getEmailByUsername = async function (idapp, username) {
const Operator = this;
return await Operator.findOne({ idapp, username })
.then((arrrec) => {
return ((arrrec) ? arrrec.email : '');
}).catch((e) => {
console.error('getEmailByUsername', e);
});
};
OperatorSchema.statics.executeQueryTable = function (idapp, params) {
params.fieldsearch = this.getFieldsForSearch();
return tools.executeQueryTable(this, idapp, params);