mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 09:57:37 +00:00
Initial report
This commit is contained in:
@@ -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 ***********************
|
||||
|
||||
Reference in New Issue
Block a user