Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

3 changed files with 20 additions and 6 deletions

5
.gitignore vendored
View File

@ -1,8 +1,3 @@
node_modules/
*/node_modules/
*/build/
**/node_modules/
**/build/
.DS_Store
.env

View File

@ -204,6 +204,16 @@ module.exports = class TasksDBApi {
let where = {};
const currentPage = +filter.page;
const user = (options && options.currentUser) || null;
const userOrganizations = (user && user.organizations?.id) || null;
if (userOrganizations) {
if (options?.currentUser?.organizationsId) {
where.organizationsId = options.currentUser.organizationsId;
}
}
offset = currentPage * limit;
const orderBy = null;
@ -370,6 +380,16 @@ module.exports = class TasksDBApi {
};
}
if (filter.organizations) {
const listItems = filter.organizations.split('|').map((item) => {
return Utils.uuid(item);
});
where = {
...where,
organizationsId: { [Op.or]: listItems },
};
}
if (filter.createdAtRange) {
const [start, end] = filter.createdAtRange;

View File

@ -1 +0,0 @@
{}