Skip to content
This repository was archived by the owner on Jul 2, 2022. It is now read-only.

Commit 1e0fbb0

Browse files
author
Tischa
committed
Comment filter on applicants
1 parent 9f02a09 commit 1e0fbb0

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

server/src/applicants/applicants.service.ts

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,28 @@ export class ApplicantsService {
3434
where || {};
3535

3636
//todo: filter parents with more than one condition
37-
38-
const filter = {
39-
...whereArgs,
40-
profiles: {
41-
some: { profile: profiles_every }
42-
},
43-
projects: {
44-
some: { project: projects_every }
45-
},
46-
suggestions: {
47-
every: suggestions_every
48-
},
49-
skillset: {
50-
every: { skill: skills_every }
51-
}
52-
};
37+
// fix: filter
38+
// const filter = {
39+
// ...whereArgs,
40+
// profiles: {
41+
// some: { profile: profiles_every }
42+
// },
43+
// projects: {
44+
// some: { project: projects_every }
45+
// },
46+
// suggestions: {
47+
// every: suggestions_every
48+
// },
49+
// skillset: {
50+
// every: { skill: skills_every }
51+
// }
52+
// };
5353

5454
let applicants = await this.prisma.applicant.findMany({
5555
include: this.applicantIncludes,
56-
where: filter
56+
where: { ...whereArgs }
5757
});
5858

59-
console.log(applicants);
60-
61-
console.log(filter);
62-
6359
// todo refactor
6460
if (projects_every) applicants = applicants.filter((applicant) => applicant.projects.length);
6561
if (profiles_every) applicants = applicants.filter((applicant) => applicant.profiles.length);

0 commit comments

Comments
 (0)