Initial report

This commit is contained in:
ivan-pelly
2026-03-29 18:49:13 -07:00
parent 637c59d95d
commit bd360b42ff
24 changed files with 803 additions and 1 deletions
@@ -72,6 +72,7 @@ export class DummyStudentService {
studentId: '1',
identifier: 'J.B',
nextIepDate: new Date('2027-02-27'),
firstEntryDate: new Date('2026-01-05'),
lastEntryDate: new Date('2026-02-21'),
goalCount: 3,
progressEventCount: 5,
@@ -81,6 +82,7 @@ export class DummyStudentService {
studentId: '2',
identifier: 'M.K',
nextIepDate: new Date('2027-02-27'),
firstEntryDate: new Date('2026-01-10'),
lastEntryDate: new Date('2026-02-25'),
goalCount: 4,
progressEventCount: 8,
@@ -90,6 +92,7 @@ export class DummyStudentService {
studentId: '3',
identifier: 'A.R',
nextIepDate: new Date('2027-02-27'),
firstEntryDate: null,
lastEntryDate: null,
goalCount: 2,
progressEventCount: 0,
@@ -11,6 +11,7 @@ import { StudentCardDto } from '../classes/student-card.dto';
import { StudentGoalSummary, StudentGoalItem } from '../classes/student-goal';
import { ProgressEventDto } from '../classes/progress-event.dto';
import { StudentBenchmarkSummary } from '../classes/benchmark.dto';
import { StudentProgressReportDto } from '../classes/student-progress-report.dto';
@Injectable({
providedIn: 'root',
@@ -179,6 +180,29 @@ export class StudentService {
}
}
// *****************************************************************
// Returns a full progress report for a student within a date
// range, including goals, events, and benchmark associations.
// *****************************************************************
async getStudentProgressReport(studentId: string, fromDate: string, toDate: string, goalIds?: string): Promise<ApiResult<string>> {
try {
const params: any = { fromDate, toDate };
if (goalIds) params.goalIds = goalIds;
const result = await firstValueFrom(
this.http.get<ResponseResult<string>>(
`${this.base}/api/Student/${studentId}/progress-report`,
{ params }
)
);
return result.success && result.data
? ApiResult.ok(result.data)
: ApiResult.fail(result.message);
} catch (error) {
return ApiResult.fail(describeHttpError(error as HttpErrorResponse));
}
}
// ************************ Event Handlers *************************
// ********************** Support Procedures ***********************