Reportistica Ore 2
This commit is contained in:
@@ -1272,7 +1272,7 @@ UserSchema.statics.getusersManagers = async function (idapp) {
|
||||
UserSchema.statics.getusersRespList = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
return await User.find({ idapp, 'profile.resplist': true }, { _id:1, username: 1, name: 1, surname: 1 })
|
||||
return await User.find({ idapp, 'profile.resplist': true }, { _id: 1, username: 1, name: 1, surname: 1 })
|
||||
.then((arrrec) => {
|
||||
return (!!arrrec) ? arrrec : null;
|
||||
}).catch((e) => {
|
||||
@@ -1283,7 +1283,7 @@ UserSchema.statics.getusersRespList = async function (idapp) {
|
||||
UserSchema.statics.getusersWorkersList = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
return await User.find({ idapp, 'profile.workerslist': true }, { _id:1, username: 1, name: 1, surname: 1 })
|
||||
return await User.find({ idapp, 'profile.workerslist': true }, { _id: 1, username: 1, name: 1, surname: 1 })
|
||||
.then((arrrec) => {
|
||||
return (!!arrrec) ? arrrec : null;
|
||||
}).catch((e) => {
|
||||
@@ -1892,6 +1892,18 @@ UserSchema.statics.getUsersZoom = async function (idapp) {
|
||||
return await User.count(myfind);
|
||||
};
|
||||
|
||||
UserSchema.statics.getUsersResidenti = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
const myfind = {
|
||||
idapp,
|
||||
$or: [{ deleted: { $exists: false } }, { deleted: { $exists: true, $eq: false } }],
|
||||
'profile.socioresidente': { $exists: true, $eq: true }
|
||||
};
|
||||
|
||||
return await User.find(myfind, {username: 1, name: 1, surname: 1});
|
||||
};
|
||||
|
||||
UserSchema.statics.getSaw_and_Accepted = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user