fix(mentor): show non-suspended users in pool + picker (§B/§C)
mentor.getCandidates and mentor.getMentorPool both filtered on status='ACTIVE', which excluded every seeded mentor (status=NONE) and any INVITED mentor. Production scenario: PR 4's Manual Picker and PR 5's pool counts both rendered empty against real data. Filter changed to status != SUSPENDED — admins want to see all mentors they manage (including INVITED + NONE), but not suspended ones. Found via Playwright smoke of PR 5: pool count read 0 against 4 seeded mentors with roles[]=['MENTOR'], status='NONE'.
This commit is contained in:
@@ -169,7 +169,7 @@ export const mentorRouter = router({
|
||||
const mentors = await ctx.prisma.user.findMany({
|
||||
where: {
|
||||
roles: { has: 'MENTOR' },
|
||||
status: 'ACTIVE',
|
||||
status: { not: 'SUSPENDED' },
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
@@ -996,7 +996,7 @@ export const mentorRouter = router({
|
||||
const mentors = await ctx.prisma.user.findMany({
|
||||
where: {
|
||||
roles: { has: 'MENTOR' },
|
||||
status: 'ACTIVE',
|
||||
status: { not: 'SUSPENDED' },
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
Reference in New Issue
Block a user