feat: Students list excludes staff by default
This commit is contained in:
@@ -26,7 +26,8 @@ export class StudentsService {
|
||||
if (query?.status) {
|
||||
where.status = query.status;
|
||||
} else if (!query?.includeArchived) {
|
||||
where.status = Not('archived');
|
||||
// Default: hide archived and staff, unless explicitly queried
|
||||
where.status = Not(In(['archived', 'staff']));
|
||||
}
|
||||
const filteredWhere = await this.scope.filter(where);
|
||||
return this.repo.find({ where: filteredWhere, order: { createdAt: 'DESC' }, relations: ['tenant'] });
|
||||
|
||||
Reference in New Issue
Block a user