Updates to see others' students

This commit is contained in:
ivan-pelly
2026-04-08 07:56:04 -07:00
parent 0a8d2ebb59
commit 59de3bb2e5
15 changed files with 278 additions and 53 deletions
@@ -53,11 +53,15 @@ export class StudentService {
// *****************************************************************
// Returns student card summaries for the authenticated user.
// When scope is 'all', returns all students in the program.
// *****************************************************************
async getMyStudents(): Promise<ApiResult<StudentCardDto[]>> {
async getMyStudents(scope?: 'all'): Promise<ApiResult<StudentCardDto[]>> {
try {
const params: any = {};
if (scope) params.scope = scope;
const result = await firstValueFrom(
this.http.get<ResponseResult<StudentCardDto[]>>(`${this.base}/api/Student/my`)
this.http.get<ResponseResult<StudentCardDto[]>>(`${this.base}/api/Student/my`, { params })
);
return result.success && result.data
? ApiResult.ok(result.data)